Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Editor actions

Javier Torrente edited this page Mar 23, 2014 · 10 revisions

An editor action encapsulates an editor task which can be invoked from different contexts. For example, "undo", "redo", "save as", "open" and "run" will all be actions. Notice that the some actions may require additional input from the user before actually doing much; for instance, "save as" will likely pop up a dialog before saving anything.

Actions are the only first line of interaction, exposing editor APIs to the GUI user. They delegate all the actual heavy lifting to the actual editor APIs.

All actions extend EditorAction, and must implement void perform(Object... args);, which contains the code to execute the action. Each action can accept an undetermined number of arguments.

All actions invocations must be done through the controller, using the method Controller#action(String, Object...), where the first argument is the name of the action and the second is an array with arguments for the action.

Actions can be serialized, and a stack of SerializedActions is kept on memory. See this article for more details.

You can see the full list of actions in the package actions. However, here you have the list grouped logically:

Game project properties

Project management

Scenes

Scene elements

Edit operations

UI and application operations

System operations

These actions are not user-triggered but automatically generated by the system.

Clone this wiki locally