Hi!
In C#, a method may be defined in several files. In fact, each statement knows in which file it is defined. Currently, there is one unique file anchor per method. Is this something that FAMIX can represent? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi,
Currently, the is one SourceAnchor per entity. FileAnchor is just one implementation. In your case, you should build your own SourceAnchor that deals with multiple files. Cheers, Doru On 21 Sep 2011, at 21:16, Alexandre Bergel wrote: > Hi! > > In C#, a method may be defined in several files. In fact, each statement knows in which file it is defined. Currently, there is one unique file anchor per method. > > Is this something that FAMIX can represent? > > Cheers, > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "When people care, great things can happen." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Yep, this is what I thought too.
Thanks, Alexandre On 21 Sep 2011, at 16:34, Tudor Girba wrote: > Hi, > > Currently, the is one SourceAnchor per entity. FileAnchor is just one implementation. In your case, you should build your own SourceAnchor that deals with multiple files. > > Cheers, > Doru > > > On 21 Sep 2011, at 21:16, Alexandre Bergel wrote: > >> Hi! >> >> In C#, a method may be defined in several files. In fact, each statement knows in which file it is defined. Currently, there is one unique file anchor per method. >> >> Is this something that FAMIX can represent? >> >> Cheers, >> Alexandre >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "When people care, great things can happen." > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
Can you show an example because I'm confused.
Stef On Sep 21, 2011, at 9:16 PM, Alexandre Bergel wrote: > Hi! > > In C#, a method may be defined in several files. In fact, each statement knows in which file it is defined. Currently, there is one unique file anchor per method. > > Is this something that FAMIX can represent? > > Cheers, > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
I do not have a concrete example, but you may have a contract (pre and post conditions) defined in one file, and a method in another file.
The pre and post conditions are then in different files than the method itself. A guy from microsoft is visiting us. Alexandre On 21 Sep 2011, at 17:36, Stéphane Ducasse wrote: > Can you show an example because I'm confused. > > Stef > > On Sep 21, 2011, at 9:16 PM, Alexandre Bergel wrote: > >> Hi! >> >> In C#, a method may be defined in several files. In fact, each statement knows in which file it is defined. Currently, there is one unique file anchor per method. >> >> Is this something that FAMIX can represent? >> >> Cheers, >> Alexandre >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In short, partial classes allow you to split the definition of a class across multiple files, or alternatively you could think about it as a code compilation unit separated over multiple files. The reason for the existence of this feature is - primarily - to provide a nice split between generated code and user code, as in the Windows Forms Designer that generates its code in a separate file, while developers have almost (you should delete the initialization call in the ctor) full control over the form's other code file.
A silly example:
public partial class Employee { public void DoWork() { } } public partial class Employee { public void GoToLunch() { } } taken from here:
and here:
http://msdn.microsoft.com/en-us/library/wa80x488.aspx On Wed, Sep 21, 2011 at 10:42 PM, Alexandre Bergel <[hidden email]> wrote: I do not have a concrete example, but you may have a contract (pre and post conditions) defined in one file, and a method in another file. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
you can ignore the last post :-) ...
On Wed, Sep 21, 2011 at 10:50 PM, Usman Bhatti <[hidden email]> wrote: In short, partial classes allow you to split the definition of a class across multiple files, or alternatively you could think about it as a code compilation unit separated over multiple files. The reason for the existence of this feature is - primarily - to provide a nice split between generated code and user code, as in the Windows Forms Designer that generates its code in a separate file, while developers have almost (you should delete the initialization call in the ctor) full control over the form's other code file. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Usman Bhatti
But to me this seems different from what alex is saying.
May be microsoft is inventing puzzle oriented programming. Stef On Sep 21, 2011, at 10:50 PM, Usman Bhatti wrote: > In short, partial classes allow you to split the definition of a class across multiple files, or alternatively you could think about it as a code compilation unit separated over multiple files. The reason for the existence of this feature is - primarily - to provide a nice split between generated code and user code, as in the Windows Forms Designer that generates its code in a separate file, while developers have almost (you should delete the initialization call in the ctor) full control over the form's other code file. > > A silly example: > public partial class > Employee > { > > public void > DoWork() > { > } > } > > > public partial class > Employee > { > > public void > GoToLunch() > { > } > } > > > taken from here: > http://bartdesmet.net/blogs/bart/archive/2007/07/28/c-3-0-partial-methods-what-why-and-how.aspx > and > here: > http://msdn.microsoft.com/en-us/library/wa80x488.aspx > > On Wed, Sep 21, 2011 at 10:42 PM, Alexandre Bergel <[hidden email]> wrote: > I do not have a concrete example, but you may have a contract (pre and post conditions) defined in one file, and a method in another file. > The pre and post conditions are then in different files than the method itself. A guy from microsoft is visiting us. > > Alexandre > > > On 21 Sep 2011, at 17:36, Stéphane Ducasse wrote: > > > Can you show an example because I'm confused. > > > > Stef > > > > On Sep 21, 2011, at 9:16 PM, Alexandre Bergel wrote: > > > >> Hi! > >> > >> In C#, a method may be defined in several files. In fact, each statement knows in which file it is defined. Currently, there is one unique file anchor per method. > >> > >> Is this something that FAMIX can represent? > >> > >> Cheers, > >> Alexandre > >> -- > >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > >> Alexandre Bergel http://www.bergel.eu > >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > >> > >> > >> > >> > >> > >> _______________________________________________ > >> Moose-dev mailing list > >> [hidden email] > >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > > > > _______________________________________________ > > Moose-dev mailing list > > [hidden email] > > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |