/**
 * 
 */
package de.uni_jena.iaa.linktype.atomic.editors.grapheditor.commands;

import org.eclipse.gef.commands.Command;

import de.hu_berlin.german.korpling.saltnpepper.salt.graph.LabelableElement;
import de.hu_berlin.german.korpling.saltnpepper.salt.saltCore.SAnnotation;

/**
 * @author Stephan Druskat
 *
 */
public class GraphEditorDeleteCommand extends Command {

	private LabelableElement model;
	
	@Override
	public void execute(){
		if (model instanceof SAnnotation) {
			SAnnotation annotation = (SAnnotation) model;
			annotation.getSAnnotatableElement().removeLabel(annotation.getSName());
		}
	}

	public void setModel(LabelableElement model) {
		this.model = model;
	}

}

@@ -523,16 +523,178 @@
  model;%0A
+%09%09%09if (annotation.getNamespace() != null) %7B%0A%09%09%09%09annotation.getSAnnotatableElement().removeLabel(annotation.getNamespace(), annotation.getName());%0A%09%09%09%7D%0A%09%09%09else %7B%0A%09
 %09%09%09annot
@@ -759,16 +759,22 @@
 Name());
+%09%0A%09%09%09%7D
 %0A%09%09%7D%0A%09%7D%0A

Fix delete command to delete regardless of whether an SAnnotation has a namespace or not