Package org.eclipse.ui.part

Examples of org.eclipse.ui.part.MultiPageEditorPart


    activeEditorPart = part;

    IActionBars actionBars = getActionBars();
    if (actionBars != null) {

      MultiPageEditorPart editor = (MultiPageEditorPart) part;

      actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor,
              ITextEditorActionConstants.DELETE));
      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor,
              ITextEditorActionConstants.UNDO));
View Full Code Here


    activeEditorPart = part;

    IActionBars actionBars = getActionBars();
    if (actionBars != null) {

      MultiPageEditorPart editor = (MultiPageEditorPart) part;

      actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor,
              ITextEditorActionConstants.DELETE));
      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor,
              ITextEditorActionConstants.UNDO));
View Full Code Here

  protected void insertText(String text) {
    IEditorPart editor = PlatformUI.getWorkbench()
        .getActiveWorkbenchWindow().getActivePage().getActiveEditor();

    if (editor instanceof MultiPageEditorPart) {
      MultiPageEditorPart multiEditor = (MultiPageEditorPart) editor;
      if (multiEditor.getSelectedPage() instanceof ITextEditor) {
        doInsert((ITextEditor) multiEditor.getSelectedPage(), text);
      }
    } else if (editor instanceof ITextEditor) {
      doInsert((ITextEditor) editor, text);
    }
  }
View Full Code Here

 
  private ITextEditor getTextEditor(IEditorInput input, IEditorPart editor)
  {
    if( editor instanceof MultiPageEditorPart )
    {
      MultiPageEditorPart multiPageEditor = (MultiPageEditorPart) editor;
      IEditorPart[] editors = multiPageEditor.findEditors(input);
     
      for(IEditorPart ed: editors)
      {
        if( ed instanceof ITextEditor )
        {
          multiPageEditor.setActiveEditor(ed);
          return (ITextEditor) ed;
        }
      }
    }
    else if( editor instanceof ITextEditor )
View Full Code Here

    activeEditorPart = part;

    IActionBars actionBars = getActionBars();
    if (actionBars != null) {

      MultiPageEditorPart editor = (MultiPageEditorPart) part;

      actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor,
              ITextEditorActionConstants.DELETE));
      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor,
              ITextEditorActionConstants.UNDO));
View Full Code Here

    protected void insertText(String text)
    {
        IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
       
        if (editor instanceof MultiPageEditorPart) {
            MultiPageEditorPart multiEditor = (MultiPageEditorPart) editor;
            if (multiEditor.getSelectedPage() instanceof ITextEditor) {
                doInsert((ITextEditor) multiEditor.getSelectedPage() , text);
            }
        } else if (editor instanceof ITextEditor) {
            doInsert((ITextEditor) editor, text);
        }
    }       
View Full Code Here

      if (editor instanceof IConfigEditor) {
        IConfigEditor configEditor = (IConfigEditor) editor;
        return configEditor.getTextViewer().getDocument();
      }
      else if (editor instanceof MultiPageEditorPart) {
        MultiPageEditorPart multiEditor = (MultiPageEditorPart) editor;
        IEditorPart[] editors = multiEditor.findEditors(fileInput);
        for (IEditorPart e : editors) {
          if (e instanceof StructuredTextEditor) {
            return ((StructuredTextEditor) e).getDocumentProvider().getDocument(fileInput);
          }
        }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.part.MultiPageEditorPart

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.