/** {@inheritDoc} */ @Override public Object execute(ExecutionEvent event) throws ExecutionException { StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelectionChecked(event); AbstractRootEditor rootEditor = (AbstractRootEditor) HandlerUtil.getActiveEditor(event); RepositoryDefinition repositoryDefinition = rootEditor.getInputDefinition().getRepositoryDefinition(); Object selectedObject = selection.getFirstElement(); ExceptionSensorData dataToNavigateTo = null; if (selectedObject instanceof ExceptionSensorData) { dataToNavigateTo = (ExceptionSensorData) selectedObject; } else if (selectedObject instanceof InvocationSequenceData) { List<ExceptionSensorData> exceptions = ((InvocationSequenceData) selectedObject).getExceptionSensorDataObjects(); if ((null != exceptions) && !exceptions.isEmpty()) { for (ExceptionSensorData exSensorData : exceptions) { if (0 != exSensorData.getMethodIdent()) { dataToNavigateTo = exSensorData; break; } } } } if (null != dataToNavigateTo) { ExceptionSensorData exceptionSensorData = dataToNavigateTo; // exit if the object does not carry the methodIdent if (null == exceptionSensorData.getThrowableType()) { return null; } InputDefinition inputDefinition = getInputDefinition(repositoryDefinition, exceptionSensorData); // open the view via command IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class); ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); Command command = commandService.getCommand(OpenViewHandler.COMMAND); ExecutionEvent executionEvent = handlerService.createExecutionEvent(command, new Event()); IEvaluationContext context = (IEvaluationContext) executionEvent.getApplicationContext(); context.addVariable(OpenViewHandler.INPUT, inputDefinition); try { command.executeWithChecks(executionEvent); } catch (NotDefinedException | NotEnabledException | NotHandledException e) { throw new ExecutionException("Error opening the exception type view.", e); } } return null; }