Re: Real example. Tutorial request.

Hello Konstantin,

You may start from creating new Concept SelectStatement that extends  

Block concept from BaseLanguage. I think it should contain StatementList  

node as child and some nodes to represent parameter. You language is  

baseLanguage extension. For more examples you can look at  

CollectionLanguage project under MPS_HOME/languages/collectionLanguage.

Thank you for replay. I'm already create SelectStatement with editor. But  

the troubles with i'm now here:

   

  • Troubles with understanding editors actions. Can you please describe  

What, Why and How-To with editor Actions?

   

  • Troubles with understanding with Aspects realization. MPS simple go  

into IDEA, but i'm as stupid look on method stub and can't catch that i  

must write in method body.

Follow up the sample. I create SelectStatement that have %variables% as  

StatementList reference. Is it right? How i can link it to Editor?

Sory for a lot of questions :-)

Thanks!

1 comment
Comment actions Permalink

Alexey Efimov wrote:

Hello Konstantin,

>> You may start from creating new Concept SelectStatement that extends  

>> Block concept from BaseLanguage. I think it should contain

>> StatementList  node as child and some nodes to represent parameter.

>> You language is  baseLanguage extension. For more examples you can

>> look at  CollectionLanguage project under

>> MPS_HOME/languages/collectionLanguage.

Thank you for replay. I'm already create SelectStatement with editor.

But  the troubles with i'm now here:

  

  • Troubles with understanding editors actions. Can you please

describe  What, Why and How-To with editor Actions?

For actions we have two concept in editor language :

First KeyMaps. KeyMap is set of shortcut to action mappings. You can

look for an example of KeyMap at jetbrains.mps.baseLanguage.editor model

(you can find it in baseLanguage's node of baseLanguage).

Another kind of actions is actions set. In MPS you can perform different

actions on node. Some of this you can redefine with actions set :

delete node

delete property

delete reference

right transform

substitute node

surround node with

Most intersting from them is substiute. It makes possible to redefine

popup menu. For example of such actionSet you can look at

jetbrains.mps.baseLanguage's _ExpressionActionSet node.

  

  • * Troubles with understanding with Aspects realization. MPS simple go  

into IDEA, but i'm as stupid look on method stub and can't catch that i  

must write in method body.

What aspect method you want to redifine? Aspect methods in MPS contains

of two parts : prefix_part2. The best way to realize what this method

does is to find in samples methods with same prefix.

Follow up the sample. I create SelectStatement that have %variables% as  

StatementList reference. Is it right? How i can link it to Editor?

You have to create Editor conept node in editor's model like in

HelloWorld sample and then select you concept as editor's concept.

0

Please sign in to leave a comment.