Skip to content

Actions

This page lists which data keys are available when you declare actions ⧉. MPSCommonDataKeys are always available, MPSEditorDataKeys ⧉ is only available in node editors. MPSDataKeys ⧉ are only available in certain places such as project panes.

CommonDataKeys

This class lists common data keys used as parameter for actions.

name description Available in MPS
CARET Returns a caret instance (in host or injected editor, depending on context). ⛔
EDITOR Returns the currently focused editor instance. ⛔
EDITOR_EVEN_IF_INACTIVE Returns an editor even if the focus currently is in the find bar. ⛔
EDITOR_VIRTUAL_SPACE Returns whether the current location relates to a virtual space in an editor. ⛔
HOST_EDITOR Returns a reference to host an editor instance in case the EDITOR key refers to an injected editor. ⛔
NAVIGATABLE Returns a Navigatable instance. ⛔
NAVIGATABLE_ARRAY Returns several navigatables, e.g. ⛔
PROJECT Returns a project if a project node is selected (in project view) ✅
PSI_ELEMENT Returns a PsiElement instance. ⛔
PSI_FILE Returns the currently selected PsiFile instance. ⛔
VIRTUAL_FILE Returns a VirtualFile instance. ✅
VIRTUAL_FILE_ARRAY Returns several VirtualFile instances ✅

PlatformDataKeys

This class extends CommonDataKeys and adds new keys that deal with the IntelliJ platform itself.

name description Available in MPS
ACTIONS_SORTER Deprecated. use ActionPromoter ⛔
CONTENT_MANAGER Returns the managing class that's responsible for the current component's content ⛔
CONTEXT_COMPONENT Returns the component that's currently in focus. ✅
CONTEXT_MENU_POINT Returns a point to guess where to show the context menu invoked by a key. ⛔
COPY_PROVIDER Returns the copy provider responsible for copying data. ✅
CUT_PROVIDER Returns the cut provider responsible for cutting data. ✅
DELETE_ELEMENT_PROVIDER ✅
DOMINANT_HINT_AREA_RECTANGLE Returns the position and dimension of a hint. ⛔
EXPORTER_TO_TEXT_FILE ⛔
FILE_EDITOR Returns the file ✅
FILE_TEXT Returns the text of the currently selected file/file revision
HELP_ID Returns help id. ✅
IS_MODAL_CONTEXT Returns Boolean. TRUE if action is executed in modal context and Boolean. FALSE if action is executed not in modal context. ✅
MODALITY_STATE See: Modality and invokeLater() - IntelliJ Platform Plugin SDK ⧉
NONEMPTY_CONTENT_MANAGER Returns a non-empty managing class that's responsible for the current component's content ⛔
PASTE_PROVIDER Returns the paste provider responsible for pasting data. ✅
PREDEFINED_TEXT Returns a predefined text value. ⛔
PROJECT_CONTEXT Returns a project if a project node is selected (in the project view). ⛔
PROJECT_FILE_DIRECTORY ✅
SEARCH_INPUT_TEXT ⛔
SELECTED_ITEM Returns a single selected item. ✅
SELECTED_ITEMS Returns multiple selected items. ⛔
SOURCE_NAVIGATION_LOCKED ⛔
SPEED_SEARCH_COMPONENT Returns the speed search component ⛔
STATUS_BAR Returns the status bar class ⛔
TOOL_WINDOW Returns the current tool window ✅
TREE_EXPANDER ⛔
UI_DISPOSABLE Returns the class responsible for disposing of a UI component ⛔

Last update: July 13, 2023

Comments