Package org.eclipse.ui.texteditor

Examples of org.eclipse.ui.texteditor.TextOperationAction


            }

            Action action;
            if (noCommentFound)
            {
                action = new TextOperationAction(
                    PerlEditorMessages.getResourceBundle(),
                    "Uncomment.",
                    editor,
                    ITextOperationTarget.STRIP_PREFIX);
            }
            else
            {
                action = new TextOperationAction(
                    PerlEditorMessages.getResourceBundle(),
                    "Comment.",
                    editor,
                    ITextOperationTarget.PREFIX);
            }
View Full Code Here


        contentAssistAction
                .setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
        setAction("ContentAssistProposal", contentAssistAction);
        markAsStateDependentAction("ContentAssistProposal", true);

        final TextOperationAction showEdocAction0 = new TextOperationAction(keyBundle,
                "ShowEDoc.", this, ISourceViewer.INFORMATION, true);
        final ShowEDocAction showEdocAction = new ShowEDocAction(this, getSourceViewer(),
                keyBundle, "ShowEDoc.", showEdocAction0);
        showEdocAction.setActionDefinitionId(IErlangEditorActionDefinitionIds.SHOW_EDOC);
        setAction("ShowEDoc", showEdocAction);
View Full Code Here

    protected void createActions() {
        super.createActions();

        // This action will fire a CONTENTASSIST_PROPOSALS operation
        // when executed
        IAction action = new TextOperationAction(IvyPlugin.getDefault().getResourceBundle(),
                "ContentAssistProposal", this, ISourceViewer.CONTENTASSIST_PROPOSALS);
        action.setActionDefinitionId(CONTENTASSIST_PROPOSAL_ID);

        // Tell the editor about this new action
        setAction(CONTENTASSIST_PROPOSAL_ID, action);

        // Tell the editor to execute this action
View Full Code Here

    /** For user triggered content assistance */
    protected void createActions() {
        super.createActions();

        IAction a = new TextOperationAction(RuleEditorMessages
                .getResourceBundle(), "ContentAssistProposal.", this,
                ISourceViewer.CONTENTASSIST_PROPOSALS);
        a
                .setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
        setAction("ContentAssistProposal", a);

        a = new TextOperationAction(
                RuleEditorMessages.getResourceBundle(),
                "ContentAssistTip.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION); //$NON-NLS-1$
        a
                .setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
        setAction("ContentAssistTip", a);

        a = new ToggleBreakpointAction(getSite().getPart() , null, getVerticalRuler());
        setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, a);
View Full Code Here

    protected void createActions() {
        super.createActions();

        // This action will fire a CONTENTASSIST_PROPOSALS operation
        // when executed
        IAction action = new TextOperationAction(IvyPlugin.getDefault().getResourceBundle(),
                "ContentAssistProposal", this, SourceViewer.CONTENTASSIST_PROPOSALS);
        action.setActionDefinitionId(CONTENTASSIST_PROPOSAL_ID);

        // Tell the editor about this new action
        setAction(CONTENTASSIST_PROPOSAL_ID, action);

        // Tell the editor to execute this action
View Full Code Here

        super.createActions();

        ResourceBundle bundle = JavaEditorMessages.getResourceBundle();
        // This action will fire a CONTENTASSIST_PROPOSALS operation
        // when executed
        IAction action = new TextOperationAction(//
                bundle, "ContentAssistProposal", this, SourceViewer.CONTENTASSIST_PROPOSALS);
        action.setActionDefinitionId(CONTENTASSIST_PROPOSAL_ID);
        // Tell the editor about this new action
        setAction(CONTENTASSIST_PROPOSAL_ID, action);
        // Tell the editor to execute this action
        // when Ctrl+Spacebar is pressed
        setActionActivationCode(CONTENTASSIST_PROPOSAL_ID, ' ', -1, SWT.CTRL);
View Full Code Here

    protected void createActions() {
        super.createActions();

        // This action will fire a CONTENTASSIST_PROPOSALS operation
        // when executed
        IAction action = new TextOperationAction(IvyPlugin.getDefault().getResourceBundle(),
                "ContentAssistProposal", this, SourceViewer.CONTENTASSIST_PROPOSALS);
        action.setActionDefinitionId(CONTENTASSIST_PROPOSAL_ID);

        // Tell the editor about this new action
        setAction(CONTENTASSIST_PROPOSAL_ID, action);

        // Tell the editor to execute this action
View Full Code Here

  @Override
  protected void createActions() {
    super.createActions();

    // Comment
    Action action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),
            "Comment.", this, ITextOperationTarget.PREFIX); //$NON-NLS-1$
    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.COMMENT);
    setAction("Comment", action); //$NON-NLS-1$
    markAsStateDependentAction("Comment", true); //$NON-NLS-1$

    // Uncomment
    action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),
            "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX); //$NON-NLS-1$
    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.UNCOMMENT);
    setAction("Uncomment", action); //$NON-NLS-1$
    markAsStateDependentAction("Uncomment", true); //$NON-NLS-1$

    // Toggle comment
    action = new ToggleCommentAction(DLTKEditorMessages.getBundleForConstructedKeys(),
            "ToggleComment.", this); //$NON-NLS-1$
    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.TOGGLE_COMMENT);
    setAction("ToggleComment", action); //$NON-NLS-1$
    markAsStateDependentAction("ToggleComment", true); //$NON-NLS-1$
    configureToggleCommentAction();

    action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),
            "Format.", this, ISourceViewer.FORMAT); //$NON-NLS-1$
    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.FORMAT);
    setAction("Format", action); //$NON-NLS-1$
    markAsStateDependentAction("Format", true); //$NON-NLS-1$
    markAsSelectionDependentAction("Format", true); //$NON-NLS-1$
    // PlatformUI.getWorkbench().getHelpSystem().setHelp(action,
    // IJavaHelpContextIds.FORMAT_ACTION);
