Intention - create specific concept instance for unmatched input

Silly question, but I couldn't get it work, so I'm asking here:
How can I create intention like one on the image below?

mps-docflow-v0.1-idea - intention.png
2 comments
Thank you Vaclav. I have already worked with intentions before, but couldn't create working one for my case. The case - I have concept A, that references to root concept B throught B.{name} in editor, and I want to create B from invalid string in editor cell for B.{name} . After watching the screencast, I decided to mount my intention to BaseConcept and print node.concept.name in intention description. This lead me to the fact that there is no special node created for unmatched input in my case. I then found sample intention that lead me to the solution - CreateMethodDeclaration. In CreateMethodDeclaration intention unmatched text is extracted from editor cell directly. So here is my solution for those who has same issues:

Intention declaration:

mps-1-intention.png


Helper method CreateStateUtil.getErrorCellText() declaration:

mps-2.png
0

Please sign in to leave a comment.