2020
2121from contextlib import contextmanager
2222
23- from robotide .namespace import Namespace
24- from robotide .controller import Project
25- from robotide .spec import librarydatabase
26- from robotide .ui import LoadProgressObserver
27- from robotide .ui .mainframe import RideFrame
28- from robotide import publish
29- from robotide import context , contrib
30- from robotide .context import coreplugins
31- from robotide .preferences import Preferences , RideSettings
32- from robotide .application .pluginloader import PluginLoader
33- from robotide .application .editorprovider import EditorProvider
34- from robotide .application .releasenotes import ReleaseNotes
35- from robotide .application .updatenotifier import UpdateNotifierController , UpdateDialog
36- from robotide .ui .treeplugin import TreePlugin
37- from robotide .ui .fileexplorerplugin import FileExplorerPlugin
38- from robotide import utils
23+ from . .namespace import Namespace
24+ from . .controller import Project
25+ from . .spec import librarydatabase
26+ from . .ui import LoadProgressObserver
27+ from . .ui .mainframe import RideFrame
28+ from .. import publish
29+ from .. import context , contrib
30+ from . .context import coreplugins
31+ from . .preferences import Preferences , RideSettings
32+ from . .application .pluginloader import PluginLoader
33+ from . .application .editorprovider import EditorProvider
34+ from . .application .releasenotes import ReleaseNotes
35+ from . .application .updatenotifier import UpdateNotifierController , UpdateDialog
36+ from . .ui .treeplugin import TreePlugin
37+ from . .ui .fileexplorerplugin import FileExplorerPlugin
38+ from .. import utils
3939
4040
4141class RIDE (wx .App ):
@@ -62,10 +62,15 @@ def OnInit(self):
6262 self ._plugin_loader = PluginLoader (self , self ._get_plugin_dirs (),
6363 coreplugins .get_core_plugins ())
6464 self ._plugin_loader .enable_plugins ()
65+ perspective = self .settings .get ('AUI Perspective' , None )
66+ if perspective :
67+ self .frame ._mgr .LoadPerspective (perspective , True )
6568 self .treeplugin = TreePlugin (self )
66- self .treeplugin .register_frame (self .frame )
69+ if self .treeplugin .settings ['_enabled' ]:
70+ self .treeplugin .register_frame (self .frame )
6771 self .fileexplorerplugin = FileExplorerPlugin (self , self ._controller )
68- self .fileexplorerplugin .register_frame (self .frame )
72+ if self .fileexplorerplugin .settings ['_enabled' ]:
73+ self .fileexplorerplugin .register_frame (self .frame )
6974 self .frame .Show ()
7075 if not self .treeplugin .opened :
7176 self .treeplugin .close_tree ()
@@ -77,9 +82,6 @@ def OnInit(self):
7782 self .treeplugin .set_editor (self .editor )
7883 self ._find_robot_installation ()
7984 self ._publish_system_info ()
80- perspective = self .settings .get ('AUI Perspective' , None )
81- if perspective :
82- self .frame ._mgr .LoadPerspective (perspective , True )
8385 if self ._updatecheck :
8486 UpdateNotifierController (self .settings ).notify_update_if_needed (UpdateDialog )
8587 wx .CallLater (200 , ReleaseNotes (self ).bring_to_front )
@@ -99,8 +101,8 @@ def _get_plugin_dirs(self):
99101 contrib .CONTRIB_PATH ]
100102
101103 def _get_editor (self ):
102- from robotide .editor import EditorPlugin
103- from robotide .editor .texteditor import TextEditorPlugin
104+ from . .editor import EditorPlugin
105+ from . .editor .texteditor import TextEditorPlugin
104106 for pl in self ._plugin_loader .plugins :
105107 maybe_editor = pl ._plugin
106108 if (isinstance (maybe_editor , EditorPlugin ) or
@@ -135,7 +137,7 @@ def _get_latest_path(self):
135137 return recent .recent_files [0 ]
136138
137139 def _get_recentfiles_plugin (self ):
138- from robotide .recentfiles import RecentFilesPlugin
140+ from . .recentfiles import RecentFilesPlugin
139141 for pl in self .get_plugins ():
140142 if isinstance (pl ._plugin , RecentFilesPlugin ):
141143 return pl ._plugin
0 commit comments