Example #1
0
 def get_action_info(self):
     action_info = ActionInfo('File',
                              self.label,
                              self.OnOpenRecent,
                              doc=self.doc)
     action_info.set_menu_position(before='Exit')
     return action_info
Example #2
0
 def _register_actions(self):
     run_action_info = ActionInfo("Tools",
                                  "Run Tests",
                                  self.OnRun,
                                  None,
                                  "F8",
                                  ImageProvider().TOOLBAR_PLAY,
                                  "Run the selected tests",
                                  position=10)
     self._run_action = self.register_action(run_action_info)
     run_action_debug = ActionInfo("Tools",
                                   "Run Tests with Debug",
                                   self.OnRunDebug,
                                   None,
                                   "F9",
                                   getBugIconBitmap(),
                                   "Run the selected tests with Debug",
                                   position=8)
     self._run_action = self.register_action(run_action_debug)
     stop_action_info = ActionInfo("Tools",
                                   "Stop Test Run",
                                   self.OnStop,
                                   None,
                                   "CtrlCmd-F8",
                                   ImageProvider().TOOLBAR_STOP,
                                   "Stop a running test",
                                   position=11)
     self._stop_action = self.register_action(stop_action_info)
Example #3
0
 def _add_recent_files_to_menu(self):
     if not self.recent_files:
         action = ActionInfo('File', 'No recent files')
         action.set_menu_position(before='Exit')
         self.register_action(action)
     else:
         for n, path in enumerate(self.recent_files):
             self._add_file_to_menu(path, n)
     sep = SeparatorInfo('File')
     sep.set_menu_position(before='Exit')
     self.register_action(sep)
Example #4
0
 def _add_recent_files_to_menu(self):
     if not self.recent_files:
         action = ActionInfo('File', 'No recent files')
         action.set_menu_position(before='Exit')
         self.register_action(action)
     else:
         for n, path in enumerate(self.recent_files):
             self._add_file_to_menu(path, n)
     sep = SeparatorInfo('File')
     sep.set_menu_position(before='Exit')
     self.register_action(sep)
Example #5
0
 def enable(self):
     self.application.frame.actions.register_action(
         ActionInfo('Help',
                    'Release Notes',
                    self.show,
                    doc='Show the release notes'))
     self.show_if_updated()
 def _create_menu(self, configs):
     self.unregister_actions()
     self.register_action(ActionInfo('Macros', 'Manage Run Configurations',
                                     self.OnManageConfigurations))
     self.register_action(SeparatorInfo('Macros'))
     for index, cfg in enumerate(configs):
         self._add_config_to_menu(cfg, index+1)
Example #7
0
 def _create_menu(self):
     self.unregister_actions()
     self.register_action(
         ActionInfo('Tools',
                    'Create RIDE Desktop Shortcut',
                    self.OnViewShortcutCreate,
                    position=85))
Example #8
0
 def enable(self):
     self.register_action(ActionInfo('View','View File Explorer', self.OnShowFileExplorer,
                                     shortcut='F11',
                                     doc='Show File Explorer panel',
                                     position=1))
     # self.save_setting('opened', True)
     if self.opened:
         self.OnShowFileExplorer(None)
Example #9
0
 def enable(self):
     self.register_action(ActionInfo('View','View Test Suites Explorer', self.OnShowTree,
                                     shortcut='F12',
                                     doc='Show Test Suites tree panel',
                                     position=1))
     self.subscribe(self.OnTreeSelection, RideTreeSelection)
     # self.save_setting('opened', True)
     if self.opened:
         self.OnShowTree(None)
Example #10
0
    def _add_config_to_menu(self, config, index):
        def run(event):
            Runner(config, self.notebook).run()

        info = ActionInfo('Macros',
                          name='%d: %s' % (index, config.name),
                          doc=config.help,
                          action=run)
        self.register_action(info)
 def add_main_menu(self):
     self.unregister_actions()
     for menuItem in self.menu:
         if menuItem['name'] is None:
             self.register_action(SeparatorInfo(self.MENU_NAME))
         else:
             action_info = ActionInfo(self.MENU_NAME, name=menuItem['name'],
                                      action=self.create_callable(menuItem['name'], menuItem['action']))
             self.register_action(action_info)
