Examples of IViewPart


Examples of org.eclipse.ui.IViewPart

        if (persp == null) {
      return;
    }

        boolean promptedForSave = false;
        IViewPart view = ref.getView(false);
        if (view != null) {

            if (!certifyPart(view)) {
                return;
            }
           
            // Confirm.
        if (view instanceof ISaveablePart) {
          ISaveablePart saveable = (ISaveablePart)view;
          if (saveable.isSaveOnCloseNeeded()) {
            IWorkbenchWindow window = view.getSite().getWorkbenchWindow();
            boolean success = EditorManager.saveAll(Collections.singletonList(view), true, true, false, window);
            if (!success) {
              // the user cancelled.
              return;
            }
View Full Code Here

Examples of org.eclipse.ui.IViewPart

    }

        List result = new ArrayList();
      
        for (int i = 0; i < refStack.length; i++) {
            IViewPart next = refStack[i].getView(false);
            if (next != null) {
                result.add(next);
            }
        }
View Full Code Here

Examples of org.eclipse.ui.IViewPart

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    IWorkbenchWindow window = HandlerUtil
        .getActiveWorkbenchWindowChecked(event);
    IViewPart view = window.getActivePage().findView(MapView.ID);
    if (view instanceof MapView) {
      ((MapView) view).turnCounterClockWise();
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.ui.IViewPart

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    IWorkbenchWindow window = HandlerUtil
        .getActiveWorkbenchWindowChecked(event);
    IViewPart view = window.getActivePage().findView(MapView.ID);
    if (view instanceof MapView) {
      ((MapView) view).turn();
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.ui.IViewPart

   * @param iSelection
   *            the new selection
   */
  protected void handleNewSelection(IStructuredSelection iSelection) {
    // ALG FIXME Solves this with listeners!!!
    IViewPart commandView = getSite().getWorkbenchWindow().getActivePage()
        .findView(CommandView.ID);
    if (commandView != null) {
      ((CommandView) commandView).updateSelection(iSelection);
    }

    IViewPart selectionView = getSite().getWorkbenchWindow()
        .getActivePage().findView(SelectionView.ID);
    if (selectionView != null) {
      ((SelectionView) selectionView).updateSelection(iSelection);
    }
  }
View Full Code Here

Examples of org.eclipse.ui.IViewPart

    map.getViewportModelInternal().setCRS(crs);
    FeatureIssue issue=new FeatureIssue(Priority.LOW, "Description",layer, features[0], "test" ); //$NON-NLS-1$ //$NON-NLS-2$
   
    if( issue.getViewPartId()!=null  ){
      IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      IViewPart view = activePage.findView(issue.getViewPartId());
      activePage.hideView(view);
    }
   
    assertFalse(ApplicationGIS.getActiveMap()==map);
   
View Full Code Here

Examples of org.eclipse.ui.IViewPart

            }
        }
        // JONES: need to get the part and set the selection to null so that the
        // last selected
        // feature will not flash (because it will not be in list any more).
        IViewPart infoView = null;
        if (infoRef == null) {
            try {
                infoView = page.showView(id);
            } catch (PartInitException e1) {
                return null;
View Full Code Here

Examples of org.eclipse.ui.IViewPart

                break;
            }
        }
        // JONES: need to get the part and set the selection to null so that the last selected feature
        // will not flash (because it will not be in list any more).
        IViewPart infoView=null;
        if( infoRef == null ) {
            try {
                infoView= page.showView(id);
            } catch (PartInitException e1) {
                return null;
View Full Code Here

Examples of org.eclipse.ui.IViewPart

        if (page == null) {
            return null;
        }

        try {
            IViewPart catalogView = page.showView(CatalogView.VIEW_ID);
            return (CatalogView) catalogView;
        } catch (PartInitException e) {
            CatalogUIPlugin.log("Uh oh problem opening the catalog view", e); //$NON-NLS-1$
            return null;
        }
View Full Code Here

Examples of org.eclipse.ui.IViewPart

        public void run() {
          // run the view, set the parallelcontext and add the
          // parameters view as observer.
          ApplicationGIS.getView(true, ParallelParametersView.id);
          IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
          IViewPart viewPart = page.findView(ParallelParametersView.id);
          view = (ParallelParametersView) viewPart;
          assert view != null : "view is null"; //$NON-NLS-1$
          view.setParallelContext(parallelContext);

        }

      });
    } else {
      Display.getCurrent().asyncExec(new Runnable() {
        public void run() {
          // When the tool is deactivated, hide the view.
          ApplicationGIS.getView(false, ParallelParametersView.id);
          IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
          IViewPart viewPart = page.findView(ParallelParametersView.id);
          page.hideView(viewPart);
        }
      });
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.