Package org.eclipse.ui

Examples of org.eclipse.ui.IEditorSite


        if (activePart==null) {
            return null;
        }
        IWorkbenchPartSite site = activePart.getSite();
        if (site instanceof IEditorSite) {
            IEditorSite editorSite = (IEditorSite)site;
            return editorSite.getActionBars().getStatusLineManager();
        } else if (site instanceof IViewSite) {
            IViewSite viewSite = (IViewSite)site;
            return viewSite.getActionBars().getStatusLineManager();
        } else {
            return null;
View Full Code Here


      if (receiver instanceof ITextEditor)
        editor = (ITextEditor) receiver;
      else
        editor = (ITextEditor) ((IEditorPart) receiver).getAdapter(ITextEditor.class);
      if (editor != null) {
        IEditorSite site = editor.getEditorSite();
        if (site != null) {
          return EDITOR_ID.equals(site.getId());
        }
      }
    }
    return false;
  }
View Full Code Here

   * @see MultiPageEditorPart#handlePropertyChange(int) the handler for
   *      property change events from the nested editor
   */
  public void addPage(int index, IEditorPart editor, IEditorInput input)
      throws PartInitException {
    IEditorSite site = createSite(editor);
    // call init first so that if an exception is thrown, we have created no
    // new widgets
    editor.init(site, input);
    Composite parent2 = new Composite(getContainer(),
        getOrientation(editor));
View Full Code Here

      if( site instanceof IViewSite){
        IViewSite viewSite = (IViewSite) site;
        return viewSite.getActionBars().getStatusLineManager();
      }
      else if ( site instanceof IEditorSite){
        IEditorSite editorSite = (IEditorSite) site;
        return editorSite.getActionBars().getStatusLineManager();
      }
      throw new NullPointerException( "Unable to determine StatusLineManager");
    }
View Full Code Here

            }
        });
    }
   
    private IStatusLineManager getStatusBar(){
        IEditorSite site=getEditorSite();
        if( site==null )
            return null;
        return site.getActionBars().getStatusLineManager();
    }
View Full Code Here

            }
        });
    }
   
    private IStatusLineManager getStatusBar(){
        IEditorSite site=getEditorSite();
        if( site==null )
            return null;
        return site.getActionBars().getStatusLineManager();
    }
View Full Code Here

            }
        });
    }
   
    private IStatusLineManager getStatusBar(){
        IEditorSite site=getEditorSite();
        if( site==null )
            return null;
        return site.getActionBars().getStatusLineManager();
    }
View Full Code Here

      for (IContextCustomizer customizer : contexts) {
        customizer.fillContextMenu(manager, rootAdapter, selected);
      }
    }
    manager.add(new Separator());
    IEditorSite site = editor.getEditorSite();
    manager.add(undoAction);
    manager.add(redoAction);
    manager.add(new Separator());

    IWorkbenchPage page = site.getPage();
    IWorkbenchWindow window = site.getWorkbenchWindow();
    page.getActiveEditor();
    for (EditorAction action : editor.getActions()) {
      if (action == null) {
        manager.add(new Separator());
      } else if (action.isRetargetable()) {
View Full Code Here

      hideVisibleWindow(adapter);
      root = adapter.getRootPane();
      Container parent = root.getParent();
      if (parent != null)
        parent.remove(root);
      IEditorSite site = editor.getEditorSite();
      undoAction = new UndoActionHandler(site, getUndoContext());
      redoAction = new RedoActionHandler(site, getUndoContext());
      IActionBars actionBars = site.getActionBars();
      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
      actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
      rootBounds = adapter.getDesignBounds();
      root.setSize(rootBounds.width, rootBounds.height);
      add(root);
View Full Code Here

      super(XtextEditorErrorTickUpdater_JobName);
      setRule(SEQUENCE_RULE);
    }

    @Override public IStatus runInUIThread(final IProgressMonitor monitor) {
      IEditorSite site = null != editor ? editor.getEditorSite() : null;
      if (site != null) {
        if (!monitor.isCanceled() && titleImage != null && !titleImage.isDisposed() && editor != null) {
          editor.updatedTitleImage(titleImage);
        }
      }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IEditorSite

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.