Behavior works differently when packed into Idea plugin
In my language I have a behavior that provides names for generated classes.
That works fine when used in MPS. When packed into Idea plugin "this.name" returns null.
What's wrong with this code? Or behavior are not supported in Idea?
public string getBeanName() { this.name + "TLBean"; }
That works fine when used in MPS. When packed into Idea plugin "this.name" returns null.
What's wrong with this code? Or behavior are not supported in Idea?
Please sign in to leave a comment.
Dereferencing a node from another model leads to strange results - node.name returns null.
If so, the reason is probably that we use out-of-process, ANT-based backend, which ignores your plugin.xml and loads languages from the 'languages' folder of your plug-in (by convention). The behavior won't work if its language is not found.
it happens in generator only. I changed editor for reference concept so it defines "get" accessor as a call to behavior in question. Editor works fine in both MPS and Idea.
Concept has only one child - reference, and generates to a class with string field, which value is defined as property macro:
Cross-model references works fine in MPS. In Idea - empty string.
After adding some debug statements, I found that following code gets executed, meaning that imported models are no present at generation time.