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) { } }
/** * Creates a new <code>GenerateActionGroup</code>. The group requires that the selection provided * by the part's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param part the view part that owns this action group */ public GenerateIncludePathActionGroup(IViewPart part) { this(part.getSite()); }