Replies: 22 comments
-
Yes the |
Beta Was this translation helpful? Give feedback.
-
(Without having a detailed look at the code) I think |
Beta Was this translation helpful? Give feedback.
-
A solution for this could look somewhat like this: |
Beta Was this translation helpful? Give feedback.
-
If |
Beta Was this translation helpful? Give feedback.
-
but if the semantic element is absent we have to check if this is an inheritance edge. |
Beta Was this translation helpful? Give feedback.
-
For this I would use modelState.getIndex() to retrieve the corresponding GmodelElement for the given 'elementId'. And check if the GModelElement has the inheritance type. |
Beta Was this translation helpful? Give feedback.
-
If so the source and target id of the edge have to be mapped to the semantic elements and then the inheritance can be removed there |
Beta Was this translation helpful? Give feedback.
-
[simongraband] I still have 2 questions about this. Currently i am not quite sure how i can get the GModelElement from the |
Beta Was this translation helpful? Give feedback.
-
The elementId is the id of the edge itself. You could use |
Beta Was this translation helpful? Give feedback.
-
[simongraband] I tried the approach you described above:
However it is not working, Theia notices that something is changing, but neither the Editor nor the Ecore file remove the inheritance/the ESuperTypes. Did i forget something here? If i just delete the ESuperType Attribute in the Ecore file it works, which should be what EDIT: I just realized that |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Shouldn't this be |
Beta Was this translation helpful? Give feedback.
-
And for checking the element type id I'd suggest to move the if statement inside of the first if present clause |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
[simongraband] Sure... i changed it however it still doesn´t work. I debugged it and it seems like it isn´t able to find the |
Beta Was this translation helpful? Give feedback.
-
[simongraband] It seems like the elementId is the ID of the sourceClass. I tested this, and the same id is send when i delete the SourceClass and the Node. Is this intended? |
Beta Was this translation helpful? Give feedback.
-
That's definitly not intended. According to https://github.com/eclipsesource/ecore-glsp/blob/master/server/org.eclipse.emfcloud.ecore.glsp/src/main/java/org/eclipse/emfcloud/ecore/glsp/gmodel/GModelFactory.java#L199 the elementId should be |
Beta Was this translation helpful? Give feedback.
-
[simongraband] I think that inheritance edges are never added to the GModelFactory in the first place. See here: https://github.com/eclipsesource/ecore-glsp/blob/de808d766176a9567d39cc3d25c8b818831bebd5/server/org.eclipse.emfcloud.ecore.glsp/src/main/java/org/eclipse/emfcloud/ecore/glsp/operationhandler/CreateEcoreEdgeOperationHandler.java#L63 |
Beta Was this translation helpful? Give feedback.
-
[simongraband] As far as i understand it, currently inheritance edges are rendered when the |
Beta Was this translation helpful? Give feedback.
-
The position is stored in the notation element and not the semantic element. And there should definitively be a corresponding notation element for each inheritance edge. The edge should be in the index as well so looks like there is a bug in the creation process of inheritance edges. |
Beta Was this translation helpful? Give feedback.
-
Could you push you current state so that I can have a look at the code? |
Beta Was this translation helpful? Give feedback.
-
[simongraband] Here is my current state: https://github.com/simongraband/ecore-glsp/tree/inheritanceFix-103 |
Beta Was this translation helpful? Give feedback.
-
I am currently working on this Issue. From my understanding the handling of deleting inheritance Edges needs to be different from references, since inhertitance in ecore is represented by the
eSuperTypes
tag in anEClassifier
. My question would be wheter or not theDeleteOperationHandler
is applicable here? Does the deletion of an inhertance trigger this handler or another one? Currently there seems to be no way to get the source classifier from theelementId
in theDeleteOperationHanlder
.original thread by simongraband
Beta Was this translation helpful? Give feedback.
All reactions