GuiEditor (@NotNull final DataContext context) { final FileEditor editor = PlatformCoreDataKeys.FILE_EDITOR.getData(context); if (editor instanceof UIFormEditor) { return ((UIFormEditor)editor).getEditor(); } else { return GuiEditor.DATA_KEY.getData(context); } }