use of org.erlide.tracing.core.mvc.model.TracePattern in project erlide_eclipse by erlang.
the class RemoveTracePatternHandler method execute.
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
final ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getSelection();
if (selection instanceof ITreeSelection) {
final Object firstElement = ((ITreeSelection) selection).getFirstElement();
if (firstElement instanceof IErlFunction) {
final IErlFunction function = (IErlFunction) firstElement;
final TracePattern tracePattern = new TracePattern(true);
tracePattern.setFunctionName(function.getFunctionName());
tracePattern.setModuleName(ErlangEngine.getInstance().getModelUtilService().getModule(function).getModuleName());
tracePattern.setArity(function.getArity());
TraceBackend.getInstance().removeTracePattern(tracePattern);
}
}
return null;
}
Aggregations