Custom DotOperation

Hi,

i tried to create my own DotOperation for my own kind of "Expression". I digged around a little bit within the DotExpression of baseLanguage and found out that there is an action called "dotExpression" (within baseLanguage.actions.sideTransforms.expression) that seems to do the job of replacing Expression by DotExpression. But i can't get the clue how that action ("do something when a DOT is typed in Editor") is connected to the Editor and to the keystroke ".". It would be great if someone could give me a hint on that ;-).

Thx,

Mirko

3 comments
Comment actions Permalink

Hi,

no one any idea? Or is the solution too obvious and i can't get it? :-\

Thx,

Mirko

0
Comment actions Permalink

Hi Mirko,

Actions in a language’s actions model are not connected to editor explicitly.


Instead you declare action’s applicable concept (Expression in this case) and optional condition.
At runtime editor will check those criteria and build list of actions available in given context (i.e. selected node, caret position and keystroke pressed).

The keystroke an action is matched with is defined in ‘matching text’ section (‘.’ in this case).

You can also declare actions bound to particular editor cells – see ‘actions’ section in cell’s inspector.

Regards, Igor
0
Comment actions Permalink

Hi Igor,

works great for me!

Thanks,

Mirko

0

Please sign in to leave a comment.