Skip to content
This repository was archived by the owner on Nov 2, 2020. It is now read-only.

Commit 96bae7a

Browse files
authored
Add command to open log file (#193)
Fixes #178
1 parent 0b1e49f commit 96bae7a

File tree

5 files changed

+41
-16
lines changed

5 files changed

+41
-16
lines changed

Context.sublime-menu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@
263263
{
264264
"caption": "Command Logging",
265265
"command": "log_commands"
266+
},
267+
{
268+
"caption": "Open Log File",
269+
"command": "open_log_file"
266270
}
267271
]
268272
}

Default.sublime-commands

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@
2626
{
2727
"caption": "Robot Framework: Command Logging",
2828
"command": "log_commands"
29+
},
30+
{
31+
"caption": "Robot Framework: Open Log File",
32+
"command": "open_log_file"
2933
}
3034
]

commands/__init__.py

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
from .scan_and_index import ScanIndexCommand
2-
from .scan import ScanCommand
3-
from .scan_open_tab import ScanOpenTabCommand
1+
from .command_logging import LogCommands
42
from .index_open_tab import IndexOpenTabCommand
5-
from .query_completions import RobotCompletion
6-
from .show_documentation import ShowKeywordDocumentation
73
from .jump_to_keyword import JumpToKeyword
8-
from .setting_import_helper import SettingImporter
9-
from .setting_import_helper import InsertImport
10-
from .command_logging import LogCommands
114
from .on_save_create_table import OnSaveCreateTable
5+
from .open_log_file import OpenLogFile
6+
from .query_completions import RobotCompletion
7+
from .scan import ScanCommand
8+
from .scan_and_index import ScanIndexCommand
129
from .scan_index_open_tab import ScanAndIndexOpenTab
10+
from .scan_open_tab import ScanOpenTabCommand
11+
from .setting_import_helper import InsertImport
12+
from .setting_import_helper import SettingImporter
13+
from .show_documentation import ShowKeywordDocumentation
1314

1415
__all__ = [
15-
'ScanIndexCommand',
16-
'ScanCommand',
17-
'ScanOpenTabCommand',
1816
'IndexOpenTabCommand',
19-
'RobotCompletion',
20-
'ShowKeywordDocumentation',
21-
'JumpToKeyword',
22-
'SettingImporter',
2317
'InsertImport',
18+
'JumpToKeyword',
2419
'LogCommands',
2520
'OnSaveCreateTable',
26-
'ScanAndIndexOpenTab'
21+
'OpenLogFile',
22+
'RobotCompletion',
23+
'ScanAndIndexOpenTab',
24+
'ScanCommand',
25+
'ScanIndexCommand',
26+
'ScanOpenTabCommand',
27+
'SettingImporter',
28+
'ShowKeywordDocumentation'
2729
]

commands/open_log_file.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import sublime
2+
import sublime_plugin
3+
4+
from ..setting.setting import get_log_file
5+
6+
7+
class OpenLogFile(sublime_plugin.TextCommand):
8+
9+
def run(self, edit):
10+
log_file = get_log_file()
11+
self.view.window().open_file(log_file)

templates/Main.sublime-menu.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
"command": "log_commands",
5757
"caption": "Command Logging"
5858
},
59+
{
60+
"command": "open_log_file",
61+
"caption": "Open Log File"
62+
},
5963
]
6064
}
6165
]

0 commit comments

Comments
 (0)