Skip to content

Commit

Permalink
Issue #3 make it possible to clear the buffer implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
quarnster committed Apr 5, 2012
1 parent fb8fdda commit ba6746f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Context.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
{ "command": "adb_filter_by_process_id", "caption": "ADB Filter by Process ID" },
{ "command": "adb_filter_by_process_name", "caption": "ADB Filter by Process Name"},
{ "command": "adb_filter_by_message_level", "caption": "ADB Filter by Message Level"},
{ "command": "adb_set_filter", "caption": "ADB Custom Regular Expression Filter"}
{ "command": "adb_set_filter", "caption": "ADB Custom Regular Expression Filter"},
{ "command": "adb_clear_view", "caption": "ADB Clear View"}
]
11 changes: 11 additions & 0 deletions adbview.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,17 @@ def is_visible(self):
return self.is_enabled()


class AdbClearView(sublime_plugin.WindowCommand):
def run(self):
adb_view.clear()

def is_enabled(self):
return adb_process != None and adb_view.is_open()

def is_visible(self):
return self.is_enabled()


class AdbEventListener(sublime_plugin.EventListener):
def on_close(self, view):
if adb_view.is_open() and view.id() == adb_view.get_view().id():
Expand Down
4 changes: 4 additions & 0 deletions adbview.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
{
"caption": "ADB: Set Regex filter",
"command": "adb_set_filter"
},
{
"caption": "ADB: Clear View",
"command": "adb_clear_view"
}

]

0 comments on commit ba6746f

Please sign in to comment.