add the first plugins
This commit is contained in:
21
raven/plugins/ravenlogplugin.py
Normal file
21
raven/plugins/ravenlogplugin.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Optional
|
||||
|
||||
from raven.mainwindow import MainWindow
|
||||
from raven.pluginbase import PluginBase
|
||||
|
||||
|
||||
class RavenLogPlugin(PluginBase):
|
||||
def __init__(self):
|
||||
super(RavenLogPlugin, self).__init__()
|
||||
self.main_window = None
|
||||
|
||||
def create_main_window(self):
|
||||
if not self.main_window:
|
||||
self.main_window = MainWindow()
|
||||
return self.main_window
|
||||
|
||||
def current_file(self) -> Optional[str]:
|
||||
return self.main_window.current_file()
|
||||
|
||||
def create_tab(self, file: str):
|
||||
self.main_window.tabs.create_tab(file)
|
||||
Reference in New Issue
Block a user