je-editor 0.0.210__tar.gz → 0.0.212__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {je_editor-0.0.210 → je_editor-0.0.212}/PKG-INFO +4 -2
- je_editor-0.0.212/je_editor/code_scan/ruff_thread.py +31 -0
- je_editor-0.0.212/je_editor/code_scan/watchdog_implement.py +34 -0
- je_editor-0.0.212/je_editor/code_scan/watchdog_thread.py +33 -0
- je_editor-0.0.212/je_editor/pyside_ui/code/variable_inspector/inspector_gui.py +122 -0
- je_editor-0.0.212/je_editor/pyside_ui/main_ui/console_widget/console_gui.py +130 -0
- je_editor-0.0.212/je_editor/pyside_ui/main_ui/console_widget/qprocess_adapter.py +63 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py +44 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py +66 -7
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/multi_language/english.py +79 -3
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/multi_language/traditional_chinese.py +79 -7
- je_editor-0.0.212/je_editor/utils/venv_check/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor.egg-info/PKG-INFO +4 -2
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor.egg-info/SOURCES.txt +9 -7
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor.egg-info/requires.txt +3 -1
- {je_editor-0.0.210 → je_editor-0.0.212}/pyproject.toml +3 -3
- je_editor-0.0.210/je_editor/pyside_ui/main_ui/ai_widget/ai_config.py +0 -19
- je_editor-0.0.210/je_editor/pyside_ui/main_ui/ai_widget/ask_thread.py +0 -17
- je_editor-0.0.210/je_editor/pyside_ui/main_ui/ai_widget/chat_ui.py +0 -130
- je_editor-0.0.210/je_editor/pyside_ui/main_ui/ai_widget/langchain_interface.py +0 -45
- je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/check_style_menu/build_check_style_menu.py +0 -81
- {je_editor-0.0.210 → je_editor-0.0.212}/LICENSE +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/README.md +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/__main__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui → je_editor-0.0.212/je_editor/code_scan}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/browser → je_editor-0.0.212/je_editor/pyside_ui}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code → je_editor-0.0.212/je_editor/pyside_ui/browser}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/browser/browser_download_window.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/browser/browser_serach_lineedit.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/browser/browser_view.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/browser/browser_widget.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code/auto_save → je_editor-0.0.212/je_editor/pyside_ui/code}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code/code_format → je_editor-0.0.212/je_editor/pyside_ui/code/auto_save}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/auto_save/auto_save_manager.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/auto_save/auto_save_thread.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code/code_process → je_editor-0.0.212/je_editor/pyside_ui/code/code_format}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/code_format/pep8_format.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code/plaintext_code_edit → je_editor-0.0.212/je_editor/pyside_ui/code/code_process}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/code_process/code_exec.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code/shell_process → je_editor-0.0.212/je_editor/pyside_ui/code/plaintext_code_edit}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/plaintext_code_edit/code_edit_plaintext.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/running_process_manager.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code/syntax → je_editor-0.0.212/je_editor/pyside_ui/code/shell_process}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/shell_process/shell_exec.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/code/textedit_code_result → je_editor-0.0.212/je_editor/pyside_ui/code/syntax}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/syntax/python_syntax.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/syntax/syntax_setting.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/dialog → je_editor-0.0.212/je_editor/pyside_ui/code/textedit_code_result}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/code/textedit_code_result/code_record.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/dialog/ai_dialog → je_editor-0.0.212/je_editor/pyside_ui/code/variable_inspector}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/dialog/file_dialog → je_editor-0.0.212/je_editor/pyside_ui/dialog}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/dialog/search_ui → je_editor-0.0.212/je_editor/pyside_ui/dialog/ai_dialog}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/dialog/ai_dialog/set_ai_dialog.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui → je_editor-0.0.212/je_editor/pyside_ui/dialog/file_dialog}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/dialog/file_dialog/create_file_dialog.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/dialog/file_dialog/open_file_dialog.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/dialog/file_dialog/save_file_dialog.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/ai_widget → je_editor-0.0.212/je_editor/pyside_ui/dialog/search_ui}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/dialog/search_ui/search_error_box.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/dialog/search_ui/search_text_box.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/dock → je_editor-0.0.212/je_editor/pyside_ui/main_ui}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/editor → je_editor-0.0.212/je_editor/pyside_ui/main_ui/console_widget}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/ipython_widget → je_editor-0.0.212/je_editor/pyside_ui/main_ui/dock}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/dock/destroy_dock.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/editor}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/editor/editor_widget.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/editor/editor_widget_dock.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/editor/process_input.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/check_style_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/ipython_widget}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/ipython_widget/rich_jupyter.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/main_editor.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/dock_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/file_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/dock_menu}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/help_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/file_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/file_menu/build_file_menu.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/language_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/help_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/help_menu/build_help_menu.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/python_env_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/language_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/language_menu/build_language_server.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/run_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/python_env_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/python_env_menu/build_venv_menu.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/run_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/run_menu/build_run_menu.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/style_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_debug_menu.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_program_menu.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_shell_menu.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/utils.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/set_menu_bar.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/tab_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/style_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/style_menu/build_style_menu.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/menu/text_menu → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/tab_menu}/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/save_settings → je_editor-0.0.212/je_editor/pyside_ui/main_ui/menu/text_menu}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/text_menu/build_text_menu.py +0 -0
- {je_editor-0.0.210/je_editor/pyside_ui/main_ui/system_tray → je_editor-0.0.212/je_editor/pyside_ui/main_ui/save_settings}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/save_settings/setting_utils.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/save_settings/user_color_setting_file.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/save_settings/user_setting_file.py +0 -0
- {je_editor-0.0.210/je_editor/utils/encodings → je_editor-0.0.212/je_editor/pyside_ui/main_ui/system_tray}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/system_tray/extend_system_tray.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/start_editor.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/__init__.py +0 -0
- {je_editor-0.0.210/je_editor/utils/file → je_editor-0.0.212/je_editor/utils/encodings}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/encodings/python_encodings.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/exception/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/exception/exception_tags.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/exception/exceptions.py +0 -0
- {je_editor-0.0.210/je_editor/utils/json → je_editor-0.0.212/je_editor/utils/file}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/file/open/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/file/open/open_file.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/file/save/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/file/save/save_file.py +0 -0
- {je_editor-0.0.210/je_editor/utils/logging → je_editor-0.0.212/je_editor/utils/json}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/json/json_file.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/json_format/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/json_format/json_process.py +0 -0
- {je_editor-0.0.210/je_editor/utils/multi_language → je_editor-0.0.212/je_editor/utils/logging}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/logging/loggin_instance.py +0 -0
- {je_editor-0.0.210/je_editor/utils/redirect_manager → je_editor-0.0.212/je_editor/utils/multi_language}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/multi_language/multi_language_wrapper.py +0 -0
- {je_editor-0.0.210/je_editor/utils/venv_check → je_editor-0.0.212/je_editor/utils/redirect_manager}/__init__.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/redirect_manager/redirect_manager_class.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor/utils/venv_check/check_venv.py +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor.egg-info/dependency_links.txt +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/je_editor.egg-info/top_level.txt +0 -0
- {je_editor-0.0.210 → je_editor-0.0.212}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: je_editor
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.212
|
4
4
|
Summary: JEditor is basic but powerful editor include GPT
|
5
5
|
Author-email: JE-Chen <jechenmailman@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/JE-Chen/je_editor
|
@@ -16,7 +16,7 @@ Classifier: Operating System :: OS Independent
|
|
16
16
|
Requires-Python: >=3.10
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
License-File: LICENSE
|
19
|
-
Requires-Dist: PySide6==6.9.
|
19
|
+
Requires-Dist: PySide6==6.9.2
|
20
20
|
Requires-Dist: qt-material
|
21
21
|
Requires-Dist: yapf
|
22
22
|
Requires-Dist: frontengine
|
@@ -26,6 +26,8 @@ Requires-Dist: qtconsole
|
|
26
26
|
Requires-Dist: langchain_openai
|
27
27
|
Requires-Dist: langchain
|
28
28
|
Requires-Dist: pydantic
|
29
|
+
Requires-Dist: watchdog
|
30
|
+
Requires-Dist: ruff
|
29
31
|
Dynamic: license-file
|
30
32
|
|
31
33
|
# je_editor
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import subprocess
|
2
|
+
import threading
|
3
|
+
import time
|
4
|
+
from queue import Queue
|
5
|
+
|
6
|
+
|
7
|
+
class RuffThread(threading.Thread):
|
8
|
+
|
9
|
+
def __init__(self, ruff_commands: list, std_queue: Queue, stderr_queue: Queue):
|
10
|
+
super().__init__()
|
11
|
+
if ruff_commands is None:
|
12
|
+
self.ruff_commands = ["ruff", "check"]
|
13
|
+
else:
|
14
|
+
self.ruff_commands = ruff_commands
|
15
|
+
self.ruff_process = None
|
16
|
+
self.std_queue = std_queue
|
17
|
+
self.stderr_queue = stderr_queue
|
18
|
+
|
19
|
+
def run(self):
|
20
|
+
self.ruff_process = subprocess.Popen(
|
21
|
+
self.ruff_commands, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1)
|
22
|
+
while self.ruff_process.poll() is None:
|
23
|
+
time.sleep(1)
|
24
|
+
else:
|
25
|
+
for line in self.ruff_process.stdout:
|
26
|
+
print(line.strip())
|
27
|
+
for line in self.ruff_process.stderr:
|
28
|
+
print(line.strip())
|
29
|
+
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
from queue import Queue
|
2
|
+
|
3
|
+
from watchdog.events import FileSystemEventHandler
|
4
|
+
|
5
|
+
from je_editor.code_scan.ruff_thread import RuffThread
|
6
|
+
|
7
|
+
|
8
|
+
class RuffPythonFileChangeHandler(FileSystemEventHandler):
|
9
|
+
|
10
|
+
def __init__(self, ruff_commands: list = None):
|
11
|
+
super(RuffPythonFileChangeHandler, self).__init__()
|
12
|
+
self.ruff_commands = ruff_commands
|
13
|
+
self.stdout_queue = Queue()
|
14
|
+
self.stderr_queue = Queue()
|
15
|
+
self.ruff_threads_dict = dict()
|
16
|
+
|
17
|
+
def on_modified(self, event):
|
18
|
+
if event.is_directory:
|
19
|
+
return
|
20
|
+
if event.src_path.endswith(".py"):
|
21
|
+
if self.ruff_threads_dict.get(event.src_path) is None:
|
22
|
+
ruff_thread = RuffThread(self.ruff_commands, self.stdout_queue, self.stderr_queue)
|
23
|
+
self.ruff_threads_dict.update({event.src_path: ruff_thread})
|
24
|
+
ruff_thread.start()
|
25
|
+
else:
|
26
|
+
ruff_thread = self.ruff_threads_dict.get(event.src_path)
|
27
|
+
if not ruff_thread.is_alive():
|
28
|
+
ruff_thread = RuffThread(self.ruff_commands, self.stdout_queue, self.stderr_queue)
|
29
|
+
self.ruff_threads_dict.update({event.src_path: ruff_thread})
|
30
|
+
ruff_thread.start()
|
31
|
+
else:
|
32
|
+
pass
|
33
|
+
|
34
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import threading
|
2
|
+
import time
|
3
|
+
|
4
|
+
from watchdog.observers import Observer
|
5
|
+
|
6
|
+
from je_editor.code_scan.watchdog_implement import RuffPythonFileChangeHandler
|
7
|
+
|
8
|
+
|
9
|
+
class WatchdogThread(threading.Thread):
|
10
|
+
|
11
|
+
def __init__(self, check_path: str):
|
12
|
+
super().__init__()
|
13
|
+
self.check_path = check_path
|
14
|
+
self.ruff_handler = RuffPythonFileChangeHandler()
|
15
|
+
self.running = True
|
16
|
+
|
17
|
+
def run(self):
|
18
|
+
observer = Observer()
|
19
|
+
observer.schedule(self.ruff_handler, str(self.check_path), recursive=True)
|
20
|
+
observer.start()
|
21
|
+
try:
|
22
|
+
while self.running:
|
23
|
+
time.sleep(1)
|
24
|
+
finally:
|
25
|
+
observer.stop()
|
26
|
+
|
27
|
+
|
28
|
+
if __name__ == '__main__':
|
29
|
+
watchdog_thread = WatchdogThread(".")
|
30
|
+
watchdog_thread.start()
|
31
|
+
while True:
|
32
|
+
time.sleep(1)
|
33
|
+
|
@@ -0,0 +1,122 @@
|
|
1
|
+
import ast
|
2
|
+
|
3
|
+
from PySide6.QtCore import QAbstractTableModel, Qt, QTimer, QSortFilterProxyModel
|
4
|
+
from PySide6.QtWidgets import QTableView, QVBoxLayout, QWidget, QLineEdit, QLabel
|
5
|
+
|
6
|
+
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper
|
7
|
+
|
8
|
+
|
9
|
+
class VariableModel(QAbstractTableModel):
|
10
|
+
def __init__(self, parent=None):
|
11
|
+
super().__init__(parent)
|
12
|
+
self.variables = []
|
13
|
+
|
14
|
+
def update_data(self):
|
15
|
+
parent_widget = self.parent()
|
16
|
+
if parent_widget and getattr(parent_widget, "table", None):
|
17
|
+
if parent_widget.table.state() != QTableView.State.NoState:
|
18
|
+
return
|
19
|
+
|
20
|
+
vars_dict = globals()
|
21
|
+
self.beginResetModel()
|
22
|
+
self.variables = [
|
23
|
+
[name, type(value).__name__, repr(value), value]
|
24
|
+
for name, value in vars_dict.items()
|
25
|
+
if not name.startswith("__") # 過濾內建變數
|
26
|
+
]
|
27
|
+
self.endResetModel()
|
28
|
+
|
29
|
+
def rowCount(self, parent=None):
|
30
|
+
return len(self.variables)
|
31
|
+
|
32
|
+
def columnCount(self, parent=None):
|
33
|
+
return 3
|
34
|
+
|
35
|
+
def data(self, index, role=Qt.ItemDataRole.DisplayRole):
|
36
|
+
if not index.isValid() or not (0 <= index.row() < len(self.variables)):
|
37
|
+
return None
|
38
|
+
if role == Qt.ItemDataRole.DisplayRole:
|
39
|
+
return self.variables[index.row()][index.column()]
|
40
|
+
return None
|
41
|
+
|
42
|
+
def headerData(self, section, orientation, role=Qt.ItemDataRole.DisplayRole):
|
43
|
+
if role == Qt.ItemDataRole.DisplayRole and orientation == Qt.Orientation.Horizontal:
|
44
|
+
return [
|
45
|
+
language_wrapper.language_word_dict.get("variable_inspector_var_name"),
|
46
|
+
language_wrapper.language_word_dict.get("variable_inspector_var_type"),
|
47
|
+
language_wrapper.language_word_dict.get("variable_inspector_var_value")
|
48
|
+
][section]
|
49
|
+
return None
|
50
|
+
|
51
|
+
def flags(self, index):
|
52
|
+
if not index.isValid() or not (0 <= index.row() < len(self.variables)):
|
53
|
+
return Qt.ItemFlag.NoItemFlags
|
54
|
+
base = super().flags(index)
|
55
|
+
if index.column() == 2: # 只允許編輯值欄
|
56
|
+
base |= Qt.ItemFlag.ItemIsEditable
|
57
|
+
return base
|
58
|
+
|
59
|
+
def setData(self, index, value, role=Qt.ItemDataRole.EditRole):
|
60
|
+
if role == Qt.ItemDataRole.EditRole and index.column() == 2:
|
61
|
+
|
62
|
+
if value == "":
|
63
|
+
return False
|
64
|
+
|
65
|
+
old_repr = self.variables[index.row()][2]
|
66
|
+
if str(value) == old_repr:
|
67
|
+
return False
|
68
|
+
|
69
|
+
var_name = self.variables[index.row()][0]
|
70
|
+
try:
|
71
|
+
new_value = ast.literal_eval(value)
|
72
|
+
except Exception:
|
73
|
+
new_value = value
|
74
|
+
|
75
|
+
if new_value == self.variables[index.row()][3]:
|
76
|
+
return False
|
77
|
+
|
78
|
+
globals()[var_name] = new_value
|
79
|
+
self.variables[index.row()][2] = repr(new_value)
|
80
|
+
self.variables[index.row()][3] = new_value
|
81
|
+
self.dataChanged.emit(index, index, [Qt.ItemDataRole.DisplayRole])
|
82
|
+
return True
|
83
|
+
return False
|
84
|
+
|
85
|
+
class VariableProxy(QSortFilterProxyModel):
|
86
|
+
def setData(self, index, value, role=Qt.ItemDataRole.EditRole):
|
87
|
+
return self.sourceModel().setData(
|
88
|
+
self.mapToSource(index), value, role
|
89
|
+
)
|
90
|
+
|
91
|
+
class VariableInspector(QWidget):
|
92
|
+
def __init__(self):
|
93
|
+
super().__init__()
|
94
|
+
self.setWindowTitle(language_wrapper.language_word_dict.get("variable_inspector_title"))
|
95
|
+
layout = QVBoxLayout(self)
|
96
|
+
|
97
|
+
self.search_box = QLineEdit()
|
98
|
+
self.search_box.setPlaceholderText(language_wrapper.language_word_dict.get("variable_inspector_search"))
|
99
|
+
layout.addWidget(QLabel(language_wrapper.language_word_dict.get("variable_inspector_search")))
|
100
|
+
layout.addWidget(self.search_box)
|
101
|
+
|
102
|
+
self.model = VariableModel(parent=self)
|
103
|
+
self.proxy_model = VariableProxy(self)
|
104
|
+
self.proxy_model.setSourceModel(self.model)
|
105
|
+
self.proxy_model.setFilterCaseSensitivity(Qt.CaseSensitivity.CaseInsensitive)
|
106
|
+
self.proxy_model.setFilterKeyColumn(0)
|
107
|
+
|
108
|
+
self.table = QTableView()
|
109
|
+
self.table.setModel(self.proxy_model)
|
110
|
+
self.table.horizontalHeader().setStretchLastSection(True)
|
111
|
+
self.table.horizontalHeader().setSectionResizeMode(
|
112
|
+
self.table.horizontalHeader().ResizeMode.Stretch
|
113
|
+
)
|
114
|
+
layout.addWidget(self.table, stretch=1)
|
115
|
+
|
116
|
+
self.search_box.textChanged.connect(
|
117
|
+
self.proxy_model.setFilterFixedString
|
118
|
+
)
|
119
|
+
|
120
|
+
self.timer = QTimer(self)
|
121
|
+
self.timer.timeout.connect(self.model.update_data)
|
122
|
+
self.timer.start(500)
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from PySide6.QtCore import Qt, QEvent
|
4
|
+
from PySide6.QtGui import QTextCursor, QColor, QKeyEvent
|
5
|
+
from PySide6.QtWidgets import (
|
6
|
+
QWidget, QVBoxLayout, QHBoxLayout, QPlainTextEdit, QLineEdit,
|
7
|
+
QPushButton, QLabel, QFileDialog, QComboBox
|
8
|
+
)
|
9
|
+
|
10
|
+
from je_editor.pyside_ui.main_ui.console_widget.qprocess_adapter import ConsoleProcessAdapter
|
11
|
+
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper
|
12
|
+
|
13
|
+
|
14
|
+
class ConsoleWidget(QWidget):
|
15
|
+
def __init__(self, parent=None):
|
16
|
+
super().__init__(parent)
|
17
|
+
self.language_word_dict_get = language_wrapper.language_word_dict.get
|
18
|
+
self.proc = ConsoleProcessAdapter(self)
|
19
|
+
self.proc.stdout.connect(self.append_text)
|
20
|
+
self.proc.stderr.connect(lambda t: self.append_text(t, "#d33"))
|
21
|
+
self.proc.system.connect(
|
22
|
+
lambda t: self.append_text(f"{self.language_word_dict_get('dynamic_console_system_prefix')}{t}\n", "#888"))
|
23
|
+
self.proc.started.connect(lambda: self.proc.system.emit(self.language_word_dict_get("dynamic_console_running")))
|
24
|
+
self.proc.finished.connect(self.on_finished)
|
25
|
+
|
26
|
+
self.history, self.history_index = [], -1
|
27
|
+
|
28
|
+
self.output = QPlainTextEdit(readOnly=True)
|
29
|
+
self.output.setMaximumBlockCount(10000)
|
30
|
+
self.output.setStyleSheet("font-family: Consolas, monospace;")
|
31
|
+
|
32
|
+
self.input = QLineEdit()
|
33
|
+
self.input.setPlaceholderText("Enter command")
|
34
|
+
self.input.returnPressed.connect(self.run_command)
|
35
|
+
self.input.installEventFilter(self)
|
36
|
+
|
37
|
+
self.btn_run = QPushButton(self.language_word_dict_get("dynamic_console_run"))
|
38
|
+
self.btn_run.clicked.connect(self.run_command)
|
39
|
+
self.btn_stop = QPushButton(self.language_word_dict_get("dynamic_console_stop"))
|
40
|
+
self.btn_stop.clicked.connect(self.proc.stop)
|
41
|
+
self.btn_clear = QPushButton(self.language_word_dict_get("dynamic_console_clear"))
|
42
|
+
self.btn_clear.clicked.connect(self.output.clear)
|
43
|
+
|
44
|
+
self.cwd_label = QLabel(f"{self.language_word_dict_get('dynamic_console_cwd')}: {os.getcwd()}")
|
45
|
+
self.btn_pick_cwd = QPushButton("…")
|
46
|
+
self.btn_pick_cwd.clicked.connect(self.pick_cwd)
|
47
|
+
|
48
|
+
self.shell_combo = QComboBox()
|
49
|
+
self.shell_combo.addItems(["auto", "cmd", "powershell", "bash", "sh"])
|
50
|
+
|
51
|
+
top = QHBoxLayout()
|
52
|
+
top.addWidget(self.cwd_label)
|
53
|
+
top.addWidget(self.btn_pick_cwd)
|
54
|
+
top.addStretch()
|
55
|
+
top.addWidget(QLabel(self.language_word_dict_get("dynamic_console_shell")))
|
56
|
+
top.addWidget(self.shell_combo)
|
57
|
+
|
58
|
+
mid = QHBoxLayout()
|
59
|
+
mid.addWidget(self.input, 1)
|
60
|
+
mid.addWidget(self.btn_run)
|
61
|
+
mid.addWidget(self.btn_stop)
|
62
|
+
mid.addWidget(self.btn_clear)
|
63
|
+
|
64
|
+
lay = QVBoxLayout(self)
|
65
|
+
lay.addLayout(top)
|
66
|
+
lay.addWidget(self.output, 1)
|
67
|
+
lay.addLayout(mid)
|
68
|
+
|
69
|
+
self.proc.system.emit(self.language_word_dict_get("dynamic_console_ready"))
|
70
|
+
# 啟動互動式 shell
|
71
|
+
self.proc.start_shell(self.shell_combo.currentText())
|
72
|
+
|
73
|
+
def eventFilter(self, obj, event):
|
74
|
+
if obj is self.input and isinstance(event, QKeyEvent) and event.type() == QEvent.Type.KeyPress:
|
75
|
+
if event.key() == Qt.Key.Key_Up:
|
76
|
+
self.history_prev()
|
77
|
+
return True
|
78
|
+
if event.key() == Qt.Key.Key_Down:
|
79
|
+
self.history_next()
|
80
|
+
return True
|
81
|
+
return super().eventFilter(obj, event)
|
82
|
+
|
83
|
+
def history_prev(self):
|
84
|
+
if not self.history: return
|
85
|
+
self.history_index = len(self.history) - 1 if self.history_index < 0 else max(0, self.history_index - 1)
|
86
|
+
self.input.setText(self.history[self.history_index])
|
87
|
+
self.input.end(False)
|
88
|
+
|
89
|
+
def history_next(self):
|
90
|
+
if not self.history: return
|
91
|
+
if self.history_index < 0: return
|
92
|
+
self.history_index += 1
|
93
|
+
if self.history_index >= len(self.history):
|
94
|
+
self.history_index = -1
|
95
|
+
self.input.clear()
|
96
|
+
else:
|
97
|
+
self.input.setText(self.history[self.history_index])
|
98
|
+
self.input.end(False)
|
99
|
+
|
100
|
+
def pick_cwd(self):
|
101
|
+
d = QFileDialog.getExistingDirectory(self, "Select working directory", os.getcwd())
|
102
|
+
if d:
|
103
|
+
self.proc.set_cwd(d)
|
104
|
+
self.cwd_label.setText(f"{self.language_word_dict_get('dynamic_console_cwd')}: {d}")
|
105
|
+
self.proc.system.emit(f'cd "{d}"')
|
106
|
+
|
107
|
+
def append_text(self, text, color=None):
|
108
|
+
cursor = self.output.textCursor()
|
109
|
+
cursor.movePosition(QTextCursor.MoveOperation.End)
|
110
|
+
fmt = self.output.currentCharFormat()
|
111
|
+
if color: fmt.setForeground(QColor(color))
|
112
|
+
cursor.setCharFormat(fmt)
|
113
|
+
cursor.insertText(text)
|
114
|
+
self.output.setTextCursor(cursor)
|
115
|
+
self.output.ensureCursorVisible()
|
116
|
+
|
117
|
+
def run_command(self):
|
118
|
+
cmd = self.input.text().strip()
|
119
|
+
if not cmd: return
|
120
|
+
if not self.history or self.history[-1] != cmd:
|
121
|
+
self.history.append(cmd)
|
122
|
+
self.history_index = -1
|
123
|
+
self.append_text(f"{self.language_word_dict_get('dynamic_console_prompt')}{cmd}\n", "#0aa")
|
124
|
+
self.proc.send_command(cmd)
|
125
|
+
self.input.clear()
|
126
|
+
|
127
|
+
def on_finished(self, code, status):
|
128
|
+
self.append_text(f"\n{self.language_word_dict_get('dynamic_console_done').format(code=code, status=status)}\n",
|
129
|
+
"#888")
|
130
|
+
self.proc.system.emit(self.language_word_dict_get("dynamic_console_ready"))
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from PySide6.QtCore import QObject, QProcess, Signal, QTimer
|
4
|
+
|
5
|
+
|
6
|
+
class ConsoleProcessAdapter(QObject):
|
7
|
+
started = Signal()
|
8
|
+
finished = Signal(int, QProcess.ExitStatus)
|
9
|
+
stdout = Signal(str)
|
10
|
+
stderr = Signal(str)
|
11
|
+
system = Signal(str)
|
12
|
+
|
13
|
+
def __init__(self, parent=None):
|
14
|
+
super().__init__(parent)
|
15
|
+
self.proc = QProcess(self)
|
16
|
+
self.proc.setProcessChannelMode(QProcess.ProcessChannelMode.SeparateChannels)
|
17
|
+
self.proc.readyReadStandardOutput.connect(self._on_stdout)
|
18
|
+
self.proc.readyReadStandardError.connect(self._on_stderr)
|
19
|
+
self.proc.started.connect(self.started)
|
20
|
+
self.proc.finished.connect(self.finished)
|
21
|
+
|
22
|
+
def set_cwd(self, path: str):
|
23
|
+
self.proc.setWorkingDirectory(path)
|
24
|
+
|
25
|
+
def start_shell(self, shell: str = "auto"):
|
26
|
+
if self.is_running():
|
27
|
+
self.system.emit("Shell already running")
|
28
|
+
return
|
29
|
+
program, args = self._build_shell_command(shell)
|
30
|
+
self.proc.start(program, args)
|
31
|
+
|
32
|
+
if os.name == "nt":
|
33
|
+
QTimer.singleShot(500, lambda: self.send_command("chcp 65001"))
|
34
|
+
|
35
|
+
def send_command(self, cmd: str):
|
36
|
+
if not self.is_running():
|
37
|
+
self.system.emit("Shell not running")
|
38
|
+
return
|
39
|
+
self.proc.write((cmd + "\n").encode("utf-8"))
|
40
|
+
|
41
|
+
def stop(self):
|
42
|
+
if not self.is_running():
|
43
|
+
return
|
44
|
+
self.proc.terminate()
|
45
|
+
QTimer.singleShot(1000, lambda: self.is_running() and self.proc.kill())
|
46
|
+
|
47
|
+
def is_running(self):
|
48
|
+
return self.proc.state() != QProcess.ProcessState.NotRunning
|
49
|
+
|
50
|
+
def _on_stdout(self):
|
51
|
+
self.stdout.emit(bytes(self.proc.readAllStandardOutput()).decode("utf-8", errors="replace"))
|
52
|
+
|
53
|
+
def _on_stderr(self):
|
54
|
+
self.stderr.emit(bytes(self.proc.readAllStandardError()).decode("utf-8", errors="replace"))
|
55
|
+
|
56
|
+
def _build_shell_command(self, shell: str):
|
57
|
+
if shell == "auto":
|
58
|
+
shell = "cmd" if os.name == "nt" else "bash"
|
59
|
+
if os.name == "nt":
|
60
|
+
if shell == "powershell":
|
61
|
+
return "powershell.exe", ["-NoLogo", "-NoProfile", "-ExecutionPolicy", "Bypass"]
|
62
|
+
return "cmd.exe", []
|
63
|
+
return ("/bin/bash" if shell == "bash" else "/bin/sh"), []
|
@@ -9,7 +9,11 @@ from PySide6.QtWidgets import QFileDialog
|
|
9
9
|
from frontengine import FrontEngineMainUI
|
10
10
|
|
11
11
|
from je_editor.pyside_ui.browser.browser_widget import BrowserWidget
|
12
|
+
from je_editor.pyside_ui.code.variable_inspector.inspector_gui import VariableInspector
|
13
|
+
from je_editor.pyside_ui.git.git_branch_tree_widget import GitTreeViewGUI
|
14
|
+
from je_editor.pyside_ui.git.git_client_gui import Gitgui
|
12
15
|
from je_editor.pyside_ui.main_ui.ai_widget.chat_ui import ChatUI
|
16
|
+
from je_editor.pyside_ui.main_ui.console_widget.console_gui import ConsoleWidget
|
13
17
|
from je_editor.pyside_ui.main_ui.dock.destroy_dock import DestroyDock
|
14
18
|
from je_editor.pyside_ui.main_ui.editor.editor_widget_dock import FullEditorWidget
|
15
19
|
from je_editor.pyside_ui.main_ui.ipython_widget.rich_jupyter import IpythonWidget
|
@@ -67,6 +71,34 @@ def set_dock_menu(ui_we_want_to_set: EditorMain) -> None:
|
|
67
71
|
lambda: add_dock_widget(ui_we_want_to_set, "chat_ui")
|
68
72
|
)
|
69
73
|
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_chat_ui)
|
74
|
+
# Git Client
|
75
|
+
ui_we_want_to_set.dock_menu.new_git_client = QAction(
|
76
|
+
language_wrapper.language_word_dict.get("tab_menu_git_client_tab_name"))
|
77
|
+
ui_we_want_to_set.dock_menu.new_git_client.triggered.connect(
|
78
|
+
lambda: add_dock_widget(ui_we_want_to_set, "git_client")
|
79
|
+
)
|
80
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_git_client)
|
81
|
+
# Git branch tree view
|
82
|
+
ui_we_want_to_set.dock_menu.new_git_branch_view = QAction(
|
83
|
+
language_wrapper.language_word_dict.get("tab_menu_git_branch_tree_view_tab_name"))
|
84
|
+
ui_we_want_to_set.dock_menu.new_git_branch_view.triggered.connect(
|
85
|
+
lambda: add_dock_widget(ui_we_want_to_set, "git_branch_tree_view")
|
86
|
+
)
|
87
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_git_branch_view)
|
88
|
+
# Variable Inspector
|
89
|
+
ui_we_want_to_set.dock_menu.new_variable_inspector = QAction(
|
90
|
+
language_wrapper.language_word_dict.get("tab_menu_variable_inspector_tab_name"))
|
91
|
+
ui_we_want_to_set.dock_menu.new_variable_inspector.triggered.connect(
|
92
|
+
lambda: add_dock_widget(ui_we_want_to_set, "variable_inspector")
|
93
|
+
)
|
94
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_variable_inspector)
|
95
|
+
# Dynamic Console
|
96
|
+
ui_we_want_to_set.dock_menu.new_dynamic_console = QAction(
|
97
|
+
language_wrapper.language_word_dict.get("tab_menu_console_widget_tab_name"))
|
98
|
+
ui_we_want_to_set.dock_menu.new_dynamic_console.triggered.connect(
|
99
|
+
lambda: add_dock_widget(ui_we_want_to_set, "console_widget")
|
100
|
+
)
|
101
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_dynamic_console)
|
70
102
|
|
71
103
|
def add_dock_widget(ui_we_want_to_set: EditorMain, widget_type: str = None):
|
72
104
|
jeditor_logger.info("build_dock_menu.py add_dock_widget "
|
@@ -100,6 +132,18 @@ def add_dock_widget(ui_we_want_to_set: EditorMain, widget_type: str = None):
|
|
100
132
|
elif widget_type == "chat_ui":
|
101
133
|
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("chat_ui_dock_label"))
|
102
134
|
dock_widget.setWidget(ChatUI(ui_we_want_to_set))
|
135
|
+
elif widget_type == "git_client":
|
136
|
+
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_menu_git_client_tab_name"))
|
137
|
+
dock_widget.setWidget(Gitgui())
|
138
|
+
elif widget_type == "git_branch_tree_view":
|
139
|
+
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_menu_git_branch_tree_view_tab_name"))
|
140
|
+
dock_widget.setWidget(GitTreeViewGUI())
|
141
|
+
elif widget_type == "variable_inspector":
|
142
|
+
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_menu_variable_inspector_tab_name"))
|
143
|
+
dock_widget.setWidget(VariableInspector())
|
144
|
+
elif widget_type == "console_widget":
|
145
|
+
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_menu_console_widget_tab_name"))
|
146
|
+
dock_widget.setWidget(ConsoleWidget())
|
103
147
|
else:
|
104
148
|
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("dock_browser_title"))
|
105
149
|
dock_widget.setWidget(BrowserWidget())
|
{je_editor-0.0.210 → je_editor-0.0.212}/je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py
RENAMED
@@ -5,7 +5,11 @@ from typing import TYPE_CHECKING
|
|
5
5
|
from frontengine import FrontEngineMainUI
|
6
6
|
|
7
7
|
from je_editor.pyside_ui.browser.browser_widget import BrowserWidget
|
8
|
+
from je_editor.pyside_ui.code.variable_inspector.inspector_gui import VariableInspector
|
9
|
+
from je_editor.pyside_ui.git.git_branch_tree_widget import GitTreeViewGUI
|
10
|
+
from je_editor.pyside_ui.git.git_client_gui import Gitgui
|
8
11
|
from je_editor.pyside_ui.main_ui.ai_widget.chat_ui import ChatUI
|
12
|
+
from je_editor.pyside_ui.main_ui.console_widget.console_gui import ConsoleWidget
|
9
13
|
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
10
14
|
from je_editor.pyside_ui.main_ui.ipython_widget.rich_jupyter import IpythonWidget
|
11
15
|
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
@@ -63,10 +67,37 @@ def set_tab_menu(ui_we_want_to_set: EditorMain) -> None:
|
|
63
67
|
lambda: add_chat_ui_tab(ui_we_want_to_set)
|
64
68
|
)
|
65
69
|
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_chat_ui_action)
|
66
|
-
|
70
|
+
# Git Client
|
71
|
+
ui_we_want_to_set.tab_menu.add_git_client_ui_action = QAction(
|
72
|
+
language_wrapper.language_word_dict.get("tab_menu_git_client_tab_name"))
|
73
|
+
ui_we_want_to_set.tab_menu.add_git_client_ui_action.triggered.connect(
|
74
|
+
lambda: add_git_client_tab(ui_we_want_to_set)
|
75
|
+
)
|
76
|
+
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_git_client_ui_action)
|
77
|
+
# Git Branch tree
|
78
|
+
ui_we_want_to_set.tab_menu.add_git_branch_view_ui_action = QAction(
|
79
|
+
language_wrapper.language_word_dict.get("tab_menu_git_branch_tree_view_tab_name"))
|
80
|
+
ui_we_want_to_set.tab_menu.add_git_branch_view_ui_action.triggered.connect(
|
81
|
+
lambda: add_git_tree_view_tab(ui_we_want_to_set)
|
82
|
+
)
|
83
|
+
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_git_branch_view_ui_action)
|
84
|
+
# Variable Inspector
|
85
|
+
ui_we_want_to_set.tab_menu.add_variable_inspector_ui_action = QAction(
|
86
|
+
language_wrapper.language_word_dict.get("tab_menu_variable_inspector_tab_name"))
|
87
|
+
ui_we_want_to_set.tab_menu.add_variable_inspector_ui_action.triggered.connect(
|
88
|
+
lambda: add_variable_inspector_tab(ui_we_want_to_set)
|
89
|
+
)
|
90
|
+
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_variable_inspector_ui_action)
|
91
|
+
# Dynamic Console
|
92
|
+
ui_we_want_to_set.tab_menu.add_console_widget_ui_action = QAction(
|
93
|
+
language_wrapper.language_word_dict.get("tab_menu_console_widget_tab_name"))
|
94
|
+
ui_we_want_to_set.tab_menu.add_console_widget_ui_action.triggered.connect(
|
95
|
+
lambda: add_console_widget_tab(ui_we_want_to_set)
|
96
|
+
)
|
97
|
+
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_console_widget_ui_action)
|
67
98
|
|
68
99
|
def add_editor_tab(ui_we_want_to_set: EditorMain):
|
69
|
-
jeditor_logger.info(f"build_tab_menu.py
|
100
|
+
jeditor_logger.info(f"build_tab_menu.py add editor tab ui_we_want_to_set: {ui_we_want_to_set}")
|
70
101
|
widget = EditorWidget(ui_we_want_to_set)
|
71
102
|
ui_we_want_to_set.tab_widget.addTab(
|
72
103
|
widget,
|
@@ -76,7 +107,7 @@ def add_editor_tab(ui_we_want_to_set: EditorMain):
|
|
76
107
|
|
77
108
|
|
78
109
|
def add_frontengine_tab(ui_we_want_to_set: EditorMain):
|
79
|
-
jeditor_logger.info(f"build_tab_menu.py
|
110
|
+
jeditor_logger.info(f"build_tab_menu.py add frontengine tab ui_we_want_to_set: {ui_we_want_to_set}")
|
80
111
|
ui_we_want_to_set.tab_widget.addTab(
|
81
112
|
FrontEngineMainUI(show_system_tray_ray=False, redirect_output=False),
|
82
113
|
f"{language_wrapper.language_word_dict.get('tab_menu_frontengine_tab_name')} "
|
@@ -84,7 +115,7 @@ def add_frontengine_tab(ui_we_want_to_set: EditorMain):
|
|
84
115
|
|
85
116
|
|
86
117
|
def add_web_tab(ui_we_want_to_set: EditorMain):
|
87
|
-
jeditor_logger.info(f"build_tab_menu.py
|
118
|
+
jeditor_logger.info(f"build_tab_menu.py add web tab ui_we_want_to_set: {ui_we_want_to_set}")
|
88
119
|
ui_we_want_to_set.tab_widget.addTab(
|
89
120
|
BrowserWidget(),
|
90
121
|
f"{language_wrapper.language_word_dict.get('tab_menu_web_tab_name')} "
|
@@ -92,7 +123,7 @@ def add_web_tab(ui_we_want_to_set: EditorMain):
|
|
92
123
|
|
93
124
|
|
94
125
|
def add_stackoverflow_tab(ui_we_want_to_set: EditorMain):
|
95
|
-
jeditor_logger.info(f"build_tab_menu.py
|
126
|
+
jeditor_logger.info(f"build_tab_menu.py add stackoverflow tab ui_we_want_to_set: {ui_we_want_to_set}")
|
96
127
|
ui_we_want_to_set.tab_widget.addTab(
|
97
128
|
BrowserWidget(start_url="https://stackoverflow.com/", search_prefix="https://stackoverflow.com/search?q="),
|
98
129
|
f"{language_wrapper.language_word_dict.get('tab_menu_stackoverflow_tab_name')} "
|
@@ -100,7 +131,7 @@ def add_stackoverflow_tab(ui_we_want_to_set: EditorMain):
|
|
100
131
|
|
101
132
|
|
102
133
|
def add_ipython_tab(ui_we_want_to_set: EditorMain):
|
103
|
-
jeditor_logger.info(f"build_tab_menu.py
|
134
|
+
jeditor_logger.info(f"build_tab_menu.py add ipython tab ui_we_want_to_set: {ui_we_want_to_set}")
|
104
135
|
ui_we_want_to_set.tab_widget.addTab(
|
105
136
|
IpythonWidget(ui_we_want_to_set),
|
106
137
|
f"{language_wrapper.language_word_dict.get('tab_menu_ipython_tab_name')} "
|
@@ -108,10 +139,38 @@ def add_ipython_tab(ui_we_want_to_set: EditorMain):
|
|
108
139
|
|
109
140
|
|
110
141
|
def add_chat_ui_tab(ui_we_want_to_set: EditorMain):
|
111
|
-
jeditor_logger.info(f"build_tab_menu.py
|
142
|
+
jeditor_logger.info(f"build_tab_menu.py add chat_ui tab ui_we_want_to_set: {ui_we_want_to_set}")
|
112
143
|
ui_we_want_to_set.tab_widget.addTab(
|
113
144
|
ChatUI(ui_we_want_to_set),
|
114
145
|
f"{language_wrapper.language_word_dict.get('tab_menu_chat_ui_tab_name')} "
|
115
146
|
f"{ui_we_want_to_set.tab_widget.count()}")
|
116
147
|
|
117
148
|
|
149
|
+
def add_git_client_tab(ui_we_want_to_set: EditorMain):
|
150
|
+
jeditor_logger.info(f"build_tab_menu.py add git client tab ui_we_want_to_set: {ui_we_want_to_set}")
|
151
|
+
ui_we_want_to_set.tab_widget.addTab(
|
152
|
+
Gitgui(),
|
153
|
+
f"{language_wrapper.language_word_dict.get('tab_menu_git_client_tab_name')} "
|
154
|
+
f"{ui_we_want_to_set.tab_widget.count()}")
|
155
|
+
|
156
|
+
def add_git_tree_view_tab(ui_we_want_to_set: EditorMain):
|
157
|
+
jeditor_logger.info(f"build_tab_menu.py add git tree view tab ui_we_want_to_set: {ui_we_want_to_set}")
|
158
|
+
ui_we_want_to_set.tab_widget.addTab(
|
159
|
+
GitTreeViewGUI(),
|
160
|
+
f"{language_wrapper.language_word_dict.get('tab_menu_git_branch_tree_view_tab_name')} "
|
161
|
+
f"{ui_we_want_to_set.tab_widget.count()}")
|
162
|
+
|
163
|
+
def add_variable_inspector_tab(ui_we_want_to_set: EditorMain):
|
164
|
+
jeditor_logger.info(f"build_tab_menu.py add variable inspector tab ui_we_want_to_set: {ui_we_want_to_set}")
|
165
|
+
ui_we_want_to_set.tab_widget.addTab(
|
166
|
+
VariableInspector(),
|
167
|
+
f"{language_wrapper.language_word_dict.get('tab_menu_variable_inspector_tab_name')} "
|
168
|
+
f"{ui_we_want_to_set.tab_widget.count()}")
|
169
|
+
|
170
|
+
|
171
|
+
def add_console_widget_tab(ui_we_want_to_set: EditorMain):
|
172
|
+
jeditor_logger.info(f"build_tab_menu.py add console widget tab ui_we_want_to_set: {ui_we_want_to_set}")
|
173
|
+
ui_we_want_to_set.tab_widget.addTab(
|
174
|
+
ConsoleWidget(),
|
175
|
+
f"{language_wrapper.language_word_dict.get('tab_menu_console_widget_tab_name')} "
|
176
|
+
f"{ui_we_want_to_set.tab_widget.count()}")
|