Example #12
0
 def _register_actions(self):
     run_action_info = ActionInfo("Tools",
                                  "Run Tests",
                                  self.OnRun,
                                  None,
                                  "F8",
                                  ImageProvider().TOOLBAR_PLAY,
                                  "Run the selected tests",
                                  position=10)
     self._run_action = self.register_action(run_action_info)
     stop_action_info = ActionInfo("Tools",
                                   "Stop Test Run",
                                   self.OnStop,
                                   None,
                                   "CtrlCmd-F8",
                                   ImageProvider().TOOLBAR_STOP,
                                   "Stop a running test",
                                   position=11)
     self._stop_action = self.register_action(stop_action_info)
Example #13
0
 def enable(self):
     self.register_action(ActionInfo('Tools','Preview', self.OnShowPreview,
                                     shortcut='F6',
                                     doc='Show preview of the current file',
                                     position=71))
     self.subscribe(self.OnTreeSelection, RideTreeSelection)
     self.subscribe(self.OnTabChanged, RideNotebookTabChanged)
     self.subscribe(self._update_preview, RideTestCaseAdded)
     self.subscribe(self._update_preview, RideUserKeywordAdded)
     self.add_self_as_tree_aware_plugin()
Example #14
0
 def __init__(self, tree, action_registerer):
     self._tree = tree
     tree.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit)
     tree.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnLabelEdited)
     tree.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
     if IS_WINDOWS:
         # Delete key does not work in windows without registration
         delete_key_action = ActionInfo(
             None, None, action=self.OnDelete, shortcut='Del')
         action_registerer.register_shortcut(delete_key_action)
     self._editing_label = False
     self._on_label_edit_called = False
Example #15
0
 def enable(self):
     action = ActionInfo('Tools', 'Search Keywords', self.OnSearch,
                         shortcut='F5',
                         doc='Search keywords from libraries and resources',
                         icon=ImageProvider().KW_SEARCH_ICON,
                         position=51)
     self.register_action(action)
     self.register_search_action('Search Keywords', self.show_search_for, ImageProvider().KW_SEARCH_ICON)
     self.subscribe(self.mark_dirty, RideOpenSuite, RideOpenResource,
                    RideImportSetting, RideUserKeyword, RideNewProject)
     self._dialog = KeywordSearchDialog(self.frame, self)
     self.tree.register_context_menu_hook(self._search_resource)
Example #16
0
    def _create_menu(self):
        self.unregister_actions()
        #sep_info = SeparatorInfo("Tools")
        #print site.getsitepackages()

        logo_fullname = get_python_lib(
        ) + os.sep + "alyvix" + os.sep + "extra" + os.sep + "robotide" + os.sep + "images" + os.sep + "logo.png"
        #action_info =  ActionInfo('Alyvix', 'Alyvix Drawing Tools', self.OnViewLog, icon=self._load_image("alyvix_data\\aly_logo.png"))
        action_info = ActionInfo('Alyvix',
                                 'Alyvix Drawing Tools',
                                 self.OnViewLog,
                                 icon=self._load_image(logo_fullname))
        #self.register_action(sep_info)
        self.register_action(action_info)
    def __init__(self, application):
        Plugin.__init__(self,
                        application,
                        name=None,
                        doc=None,
                        metadata=None,
                        default_settings=None,
                        initially_enabled=True)

        self.menu = [
            ActionInfo("ClearCase", "Check &Out", self.OnCheckOut, position=0),
            ActionInfo("ClearCase",
                       "&Undo Check out",
                       self.OnUndoCheckOut,
                       position=1),
            ActionInfo("ClearCase", "Check &In", self.OnCheckIn, position=2),
        ]

        self.treemenuitems = [
            PopupMenuItem("---"),
            PopupMenuItem("Check Out", self.OnCheckOut, self),
            PopupMenuItem("Undo Check Out", self.OnUndoCheckOut, self),
            PopupMenuItem("Check In", self.OnCheckIn, self)
        ]
Example #18
0
 def _create_menu(self):
     self.unregister_actions()
     self.register_action(
         ActionInfo('Tools', 'View Parser Log', self.OnViewLog,
                    position=83))
Example #19
0
 def get_action_info(self):
     action_info = ActionInfo('File', self.label, self.OnOpenRecent,
                              doc=self.doc)
     action_info.set_menu_position(before='Exit')
     return action_info