Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.RetargetTextEditorAction


   * form of adding Content Format to the menu
   */
  public TMLEditorContributor() {
    super();
    ResourceBundle bundle = Plugin.getDefault().getResourceBundle();
    formatProposal = new RetargetTextEditorAction(bundle, "ContentFormatProposal.");
  }
View Full Code Here


     */
    public LdifEditorContributor()
    {
        super();

        contentAssist = new RetargetTextEditorAction( LdifEditorActivator.getDefault().getResourceBundle(),
            "ContentAssistProposal." ); //$NON-NLS-1$
        contentAssist.setActionDefinitionId( ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS );
    }
View Full Code Here

    /**
     * Default constructor.
     */
    public JavaActionContributor() {
        super();
        fContentAssistProposal = new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal."); //$NON-NLS-1$
        fContentAssistProposal.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
        fContentAssistTip = new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "ContentAssistTip."); //$NON-NLS-1$
        fContentAssistTip.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
        // fToggleStartStop = new StartStopAction();
        // templateAction = new AddCommonImportsAction();
    }
View Full Code Here

  /**
   * Creates a new encoding action group for an action bar contributor.
   */
  public EncodingActionGroup() {

    fRetargetActions.add(new RetargetTextEditorAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ConvertEncoding." + ENCODINGS[0][0] + ".", ENCODINGS[0][0], IAction.AS_RADIO_BUTTON)); //$NON-NLS-1$ //$NON-NLS-2$

    if (SYSTEM_ENCODING != null)
      fRetargetActions.add(new RetargetTextEditorAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ConvertEncoding.System.", IEncodingActionsConstants.SYSTEM, IAction.AS_RADIO_BUTTON)); //$NON-NLS-1$

    for (int i= 1; i < ENCODINGS.length; i++)
      fRetargetActions.add(new RetargetTextEditorAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ConvertEncoding." + ENCODINGS[i][0] + ".", ENCODINGS[i][0], IAction.AS_RADIO_BUTTON)); //$NON-NLS-1$ //$NON-NLS-2$

    fRetargetActions.add(new RetargetTextEditorAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ConvertEncoding.Custom.", IEncodingActionsConstants.CUSTOM, IAction.AS_PUSH_BUTTON)); //$NON-NLS-1$
  }
View Full Code Here

   */
  public void retarget(ITextEditor editor) {
    fTextEditor= editor;
    Iterator e= fRetargetActions.iterator();
    while (e.hasNext()) {
      RetargetTextEditorAction a= (RetargetTextEditorAction) e.next();
      a.setAction(editor == null ? null : editor.getAction(a.getId()));
    }
  }
View Full Code Here

  /**
   * Creates a new contributor.
   */
  public TextEditorActionContributor() {
    fChangeEncodingAction= new RetargetTextEditorAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ChangeEncodingAction."); //$NON-NLS-1$
    fQuickAssistAction= new RetargetTextEditorAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.QuickAssist."); //$NON-NLS-1$
    fQuickAssistAction.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICK_ASSIST);
    fQuickAssistMenuEntry= new ActionContributionItem(fQuickAssistAction);
   
    fRetargetShowInformationAction= new RetargetTextEditorAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ShowInformation."); //$NON-NLS-1$
    fRetargetShowInformationAction.setActionDefinitionId(ITextEditorActionDefinitionIds.SHOW_INFORMATION);
  }
View Full Code Here

    if (part instanceof ITextEditor){
      textEditor = (ITextEditor) part;
    }
    if(textEditor!=null){
      for(int i=0;i<this.actions.size();i++){
        RetargetTextEditorAction action = (RetargetTextEditorAction)actions.get(i);
        IAction targetAction = textEditor.getAction((String)actionIds.get(i));
        if(targetAction!=null){
          action.setAccelerator(targetAction.getAccelerator());
          action.setAction(targetAction);
        } else {
          action.setAccelerator(SWT.NULL);
          action.setAction(null);
        }
      }
    }
  }
View Full Code Here

    IMenuManager editMenu = menuManager.findMenuUsingPath("edit");
   
    if (editMenu != null) {
      editMenu.insertBefore("additions", new Separator("amateras"));
      for(int i=0;i<actionIds.size();i++){
        RetargetTextEditorAction action = new RetargetTextEditorAction(HTMLPlugin.getDefault().getResourceBundle(), null);
        this.actions.add(action);
        editMenu.appendToGroup("amateras",action);
      }
    }
  }
View Full Code Here

    ResourceBundle resourceBundle = SSEUIMessages.getResourceBundle();

    fCommandsSeparator = new Separator();

    // edit commands
    fStructureSelectEnclosingAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_ENCLOSING + StructuredTextEditorActionConstants.UNDERSCORE);
    fStructureSelectEnclosingAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_ENCLOSING);

    fStructureSelectNextAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_NEXT + StructuredTextEditorActionConstants.UNDERSCORE);
    fStructureSelectNextAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_NEXT);

    fStructureSelectPreviousAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_PREVIOUS + StructuredTextEditorActionConstants.UNDERSCORE);
    fStructureSelectPreviousAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_PREVIOUS);

    fStructureSelectHistoryAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_STRUCTURE_SELECT_HISTORY + StructuredTextEditorActionConstants.UNDERSCORE);
    fStructureSelectHistoryAction.setActionDefinitionId(ActionDefinitionIds.STRUCTURE_SELECT_HISTORY);

    fExpandSelectionToMenu = new MenuManager(SSEUIMessages.ExpandSelectionToMenu_label); //$NON-NLS-1$
    fExpandSelectionToMenu.add(fStructureSelectEnclosingAction);
    fExpandSelectionToMenu.add(fStructureSelectNextAction);
    fExpandSelectionToMenu.add(fStructureSelectPreviousAction);
    fExpandSelectionToMenu.add(fStructureSelectHistoryAction);

    // source commands
    fShiftRight = new RetargetTextEditorAction(resourceBundle, ITextEditorActionConstants.SHIFT_RIGHT + StructuredTextEditorActionConstants.UNDERSCORE);
    fShiftRight.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_RIGHT);

    fShiftLeft = new RetargetTextEditorAction(resourceBundle, ITextEditorActionConstants.SHIFT_LEFT + StructuredTextEditorActionConstants.UNDERSCORE);
    fShiftLeft.setActionDefinitionId(ITextEditorActionDefinitionIds.SHIFT_LEFT);

    fToggleComment = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_TOGGLE_COMMENT + StructuredTextEditorActionConstants.UNDERSCORE);
    fToggleComment.setActionDefinitionId(ActionDefinitionIds.TOGGLE_COMMENT);

    fAddBlockComment = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_ADD_BLOCK_COMMENT + StructuredTextEditorActionConstants.UNDERSCORE);
    fAddBlockComment.setActionDefinitionId(ActionDefinitionIds.ADD_BLOCK_COMMENT);

    fRemoveBlockComment = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_REMOVE_BLOCK_COMMENT + StructuredTextEditorActionConstants.UNDERSCORE);
    fRemoveBlockComment.setActionDefinitionId(ActionDefinitionIds.REMOVE_BLOCK_COMMENT);

    // goto prev/next error
    // CMVC 249017 for JavaEditor consistancy
    fPreviousAnnotation = new GotoAnnotationAction("Previous_annotation", false); //$NON-NLS-1$
    fPreviousAnnotation.setActionDefinitionId("org.eclipse.ui.navigate.previous"); //$NON-NLS-1$

    fNextAnnotation = new GotoAnnotationAction("Next_annotation", true); //$NON-NLS-1$
    fNextAnnotation.setActionDefinitionId("org.eclipse.ui.navigate.next"); //$NON-NLS-1$

    fGotoMatchingBracketAction = new RetargetTextEditorAction(resourceBundle, StructuredTextEditorActionConstants.ACTION_NAME_GOTO_MATCHING_BRACKET + StructuredTextEditorActionConstants.UNDERSCORE);
    fGotoMatchingBracketAction.setActionDefinitionId(ActionDefinitionIds.GOTO_MATCHING_BRACKET);

    // Read action extensions.
    ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();
    extendedContributor = builder.readActionExtensions(getExtensionIDs());

    fMenuAdditionsGroupMarker = new GroupMarker(StructuredTextEditorActionConstants.GROUP_NAME_MENU_ADDITIONS);
    fToolbarSeparator = new Separator();
    fToolbarAdditionsGroupMarker = new GroupMarker(StructuredTextEditorActionConstants.GROUP_NAME_TOOLBAR_ADDITIONS);

    fToggleInsertModeAction = new RetargetTextEditorAction(resourceBundle, "Editor.ToggleInsertMode.", IAction.AS_CHECK_BOX); //$NON-NLS-1$
    fToggleInsertModeAction.setActionDefinitionId(ITextEditorActionDefinitionIds.TOGGLE_INSERT_MODE);

    if (_showDebugStatus) {
      fDebugStatusOffset = new OffsetStatusLineContributionItem(StructuredTextEditorActionConstants.STATUS_CATEGORY_OFFSET, true, 20);
    }
View Full Code Here

  public ActionContributorJSP() {
    super();

    ResourceBundle bundle = JSPUIMessages.getResourceBundle();
    this.renameElementAction = new RetargetTextEditorAction(bundle, IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT + StructuredTextEditorActionConstants.UNDERSCORE);
    this.renameElementAction.setActionDefinitionId(IActionDefinitionIdsJSP.RENAME_ELEMENT);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this.renameElementAction, IHelpContextIds.JSP_REFACTORRENAME_HELPID);

    this.moveElementAction = new RetargetTextEditorAction(bundle, IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT + StructuredTextEditorActionConstants.UNDERSCORE);
    this.moveElementAction.setActionDefinitionId(IActionDefinitionIdsJSP.MOVE_ELEMENT);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(this.moveElementAction, IHelpContextIds.JSP_REFACTORMOVE_HELPID);

    // the refactor menu, add the menu itself to add all refactor actions
    this.refactorMenu = new MenuManager(JSPUIMessages.ActionContributorJSP_0, RefactorActionGroup.MENU_ID); //$NON-NLS-1$
View Full Code Here

TOP

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

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.