The view registry provides facilities to map from an extension to a IViewDescriptor.
This interface is not intended to be implemented by clients.
565758596061626364656667
* If no view with id <tt>viewId</tt> is found in the view * registry. */ public static IViewPart getView(String viewId) throws CoreException, NoSuchElementException { IViewDescriptor descriptor = PlatformUI.getWorkbench() .getViewRegistry().find(viewId); if (descriptor == null) { throw new NoSuchElementException("No view with id - " + viewId); } return descriptor.createView(); }
596061626364656667
* @param sp */ public ShowInShellAction(ISelectionProvider sp) { super(sp, null); IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry(); IViewDescriptor desc = reg.find(KarafUIPlugin.TERMINAL_VIEW_ID); setText(desc.getLabel()); setImageDescriptor(desc.getImageDescriptor()); }
6364656667686970717273747576
super.dispose(); } public boolean performOk() { IViewDescriptor desc = workbench.getViewRegistry().find(Activator.PLUGIN_ID + ".views.HudsonView"); if (desc != null) { try { IViewPart part = desc.createView(); System.out.println(part); } catch (CoreException e) { // TODO Auto-generated catch block e.printStackTrace(); }