81 from eric7.PluginManager.PluginManager import PluginManager |
81 from eric7.PluginManager.PluginManager import PluginManager |
82 from eric7.PluginManager.PluginRepositoryDialog import PluginRepositoryDownloadCleanup |
82 from eric7.PluginManager.PluginRepositoryDialog import PluginRepositoryDownloadCleanup |
83 from eric7.Preferences import Shortcuts |
83 from eric7.Preferences import Shortcuts |
84 from eric7.Project.Project import Project |
84 from eric7.Project.Project import Project |
85 from eric7.QScintilla.SpellChecker import SpellChecker |
85 from eric7.QScintilla.SpellChecker import SpellChecker |
|
86 from eric7.RemoteServerInterface.EricServerInterface import EricServerInterface |
86 from eric7.Sessions.SessionFile import SessionFile |
87 from eric7.Sessions.SessionFile import SessionFile |
87 from eric7.SystemUtilities import ( |
88 from eric7.SystemUtilities import ( |
88 DesktopUtilities, |
89 DesktopUtilities, |
89 FileSystemUtilities, |
90 FileSystemUtilities, |
90 OSUtilities, |
91 OSUtilities, |
390 self.shell.setDebuggerUI(self.debuggerUI) |
391 self.shell.setDebuggerUI(self.debuggerUI) |
391 |
392 |
392 # Generate the redirection helpers |
393 # Generate the redirection helpers |
393 self.stdout = Redirector(False, self) |
394 self.stdout = Redirector(False, self) |
394 self.stderr = Redirector(True, self) |
395 self.stderr = Redirector(True, self) |
|
396 |
|
397 # create the remote server interface |
|
398 self.__ericServerInterface = EricServerInterface(self) |
395 |
399 |
396 # set a few dialog members for non-modal dialogs created on demand |
400 # set a few dialog members for non-modal dialogs created on demand |
397 self.programsDialog = None |
401 self.programsDialog = None |
398 self.shortcutsDialog = None |
402 self.shortcutsDialog = None |
399 self.__testingWidget = None |
403 self.__testingWidget = None |
633 ericApp().registerObject("DocuViewer", self.codeDocumentationViewer) |
637 ericApp().registerObject("DocuViewer", self.codeDocumentationViewer) |
634 if self.microPythonWidget is not None: |
638 if self.microPythonWidget is not None: |
635 ericApp().registerObject("MicroPython", self.microPythonWidget) |
639 ericApp().registerObject("MicroPython", self.microPythonWidget) |
636 ericApp().registerObject("JediAssistant", self.jediAssistant) |
640 ericApp().registerObject("JediAssistant", self.jediAssistant) |
637 ericApp().registerObject("PluginRepositoryViewer", self.pluginRepositoryViewer) |
641 ericApp().registerObject("PluginRepositoryViewer", self.pluginRepositoryViewer) |
|
642 ericApp().registerObject("EricServer", self.__ericServerInterface) |
638 |
643 |
639 # create the various JSON file interfaces |
644 # create the various JSON file interfaces |
640 self.__sessionFile = SessionFile(True) |
645 self.__sessionFile = SessionFile(True) |
641 self.__tasksFile = TasksFile(True) |
646 self.__tasksFile = TasksFile(True) |
642 |
647 |
3570 self.project.initActions() |
3575 self.project.initActions() |
3571 |
3576 |
3572 # initialize multi project actions |
3577 # initialize multi project actions |
3573 self.multiProject.initActions() |
3578 self.multiProject.initActions() |
3574 |
3579 |
|
3580 # initialize eric-ide server actions |
|
3581 self.__ericServerInterface.initActions() |
|
3582 |
3575 def __initQtDocActions(self): |
3583 def __initQtDocActions(self): |
3576 """ |
3584 """ |
3577 Private slot to initialize the action to show the Qt documentation. |
3585 Private slot to initialize the action to show the Qt documentation. |
3578 """ |
3586 """ |
3579 self.qt5DocAct = EricAction( |
3587 self.qt5DocAct = EricAction( |
3777 mb = self.menuBar() |
3785 mb = self.menuBar() |
3778 if ( |
3786 if ( |
3779 OSUtilities.isLinuxPlatform() or OSUtilities.isFreeBsdPlatform() |
3787 OSUtilities.isLinuxPlatform() or OSUtilities.isFreeBsdPlatform() |
3780 ) and not Preferences.getUI("UseNativeMenuBar"): |
3788 ) and not Preferences.getUI("UseNativeMenuBar"): |
3781 mb.setNativeMenuBar(False) |
3789 mb.setNativeMenuBar(False) |
|
3790 |
|
3791 ############################################################## |
|
3792 ## Remote Server menu |
|
3793 ############################################################## |
|
3794 |
|
3795 self.__menus["server"] = self.__ericServerInterface.initMenu() |
3782 |
3796 |
3783 ############################################################## |
3797 ############################################################## |
3784 ## File menu |
3798 ## File menu |
3785 ############################################################## |
3799 ############################################################## |
3786 |
3800 |
3793 self.__menus["file"].addAction(self.restartAct) |
3807 self.__menus["file"].addAction(self.restartAct) |
3794 self.__menus["file"].addAction(self.exitAct) |
3808 self.__menus["file"].addAction(self.exitAct) |
3795 act = self.__menus["file"].actions()[0] |
3809 act = self.__menus["file"].actions()[0] |
3796 sep = self.__menus["file"].insertSeparator(act) |
3810 sep = self.__menus["file"].insertSeparator(act) |
3797 self.__menus["file"].insertAction(sep, self.newWindowAct) |
3811 self.__menus["file"].insertAction(sep, self.newWindowAct) |
|
3812 self.__menus["file"].insertSeparator(sep) |
|
3813 self.__menus["file"].insertMenu(sep, self.__menus["server"]) |
|
3814 self.__menus["file"].insertSeparator(sep) |
3798 self.__menus["file"].aboutToShow.connect(self.__showFileMenu) |
3815 self.__menus["file"].aboutToShow.connect(self.__showFileMenu) |
3799 |
3816 |
3800 ############################################################## |
3817 ############################################################## |
3801 ## Edit menu |
3818 ## Edit menu |
3802 ############################################################## |
3819 ############################################################## |
4090 spellingtb = self.viewmanager.initSpellingToolbar(self.toolbarManager) |
4107 spellingtb = self.viewmanager.initSpellingToolbar(self.toolbarManager) |
4091 settingstb = QToolBar(self.tr("Settings"), self) |
4108 settingstb = QToolBar(self.tr("Settings"), self) |
4092 helptb = QToolBar(self.tr("Help"), self) |
4109 helptb = QToolBar(self.tr("Help"), self) |
4093 profilestb = QToolBar(self.tr("Profiles"), self) |
4110 profilestb = QToolBar(self.tr("Profiles"), self) |
4094 pluginstb = QToolBar(self.tr("Plugins"), self) |
4111 pluginstb = QToolBar(self.tr("Plugins"), self) |
|
4112 servertb = self.__ericServerInterface.initToolbar(self.toolbarManager) |
4095 |
4113 |
4096 toolstb.setObjectName("ToolsToolbar") |
4114 toolstb.setObjectName("ToolsToolbar") |
4097 testingtb.setObjectName("UnittestToolbar") |
4115 testingtb.setObjectName("UnittestToolbar") |
4098 settingstb.setObjectName("SettingsToolbar") |
4116 settingstb.setObjectName("SettingsToolbar") |
4099 helptb.setObjectName("HelpToolbar") |
4117 helptb.setObjectName("HelpToolbar") |
4192 pluginstb.addAction(self.pluginRepoAct) |
4210 pluginstb.addAction(self.pluginRepoAct) |
4193 self.toolbarManager.addToolBar(pluginstb, pluginstb.windowTitle()) |
4211 self.toolbarManager.addToolBar(pluginstb, pluginstb.windowTitle()) |
4194 |
4212 |
4195 # add the various toolbars |
4213 # add the various toolbars |
4196 self.addToolBar(filetb) |
4214 self.addToolBar(filetb) |
|
4215 self.addToolBar(servertb) |
4197 self.addToolBar(edittb) |
4216 self.addToolBar(edittb) |
4198 self.addToolBar(searchtb) |
4217 self.addToolBar(searchtb) |
4199 self.addToolBar(viewtb) |
4218 self.addToolBar(viewtb) |
4200 self.addToolBar(starttb) |
4219 self.addToolBar(starttb) |
4201 self.addToolBar(debugtb) |
4220 self.addToolBar(debugtb) |
4242 multiprojecttb, |
4261 multiprojecttb, |
4243 "", |
4262 "", |
4244 ] |
4263 ] |
4245 self.__toolbars["spelling"] = [spellingtb.windowTitle(), spellingtb, ""] |
4264 self.__toolbars["spelling"] = [spellingtb.windowTitle(), spellingtb, ""] |
4246 self.__toolbars["vcs"] = [vcstb.windowTitle(), vcstb, "vcs"] |
4265 self.__toolbars["vcs"] = [vcstb.windowTitle(), vcstb, "vcs"] |
|
4266 self.__toolbars["server"] = [servertb.windowTitle(), servertb, ""] |
4247 |
4267 |
4248 def __initDebugToolbarsLayout(self): |
4268 def __initDebugToolbarsLayout(self): |
4249 """ |
4269 """ |
4250 Private slot to initialize the toolbars layout for the debug profile. |
4270 Private slot to initialize the toolbars layout for the debug profile. |
4251 """ |
4271 """ |