Actions
Prev | Chapter 2. API Changes | Next

## Actions

The syntax of the `actions.xml` file has not changed.

A few methods of the EditAction class were made final, since these three values must be known even if the action instance in question has not been loaded:

- `getLabel()`

- `isToggle()`

- `getMouseOverText()`

This change does not affect plugins that define actions using an `actions.xml` file. However, if your plugin creates action instances dynamically, you will need to make calls like the following instead of overriding these methods:

    jEdit.setTemporaryProperty("action name.label",
        "Hello World");
    jEdit.setTemporaryProperty("action name.toggle",
        "true or false");
    jEdit.setTemporaryProperty("action name.mouse-over",
        "some string");

Make sure to use `jEdit.setTemporaryProperty()` and not `jEdit.setProperty()` since the latter will save the values to the user properties file, which is probably not what you want.

The `jEdit.getActions()` method has been deprecated, since it must load all plugin `actions.xml` files in order to return an array of EditAction instances. Use `jEdit.getActionNames()` instead, which returns an array of strings.

A new abstract method was added to the InputHandler class:

`void addKeyBinding(` | String | keyBinding,
| String | action`)`;

The `removeKeyBinding()` method of the DefaultInputHandler class has finally been implemented. Previously it always threw an `InternalError` when invoked.

Prev | Up | Next
EditPlugin Class Changes | Home | Dockable Windows