Missing StructureAspectDescriptor and ConceptPresentationAspect
Hello,
Since this happened now a few times and I don't understand what I did wrong here my question:
After a while working on my project I get an error from Language,java
Compilation problems
sceml\core\Language.java : Syntax error on token "new", ClassType expected after this token (line: 51)
sceml\core\Language.java : Syntax error on token "new", ClassType expected after this token (line: 54)
...
Somehow after Rebuild project/language there are parts missing.
I don't realy understand what I have to change to avoid that, since I don't get any other errors or warings from 'Check Language'
In case I manually complete Language.java it works until I rebuild my project
it is:
@Override
protected <T extends ILanguageAspect> T createAspect(Class<T> aspectClass) {
// AP: legacy part, must be migrated from switch: please use lang.descriptor mapping label
if (aspectClass == EditorAspectDescriptor.class) {
return aspectClass.cast(new EditorAspectDescriptorImpl());
}
if (aspectClass == StructureAspectDescriptor.class) {
return aspectClass.cast(new ());
}
if (aspectClass == ConceptPresentationAspect.class) {
return aspectClass.cast(new ());
}
return null;
}
it should be:
@Override
protected <T extends ILanguageAspect> T createAspect(Class<T> aspectClass) {
// AP: legacy part, must be migrated from switch: please use lang.descriptor mapping label
if (aspectClass == EditorAspectDescriptor.class) {
return aspectClass.cast(new EditorAspectDescriptorImpl());
}
if (aspectClass == StructureAspectDescriptor.class) {
return aspectClass.cast(new sceml.carla.tree.structure.StructureAspectDescriptor());
}
if (aspectClass == ConceptPresentationAspect.class) {
return aspectClass.cast(new ConceptPresentationAspectImpl());
}
return null;
}
Please sign in to leave a comment.
It helped to restart MPS.
In my case, it helped to add
jetbrains.mps.devkit.aspect.structure
to the used languages of the structure aspect. I don't understand how and when it went missing but that solved the problem for me.