Replies: 19 comments
-
Edges have a read-write list of bendpoints (GPoint[*]). So you can do something like this:
|
Beta Was this translation helpful? Give feedback.
-
And actually, since the RerouteConnection action already contains the new list of points, it's probably sufficient to do a ...clear() ...and addAll(action.getRoutingPoints()) |
Beta Was this translation helpful? Give feedback.
-
This problem has already bin addressed in a WIP PR that didn't got merged (yet): https://github.com/eclipsesource/graphical-lsp/pull/376/files. So you could have a look at the code there and use an adaptation of that.The |
Beta Was this translation helpful? Give feedback.
-
I think the |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Ok thanks for the help. The saving of the points is now working. However i still have two issues, that need some work. Now my question that should help me solve both of the issues is, where are those two Actions( Edit: the first one seems to work now. |
Beta Was this translation helpful? Give feedback.
-
Yes you are right, the |
Beta Was this translation helpful? Give feedback.
-
Unfortunatley ecore-glsp is still based on the old GLSP infrastructure (https://github.com/eclipsesource/graphical-lsp) which is no longer updated. You have two options here: |
Beta Was this translation helpful? Give feedback.
-
a) You could wait until ecore-glsp gets migrated to the new eclipse-glsp infrastructure or |
Beta Was this translation helpful? Give feedback.
-
b) You bind a customized |
Beta Was this translation helpful? Give feedback.
-
[simongraband] @tortmayr Since i now have the new eclipse-glsp infrastructure: How am i able to get the ElementID of a |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
for reference see also: https://github.com/eclipse-glsp/glsp-server/blob/master/plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/operationhandler/ChangeRoutingPointsHandler.java |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Is the
I changed nothing after this method, since there were no changes to how the data is stored in the notation model right? With the old operation i had it working, but with the new one i cannot get the data to be written in the .enotation file. Do you know of any changes that might affect this or is the Operation somehow triggered differently? |
Beta Was this translation helpful? Give feedback.
-
The operation should be triggered in the same way as before. The only difference is that it's also triggered when moving a node (to update all attached edges). Your code looks code as well, so in theory this should work just fine. If you provide me with a link to your branch I can have a quick look at your changes. |
Beta Was this translation helpful? Give feedback.
-
[simongraband] https://github.com/jonny3576/ecore-glsp/tree/flexibleEdgeRouting%2360 |
Beta Was this translation helpful? Give feedback.
-
Looks like you did forget to bind |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Ah thanks. There must have been a problem while merging the new versions. I now got the code running and everything is working as intended. However when moving a node with a edge connected i get the following error:
But the code is still working. I am not quite sure how the |
Beta Was this translation helpful? Give feedback.
-
I did a little testing and it looks like this is a problem with the id generation in the |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Thanks that fix seems to work. |
Beta Was this translation helpful? Give feedback.
-
I currently work on making the edge routing consistent. Right now edges can be moved around but when you change the position of another object they move back to the position the autolayouter assigned to them. I looked into how this is handled for nodes, where this is not happening. There (ShapeImpl) i found this code for setting the position of Shapes.
This is called when a
changeBounds
Action is called.The Action for moving references is
rerouteConnection
i believe, so i recreated thechangeBounds
process for it. But i do not seem to find anything on how to tailor the above code, for edges, since edges contain of multiple GPoints, which Shapes do not.My question would be if this has been done before or if anyone could give me some insight on how this should be handled for edges.
Thanks in advance.
original thread by simongraband
Beta Was this translation helpful? Give feedback.
All reactions