use of org.erlide.tracing.core.mvc.model.treenodes.ITreeNode in project erlide_eclipse by erlang.
the class TreeViewerView method doDoubleClick.
/**
* Action performed when user double-clicks on tree element.
*
* @param event
*/
private void doDoubleClick(final DoubleClickEvent event) {
final IStructuredSelection selection = (IStructuredSelection) event.getSelection();
final ITreeNode treeNode = (ITreeNode) selection.getFirstElement();
try {
if (treeNode instanceof FunctionNode) {
final FunctionNode functionNode = (FunctionNode) treeNode;
ErlModelUtils.openMFA(functionNode.getModuleName(), functionNode.getFunctionName(), functionNode.getArity());
} else if (treeNode instanceof ModuleNode) {
final ModuleNode moduleNode = (ModuleNode) treeNode;
ErlModelUtils.openModule(moduleNode.getModuleName());
}
} catch (final CoreException e) {
ErlLogger.error(e);
}
}
Aggregations