Different behaviour of InstanceMethodCallOperation and ExtensionMethodCall in Editors CodeCompletion

Hi,

i created a type-extension and was wondering, why the two concepts InstanceMethodCallOperation and ExtensionMethodCall seem to behave differently within the editors CC-Menu, when switching between them. When i have an instance of InstanceMethodCallOperation in a cell and want to switch over to ExtensionMethodCall i have to delete the InstanceMethodCallOperation-cell completely before being able to select the extension-method:

one.PNG

If i want to switch from an instance of ExtensionMethodCall to InstanceMethodCallOperation can do that instantly (as i actually want) without deleting the ExtensionMethodCall-cell before (just typing Ctrl-Space behind "to"):

two.PNG

I compared the two concepts and found out, that they are defined exactly indentically in their concept-hierachy:

three.PNG

The only "obvious" difference is that InstanceMethodCallOperationdefines defines the following concept properties:

four.PNG

wheras the concept properties of ExtensionMethodCall are empty...

Is that the reason for the different handling in editor? Or why is that else?

BTW: there are differences in the concepts editors though, but i can't get the point :-)

Thanks,

Mirko



Attachment(s):
one.PNG
two.PNG
three.PNG
four.PNG
6 comments
Comment actions Permalink

Hi, Mirko!

As far as i can see there is another difference between InstanceMethodCallOperation and ExtensionMethodCall concept declarations:

InstanceMethodCallOperation_VS_ExtensionMethodCall.png

so this looks like a reason why we have two different concepts for these tho method calls.

Anyway, answering your question: it looks like some special tricks were applied to make it possible to transform ExtensionMethodCall to InstanceMethodCallOperation using code completion menu and in the same time corresponding functionality was not implemented for backward transformation. Please file a request, so we'll correct this inconsistency.

Thank you for investigating this problem!



Attachment(s):
InstanceMethodCallOperation_VS_ExtensionMethodCall.png
0
Comment actions Permalink

Hi Alex,

As far as i can see there is another difference between InstanceMethodCallOperation and ExtensionMethodCall concept declarations:

InstanceMethodCallOperation_VS_ExtensionMethodCall.png

so this looks like a reason why we have two different concepts for these tho method calls.

yes, to have two different concepts is absolutely correct and i didn't doubt on that :-). I didn't mentioned this difference above as it is conceptual the same ("1 specializes baseMethodDeclaration").

Thanks anyway for answering and i file a bug to have the nicer behaviour in both directions,

Mirko

0
Comment actions Permalink

While adding that (maybe) bug/feature/trick i realized that MPS 1.5RC? is not selectable for affected version in the tracker.

mirko

0
Comment actions Permalink

Hi, Mirko!

While adding that (maybe) bug/feature/trick i realized that MPS 1.5RC? is not selectable for affected version in the tracker.

You are  right, but as we are close to release of MPS 1.5 I'd better wait for a couple of days and then mark MPS 1.5 as released, so you'll be able to select this version as "affected" one instead of 1.5 RC 5.

BTW, RC_5 is going to become final release build. ;-)

0
Comment actions Permalink

Hi alex,


BTW, RC_5 is going to become final release build. ;-)

It is there! :-)

Mirko

0
Comment actions Permalink

Yess. ;-)

Here is official posting in MPS blog from where you can navigate to Download/What's new pages: http://blogs.jetbrains.com/mps/2010/08/mps-15-is-ready-for-downloads/

0

Please sign in to leave a comment.