My panel is created with this code
- Code: Select all
panel = window.get_output_panel(self.PANEL_NAME)
panel = window.get_output_panel(self.PANEL_NAME)"command": "show_panel", "args": {"panel": "console", "toggle": true}
"context": [{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
{ "keys": ["escape"], "command": "hide_panel", "args": {"cancel": true},
"context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
class TestCommandCommand(sublime_lib.WindowAndTextCommand):
def is_checked(self):
return False
def run(self, param):
print(self.view, self._window_command)
self.window.run_command("show_panel", {"panel": "output.aaa_package_dev"})
visible = sublime_plugin.on_query_context(self.view, key="panel_visible", operator=sublime.OP_EQUAL, operand=True, match_all=False)
focus = sublime_plugin.on_query_context(self.view, key="panel_has_focus", operator=sublime.OP_EQUAL, operand="output.aaa_package_dev", match_all=False)
print("is visible", visible, "has focus", focus)
Users browsing this forum: No registered users and 5 guests