Can't use node, childConcept, link , parentNode argument in 'can be XXX' constraint

In my current project I can't use the can be child/parent/ancestor functions because their completion menus are empty.
If I select node, for example, type . and press Ctrl+Space there are no entries in the completion menu.
In the inspector I see this text:
[operation] AbstractOperation <no name>[8067538482959818733] in project.constraints
The text is underlined red and there is the following error message:
Error: Abstract concept instance detected. Use one of sub-concepts instead. Concept: AbstractOperation; owner is jetbrains.mps.typesystem.checking.TypesEditorChecker@1cecfdb6

I've tried this for different concepts always with the same result. Also rebuilding or reopen MPS does not change the behvior. In another project I can use the arguments as expected. There are no errors or warnings in my language, so I've no clue what's the reason for this misbehavior.

It would be great if anybody has a hint for me!
5 comments
I've just seen, that the error message also appears in another project where the context menu contains the correct entries.
0
Ok, this seems to be a bug.
I've just copied a statement from the project, where completion menu works, to the other one. I took
node.isInstanceOf(BaseConcept);
After inserting the statement into the can be parent closure without importing anything there was no error message in this line and afterwards I could the context menu works in any other constraint, too.
Unfortunately I don't know how to specify this bug, I can't give any further helpful information.
0
Hi!

Can you please check that all necessary languages are imported into constraints model you are working with. To be able to property work with constraints model you have to specify following languages as "Used Languages":
  • jetbrains.mps.baseLanguage
  • jetbrains.mps.lang.constraints
  • jetbrains.mps.lang.smodel

Looks like the bug is: MPS have to import corresponding languages into a newly create constraints model by default.
0
Hey,

The languages are imported properly. The error is gone, without importing anything.
At the moment I can't enter a ReportErrorStatement in any checking rule. Every time I type 'error' an LogStatement is created. But I can copy the statement from another rule. When I have pasted it there are no errors but I still can't create a new one with typing. That's annoying...
0
Hey Guys,

I really need help, because I can't work anymore in my project. The editor prevents me from entering several things. I can't create any for-loop inside a script or I can't insert a CheckNodesForErrors statement in a test method, for example. If I copy the statements from somewhere else, everything builds fine. But now I can't still enter the statement by hand (this is different compared with the situation at the beginning of this thread).
I've just called Optimize Imports and Add missing Imports for my project. Lots of imports and dependencies have been deleted, but the project still builds fine. The editor misbehaves like before...

Please can anybody give me a hint, how or where I can solve this problem?
0

Please sign in to leave a comment.