@@ -0,0 +1,1350 @@
+/**%0A * %0A */%0Apackage de.uni_jena.iaa.linktype.atomic.editors.grapheditor.commands;%0A%0Aimport org.eclipse.emf.common.notify.Notification;%0Aimport org.eclipse.emf.common.notify.impl.NotificationImpl;%0Aimport org.eclipse.gef.commands.Command;%0A%0Aimport de.hu_berlin.german.korpling.saltnpepper.salt.saltCommon.sDocumentStructure.SDocumentGraph;%0Aimport de.hu_berlin.german.korpling.saltnpepper.salt.saltCommon.sDocumentStructure.SDominanceRelation;%0Aimport de.hu_berlin.german.korpling.saltnpepper.salt.saltCore.SNode;%0Aimport de.hu_berlin.german.korpling.saltnpepper.salt.saltCore.SRelation;%0A%0A/**%0A * @author Stephan Druskat%0A *%0A */%0Apublic class RelationDeleteCommand extends Command %7B%0A%0A%09private SRelation model;%0A%09private SDocumentGraph graph;%0A%09private SNode source, target;%0A%0A%09@Override%0A%09public boolean canExecute() %7B%0A%09%09return model != null;%0A%09%7D%0A%09%0A%09@Override%0A%09public void execute() %7B%0A%09%09graph = (SDocumentGraph) model.getSGraph();%0A%09%09source = model.getSSource();%0A%09%09target = model.getSTarget();%0A%09%09%0A%09%09model.setSGraph(null);%0A%09%09source.eNotify(new NotificationImpl(Notification.REMOVE, model, null));%0A%09%09target.eNotify(new NotificationImpl(Notification.REMOVE, model, null));%0A%09%7D%0A%09%0A%09@Override%0A%09public void undo() %7B%0A%09%09model.setSSource(source);%0A%09%09model.setSTarget(target);%0A%09%09model.setSGraph(graph);%0A%09%7D%0A%09%0A%09public void setRelation(SRelation model) %7B%0A%09%09this.model = model;%0A%09%7D%0A%0A%7D%0A

Refactor StructuredNodeAnnotateCommand + "EditPolicy to work for all model elements (rename to ElementAnnotateCommand + "EditPolicy), refactor CellEditorLocator to take into account PolylineConnections, implement RelationDeleteCommand (+ "EditPolicy)