Remove tabs UI from code editor and move to plugin. Enhance plugin system.
- Remove tabs controller, tab widget, and tabs widget files and move to plugin - Delete plugins/README.txt - Add register_controller method to controller system for plugin use - Add error handling for plugin crashes via futures callback
This commit is contained in:
32
plugins/code/tabs_bar/plugin.py
Normal file
32
plugins/code/tabs_bar/plugin.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# Python imports
|
||||
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
from libs.event_factory import Event_Factory, Code_Event_Types
|
||||
|
||||
from plugins.plugin_types import PluginCode
|
||||
|
||||
from .tabs_controller import TabsController
|
||||
|
||||
|
||||
|
||||
class Plugin(PluginCode):
|
||||
def __init__(self):
|
||||
super(Plugin, self).__init__()
|
||||
|
||||
|
||||
def _controller_message(self, event: Code_Event_Types.CodeEvent):
|
||||
...
|
||||
|
||||
def load(self):
|
||||
tabs_controller = TabsController()
|
||||
code_container = self.requests_ui_element("code-container")
|
||||
|
||||
self.register_controller("tabs", tabs_controller)
|
||||
|
||||
code_container.add( tabs_controller.tabs_widget )
|
||||
code_container.reorder_child(tabs_controller.tabs_widget, 0)
|
||||
|
||||
def run(self):
|
||||
...
|
||||
Reference in New Issue
Block a user