com.intellij.openapi.actionSystem
Interface DataProvider
- All Known Implementing Classes:
- EditorActionTestCase, FileGroupingRule.FileUsageGroup, IdeaTestCase, LightCodeInsightTestCase, LightIdeaTestCase, ModuleTestCase, PanelWithActionsAndCloseButton, ParsingTestCase, PsiTestCase, TestSourceBasedTestCase
public interface DataProvider
Allows a component hosting actions to provide context information to the actions. When a specific
data item is requested, the component hierarchy is walked up from the currently focused component,
and every component implementing the DataProvider interface is queried for the data
until one of them returns the data. Data items can also be mapped to each other - for example,
if a data provider provides an item for DataConstants.NAVIGATABLE, an item for
DataConstants.NAVIGATABLE_ARRAY can be generated from it automatically.
- See Also:
DataContext
|
Method Summary |
java.lang.Object |
getData(java.lang.String dataId)
Returns the object corresponding to the specified data identifier. |
getData
@Nullable
java.lang.Object getData(java.lang.String dataId)
- Returns the object corresponding to the specified data identifier. Some of the supported
data identifiers are defined in the
DataConstants class.
- Parameters:
dataId - the data identifier for which the value is requested.
- Returns:
- the value, or null if no value is available in the current context for this identifier.