Package org.eclipse.ui

Examples of org.eclipse.ui.IViewPart


        IActionBars partActionBars = null;
        if (contributor instanceof IEditorPart) {
            IEditorPart editorPart = (IEditorPart) contributor;
            partActionBars = editorPart.getEditorSite().getActionBars();
        } else if (contributor instanceof IViewPart) {
            IViewPart viewPart = (IViewPart) contributor;
            partActionBars = viewPart.getViewSite().getActionBars();
        }

        if (partActionBars != null) {
            IAction action = partActionBars.getGlobalActionHandler(ActionFactory.UNDO.getId());
            if (action != null) {
View Full Code Here


            preferences.setValue(KEY_VIEW_SORTER, ""); //$NON-NLS-1$
        else
            preferences.setValue(KEY_VIEW_SORTER, extensionID);
       
        try{
            IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IssueConstants.VIEW_ID);
            if( view!=null ){
                ((IssuesView) view).setSorter(sorter);
            }
        }catch (Exception e) {
            // fall through.
View Full Code Here

            preferences.setValue(KEY_VIEW_CONTENT_PROVIDER, ""); //$NON-NLS-1$
        else
            preferences.setValue(KEY_VIEW_CONTENT_PROVIDER, extensionID);
       
        try{
            IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IssueConstants.VIEW_ID);
            if( view!=null ){
                ((IssuesView) view).setContentProvider(provider);
            }
        }catch (Exception e) {
            // fall through.
View Full Code Here

            preferences.setValue(KEY_VIEW_EXPANSION_PROVIDER, ""); //$NON-NLS-1$
        else
            preferences.setValue(KEY_VIEW_EXPANSION_PROVIDER, extensionID);
       
        try{
            IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IssueConstants.VIEW_ID);
            if( view!=null ){
                ((IssuesView) view).setExpansionProvider(provider);
            }
        }catch (Exception e) {
            // fall through.
View Full Code Here

            preferences.setValue(KEY_VIEW_LABEL_PROVIDER, ""); //$NON-NLS-1$
        else
            preferences.setValue(KEY_VIEW_LABEL_PROVIDER, extensionID);
       
        try{
            IViewPart view = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(IssueConstants.VIEW_ID);
            if( view!=null ){
                ((IssuesView) view).setLabelProvider(provider);
            }
        }catch (Exception e) {
            // fall through.
View Full Code Here

    private void select(Display display, final Collection<IIssue> issues) {
      display.asyncExec(new Runnable() {
      public void run() {
        IWorkbenchPage page = findPage();
        if( page!=null ){
          IViewPart view = page.findView(IssuesView.VIEW_ID);
          if (view instanceof IssuesView) {
            IssuesView issuesView = (IssuesView) view;
            issuesView.setSelection(new StructuredSelection(issues.toArray()));
          }
        }
View Full Code Here

            name = page.getTitle();
            //viewName = page.getViewName();
        }
        IWorkbenchPage wbPage  = PlatformUI.getWorkbench().
                getActiveWorkbenchWindow().getActivePage();
        IViewPart part;
        try {
            part = wbPage.showView(BrowserContainerView.VIEW_ID);
        } catch (PartInitException e) {
            return false;
        }
View Full Code Here

                // When the tool is deactivated, hide the view.
                ApplicationGIS.getView(false, MergeView.ID);
                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                        .getActivePage();
                IViewPart viewPart = page.findView(MergeView.ID);
                page.hideView(viewPart);
                mergeContext.disposeMergeView();
            }
        });
    }
View Full Code Here

    try {

      ApplicationGIS.getView(false, MergeView.ID);
      IWorkbenchPage page = PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getActivePage();
      IViewPart viewPart = page.findView(MergeView.ID);
      page.hideView(viewPart);
    } finally {
      IToolContext context = getContext();
      if(context != null){
        UndoableMapCommand clearSelectionCommand = context
View Full Code Here

    }

        IViewReference[] views = page.getViewReferences();
       
        for (IViewReference ref : views) {
      final IViewPart view = ref.getView(false);
      if (view instanceof MapPart) {
        MapPart mapPart = (MapPart) view;
        if(getMap() == mapPart.getMap()) {
          return new IActionBars2Adapter(view);
        }
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.