public class IDEActions { private static final String STRING_ActionGroupName = "JBuilder IDE Toolbox"; // ActiveGroup's Name public static final EditorContextActionProvider CONTEXTMENU_ActionProvider = new EditorContextActionProvider() { public Action getContextAction(EditorPane target) { ActionGroup actionGroup = new ActionGroup(); ActionGroup actionSubGroup = new ActionGroup(STRING_ActionGroupName); actionSubGroup.add(JavaCommentSwitch.ACTION_GenerateJavaCommentSwitch); // 此处可以增加更多的功能 // ...... actionGroup.add(actionSubGroup); return actionGroup; }
public int getPriority() { return 0; } };
public IDEActions() { }
static class ction implements EditorContextActionProvider { public Action getContextAction(EditorPane target) { ActionGroup actionGroup = new ActionGroup(); ActionGroup actionSubGroup = new ActionGroup(STRING_ActionGroupName); actionSubGroup.add(JavaCommentSwitch.ACTION_GenerateJavaCommentSwitch); actionGroup.add(actionSubGroup); return actionGroup; }