javax.swing.text.TextAction#augmentList ( )源码实例Demo

下面列出了javax.swing.text.TextAction#augmentList ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: GspKit.java
@Override
protected Action[] createActions() {
    Action[] superActions = super.createActions();
    
    return TextAction.augmentList(superActions, new Action[] {
        new GspDeleteCharAction(deletePrevCharAction, false),
        new GspDefaultKeyTypedAction(),
        CslActions.createSelectCodeElementAction(true),
        CslActions.createSelectCodeElementAction(false),
        CslActions.createCamelCasePositionAction(findAction(superActions, nextWordAction), true),
        CslActions.createCamelCasePositionAction(findAction(superActions, previousWordAction), false),
        CslActions.createSelectCamelCasePositionAction(findAction(superActions, selectionNextWordAction), true),
        CslActions.createSelectCamelCasePositionAction(findAction(superActions, selectionPreviousWordAction), false),
        CslActions.createDeleteToCamelCasePositionAction(findAction(superActions, removeNextWordAction), true),
        CslActions.createDeleteToCamelCasePositionAction(findAction(superActions, removePreviousWordAction), false),
        CslActions.createInstantRenameAction()
     });
}
 
源代码2 项目: netbeans   文件: LanguagesEditorKit.java
protected @Override Action[] createActions() {
    Action[] myActions = new Action[] {
        new BraceCompletionInsertAction (),
        new BraceCompletionDeleteAction (),
        //new IndentAction (),
        new InstantRenameAction(),
        new LanguagesGenerateFoldPopupAction (),
        new org.netbeans.modules.languages.features.ToggleCommentAction(),
        new org.netbeans.modules.languages.features.CodeCommentAction(),
        new org.netbeans.modules.languages.features.CodeUncommentAction()
    };
    return TextAction.augmentList (
        super.createActions (), 
        myActions
    );
}
 
源代码3 项目: netbeans   文件: BaseCaretTest.java
@Override
protected Action[] getDeclaredActions() {
    Action swa = new TextAction("") {
        @Override
        public void actionPerformed(ActionEvent evt) {
            selectWordCalled = true;
        }
    };
    swa.putValue(Action.NAME, BaseKit.selectWordAction);
    
    Action[] actions = new Action[] {
        swa
    };
    return TextAction.augmentList(super.createActions(), actions);
}
 
源代码4 项目: netbeans   文件: ExtKit.java
protected @Override Action[] createActions() {
        ArrayList<Action> actions = new ArrayList<Action>();

        actions.add(new ExtDefaultKeyTypedAction());
// XXX: remove
//        if (!ExtCaret.NO_HIGHLIGHT_BRACE_LAYER) {
//            actions.add(new MatchBraceAction(matchBraceAction, false));
//            actions.add(new MatchBraceAction(selectionMatchBraceAction, true));
//        }
        actions.add(new CommentAction()); // to make ctrl-shift-T in Netbeans55 profile work
        actions.add(new UncommentAction()); // to make ctrl-shift-D in Netbeans55 profile work
                
        return TextAction.augmentList(super.createActions(), actions.toArray(new Action[actions.size()]));
    }
 
源代码5 项目: netbeans   文件: CslEditorKit.java
@Override
protected Action[] createActions() {
    Action[] superActions = super.createActions();
    Language language = LanguageRegistry.getInstance().getLanguageByMimeType(mimeType);
    ArrayList<Action> actions = new ArrayList<Action>(30);

    actions.add(new GsfDefaultKeyTypedAction());
    actions.add(new GsfInsertBreakAction());
    actions.add(new GsfDeleteCharAction(deletePrevCharAction, false));
    
    // The php needs to handle special cases of toggle comment. There has to be 
    // registered ToggleBlockCommentAction in PHP that handles these special cases,
    // but the current way, how the actions are registered, doesn't allow to overwrite the action
    // registered here.
    // See issue #204616. This hack can be removed, when issue #204616 will be done.
    if (!mimeType.equals("text/x-php5")) {
        actions.add(new ToggleBlockCommentAction());
    }
    actions.add(new GenerateFoldPopupAction());
    actions.add(new InstantRenameAction());
    actions.add(CslActions.createGoToDeclarationAction());
    actions.add(new GenericGenerateGoToPopupAction());
    actions.add(new SelectCodeElementAction(SelectCodeElementAction.selectNextElementAction, true));
    actions.add(new SelectCodeElementAction(SelectCodeElementAction.selectPreviousElementAction, false));

    if (language == null) {
        LOG.log(Level.WARNING, "Language missing for MIME type {0}", mimeType);
    } else if (language.hasOccurrencesFinder()) {
        actions.add(new GoToMarkOccurrencesAction(false));
        actions.add(new GoToMarkOccurrencesAction(true));
    }

    return TextAction.augmentList(superActions,
        actions.toArray(new Action[actions.size()]));
}
 
