18 from ..controller.basecontroller
import _BaseController
19 from ..pluginapi
import Plugin
20 from ..action
import ActionInfo, SeparatorInfo
21 from ..run.configmanagerui
import ConfigManagerDialog
22 from ..run.ui
import Runner
33 Plugin.__init__(self, app, default_settings={
'configs': []})
41 if dlg.ShowModal() == wx.ID_OK:
42 self.
_configs_configs.update(dlg.get_data())
53 for index, cfg
in enumerate(configs):
59 info =
ActionInfo(
'Macros', name=
'%d: %s' % (index, config.name),
60 doc=config.help, action=run)
68 for item
in saved_data:
69 self.
addadd(item[0], item[1], item[2])
80 def add(self, name, command, doc):
86 for index, datum
in enumerate(data):
87 self.
editedit(index, *datum)
90 self.
_swap_swap(index-1, index)
93 self.
_swap_swap(index, index+1)
95 def _swap(self, index1, index2):
99 def edit(self, index, name, command, doc):
100 config = self.
_configs_configs[index]
101 config.name, config.command, config.doc = name, command, doc
104 if index < len(self.
_configs_configs):
108 return [ (c.name, c.command, c.doc)
for c
in self.
_configs_configs ]
112 help = property(
lambda self:
'%s (%s)' % (self.
docdoc, self.
commandcommand))
Used to create menu entries, keyboard shortcuts and/or toolbar buttons.
Used to create separators to menus.
Entry point to RIDE plugin API – all plugins must extend this class.
def register_action(self, action_info)
Registers a menu entry and optionally a shortcut and a toolbar icon.
def unregister_actions(self)
Unregisters all actions registered by this plugin.
def save_setting(self, name, value, override=True, delay=0)
Saves the specified setting into the RIDE configuration file.
A plugin for executing commands on the system.
def enable(self)
This method is called by RIDE when the plugin is enabled.
def OnManageConfigurations(self, event)
def _add_config_to_menu(self, config, index)
def _create_menu(self, configs)
def __init__(self, name, command, doc)
def __init__(self, saved_data)
def add(self, name, command, doc)
def move_down(self, index)
def __getitem__(self, index)
def edit(self, index, name, command, doc)
def _swap(self, index1, index2)
def run(*tests, **options)
Programmatic entry point for running tests.