Permalink
Browse files

Add Run Tests And Show Output command.

  • Loading branch information...
1 parent e264081 commit 54abb3ed3aeb5ae73ab07f6da507e5db0d33bd1d @whitequark whitequark committed Jul 25, 2012
Showing with 16 additions and 4 deletions.
  1. +2 −3 Default (Linux).sublime-keymap
  2. +14 −1 guard.py
@@ -1,5 +1,4 @@
[
- {
- "keys": ["super+shfit+s"], "command": "gotospec"
- }
+ { "keys": ["super+shfit+s"], "command": "gotospec" },
+ { "keys": ["ctrl+shift+g"], "command": "run_tests_and_show_output_guard" }
]
View
@@ -106,7 +106,7 @@ def append_data(self, data):
# actually append the data
self.output_view.set_read_only(False)
edit = self.output_view.begin_edit()
-
+
# clear the output window when a predefined text is found.
if (self.clear_when_find_this_text and self.clear_when_find_this_text.search(clean_data)):
self.output_view.erase(edit, sublime.Region(0, self.output_view.size()))
@@ -154,6 +154,10 @@ def run_all_tests(self):
self.proc.stdin.write('\n')
self.proc.stdin.flush()
+ def run_tests_and_show_output(self):
+ self.listener.window.run_command('show_panel', {'panel': 'output.guard'})
+ self.run_all_tests()
+
def output_help(self):
self.proc.stdin.write('h\n')
self.proc.stdin.flush()
@@ -237,6 +241,15 @@ def is_enabled(self):
return GuardControllerSingleton().is_guard_running()
+class RunTestsAndShowOutputGuardCommand(sublime_plugin.WindowCommand):
+
+ def run(self):
+ GuardControllerSingleton().set_listener(self).run_tests_and_show_output()
+
+ def is_enabled(self):
+ return GuardControllerSingleton().is_guard_running()
+
+
class OutputHelpGuardCommand(sublime_plugin.WindowCommand):
def run(self):

0 comments on commit 54abb3e

Please sign in to comment.