Beispiel #1
0
  private void createMenu() {
    IApplication app = getApplication();
    ActionCollection coll = app.getActionCollection();

    JMenu menu = _resources.createMenu(IMenuResourceKeys.MENU);
    app.addToMenu(IApplication.IMenuIDs.SESSION_MENU, menu);

    Action act = new ConfigureAutoCorrectAction(app, _resources, this);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new FindAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new FindSelectedAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new RepeatLastFindAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new MarkSelectedAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new ReplaceAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new UnmarkAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new GoToLineAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new DuplicateLineAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new CommentAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);

    act = new UncommentAction(getApplication(), _resources);
    coll.add(act);
    _resources.addToMenu(act, menu);
  }
Beispiel #2
0
  /**
   * Create some additional actions and add them to the application. These actions are not part of
   * the menu, but needs to be initialized with the resources of the syntax plugin. Some of these
   * actions may be depend on a concrete editor.
   */
  private void createAdditionalActions() {
    IApplication app = getApplication();
    ActionCollection coll = app.getActionCollection();

    coll.add(new SquirrelCopyAsRtfAction(getApplication(), _resources));
  }