MPS 3.0 replacement for a concept property Follow
During the migration to MPS 3 all concept properties have been replaced by static behavior methods. This is fine in many cases but not in all. If you want to save a state at runtime inside the property you can't do this just with a method.
In my case I have used the property to save the decision if a property is displayed with a keyword or with an icon. With an action or intention the user could switch between the representations and this has effected all nodes with this property. I don't know how to implement this behavior again in MPS 3.0? Has anybody an idea?
In my case I have used the property to save the decision if a property is displayed with a keyword or with an icon. With an action or intention the user could switch between the representations and this has effected all nodes with this property. I don't know how to implement this behavior again in MPS 3.0? Has anybody an idea?
Please sign in to leave a comment.
But for now I have had a closer look to the editor hints. They are a bit more complicated to use, because they can't be accessed from a editor component, but are probably the right tool for my problem.
Anyway, we are now trying to make MPS simpler to understand and we've found that concept properties were a big misunderstanding at least in MPS codebase, used for 3 purposes actually.
1) alias, description, canBeRoot and so on are not a "concept property", but just a property of the ConceptDeclaration instances, so that's how we changed it
2) sometimes they are used to created "virtual" properties, e.g. ConceptFunction has a result concept property which is set in every instance. This seems to be closer to simple concept behavior methods, so now this kind is expressed with concept behavior
3) they are also used to add a new feature to a concept w/o changing ConceptDeclaration - this can be expressed with just an annotation to that concept
So, to have less ways to do the same thing and to have concept declaration simplified, we decided to remove concept properties.
Regards,
Mihail