Plugin

Should I use this aspect?

No. You should use plugin solutions instead.

References to keys in action context parameters are out of search scope.

You need to add a dependency to MPSCommonDataKeys. This class extends PlatformDataKeys and this class extends CommonDataKeys.

My action is not visible.

You have to add it to an ActionGroup that can be attached at differenct places such as the context menu or the build menu. All of the action context parameters that are marked as required have to be available and the isApplicable block must return true for an action to be visible. For debugging purposes you can set "always visible" to true to check if your action is registered at all. You also need to have a standalone descriptor in your model for it to work. Additionaly, the solution kind should be set to Other in the Java tab of the solution properties (official documentation).

I want to merge models.

Use the language de.itemis.mps.modelmerger (experimental) from mps-extensions.

I want to check the structure of a node.

Use the language de.slisson.mps.structurecheck from mps-extensions.

I want to store different states/versions of a node inside the model.

Use the language de.itemis.mps.nodeversioning from mps-extensions.

I want to create new SContainmentLink for non-existent role1.

It can be created through MetaAdapterFactory.

How to I check if a model is a generator model, a test model etc.?

Call the corresponding method in SModelStereotype.

How do I add imports to a model?

Use the class ModelImportHelper and call addImport.


Last update: November 16, 2021

Comments

Back to top