17 from ..
import robotapi
18 from ..
import controller
20 from ..controller.dataloader
import TestDataDirectoryWithExcludes
21 from ..controller
import filecontrollers
23 from ..controller.settingcontrollers
import VariableController
24 from .editors
import (InitFileEditor, TestCaseFileEditor, WelcomePage, ResourceFileEditor)
25 from .macroeditors
import TestCaseEditor, UserKeywordEditor
32 _controller = _controller.datafile_controller
33 editor_class = plugin.get_editor(_controller.data.__class__)
34 return editor_class(plugin, parent, _controller, tree)
48 (TestDataDirectoryWithExcludes, InitFileEditor))
55 for item, editorclass
in self.
_EDITORS_EDITORS:
66 _controller = plugin.get_selected_item()
67 if self.
_invalid_invalid(_controller):
69 if self.
_editor_editor
and tree
and (
not tree._datafile_nodes
or
79 return self.
_create_new_editor_create_new_editor(_controller, editor_panel, plugin, tree)
83 return not _controller
or _controller.data
is None or \
85 isinstance(_controller, filecontrollers.ExcludedDirectoryController)
88 return self.
_editor_editor
and \
89 isinstance(_controller, VariableController)
and \
90 _controller.datafile_controller
is self.
_editor_editor.controller
93 editor_class = plugin.get_editor(_controller.data.__class__)
96 editor_panel.Show(
False)
97 return editor_class(plugin, editor_panel, _controller, tree)
101 return all([tree.node_is_resource_file(node)
102 for node
in tree._datafile_nodes])
def _only_resource_files(tree)
def _should_use_old_editor(self, _controller)
def register_editors(self)
def editor_for(self, plugin, editor_panel, tree)
def __init__(self, editor_registerer)
def _create_editor(self, editor_panel, plugin, tree)
def _create_new_editor(self, _controller, editor_panel, plugin, tree)
def _invalid(_controller)
The parsed resource file object.
The parsed test case file object.
The parsed test data directory object.
def VariableEditorChooser(plugin, parent, _controller, tree)