/** * Makes the package explorer part visible in the active perspective. If there * isn't a package explorer part registered <code>null</code> is returned. * Otherwise the opened view part is returned. * @return the opened package explorer */ public static PackageExplorerPart openInActivePerspective() { try { return (PackageExplorerPart)JavaPlugin.getActivePage().showView(VIEW_ID); } catch(PartInitException pe) { return null; } }
/** * Makes the package explorer part visible in the active perspective. If there * isn't a package explorer part registered <code>null</code> is returned. * Otherwise the opened view part is returned. * @return the opened package explorer */ public static PackageExplorerPart openInActivePerspective() { try { return (PackageExplorerPart)JavaPlugin.getActivePage().showView(VIEW_ID); } catch(PartInitException pe) { return null; } }
static CallHierarchyViewPart findAndShowCallersView(IWorkbenchPartSite site) { IWorkbenchPage workbenchPage = site.getPage(); CallHierarchyViewPart callersView = null; try { callersView = (CallHierarchyViewPart) workbenchPage.showView(CallHierarchyViewPart.ID_CALL_HIERARCHY); } catch (PartInitException e) { JavaPlugin.log(e); } return callersView; }
@Override protected void processItem ( final Item item ) throws PartInitException { final DetailsViewPart view = (DetailsViewPart)this.page.showView ( DetailsViewPart.VIEW_ID, asSecondardId ( item ), IWorkbenchPage.VIEW_ACTIVATE ); view.setDataItem ( item ); }
@Override protected void processItem ( final Item item ) throws PartInitException { final DetailsViewPart view = (DetailsViewPart)this.page.showView ( DetailsViewPart.VIEW_ID, asSecondardId ( item ), IWorkbenchPage.VIEW_ACTIVATE ); view.setDataItem ( item ); }
public void mouseDoubleClick(MouseEvent e) { try { getSite().getPage().showView(IPageLayout.ID_PROP_SHEET); } catch (PartInitException e1) { // ignore } } });
static CallHierarchyViewPart findAndShowCallersView(IWorkbenchPartSite site) { IWorkbenchPage workbenchPage = site.getPage(); CallHierarchyViewPart callersView = null; try { callersView = (CallHierarchyViewPart) workbenchPage.showView(CallHierarchyViewPart.ID_CALL_HIERARCHY); } catch (PartInitException e) { JavaPlugin.log(e); } return callersView; }
@Override public void run() { try { getPage().showView("org.eclipse.ui.views.PropertySheet"); } catch (PartInitException exception) { GenModelEditPlugin.INSTANCE.log(exception); } } };
public void run() { try { getWorkbenchPart().getSite().getPage().showView(PROPERTIES_VIEW_ID); } catch (PartInitException pie) { } } }
private void openItem ( final Item item ) throws PartInitException { final DetailsViewPart view = (DetailsViewPart)getActivePage ().showView ( DetailsViewPart.VIEW_ID, asSecondardId ( item ), IWorkbenchPage.VIEW_ACTIVATE ); view.setDataItem ( item ); } }
@Override public void run() { try { IViewPart view = PDEPlugin.getActivePage().showView(IPDEUIConstants.DEPENDENCIES_VIEW_ID); ((DependenciesView) view).openCalleesFor(fModel); } catch (PartInitException e) { PDEPlugin.logException(e); } }
@Override public void run() { try { IViewPart view = PDEPlugin.getActivePage().showView(IPDEUIConstants.DEPENDENCIES_VIEW_ID); ((DependenciesView) view).openCallersFor(fModel); } catch (PartInitException e) { PDEPlugin.logException(e); } }
private static CallHierarchyViewPart openInViewPart(IWorkbenchWindow window, IJavaElement input) { IWorkbenchPage page= window.getActivePage(); try { CallHierarchyViewPart result= (CallHierarchyViewPart)page.showView(CallHierarchyViewPart.ID_CALL_HIERARCHY); result.setMethod((IMethod)input); return result; } catch (CoreException e) { ExceptionHandler.handle(e, window.getShell(), CallHierarchyMessages.CallHierarchyUI_error_open_view, e.getMessage()); } return null; }
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 boolean openContainer(IContainer container) { if (container != null && container.exists()) try { IViewPart part = PDEPlugin.getActivePage().showView(IPageLayout.ID_RES_NAV); ShowInNavigatorViewAction action = new ShowInNavigatorViewAction(part.getSite()); action.run(container); } catch (PartInitException e) { return false; } return true; }
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 activateSearchView(ISearchResultViewPart viewPart) { try { IWorkbenchPage activePage= viewPart.getSite().getPage(); String secondaryId= viewPart.getViewSite().getSecondaryId(); activePage.showView(NewSearchUI.SEARCH_VIEW_ID, secondaryId, IWorkbenchPage.VIEW_ACTIVATE); } catch (PartInitException ex) { ExceptionHandler.handle(ex, SearchMessages.Search_Error_openResultView_title, SearchMessages.Search_Error_openResultView_message); } }
@Override public void handleJavadocViewLink(IJavaElement linkTarget) { control.notifyDelayedInputChange(null); control.setVisible(false); control.dispose(); //FIXME: should have protocol to hide, rather than dispose try { JavadocView view= (JavadocView) JavaPlugin.getActivePage().showView(JavaUI.ID_JAVADOC_VIEW); view.setInput(linkTarget); } catch (PartInitException e) { JavaPlugin.log(e); } }
@Override public void handleJavadocViewLink(IJavaElement linkTarget) { control.notifyDelayedInputChange(null); control.setVisible(false); control.dispose(); //FIXME: should have protocol to hide, rather than dispose try { JavadocView view= (JavadocView) JavaPlugin.getActivePage().showView(JavaUI.ID_JAVADOC_VIEW); view.setInput(linkTarget); } catch (PartInitException e) { JavaPlugin.log(e); } }
private void showExpressionsView() { IWorkbenchPage page = DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(); IViewPart part = page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW); if (part == null) { try { page.showView(IDebugUIConstants.ID_EXPRESSION_VIEW); } catch (PartInitException e) { } } else { page.bringToTop(part); } }