Extend default transformation action
Hi,
We're currently migrating our project to 3.4.4, and I'm trying to understand the new features. I'd like to extend the action "InstanceMethodDeclaration_TransformationMenu", which transforms an InstanceMethodDeclaration into a StaticMethodDeclaration. I added the following contribution:

The contribution adds a second menu item "static". Is it also possible to run a contribution together with the default transformation (i.e., typing "static", which then executes the default action and the extension)?
Thanks,
Ben
Please sign in to leave a comment.
Or is it possible to override the default behavior somehow?
Hi Ben,
Contribution may only add new actions to the completion/side-transform menu.
For overriding the default behaviour you may define the new editor for the InstanceMethodDeclaration and attach the transformation menu to the specific cells.
Hi Semen,
thanks! I already tried what you've proposed. For test purposes, I even added my new transformation menu to all cells of the InstanceMethodDeclaration editor. However, in 50% of the cases code completion still shows the default menu (defined in BaseLanguage). In fact, my named transformation menu looks as follows:
I added the transformation menu to all cells of an InstanceMethodDeclaration editor. For instance:
Notice that it is not clear to me why the error (TestMenu is out of search scope) appears!
Then in the code I get the correct result here:
But the default menu still appears here:
Thanks!
Ben,
Setting the transformation menu for the child cells is not working well in some cases. We are working on it.
As a workaround I can suggest you attaching the transformation menu for the editor of visibility (with your custom hints).
Semen,
Good idea! Thanks a lot!