Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java')
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java21
1 files changed, 15 insertions, 6 deletions
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java
index 42c43a735..904de7ba2 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/editor/StructureEditor.java
@@ -16,11 +16,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.etrice.core.room.StructureClass;
import org.eclipse.etrice.ui.common.editor.RoomDiagramEditor;
import org.eclipse.etrice.ui.structure.Activator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.services.Graphiti;
import org.eclipse.graphiti.ui.editor.DiagramEditorInput;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
public class StructureEditor extends RoomDiagramEditor {
@@ -49,13 +49,22 @@ public class StructureEditor extends RoomDiagramEditor {
}
/* (non-Javadoc)
- * @see org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal#setInput(org.eclipse.ui.IEditorInput)
+ * @see org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal#createPartControl(org.eclipse.swt.widgets.Composite)
*/
@SuppressWarnings("restriction")
@Override
- protected void setInput(IEditorInput input) {
- super.setInput(input);
+ public void createPartControl(Composite parent) {
+ // TODO Auto-generated method stub
+ super.createPartControl(parent);
- doSave(null);
+ /* we have to save here whether changes have been done or not to get rid of the dirty state
+ * CAUTION: save in
+ * init(IEditorSite site, IEditorInput input)
+ * or
+ * setInput(IEditorInput input)
+ * did not work correctly
+ */
+// if (AutoUpdateFeature.isLastDoneChanges())
+ doSave(null);
}
}

Back to the top