View Full Code Here

import org.eclipse.ui.texteditor.TextOperationAction;

public class RutaGenerateActionGroup extends GenerateActionGroup {
  public RutaGenerateActionGroup(RutaEditor editor, String groupName) {
    super(editor, groupName);
    Action action = new TextOperationAction(DLTKEditorMessages.getBundleForConstructedKeys(),
            "Format.", editor, ISourceViewer.FORMAT); //$NON-NLS-1$
    action.setActionDefinitionId(IScriptEditorActionDefinitionIds.FORMAT);
    editor.setAction(DLTKActionConstants.FORMAT, action);
    editor.markAsStateDependentAction(DLTKActionConstants.FORMAT, true);
    editor.markAsSelectionDependentAction(DLTKActionConstants.FORMAT, true);
  }
View Full Code Here

    boolean checked = store.getBoolean(AbstractStructuredFoldingStrategy.FOLDING_ENABLED);
    fToggle.setChecked(checked);
    fToggle.setActionDefinitionId(IFoldingCommandIds.FOLDING_TOGGLE);
    editor.setAction("FoldingToggle", fToggle); //$NON-NLS-1$

    fExpandAll = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_ExpandAll_", editor, ProjectionViewer.EXPAND_ALL, true); //$NON-NLS-1$
    fExpandAll.setActionDefinitionId(IFoldingCommandIds.FOLDING_EXPAND_ALL);
    editor.setAction("FoldingExpandAll", fExpandAll); //$NON-NLS-1$

    fCollapseAll = new TextOperationAction(SSEUIMessages.getResourceBundle(), "Projection_CollapseAll_", editor, ProjectionViewer.COLLAPSE_ALL, true); //$NON-NLS-1$
    fCollapseAll.setActionDefinitionId(IFoldingCommandIds.FOLDING_COLLAPSE_ALL);
    editor.setAction("FoldingCollapseAll", fCollapseAll); //$NON-NLS-1$
  }
View Full Code Here

TOP

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

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.