22 from ..robotapi
import ROBOT_LOGGER
23 from ..version
import VERSION
27 ROBOT_LOGGER.unregister_console_logger()
28 ROBOT_LOGGER.register_logger(LOG)
30 IS_WINDOWS = os.sep ==
'\\'
31 IS_MAC = sys.platform ==
'darwin'
32 IS_LINUX = sys.platform ==
'linux'
33 WX_VERSION = wx.VERSION_STRING
36 SETTINGS_DIRECTORY = os.path.join(
37 os.environ[
'APPDATA'],
'RobotFramework',
'ride')
39 SETTINGS_DIRECTORY = os.path.join(
40 os.path.expanduser(
'~/.robotframework'),
'ride')
41 LIBRARY_XML_DIRECTORY = os.path.join(SETTINGS_DIRECTORY,
'library_xmls')
42 if not os.path.isdir(LIBRARY_XML_DIRECTORY):
43 os.makedirs(LIBRARY_XML_DIRECTORY)
45 SETTING_EDITOR_WIDTH = 450
46 SETTING_LABEL_WIDTH = 150
47 SETTING_ROW_HEIGHT = 25
49 POPUP_BACKGROUND = (240, 242, 80)
50 POPUP_FOREGROUND = (40, 40, 0)
52 pyversion =
'.'.join(str(v)
for v
in sys.version_info[:3])
53 SYSTEM_INFO =
"Started RIDE %s using python version %s with wx version %s in %s." % \
54 (VERSION, pyversion, WX_VERSION, sys.platform)
55 ABOUT_RIDE =
'''<h3>RIDE -- Robot Framework Test Data Editor</h3>
56 <p>RIDE %s running on Python %s.</p>
57 <p>RIDE is a test data editor for <a href="http://robotframework.org">Robot Framework</a>.
58 For more information, see project pages at
59 <a href="https://github.com/robotframework/RIDE">https://github.com/robotframework/RIDE</a>.</p>
60 <p>Some of the icons are from <a href="http://www.famfamfam.com/lab/icons/silk/">Silk Icons</a>.</p>
61 <p><br/><br/><a href="https://github.com/HelioGuilherme66">Hélio Guilherme</a> the maintainer of the project thanks the
62 original authors and all users and collaborators.<br/>
63 A very special thanks to <b><a href="https://github.com/Nyral">Nyral</a></b> and <b><a href="https://github.com/jnhyperi
64 on">Johnny.H</a></b> the most commited in helping RIDE development and maintenance.</p>
65 ''' % (VERSION, pyversion)
76 for accel, keycode, handler
in actions:
81 target.Bind(wx.EVT_MENU, handler, id=_id)
82 accelrators.append((accel, keycode, _id))
83 target.SetAcceleratorTable(wx.AcceleratorTable(accelrators))
87 <h2>Shortcut keys in RIDE</h2>
90 <th><b>Shortcut</b></th>
91 <th><b>What it does</b></th>
98 <td>CtrlCmd-Shift-S</td>
106 <td>CtrlCmd-Shift-O</td>
107 <td>Open directory</td>
111 <td>Open resource</td>
114 <td>CtrlCmd-Shift-R</td>
115 <td>Refresh directory</td>
122 <td>CtrlCmd-Shift-N</td>
123 <td>New resource</td>
139 <td>Open preview</td>
143 <td>Open search keywords dialog</td>
147 <td>Open search tests dialog</td>
151 <td>Run test suite</td>
155 <td>Stop running test suite</td>
162 <th><b>Shortcut</b></th>
163 <th><b>What it does</b></th>
166 <td>Ctrl-Space or Alt-Space</td>
167 <td>Suggestions and auto completion</td>
171 <td>Help for cell content</td>
174 <td>CtrlCmd-Shift-J</td>
175 <td>Pop-up JSON Editor</td>
179 <td>Go to Definition</td>
191 <td>Make scalar variable body</td>
195 <td>Make list variable body</td>
199 <td>Make dictionary variable body</td>
202 <td>CtrlCmd-Shift-3</td>
203 <td>Comment content with #</td>
206 <td>CtrlCmd-Shift-4</td>
207 <td>Uncomment content from #</td>
211 <td>Move cursor down</td>
215 <td>Comment row(s)</td>
219 <td>Uncomment row(s)</td>
223 <td>Move row(s) up</td>
227 <td>Move row(s) down</td>
234 <td>CtrlCmd-Shift-I</td>
235 <td>Insert cell(s)</td>
238 <td>CtrlCmd-Shift-D</td>
239 <td>Delete cell(s)</td>
243 <td>Insert row(s)</td>
247 <td>Delete row(s)</td>
255 <td>Cut (does not remove cells or rows)</td>
263 <td>Paste (does not move cells or rows)</td>
266 <td>CtrlCmd-Shift-V</td>
267 <td>Insert (adds empty rows and pastes data)</td>
271 <td>Remove cell content</td>
278 <th><b>Shortcut</b></th>
279 <th><b>What it does</b></th>
282 <td>CtrlCmd-Shift-T</td>
283 <td>Add new test case</td>
286 <td>CtrlCmd-Shift-K</td>
287 <td>Add new keyword</td>
290 <td>CtrlCmd-Shift-V</td>
291 <td>Add new scalar variable</td>
294 <td>CtrlCmd-Shift-L</td>
295 <td>Add new list variable</td>
302 <td>CtrlCmd-Shift-C</td>
303 <td>Clone/Copy selected keyword/test case</td>
307 <td>Move item up</td>
310 <td>CtrlCmd-Down</td>
311 <td>Move item down</td>
319 <th><b>Shortcut</b></th>
320 <th><b>What it does</b></th>
323 <td>Ctrl-Space or Alt-Space</td>
324 <td>Suggestions and auto completion</td>
328 <td>Swap current row up</td>
332 <td>Inserts the defined number of spaces</td>
336 <td>Moves cursor to the left the defined number of spaces</td>
339 <td>Ctrl-MouseWheel Roll</td>
340 <td>Increases or Decreases font size (Zoom +/-)</td>
344 <td>Find in text</td>
348 <td>Find next search result</td>
351 <td>CtrlCmd-Shift-G</td>
352 <td>Find previous search result</td>
356 <td>Make scalar variable body</td>
360 <td>Make list variable body</td>
364 <td>Move row(s) up</td>
368 <td>Move row(s) down</td>
372 <td>Delete row(s)</td>
376 <td>Insert row(s)</td>
380 <td>Comment row(s)</td>
383 <td>CtrlCmd-Shift-3</td>
384 <td>Comment content with #</td>
388 <td>Uncomment row(s)</td>
391 <td>CtrlCmd-Shift-4</td>
392 <td>Uncomment content with #</td>
396 <td>Make dictionary variable body</td>
400 <td>When focus is in the search field, find next search result</td>
404 <td>When focus is in the search field, find previous search result</td>
412 <th><b>Shortcut</b></th>
413 <th><b>What it does</b></th>
417 <td>Copy from text output when text selected</td>
421 <td>Open HTML log</td>
425 <td>Show HTML report</td>
428 <td>Ctrl-MouseWheel Roll</td>
429 <td>Increases or Decreases font size (Zoom +/-)</td>
def bind_keys_to_evt_menu(target, actions)