Community
Participate
Working Groups
Build Identifier: The editor is incorrectly marked as dirty after save. A recipie for copying object between diagrams would be appreciated as well: The following does this, but with the incorrect dirty mark. public void paste(IPasteContext context) { // we already verified, that we paste directly in the diagram PictogramElement[] pes = context.getPictogramElements(); Diagram diagram = (Diagram) pes[0]; // get the EClasses from the clipboard without copying them // (only copy the pictogram element, not the business object) // then create new pictogram elements using the add feature Object[] objects = getFromClipboard(); for (Object object : objects) { if (object instanceof EObject) { EObject eObject = (EObject) object; eObject = EcoreUtil.copy(eObject); AddContext ac = new AddContext(); ac.setLocation(0, 0); // for simplicity paste at (0, 0) ac.setTargetContainer(diagram); addGraphicalRepresentation(ac, eObject); } } } Reproducible: Always Steps to Reproduce: 0. Modify the tutorial paste feature like this, so no changes are made: public void paste(IPasteContext context) { // we already verified, that we paste directly in the diagram PictogramElement[] pes = context.getPictogramElements(); Diagram diagram = (Diagram) pes[0]; // get the EClasses from the clipboard without copying them // (only copy the pictogram element, not the business object) // then create new pictogram elements using the add feature return; } 1. Create two diagrams, newDiagram1 and newDiagram2, using the tutorial wizard. 2. Create a new class in newDiagram1. 3. Copy it. 4. Paste it in newDiagram2. This should do nothing. 5. Save newDiagram2. 6. Go to newDiagram1. Bug: 7. newDiagram1 is now marked as dirty.
Forgot one detail for reproducing: 2. Create a new class in newDiagram1. Save newDiagram1.
More details about installation: Graphiti SDK Plus (Incubation) 0.8.1.v20110912-1027 org.eclipse.graphiti.sdk.plus.feature.feature.group Eclipse Modeling Project Eclipse Platform Version: 3.7.1 Build id: M20110909-1335 Unable to select 0.8.1 as version in the above form.
This was caused by a bug in the DefaultDiagramUpdateFeature and has been fixed for Juno M2 along with https://bugs.eclipse.org/bugs/show_bug.cgi?id=356218 *** This bug has been marked as a duplicate of bug 356218 ***