Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.ITextEditorExtension


    ITextEditor editor= getEditor();
    if (editor instanceof ITextEditorExtension2) {
      ITextEditorExtension2 ext= (ITextEditorExtension2) editor;
      modifiable= ext.isEditorInputModifiable();
    } else if (editor instanceof ITextEditorExtension) {
      ITextEditorExtension ext= (ITextEditorExtension) editor;
      modifiable= ext.isEditorInputReadOnly();
    } else if (editor != null) {
      modifiable= editor.isEditable();
    } else {
      modifiable= true;
    }
View Full Code Here


      fRulerInfo = rulerInfo;
      fMouseListener = new MouseUpdater();
      rulerInfo.getControl().addMouseListener(fMouseListener);
    }
    if (editor instanceof ITextEditorExtension) {
      ITextEditorExtension extension = (ITextEditorExtension) editor;
      menuListener = new IMenuListener() {
        public void menuAboutToShow(IMenuManager manager) {
          update();
        }
      };
      extension.addRulerContextMenuListener(menuListener);
    }
  }
View Full Code Here

      fRulerInfo = rulerInfo;
      fMouseListener = new MouseUpdater();
      rulerInfo.getControl().addMouseListener(fMouseListener);
    }
    if (editor instanceof ITextEditorExtension) {
      ITextEditorExtension extension = (ITextEditorExtension) editor;
      menuListener = new IMenuListener() {
        public void menuAboutToShow(IMenuManager manager) {
          update();
        }
      };
      extension.addRulerContextMenuListener(menuListener);
    }
  }
View Full Code Here

    fActiveEditorPart = part;

    super.setActiveEditor(part);
   
    if (fActiveEditorPart instanceof ITextEditorExtension) {
      ITextEditorExtension extension= (ITextEditorExtension) fActiveEditorPart;
      for (int i= 0; i < STATUS_FIELD_DEFS.length; i++)
        extension.setStatusField(null, STATUS_FIELD_DEFS[i].category);
    }
   
   
    ITextEditor textEditor= null;
    if (part instanceof ITextEditor)
      textEditor= (ITextEditor)part;

    IActionBars actionBars= getActionBars();
    IStatusLineManager manager= actionBars.getStatusLineManager();
    manager.setMessage(null);
    manager.setErrorMessage(null);
   
    /** The global actions to be connected with editor actions */
    IAction action= getAction(textEditor, ITextEditorActionConstants.NEXT);
    actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, action);
    actionBars.setGlobalActionHandler(ITextEditorActionConstants.NEXT, action);
    action= getAction(textEditor, ITextEditorActionConstants.PREVIOUS);
    actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, action);
    actionBars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, action);

 
    for (int i= 0; i < STATUS_FIELD_DEFS.length; i++) {
      if (fActiveEditorPart instanceof ITextEditorExtension) {
        StatusLineContributionItem statusField= (StatusLineContributionItem) fStatusFields.get(STATUS_FIELD_DEFS[i]);
        statusField.setActionHandler(getAction(textEditor, STATUS_FIELD_DEFS[i].actionId));
        ITextEditorExtension extension= (ITextEditorExtension) fActiveEditorPart;
        extension.setStatusField(statusField, STATUS_FIELD_DEFS[i].category);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.texteditor.ITextEditorExtension

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.