use of org.eclipse.linuxtools.internal.systemtap.ui.ide.OpenFileHandler in project linuxtools by eclipse.
the class DefinitionHandler method execute.
@Override
public Object execute(ExecutionEvent event) {
TreeDefinitionNode t = getSelection(event);
if (t == null) {
return null;
}
String filename = t.getDefinition();
if (filename == null) {
return null;
}
File file = new File(filename);
OpenFileHandler open = new OpenFileHandler();
open.executeOnFile(file);
if (open.isSuccessful() && t.getData() instanceof ISearchableNode) {
IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
STPEditor editor = (STPEditor) editorPart;
editor.jumpToLocation(findDefinitionLine((ISearchableNode) t.getData(), editor) + 1, 0);
}
return null;
}
Aggregations