23 """ The ConfigEditorPlugin opens config files in a ConfigEditorTab.
26 def __init__(self, application=None, name=None):
27 logging.debug(__name__ +
": __init__")
28 BrowserPlugin.__init__(self, application)
31 self.
application().commandLineParser().add_option(
"-s",
"--saveimage", dest=
"saveimage", help=
"save center view to image FILE", metavar=
"FILE")
34 BrowserPlugin.startUp(self)
40 """ Create ConfigEditorTab and add to MainWindow.
45 tab.setController(controller)
46 controller.boxContentDialog().addButton(
"&Type",
"object.type")
47 controller.boxContentDialog().addButton(
"&Classname",
"object.classname")
48 controller.boxContentDialog().addButton(
"&Filename",
"object.filename")
49 controller.boxContentDialog().addButton(
"&Package",
"object.package")
54 """ Create ConfigEditorTab and add to MainWindow.
59 controller=self.
newTab().controller()
62 if isinstance(self.
application().currentTabController(),ConfigEditorTabController):
63 controller=self.
application().currentTabController()
64 except NoCurrentTabControllerException:
67 logging.error(__name__ +
": No configuration file was opened for editing.")
68 self.
application().errorMessage(
"No configuration file was opened for editing.")
70 controller.startEditMode()
def registerFiletypesFromTabController