@Override public Object execute(ExecutionEvent event) throws ExecutionException { IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow(); if (window == null) return null; IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); OpenTypeHierarchyUtil.open(javaElement, window); return null; } }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); PackageExplorerPart view= PackageExplorerPart.openInActivePerspective(); view.tryToReveal(javaElement); return null; }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); PackageExplorerPart view= PackageExplorerPart.openInActivePerspective(); view.tryToReveal(javaElement); return null; }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow(); if (window == null) return null; IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); OpenTypeHierarchyUtil.open(javaElement, window); return null; } }
public Object execute(ExecutionEvent event) throws ExecutionException { IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow(); if (window == null) return null; IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); OpenTypeHierarchyUtil.open(javaElement, window); return null; } }
public Object execute(ExecutionEvent event) throws ExecutionException { IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); PackageExplorerPart view= PackageExplorerPart.openInActivePerspective(); view.tryToReveal(javaElement); return null; }
public Object execute(ExecutionEvent event) throws ExecutionException { IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); try { IEditorPart editorPart= JavaUI.openInEditor(javaElement); JavaUI.revealInEditor(editorPart, javaElement); } catch (JavaModelException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } catch (PartInitException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } return null; }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); try { IEditorPart editorPart= JavaUI.openInEditor(javaElement); JavaUI.revealInEditor(editorPart, javaElement); } catch (JavaModelException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } catch (PartInitException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } return null; }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); try { IEditorPart editorPart= JavaUI.openInEditor(javaElement); JavaUI.revealInEditor(editorPart, javaElement); } catch (JavaModelException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } catch (PartInitException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } return null; }
.getObjectParameterForExecution(PARAM_ID_FILE_PATH); if (!(resource instanceof IFile)) { throw new ExecutionException(
if (event.getParameter(PARAM_ID_IMAGE_TYPE) != null) { Integer imageTypeInteger = (Integer) event .getObjectParameterForExecution(PARAM_ID_IMAGE_TYPE); imageType = imageTypeInteger.intValue(); if (event.getParameter(PARAM_ID_DEFAULT_INDEX) != null) { Integer defaultValueInteger = (Integer) event .getObjectParameterForExecution(PARAM_ID_DEFAULT_INDEX); defaultValue = defaultValueInteger.intValue();
@Override public Object execute(ExecutionEvent event) throws ExecutionException { IResource resource = (IResource) event .getObjectParameterForExecution(PARAM_ID_RESOURCE_PATH); IWorkbenchWindow activeWindow = HandlerUtil .getActiveWorkbenchWindowChecked(event); IWorkbenchPage activePage = activeWindow.getActivePage(); if (activePage == null) { throw new ExecutionException("no active workbench page"); //$NON-NLS-1$ } try { IViewPart view = activePage.showView(IPageLayout.ID_RES_NAV); if (view instanceof ISetSelectionTarget) { ISelection selection = new StructuredSelection(resource); ((ISetSelectionTarget) view).selectReveal(selection); } } catch (PartInitException e) { throw new ExecutionException("error showing resource in navigator"); //$NON-NLS-1$ } return null; }
@SuppressWarnings ( "unchecked" ) @Override public Object execute ( final ExecutionEvent event ) throws ExecutionException { final String detailViewId = event.getParameter ( "org.eclipse.scada.vi.details.showDetailDialog.id" ); final Map<String, String> parameters = (Map<String, String>)event.getObjectParameterForExecution ( "org.eclipse.scada.vi.details.showDetailDialog.parameters" ); try { if ( this.useWaitShell ) { openWithWaitShell ( getShell (), detailViewId, parameters ); } else { open ( getShell (), detailViewId, parameters ); } } catch ( final Exception e ) { StatusManager.getManager ().handle ( StatusHelper.convertStatus ( Activator.PLUGIN_ID, "Failed to open detail view", e ), StatusManager.SHOW ); } return null; }