Editor: ability to enter "mixed" (text and entity) content
Is it possible to add support to MPS editors module to use cells that support input of plain text (as string) and concept instance (maybe using IDEA-live-templates-like shortcut mechanism)?
It would be very handy for developing many language models, for example, wiki language.
It would be very handy for developing many language models, for example, wiki language.
Please sign in to leave a comment.
At first it worked when I used Ctrl+Space. But then when I tried it without using suggest box MPS started to generate nodes each time I write in a new letter (you can see it in Mumbo-Jumbo sandbox model). Is there any way to run an action's "create child node" only after suggest box item selection?
Tried also wrapper but it didn't worked at all (displaying red ?field? saying "Unresolved reference. Error: incompitable target concept in role 'field'") - samples in tutorial2.zip (672KB)
Also, will JavaDocs be available for nodes/autocomplete box items? :)
I've modified inlineInputFieldGeneration substitute action in order to check if currentTargetNode is exact instance of Expression (abstract super-concept of InputFieldReference) and create new InputFieldReference only in this case:
add custom items (output concept: InputFieldReference) simple item can substitute <default> matching text (operationContext, scope, model, parentNode, childConcept, currentTargetNode, pattern)->string { if (currentTargetNode.concept.isExactly(Expression)) { return pattern; } return null; } description text (operationContext, scope, model, parentNode, childConcept, currentTargetNode, pattern)->string { "add field " + pattern; } icon <default> type <default> create child node (operationContext, scope, model, parentNode, childConcept, currentTargetNode, pattern)->node<InputFieldReference> { node<InputField> newField = new node<InputField>(); newField.name = pattern; parentNode.ancestor<concept = Calculator>.inputField.add(newField); node<InputFieldReference> newReference = new node<InputFieldReference>(); newReference.field = newField; newReference; }Seems like with such kind of condition you can do what you want.
Well, definitely in future..