Open pcdavid opened 1 year ago
To be honest, I didn't even know about this menu. I couldn't find any documentation or other reference about it. From what I understand, this menu currently allows you to create an "in-memory" representation: when the diagram is closed, and saved, the representation is not persisted, but the semantic elements created in the session are. When the diagram is closed, there is no more trace of it; the layout is not persisted, which explains the observed layout issue.
The EcoreEntitiesReadOnlyEditor
java class corresponds to the DDiagramEditor created. According to its name and the javadoc, it is intended to be "read-only", and is used as an example (maybe to show how to use the APIs?).
/*******************************************************************************
* Copyright (c) 2013 THALES GLOBAL SERVICES and Others
* [...]
*******************************************************************************/
package org.eclipse.emf.ecoretools.design.ui.editor;
/**
* Example specific editor.
*/
public class EcoreEntitiesReadOnlyEditor extends AbstractSpecificDDiagramEditor {
[...]
}
Most of the code concerning specific implementations of DDiagramEditor has remained unchanged for at least 10 years, so I don't think this functionality is likely to evolve on our side.
More details about how I reproduce the issue:
My.ecore
> Open with > Sirius Ecore editor
My.ecore
: there is a folder "Local Session: memory:ecore test/My.aird" Maybe an improvement can me made in Ecore Tools https://github.com/eclipse-ecoretools/ecoretools
_Comment #0 on 2020-11-29T10:02:37.000Z:_ STEPS:
1.Open sample *.ecore file with "Sirius Ecore Editor" 2.Create a simple package and classes. 3.Arrange the layout and reopen the diagram 4.The diagram elements are moving to the top left corner. 5.Layout is resetting on every reopen.
Other details: It's reproducible for any editor which extends the "org.eclipse.sirius.diagram.ui.tools.api.editor.AbstractSpecificDDiagramEditor".
I have used this sample project for "org.eclipse.sirius.sample.ecore.design" ecore editor.
If someone wants to test it, Please change the "org.eclipse.sirius.sample.ecore.design.editor.EcoreEntitiesReadOnlyEditor.isSessionStoredInWorkspace()"return value to "true"
_Comment #1 on 2020-11-29T10:37:11.000Z:_ New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/172976