I have a strange scenario now. One of my colleague who was working in v.1 (verison 1)_ and created a project.. He opened up the project in v.2.. Meanwhile v.2 had some concept changes underwent for a ...
This is an auto-generated question from the MPS Slack community: I have a strange scenario now. One of my colleague who was working in v.1 (verison 1)_ and created a project.. He opened up the project in v.2..
Meanwhile v.2 had some concept changes underwent for a particular concept C... i.e C had a new child in v.2... Now the user opened the same model in v1 again.. And he gets a error 'Child does not belong to the concept' -- which is quite understandable...
How to programatically fix it??
If I write a quickfix like 'if concept.child is not null -- will this be readable in v1? because the definition of the child itself is not present there isnt it?
Please help. What other impact wil it cause?
16 comments
Sort by
Date
Votes
It might be fixable through an intention.
If you want to fix it programmatically, you can write the code to do so in the newer version and then copy-paste the _generated_ Java code into the older version (it will use classes such as SLinkAdapterById and whatnot, with the right IDs baked in for you).
There's not much impact besides error messages, I'd say. MPS nodes are basically like hashmaps on the lowest level.
I have written some quickfixes for the concept change in the newer version.
But how to copy paste the generated java code?
Right click → _Preview Generated Text_ → copy text
in the old version: Right click → _Paste as Java Class Content_ or _Paste as Java Statements_
This paste option?
Right click and preview generatd text generated me a xml? is that right?
no, it should have generated Java code
right click is on the project model right? I mean the document which shows the error?
what do your quick fixes that you've written look like?
btw if you want, come to office hours right now and we can take a look together
Hi I just noticed ur msg.. Is the office hour over already?
yes, unfortunately
next session next Wednesday at 14 CEST
Oh.. My bad! But again I wrote some quickfixes to temporarily detach that problem causing child. Might solve this issue for the user. I will have to wait and see
ok
This is auto-generated question from the MPS Community Slack Workspace. If you want to comment on the question, do it from the Slack workspace
Post is closed for comments.