public void run(IStructuredSelection selection) { if (!checkEnabled(selection)) return; run((IJavaElement)selection.getFirstElement()); }
@Override public void run(IStructuredSelection selection) { if (!checkEnabled(selection)) return; run((IJavaElement)selection.getFirstElement()); }
@Override public void run(IStructuredSelection selection) { if (!checkEnabled(selection)) return; run((IJavaElement)selection.getFirstElement()); }
private void handleGoToPackage(ISelection selection) { IPackageFragment frag = getPackageFragment(selection); if (frag != null) try { IViewPart part = PDEPlugin.getActivePage().showView(JavaUI.ID_PACKAGES); ShowInPackageViewAction action = new ShowInPackageViewAction(part.getSite()); action.run(frag); } catch (PartInitException e) { } }
private void handleGoToPackage(ISelection selection) { IPackageFragment frag = getPackageFragment(selection); if (frag != null) try { IViewPart part = PDEPlugin.getActivePage().showView(JavaUI.ID_PACKAGES); ShowInPackageViewAction action = new ShowInPackageViewAction(part.getSite()); action.run(frag); } catch (PartInitException e) { } }
public void run(ITextSelection selection) { try { IJavaElement element= SelectionConverter.getElementAtOffset(fEditor); if (element != null) run(element); } catch (JavaModelException e) { JavaPlugin.log(e); String message= ActionMessages.ShowInPackageViewAction_error_message; ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus()); } }
@Override public void run(ITextSelection selection) { try { IJavaElement element= SelectionConverter.getElementAtOffset(fEditor); if (element != null) run(element); } catch (JavaModelException e) { JavaPlugin.log(e); String message= ActionMessages.ShowInPackageViewAction_error_message; ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus()); } }
@Override public void run(ITextSelection selection) { try { IJavaElement element= SelectionConverter.getElementAtOffset(fEditor); if (element != null) run(element); } catch (JavaModelException e) { JavaPlugin.log(e); String message= ActionMessages.ShowInPackageViewAction_error_message; ErrorDialog.openError(getShell(), getDialogTitle(), message, e.getStatus()); } }
@Override protected void open2() { IResource res = fHeader.getBundle().getModel().getUnderlyingResource(); if (res == null) return; IPackageFragment frag = PDEJavaHelper.getPackageFragment(fElement, null, res.getProject()); if (frag == null) return; try { IViewPart part = PDEPlugin.getActivePage().showView(JavaUI.ID_PACKAGES); ShowInPackageViewAction action = new ShowInPackageViewAction(part.getSite()); action.run(frag); } catch (PartInitException e) { PDEPlugin.logException(e); } }