@@ -0,0 +1,1240 @@
+/**%0A * %0A */%0Apackage org.corpus_tools.atomic.api.commands;%0A%0Aimport org.corpus_tools.atomic.api.editors.DocumentGraphEditor;%0Aimport org.corpus_tools.salt.common.SDocumentGraph;%0Aimport org.eclipse.core.commands.AbstractHandler;%0Aimport org.eclipse.core.commands.ExecutionEvent;%0Aimport org.eclipse.core.commands.ExecutionException;%0Aimport org.eclipse.ui.IEditorPart;%0Aimport org.eclipse.ui.PlatformUI;%0A%0A/**%0A * TODO Description%0A *%0A * @author Stephan Druskat %3Cmail@sdruskat.net%3E%0A *%0A */%0Apublic class DocumentGraphAwareHandler extends AbstractHandler %7B%0A%09%0A%09private final SDocumentGraph graph;%0A%09%0A%09/**%0A%09 * %0A%09 */%0A%09public DocumentGraphAwareHandler() %7B%0A%09%09IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();%0A%09%09if (editor instanceof DocumentGraphEditor) %7B%0A%09%09%09graph = ((DocumentGraphEditor) editor).getGraph();%0A%09%09%7D%0A%09%09else %7B%0A%09%09%09graph = null;%0A%09%09%7D%0A%09%7D%0A%0A%09/* (non-Javadoc)%0A%09 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)%0A%09 */%0A%09@Override%0A%09public Object execute(ExecutionEvent event) throws ExecutionException %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return null;%0A%09%7D%0A%0A%09/**%0A%09 * @return the graph%0A%09 */%0A%09public final SDocumentGraph getGraph() %7B%0A%09%09return graph;%0A%09%7D%0A%0A%7D%0A

Add API for handler that know the SDocumentGraph of the editor