From 2a4a91b20538d3f6487678f78f4592372b700c72 Mon Sep 17 00:00:00 2001 From: Anna Bulenkova Date: Wed, 10 Dec 2014 14:14:18 +0100 Subject: [PATCH] [md] data context --- tutorials/working_with_editor.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tutorials/working_with_editor.md b/tutorials/working_with_editor.md index 72641bacd..d1b284bef 100644 --- a/tutorials/working_with_editor.md +++ b/tutorials/working_with_editor.md @@ -84,7 +84,17 @@ Example from **TODO** [Link to threading issue] #DataContext -**TODO** +Class +[DataContext.java] (https://github.com/JetBrains/intellij-community/blob/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/DataContext.java) +allows an action to retrieve information about the context in which it was invoked. +It's only method + +```@Nullable Object getData(@NonNls String dataId);``` + +returns an object corresponding to the specified data identifier. Some of the supported +data identifiers are defined in class +[PlatformDataKeys.java](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-api/src/com/intellij/openapi/actionSystem/PlatformDataKeys.java) + #AnActionEvent **TODO**