源代码6 项目: netbeans   文件: PropertiesKit.java
@Override
protected Action[] createActions() {
    Action[]  actions = new Action[] {
        new ToggleCommentAction("#"), //NOI18N
    };
    return TextAction.augmentList(super.createActions(), actions);
}
 
源代码7 项目: netbeans   文件: XMLKit.java
/**
 * Provide XML related actions.
 */
protected @Override Action[] createActions() {
    Action[] actions = new Action[] {
        new XMLCommentAction(),
        new XMLUncommentAction(),
        new ToggleBlockCommentAction(new XmlCommentHandler()),
        new TestAction(),
    };
    return TextAction.augmentList(super.createActions(), actions);
}
 
源代码8 项目: netbeans   文件: HtmlKit.java
@Override
protected Action[] createActions() {
    Action[] HtmlActions = new Action[]{
        CslActions.createSelectCodeElementAction(true),
        CslActions.createSelectCodeElementAction(false),
        CslActions.createInstantRenameAction(),
        CslActions.createToggleBlockCommentAction(),
        new ExtKit.CommentAction(""), //NOI18N
        new ExtKit.UncommentAction(""), //NOI18N
        CslActions.createGoToMarkOccurrencesAction(false),
        CslActions.createGoToMarkOccurrencesAction(true),
        CslActions.createGoToDeclarationAction()
    };
    return TextAction.augmentList(super.createActions(), HtmlActions);
}
 
源代码9 项目: netbeans   文件: JavaKit.java
protected Action[] createActions() {
    Action[] javaActions = new Action[] {
                               new JavaDefaultKeyTypedAction(),
                               new PrefixMakerAction(makeGetterAction, "get", getSetIsPrefixes), // NOI18N
                               new PrefixMakerAction(makeSetterAction, "set", getSetIsPrefixes), // NOI18N
                               new PrefixMakerAction(makeIsAction, "is", getSetIsPrefixes), // NOI18N
                               new AbbrevDebugLineAction(),
                           };
    return TextAction.augmentList(super.createActions(), javaActions);
}
 
源代码10 项目: netbeans   文件: NbEditorKit.java
protected @Override Action[] createActions() {
        Action[] nbEditorActions = new Action[] {
                                       nbUndoActionDef,
                                       nbRedoActionDef,
                                       new GenerateFoldPopupAction(),
                                       new NavigationHistoryBackAction(),
                                       new NavigationHistoryForwardAction(),
//                                       new ToggleToolbarAction(),
//                                       new NbToggleLineNumbersAction(),
                                       new NbGenerateGoToPopupAction(),
                                   };
        return TextAction.augmentList(super.createActions(), nbEditorActions);
    }
 
源代码11 项目: netbeans   文件: LatteEditorKit.java
@Override
protected Action[] createActions() {
    return TextAction.augmentList(super.createActions(), new Action[] {
        new ToggleBlockCommentAction(),
        CslActions.createInstantRenameAction()});
}
 
源代码12 项目: netbeans   文件: TwigEditorKit.java
@Override
protected Action[] createActions() {
    return TextAction.augmentList(super.createActions(), new Action[] {
        new ToggleBlockCommentAction(),
        CslActions.createInstantRenameAction()});
}
 
源代码13 项目: netbeans   文件: HTMLKit.java
protected Action[] createActions() {
    Action[] HTMLActions = new Action[] {
                               new HTMLShiftBreakAction()
                           };
    return TextAction.augmentList(super.createActions(), HTMLActions);
}
 
 方法所在类
 同类方法