22 lines
570 B
Python
22 lines
570 B
Python
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)
|