Package org.eclipse.ui

Examples of org.eclipse.ui.IViewPart


            return;
        } catch (Exception e) {
        }
      }
      try {
        IViewPart part = page.findView(PaletteView.ID);
        page.hideView(part);
      } catch (Exception e) {
      }
    }
  }
View Full Code Here


  @Override
  public void init(ICommonActionExtensionSite site) {
    if (site.getViewSite() instanceof ICommonViewerWorkbenchSite) {
      ICommonViewerWorkbenchSite workbenchSite = (ICommonViewerWorkbenchSite) site.getViewSite();
      if (workbenchSite.getPart() instanceof IViewPart) {
        IViewPart viewPart= (IViewPart) workbenchSite.getPart();
       
        dubActionGroup = new DubPathActionGroup(viewPart);
      }
    }
  }
View Full Code Here

    public void run(IAction action) {
        if (data == null) {
            return;
        }
        IViewPart part = getView(JavaUI.ID_PACKAGES);
        if (part instanceof ISetSelectionTarget) {
            ISetSelectionTarget target = (ISetSelectionTarget) part;
            target.selectReveal(new StructuredSelection(data));
        }
    }
View Full Code Here

            target.selectReveal(new StructuredSelection(data));
        }
    }

    private IViewPart getView(String id) {
        IViewPart part;
        try {
            part = site.getPage().showView(id);
            return part;
        } catch (PartInitException e) {
            FindbugsPlugin.getDefault().logException(e, "Can't open view: " + id);
View Full Code Here

@Singleton public class IProjects {
  private static final IViewReference[] NO_VIEW_REFERENCES = new IViewReference[0];

  public IProject activeProject() {
    for (IViewReference reference : viewReferencesInActivePage()) {
      IViewPart part = reference.getView(false);
      if (part instanceof ResourceNavigator) {
        ResourceNavigator navigator = (ResourceNavigator) part;
        StructuredSelection selection = (StructuredSelection) navigator.getTreeViewer().getSelection();
        IResource resource = (IResource) selection.getFirstElement();
        return resource.getProject();
View Full Code Here

               
                IWorkbenchPage[] pages = window.getPages();
                for(IWorkbenchPage page : pages) {
                    logger.debug("page: " + page);
                   
                    IViewPart part = page.findView(viewId);
                    logger.debug("part: " + part);
                   
                    if(part != null) {
                        logger.debug("activate the part");
                        page.showView(viewId, null, IWorkbenchPage.VIEW_VISIBLE);
View Full Code Here

   */
  public static IViewPart getView(String viewID)
  {
    IWorkbenchPage[] pages = PlatformUI.getWorkbench()
        .getActiveWorkbenchWindow().getPages();
    IViewPart view = null;
    if (0 < pages.length)
    {
      view = pages[0].findView(viewID);
      /*try
      {
 
View Full Code Here

                    // AlertsActionsSection.
                    IWorkbenchPage activePage =
                            PlatformUI.getWorkbench().
                            getActiveWorkbenchWindow().
                            getActivePage();
                    IViewPart view =
                            activePage.
                            showView("org.eclipse.ui.views.TaskList");
                    final TaskList tasklist = (TaskList) view;
                    Display.getCurrent().asyncExec(new Runnable() {
                        public void run() {
View Full Code Here

    IViewReference[] ivrt = iwp.getViewReferences();

    for (IViewReference ivrf : ivrt)
      {
      IViewPart ivpart = ivrf.getView(false);

      if (ivpart instanceof DataUpdatable)
        {
        ((DataUpdatable) ivpart).refresh(subject, clientData);
        }
View Full Code Here

    IWorkbenchWindow wbwin = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IViewReference[] vr = wbwin.getActivePage().getViewReferences();

    for (int i = 0; i < vr.length; i++)
      {
      IViewPart vp = vr[i].getView(true);

      if (vp instanceof IReStartableView)
        {
        ((IReStartableView) vp).restart();
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IViewPart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.