je-editor 0.0.182__tar.gz → 0.0.183__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {je_editor-0.0.182 → je_editor-0.0.183}/PKG-INFO +1 -1
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/__init__.py +2 -2
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/browser/browser_download_window.py +7 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/browser/browser_serach_lineedit.py +7 -2
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/browser/browser_view.py +6 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/browser/browser_widget.py +7 -1
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/auto_save/auto_save_manager.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/auto_save/auto_save_thread.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/code_format/pep8_format.py +13 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/code_process/code_exec.py +17 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/plaintext_code_edit/code_edit_plaintext.py +23 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/running_process_manager.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/shell_process/shell_exec.py +15 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/syntax/python_syntax.py +3 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/textedit_code_result/code_record.py +6 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/file_dialog/create_file_dialog.py +3 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/file_dialog/open_file_dialog.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/file_dialog/save_file_dialog.py +3 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/search_ui/search_error_box.py +2 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/search_ui/search_text_box.py +2 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/dock/destroy_dock.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/editor/editor_widget.py +19 -5
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/editor/editor_widget_dock.py +3 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/editor/process_input.py +8 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/ipython_widget/rich_jupyter.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/main_editor.py +13 -3
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/check_style_menu/build_check_style_menu.py +4 -1
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py +8 -3
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/file_menu/build_file_menu.py +19 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/help_menu/build_help_menu.py +10 -2
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/language_menu/build_language_server.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/python_env_menu/build_venv_menu.py +10 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/run_menu/build_run_menu.py +7 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_debug_menu.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_program_menu.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_shell_menu.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/utils.py +2 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/set_menu_bar.py +2 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/style_menu/build_style_menu.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py +24 -15
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/text_menu/build_text_menu.py +8 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/save_settings/setting_utils.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/save_settings/user_color_setting_file.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/save_settings/user_setting_file.py +3 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/system_tray/extend_system_tray.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/file/open/open_file.py +2 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/file/save/save_file.py +4 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/json/json_file.py +5 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/json_format/json_process.py +4 -0
- je_editor-0.0.183/je_editor/utils/logging/loggin_instance.py +13 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/multi_language/multi_language_wrapper.py +3 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/redirect_manager/redirect_manager_class.py +16 -2
- je_editor-0.0.183/je_editor/utils/venv_check/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/venv_check/check_venv.py +5 -2
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor.egg-info/PKG-INFO +1 -1
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor.egg-info/SOURCES.txt +2 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/pyproject.toml +1 -1
- {je_editor-0.0.182 → je_editor-0.0.183}/LICENSE +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/README.md +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/__main__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/browser/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/auto_save/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/code_format/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/code_process/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/plaintext_code_edit/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/shell_process/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/syntax/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/syntax/syntax_setting.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/textedit_code_result/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/file_dialog/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/dialog/search_ui/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/dock/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/editor/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/ipython_widget/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/check_style_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/dock_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/file_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/help_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/language_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/python_env_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/run_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/style_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/tab_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/menu/text_menu/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/save_settings/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/main_ui/system_tray/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/start_editor.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/encodings/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/encodings/python_encodings.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/exception/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/exception/exception_tags.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/exception/exceptions.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/file/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/file/open/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/file/save/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/json/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/json_format/__init__.py +0 -0
- {je_editor-0.0.182/je_editor/utils/multi_language → je_editor-0.0.183/je_editor/utils/logging}/__init__.py +0 -0
- {je_editor-0.0.182/je_editor/utils/redirect_manager → je_editor-0.0.183/je_editor/utils/multi_language}/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/multi_language/english.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor/utils/multi_language/traditional_chinese.py +0 -0
- {je_editor-0.0.182/je_editor/utils/venv_check → je_editor-0.0.183/je_editor/utils/redirect_manager}/__init__.py +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor.egg-info/dependency_links.txt +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor.egg-info/requires.txt +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/je_editor.egg-info/top_level.txt +0 -0
- {je_editor-0.0.182 → je_editor-0.0.183}/setup.cfg +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from je_editor.pyside_ui.browser.browser_widget import
|
1
|
+
from je_editor.pyside_ui.browser.browser_widget import BrowserWidget
|
2
2
|
from je_editor.pyside_ui.code.code_process.code_exec import ExecManager
|
3
3
|
from je_editor.pyside_ui.code.shell_process.shell_exec import ShellManager
|
4
4
|
from je_editor.pyside_ui.code.syntax.python_syntax import PythonHighlighter
|
@@ -28,7 +28,7 @@ __all__ = [
|
|
28
28
|
"JEditorRunOnShellException", "JEditorSaveFileException", "syntax_rule_setting_dict",
|
29
29
|
"JEditorOpenFileException", "JEditorContentFileException", "syntax_word_setting_dict",
|
30
30
|
"JEditorCantFindLanguageException", "JEditorJsonException", "PythonHighlighter",
|
31
|
-
"user_setting_dict", "user_setting_color_dict", "EditorWidget", "
|
31
|
+
"user_setting_dict", "user_setting_color_dict", "EditorWidget", "BrowserWidget",
|
32
32
|
"ExecManager", "ShellManager", "traditional_chinese_word_dict", "english_word_dict",
|
33
33
|
"language_wrapper"
|
34
34
|
]
|
{je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/browser/browser_download_window.py
RENAMED
@@ -2,6 +2,7 @@ from PySide6.QtCore import Qt
|
|
2
2
|
from PySide6.QtWebEngineCore import QWebEngineDownloadRequest
|
3
3
|
from PySide6.QtWidgets import QWidget, QBoxLayout, QPlainTextEdit
|
4
4
|
|
5
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
5
6
|
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper
|
6
7
|
|
7
8
|
|
@@ -9,6 +10,8 @@ class BrowserDownloadWindow(QWidget):
|
|
9
10
|
|
10
11
|
def __init__(self, download_instance: QWebEngineDownloadRequest):
|
11
12
|
super().__init__()
|
13
|
+
jeditor_logger.info(f"Init BrowserDownloadWindow "
|
14
|
+
f"download_instance: {download_instance}")
|
12
15
|
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
13
16
|
self.box_layout = QBoxLayout(QBoxLayout.Direction.TopToBottom)
|
14
17
|
self.show_download_detail_plaintext = QPlainTextEdit()
|
@@ -22,11 +25,15 @@ class BrowserDownloadWindow(QWidget):
|
|
22
25
|
self.box_layout.addWidget(self.show_download_detail_plaintext)
|
23
26
|
self.setLayout(self.box_layout)
|
24
27
|
|
28
|
+
|
25
29
|
def print_finish(self):
|
30
|
+
jeditor_logger.info("BrowserDownloadWindow Print Download is Finished")
|
26
31
|
self.show_download_detail_plaintext.appendPlainText(str(self.download_instance.isFinished()))
|
27
32
|
|
28
33
|
def print_interrupt(self):
|
34
|
+
jeditor_logger.info("BrowserDownloadWindow Print interruptReason")
|
29
35
|
self.show_download_detail_plaintext.appendPlainText(str(self.download_instance.interruptReason()))
|
30
36
|
|
31
37
|
def print_state(self):
|
38
|
+
jeditor_logger.info("BrowserDownloadWindow Print State")
|
32
39
|
self.show_download_detail_plaintext.appendPlainText(str(self.download_instance.state()))
|
{je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/browser/browser_serach_lineedit.py
RENAMED
@@ -5,18 +5,23 @@ from typing import TYPE_CHECKING
|
|
5
5
|
from PySide6.QtCore import Qt
|
6
6
|
from PySide6.QtWidgets import QLineEdit
|
7
7
|
|
8
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
9
|
+
|
8
10
|
if TYPE_CHECKING:
|
9
|
-
from je_editor.pyside_ui.browser.browser_widget import
|
11
|
+
from je_editor.pyside_ui.browser.browser_widget import BrowserWidget
|
10
12
|
|
11
13
|
|
12
14
|
class BrowserLineSearch(QLineEdit):
|
13
15
|
|
14
|
-
def __init__(self, browser_widget:
|
16
|
+
def __init__(self, browser_widget: BrowserWidget):
|
15
17
|
super().__init__()
|
18
|
+
jeditor_logger.info(f"Init BrowserLineSearch "
|
19
|
+
f"browser_widget: {browser_widget}")
|
16
20
|
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
17
21
|
self.browser = browser_widget
|
18
22
|
|
19
23
|
def keyPressEvent(self, event) -> None:
|
20
24
|
if event.key() in [Qt.Key.Key_Enter, Qt.Key.Key_Return]:
|
25
|
+
jeditor_logger.info("Browser Search")
|
21
26
|
self.browser.search()
|
22
27
|
super().keyPressEvent(event)
|
@@ -5,12 +5,15 @@ from PySide6.QtWebEngineCore import QWebEngineDownloadRequest
|
|
5
5
|
from PySide6.QtWebEngineWidgets import QWebEngineView
|
6
6
|
|
7
7
|
from je_editor.pyside_ui.browser.browser_download_window import BrowserDownloadWindow
|
8
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
8
9
|
|
9
10
|
|
10
11
|
class BrowserView(QWebEngineView):
|
11
12
|
|
12
13
|
def __init__(self, start_url: str = "https://www.google.com/"):
|
13
14
|
super().__init__()
|
15
|
+
jeditor_logger.info(f"Init BrowserView "
|
16
|
+
f"start_url: {start_url}")
|
14
17
|
self.setUrl(start_url)
|
15
18
|
self.download_list: List[QWebEngineDownloadRequest] = list()
|
16
19
|
self.download_window_list: List[BrowserDownloadWindow] = list()
|
@@ -18,12 +21,15 @@ class BrowserView(QWebEngineView):
|
|
18
21
|
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
19
22
|
|
20
23
|
def download_file(self, download_instance: QWebEngineDownloadRequest):
|
24
|
+
jeditor_logger.info(f"Download File "
|
25
|
+
f"download_instance: {download_instance}")
|
21
26
|
self.download_list.append(download_instance)
|
22
27
|
download_detail_window = BrowserDownloadWindow(download_instance)
|
23
28
|
self.download_window_list.append(download_detail_window)
|
24
29
|
download_detail_window.show()
|
25
30
|
|
26
31
|
def closeEvent(self, event) -> None:
|
32
|
+
jeditor_logger.info(f"BrowserView closeEvent event: {event}")
|
27
33
|
for download_instance in self.download_list:
|
28
34
|
download_instance.cancel()
|
29
35
|
for download_window in self.download_window_list:
|
@@ -3,14 +3,18 @@ from PySide6.QtWidgets import QWidget, QGridLayout, QPushButton, QInputDialog
|
|
3
3
|
|
4
4
|
from je_editor.pyside_ui.browser.browser_serach_lineedit import BrowserLineSearch
|
5
5
|
from je_editor.pyside_ui.browser.browser_view import BrowserView
|
6
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
6
7
|
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper
|
7
8
|
|
8
9
|
|
9
|
-
class
|
10
|
+
class BrowserWidget(QWidget):
|
10
11
|
|
11
12
|
def __init__(self, start_url: str = "https://www.google.com/",
|
12
13
|
search_prefix: str = "https://www.google.com.tw/search?q="):
|
13
14
|
super().__init__()
|
15
|
+
jeditor_logger.info(f"Init BrowserWidget "
|
16
|
+
f"start_url: {start_url} "
|
17
|
+
f"search_prefix: {search_prefix}")
|
14
18
|
# Browser setting
|
15
19
|
self.browser = BrowserView(start_url)
|
16
20
|
self.search_prefix = search_prefix
|
@@ -41,9 +45,11 @@ class JEBrowser(QWidget):
|
|
41
45
|
self.setLayout(self.grid_layout)
|
42
46
|
|
43
47
|
def search(self):
|
48
|
+
jeditor_logger.info("BrowserWidget Search")
|
44
49
|
self.browser.setUrl(f"{self.search_prefix}{self.url_input.text()}")
|
45
50
|
|
46
51
|
def find_text(self):
|
52
|
+
jeditor_logger.info("BrowserWidget Find Text")
|
47
53
|
search_box = QInputDialog(self)
|
48
54
|
search_text, press_ok = search_box.getText(
|
49
55
|
self, language_wrapper.language_word_dict.get("browser_find_text"),
|
{je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/auto_save/auto_save_manager.py
RENAMED
@@ -2,6 +2,8 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
6
|
+
|
5
7
|
if TYPE_CHECKING:
|
6
8
|
from je_editor.pyside_ui.main_ui.main_editor import EditorWidget
|
7
9
|
|
@@ -13,6 +15,9 @@ file_is_open_manager_dict: dict = dict()
|
|
13
15
|
|
14
16
|
|
15
17
|
def init_new_auto_save_thread(file_path: str, widget: EditorWidget):
|
18
|
+
jeditor_logger.info(f"auto_save_manager.py init_new_auto_save_thread "
|
19
|
+
f"file_path: {file_path} "
|
20
|
+
f"widget: {widget}")
|
16
21
|
widget.current_file = file_path
|
17
22
|
if auto_save_manager_dict.get(file_path, None) is None:
|
18
23
|
widget.code_save_thread = CodeEditSaveThread(
|
{je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/auto_save/auto_save_thread.py
RENAMED
@@ -5,6 +5,7 @@ from typing import Union
|
|
5
5
|
|
6
6
|
from je_editor.pyside_ui.code.plaintext_code_edit.code_edit_plaintext import CodeEditor
|
7
7
|
from je_editor.utils.file.save.save_file import write_file
|
8
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
8
9
|
|
9
10
|
|
10
11
|
class CodeEditSaveThread(Thread):
|
@@ -16,6 +17,9 @@ class CodeEditSaveThread(Thread):
|
|
16
17
|
:param file_to_save: file we want to auto save
|
17
18
|
:param editor: code editor to auto save
|
18
19
|
"""
|
20
|
+
jeditor_logger.info(f"Init CodeEditSaveThread "
|
21
|
+
f"file_to_save: {file_to_save} "
|
22
|
+
f"editor: {editor}")
|
19
23
|
super().__init__()
|
20
24
|
self.file: str = file_to_save
|
21
25
|
self.editor: Union[None, CodeEditor] = editor
|
@@ -27,6 +31,7 @@ class CodeEditSaveThread(Thread):
|
|
27
31
|
"""
|
28
32
|
loop and save current edit file
|
29
33
|
"""
|
34
|
+
jeditor_logger.info("CodeEditSaveThread run")
|
30
35
|
if self.file is not None:
|
31
36
|
path = Path(self.file)
|
32
37
|
while path.is_file() and self.editor is not None:
|
@@ -2,10 +2,15 @@ import tokenize
|
|
2
2
|
|
3
3
|
import pycodestyle
|
4
4
|
|
5
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
6
|
+
|
5
7
|
|
6
8
|
class PEP8FormatChecker(pycodestyle.Checker):
|
7
9
|
|
8
10
|
def __init__(self, filename: str, **kwargs):
|
11
|
+
jeditor_logger.info(f"Init PEP8FormatChecker "
|
12
|
+
f"filename: {filename} "
|
13
|
+
f"kwargs: {kwargs}")
|
9
14
|
super().__init__(filename, **kwargs)
|
10
15
|
# Init variable
|
11
16
|
self.physical_line = None
|
@@ -21,14 +26,22 @@ class PEP8FormatChecker(pycodestyle.Checker):
|
|
21
26
|
self.total_lines = None
|
22
27
|
self.new_line = frozenset([tokenize.NL, tokenize.NEWLINE])
|
23
28
|
self.report_error = self.replace_report_error
|
29
|
+
self.current_file: str = filename
|
24
30
|
self.error_list: list = list()
|
25
31
|
|
26
32
|
def replace_report_error(self, line_number, offset, text, check):
|
33
|
+
jeditor_logger.info(f"PEP8FormatChecker replace_report_error "
|
34
|
+
f"line_number: {line_number} "
|
35
|
+
f"offset: {offset} "
|
36
|
+
f"text: {text}")
|
27
37
|
if not text.startswith("W191"):
|
28
38
|
self.error_list.append(f"{text} on line: {line_number}, offset: {offset}")
|
29
39
|
|
30
40
|
def check_all_format(self, expected=None, line_offset=0) -> int:
|
31
41
|
"""Run all checks on the input file."""
|
42
|
+
jeditor_logger.info(f"PEP8FormatChecker check_all_format "
|
43
|
+
f"expected: {expected} "
|
44
|
+
f"line_offset: {line_offset}")
|
32
45
|
self.report.init_file(self.filename, self.lines, expected, line_offset)
|
33
46
|
self.total_lines = len(self.lines)
|
34
47
|
if self._ast_checks:
|
@@ -15,6 +15,7 @@ from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
|
15
15
|
from je_editor.pyside_ui.main_ui.save_settings.user_color_setting_file import actually_color_dict
|
16
16
|
from je_editor.utils.exception.exception_tags import je_editor_init_error
|
17
17
|
from je_editor.utils.exception.exceptions import JEditorException
|
18
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
18
19
|
from je_editor.utils.venv_check.check_venv import check_and_choose_venv
|
19
20
|
|
20
21
|
|
@@ -32,6 +33,11 @@ class ExecManager(object):
|
|
32
33
|
:param program_language: which program language
|
33
34
|
:param program_encoding: which encoding
|
34
35
|
"""
|
36
|
+
jeditor_logger.info(f"Init ExecManager "
|
37
|
+
f"main_window: {main_window} "
|
38
|
+
f"program_language: {program_language} "
|
39
|
+
f"program_encoding: {program_encoding} "
|
40
|
+
f"program_buffer: {program_buffer}")
|
35
41
|
self.read_program_error_output_from_thread = None
|
36
42
|
self.read_program_output_from_thread = None
|
37
43
|
self.main_window: EditorWidget = main_window
|
@@ -49,6 +55,7 @@ class ExecManager(object):
|
|
49
55
|
run_instance_manager.instance_list.append(self)
|
50
56
|
|
51
57
|
def renew_path(self) -> None:
|
58
|
+
jeditor_logger.info("ExecManager renew_path")
|
52
59
|
if self.main_window.python_compiler is None:
|
53
60
|
# Renew compiler path
|
54
61
|
if sys.platform in ["win32", "cygwin", "msys"]:
|
@@ -60,6 +67,7 @@ class ExecManager(object):
|
|
60
67
|
self.compiler_path = self.main_window.python_compiler
|
61
68
|
|
62
69
|
def later_init(self) -> None:
|
70
|
+
jeditor_logger.info("ExecManager later_init")
|
63
71
|
# Enable timer and code result area
|
64
72
|
if self.main_window is not None:
|
65
73
|
self.code_result: QTextEdit = self.main_window.code_result
|
@@ -73,6 +81,9 @@ class ExecManager(object):
|
|
73
81
|
:param exec_prefix: user define exec prefix
|
74
82
|
:return: if error return result and True else return result and False
|
75
83
|
"""
|
84
|
+
jeditor_logger.info(f"ExecManager exec_code "
|
85
|
+
f"exec_file_name: {exec_file_name} "
|
86
|
+
f"exec_prefix: {exec_prefix}")
|
76
87
|
try:
|
77
88
|
self.exit_program()
|
78
89
|
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
@@ -131,11 +142,13 @@ class ExecManager(object):
|
|
131
142
|
self.process.terminate()
|
132
143
|
|
133
144
|
def full_exit_program(self):
|
145
|
+
jeditor_logger.info("ExecManager full_exit_program")
|
134
146
|
self.timer.stop()
|
135
147
|
self.exit_program()
|
136
148
|
self.main_window.exec_program = None
|
137
149
|
|
138
150
|
def pull_text(self) -> None:
|
151
|
+
jeditor_logger.info("ExecManager pull_text")
|
139
152
|
# Pull text from queue and put in code result area
|
140
153
|
try:
|
141
154
|
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
@@ -163,6 +176,7 @@ class ExecManager(object):
|
|
163
176
|
|
164
177
|
# Exit program change run flag to false and clean read thread and queue and process
|
165
178
|
def exit_program(self) -> None:
|
179
|
+
jeditor_logger.info("ExecManager exit_program")
|
166
180
|
self.still_run_program = False
|
167
181
|
if self.read_program_output_from_thread is not None:
|
168
182
|
self.read_program_output_from_thread = None
|
@@ -176,10 +190,12 @@ class ExecManager(object):
|
|
176
190
|
|
177
191
|
# Pull all remain string on queue and add to code result area
|
178
192
|
def print_and_clear_queue(self) -> None:
|
193
|
+
jeditor_logger.info("ExecManager print_and_clear_queue")
|
179
194
|
self.run_output_queue = queue.Queue()
|
180
195
|
self.run_error_queue = queue.Queue()
|
181
196
|
|
182
197
|
def read_program_output_from_process(self) -> None:
|
198
|
+
jeditor_logger.info("ExecManager read_program_output_from_process")
|
183
199
|
while self.still_run_program:
|
184
200
|
program_output_data: str = self.process.stdout.read(
|
185
201
|
self.program_buffer).decode(self.program_encoding, "replace")
|
@@ -188,6 +204,7 @@ class ExecManager(object):
|
|
188
204
|
self.run_output_queue.put_nowait(program_output_data)
|
189
205
|
|
190
206
|
def read_program_error_output_from_process(self) -> None:
|
207
|
+
jeditor_logger.info("ExecManager read_program_error_output_from_process")
|
191
208
|
while self.still_run_program:
|
192
209
|
program_error_output_data: str = self.process.stderr.read(
|
193
210
|
self.program_buffer).decode(self.program_encoding, "replace")
|
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|
3
3
|
from pathlib import Path
|
4
4
|
from typing import TYPE_CHECKING
|
5
5
|
|
6
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
7
|
+
|
6
8
|
if TYPE_CHECKING:
|
7
9
|
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
8
10
|
from je_editor.pyside_ui.main_ui.editor.editor_widget_dock import FullEditorWidget
|
@@ -22,6 +24,7 @@ from je_editor.pyside_ui.main_ui.save_settings.user_color_setting_file import ac
|
|
22
24
|
|
23
25
|
|
24
26
|
def venv_check():
|
27
|
+
jeditor_logger.info("code_edit_plaintext.py venv check")
|
25
28
|
venv_path = Path(str(Path.cwd()) + "/venv")
|
26
29
|
return venv_path
|
27
30
|
|
@@ -33,6 +36,7 @@ class CodeEditor(QPlainTextEdit):
|
|
33
36
|
"""
|
34
37
|
|
35
38
|
def __init__(self, main_window: Union[EditorWidget, FullEditorWidget]):
|
39
|
+
jeditor_logger.info(f"Init CodeEditor main_window: {main_window}")
|
36
40
|
super().__init__()
|
37
41
|
# Jedi
|
38
42
|
self.env = None
|
@@ -76,6 +80,7 @@ class CodeEditor(QPlainTextEdit):
|
|
76
80
|
self.set_complete([])
|
77
81
|
|
78
82
|
def check_env(self):
|
83
|
+
jeditor_logger.info("CodeEditor check_env")
|
79
84
|
path = venv_check()
|
80
85
|
if path.exists():
|
81
86
|
self.env = jedi.create_environment(str(path))
|
@@ -86,6 +91,7 @@ class CodeEditor(QPlainTextEdit):
|
|
86
91
|
:param list_to_complete: keyword list to complete.
|
87
92
|
:return: None
|
88
93
|
"""
|
94
|
+
jeditor_logger.info(f"CodeEditor set_complete list_to_complete: {list_to_complete}")
|
89
95
|
completer = QCompleter(list_to_complete)
|
90
96
|
completer.activated.connect(self.insert_completion)
|
91
97
|
completer.setWidget(self)
|
@@ -100,6 +106,7 @@ class CodeEditor(QPlainTextEdit):
|
|
100
106
|
:param completion: completion text
|
101
107
|
:return: None
|
102
108
|
"""
|
109
|
+
jeditor_logger.info(f"CodeEditor insert_completion completion:{completion}")
|
103
110
|
if self.completer.widget() != self:
|
104
111
|
return
|
105
112
|
text_cursor = self.textCursor()
|
@@ -111,12 +118,14 @@ class CodeEditor(QPlainTextEdit):
|
|
111
118
|
|
112
119
|
@property
|
113
120
|
def text_under_cursor(self):
|
121
|
+
jeditor_logger.info("CodeEditor text_under_cursor")
|
114
122
|
# Find text under cursor
|
115
123
|
text_cursor = self.textCursor()
|
116
124
|
text_cursor.select(QTextCursor.SelectionType.WordUnderCursor)
|
117
125
|
return text_cursor.selectedText()
|
118
126
|
|
119
127
|
def focusInEvent(self, e) -> None:
|
128
|
+
jeditor_logger.info(f"CodeEditor focusInEvent event: {e}")
|
120
129
|
if self.completer:
|
121
130
|
self.completer.setWidget(self)
|
122
131
|
QPlainTextEdit.focusInEvent(self, e)
|
@@ -126,6 +135,7 @@ class CodeEditor(QPlainTextEdit):
|
|
126
135
|
Keyword autocomplete
|
127
136
|
:return: None
|
128
137
|
"""
|
138
|
+
jeditor_logger.info("CodeEditor complete")
|
129
139
|
prefix = self.text_under_cursor
|
130
140
|
if self.env is not None:
|
131
141
|
script = jedi.Script(code=self.toPlainText(), environment=self.env)
|
@@ -152,6 +162,7 @@ class CodeEditor(QPlainTextEdit):
|
|
152
162
|
Show search box ui and bind.
|
153
163
|
:return: None
|
154
164
|
"""
|
165
|
+
jeditor_logger.info("CodeEditor start_search_dialog")
|
155
166
|
# Search box connect to function
|
156
167
|
self.search_box = SearchBox()
|
157
168
|
self.search_box.search_back_button.clicked.connect(
|
@@ -167,6 +178,7 @@ class CodeEditor(QPlainTextEdit):
|
|
167
178
|
Find next match text.
|
168
179
|
:return: None
|
169
180
|
"""
|
181
|
+
jeditor_logger.info("CodeEditor find_next_text")
|
170
182
|
if self.search_box.isVisible():
|
171
183
|
text = self.search_box.command_input.text()
|
172
184
|
self.find(text)
|
@@ -176,11 +188,13 @@ class CodeEditor(QPlainTextEdit):
|
|
176
188
|
Find back match text.
|
177
189
|
:return: None
|
178
190
|
"""
|
191
|
+
jeditor_logger.info("CodeEditor find_back_text")
|
179
192
|
if self.search_box.isVisible():
|
180
193
|
text = self.search_box.command_input.text()
|
181
194
|
self.find(text, QTextDocument.FindFlag.FindBackward)
|
182
195
|
|
183
196
|
def line_number_paint(self, event) -> None:
|
197
|
+
jeditor_logger.info(f"CodeEditor line_number_paint event: {event}")
|
184
198
|
painter = QPainter(self.line_number)
|
185
199
|
painter.fillRect(event.rect(), actually_color_dict.get("line_number_background_color"))
|
186
200
|
block = self.firstVisibleBlock()
|
@@ -205,11 +219,13 @@ class CodeEditor(QPlainTextEdit):
|
|
205
219
|
block_number += 1
|
206
220
|
|
207
221
|
def line_number_width(self) -> int:
|
222
|
+
jeditor_logger.info("CodeEditor line_number_width")
|
208
223
|
digits = len(str(self.blockCount()))
|
209
224
|
space = 12 * digits
|
210
225
|
return space
|
211
226
|
|
212
227
|
def update_line_number_area_width(self, value) -> None:
|
228
|
+
jeditor_logger.info(f"CodeEditor update_line_number_area_width value: {value}")
|
213
229
|
self.setViewportMargins(self.line_number_width(), 0, 0, 0)
|
214
230
|
|
215
231
|
def resizeEvent(self, event) -> None:
|
@@ -218,6 +234,7 @@ class CodeEditor(QPlainTextEdit):
|
|
218
234
|
:param event: QT event.
|
219
235
|
:return: None
|
220
236
|
"""
|
237
|
+
jeditor_logger.info(f"CodeEditor resizeEvent event:{event}")
|
221
238
|
QPlainTextEdit.resizeEvent(self, event)
|
222
239
|
cr = self.contentsRect()
|
223
240
|
self.line_number.setGeometry(
|
@@ -231,6 +248,7 @@ class CodeEditor(QPlainTextEdit):
|
|
231
248
|
:param dy: update or not.
|
232
249
|
:return: None
|
233
250
|
"""
|
251
|
+
jeditor_logger.info(f"CodeEditor update_line_number_area rect: {rect}, dy: {dy}")
|
234
252
|
if dy:
|
235
253
|
self.line_number.scroll(0, dy)
|
236
254
|
else:
|
@@ -248,6 +266,7 @@ class CodeEditor(QPlainTextEdit):
|
|
248
266
|
Change current line color.
|
249
267
|
:return: None
|
250
268
|
"""
|
269
|
+
jeditor_logger.info("CodeEditor highlight_current_line")
|
251
270
|
selections = []
|
252
271
|
if not self.isReadOnly():
|
253
272
|
formats = QTextCharFormat()
|
@@ -269,6 +288,7 @@ class CodeEditor(QPlainTextEdit):
|
|
269
288
|
"""
|
270
289
|
# Catch soft wrap shift + return (line nuber not working on soft warp)
|
271
290
|
key = event.key()
|
291
|
+
jeditor_logger.info(f"CodeEditor keyPressEvent event: {event} key: {key}")
|
272
292
|
if event.modifiers() and Qt.Modifier.CTRL:
|
273
293
|
if key == Qt.Key.Key_B:
|
274
294
|
if self.env is not None:
|
@@ -301,6 +321,7 @@ class CodeEditor(QPlainTextEdit):
|
|
301
321
|
self.complete()
|
302
322
|
|
303
323
|
def mousePressEvent(self, event) -> None:
|
324
|
+
jeditor_logger.info(f"CodeEditor mousePressEvent event: {event}")
|
304
325
|
# Highlight mouse click line
|
305
326
|
super().mousePressEvent(event)
|
306
327
|
self.highlight_current_line()
|
@@ -312,8 +333,10 @@ class LineNumber(QWidget):
|
|
312
333
|
"""
|
313
334
|
|
314
335
|
def __init__(self, editor):
|
336
|
+
jeditor_logger.info("Init LineNumber")
|
315
337
|
QWidget.__init__(self, parent=editor)
|
316
338
|
self.editor = editor
|
317
339
|
|
318
340
|
def paintEvent(self, event) -> None:
|
341
|
+
jeditor_logger.info(f"LineNumber paintEvent event: {event}")
|
319
342
|
self.editor.line_number_paint(event)
|
@@ -2,6 +2,8 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
6
|
+
|
5
7
|
if TYPE_CHECKING:
|
6
8
|
from je_editor.pyside_ui.code.code_process.code_exec import ExecManager
|
7
9
|
from je_editor.pyside_ui.code.shell_process.shell_exec import ShellManager
|
@@ -12,9 +14,11 @@ from typing import List, Union
|
|
12
14
|
class RunInstanceManager(object):
|
13
15
|
|
14
16
|
def __init__(self):
|
17
|
+
jeditor_logger.info("Init RunInstanceManager")
|
15
18
|
self.instance_list: List[Union[ExecManager, ShellManager]] = list()
|
16
19
|
|
17
20
|
def close_all_instance(self):
|
21
|
+
jeditor_logger.info("RunInstanceManager close_all_instance")
|
18
22
|
for manager in self.instance_list:
|
19
23
|
if manager.process is not None:
|
20
24
|
manager.process.terminate()
|
{je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/shell_process/shell_exec.py
RENAMED
@@ -17,6 +17,7 @@ from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
|
17
17
|
from je_editor.pyside_ui.main_ui.save_settings.user_color_setting_file import actually_color_dict
|
18
18
|
from je_editor.utils.exception.exception_tags import je_editor_init_error
|
19
19
|
from je_editor.utils.exception.exceptions import JEditorException
|
20
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
20
21
|
from je_editor.utils.venv_check.check_venv import check_and_choose_venv
|
21
22
|
|
22
23
|
|
@@ -29,6 +30,11 @@ class ShellManager(object):
|
|
29
30
|
program_buffer: int = 1024,
|
30
31
|
after_done_function: Union[None, Callable] = None
|
31
32
|
):
|
33
|
+
jeditor_logger.info(f"Init ShellManager "
|
34
|
+
f"main_window: {main_window} "
|
35
|
+
f"shell_encoding: {shell_encoding} "
|
36
|
+
f"program_buffer: {program_buffer} "
|
37
|
+
f"after_done_function: {after_done_function}")
|
32
38
|
"""
|
33
39
|
:param main_window: Pyside main window
|
34
40
|
:param shell_encoding: shell command read output encoding
|
@@ -51,6 +57,7 @@ class ShellManager(object):
|
|
51
57
|
run_instance_manager.instance_list.append(self)
|
52
58
|
|
53
59
|
def renew_path(self) -> None:
|
60
|
+
jeditor_logger.info("ShellManager renew_path")
|
54
61
|
if self.main_window.python_compiler is None:
|
55
62
|
# Renew compiler path
|
56
63
|
if sys.platform in ["win32", "cygwin", "msys"]:
|
@@ -62,6 +69,7 @@ class ShellManager(object):
|
|
62
69
|
self.compiler_path = self.main_window.python_compiler
|
63
70
|
|
64
71
|
def later_init(self) -> None:
|
72
|
+
jeditor_logger.info("ShellManager later_init")
|
65
73
|
if self.main_window is not None:
|
66
74
|
self.code_result: QTextEdit = self.main_window.code_result
|
67
75
|
else:
|
@@ -72,6 +80,7 @@ class ShellManager(object):
|
|
72
80
|
:param shell_command: shell command will run
|
73
81
|
:return: if error return result and True else return result and False
|
74
82
|
"""
|
83
|
+
jeditor_logger.info(f"ShellManager exec_shell, shell_command: {shell_command}")
|
75
84
|
try:
|
76
85
|
self.exit_program()
|
77
86
|
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
@@ -115,6 +124,7 @@ class ShellManager(object):
|
|
115
124
|
|
116
125
|
# tkinter_ui update method
|
117
126
|
def pull_text(self) -> None:
|
127
|
+
jeditor_logger.info("ShellManager pull_text")
|
118
128
|
try:
|
119
129
|
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
120
130
|
if not self.run_output_queue.empty():
|
@@ -140,6 +150,7 @@ class ShellManager(object):
|
|
140
150
|
self.process.poll()
|
141
151
|
|
142
152
|
def process_run_over(self):
|
153
|
+
jeditor_logger.info("ShellManager process_run_over")
|
143
154
|
self.timer.stop()
|
144
155
|
self.exit_program()
|
145
156
|
self.main_window.exec_shell = None
|
@@ -148,6 +159,7 @@ class ShellManager(object):
|
|
148
159
|
|
149
160
|
# exit program change run flag to false and clean read thread and queue and process
|
150
161
|
def exit_program(self) -> None:
|
162
|
+
jeditor_logger.info("ShellManager exit_program")
|
151
163
|
self.still_run_shell = False
|
152
164
|
if self.read_program_output_from_thread is not None:
|
153
165
|
self.read_program_output_from_thread = None
|
@@ -160,10 +172,12 @@ class ShellManager(object):
|
|
160
172
|
self.process = None
|
161
173
|
|
162
174
|
def print_and_clear_queue(self) -> None:
|
175
|
+
jeditor_logger.info("ShellManager print_and_clear_queue")
|
163
176
|
self.run_output_queue = queue.Queue()
|
164
177
|
self.run_error_queue = queue.Queue()
|
165
178
|
|
166
179
|
def read_program_output_from_process(self) -> None:
|
180
|
+
jeditor_logger.info("ShellManager read_program_output_from_process")
|
167
181
|
while self.still_run_shell:
|
168
182
|
program_output_data = self.process.stdout.read(
|
169
183
|
self.program_buffer) \
|
@@ -173,6 +187,7 @@ class ShellManager(object):
|
|
173
187
|
self.run_output_queue.put_nowait(program_output_data)
|
174
188
|
|
175
189
|
def read_program_error_output_from_process(self) -> None:
|
190
|
+
jeditor_logger.info("ShellManager read_program_error_output_from_process")
|
176
191
|
while self.still_run_shell:
|
177
192
|
program_error_output_data = self.process.stderr.read(
|
178
193
|
self.program_buffer) \
|
@@ -3,10 +3,12 @@ from PySide6.QtGui import QSyntaxHighlighter
|
|
3
3
|
from PySide6.QtGui import QTextCharFormat
|
4
4
|
|
5
5
|
from je_editor.pyside_ui.code.syntax.syntax_setting import syntax_word_setting_dict, syntax_rule_setting_dict
|
6
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
6
7
|
|
7
8
|
|
8
9
|
class PythonHighlighter(QSyntaxHighlighter):
|
9
10
|
def __init__(self, parent=None):
|
11
|
+
jeditor_logger.info(f"Init PythonHighlighter parent: {parent}")
|
10
12
|
super().__init__(parent)
|
11
13
|
|
12
14
|
self.highlight_rules = []
|
@@ -29,6 +31,7 @@ class PythonHighlighter(QSyntaxHighlighter):
|
|
29
31
|
self.highlight_rules.append((pattern, text_char_format))
|
30
32
|
|
31
33
|
def highlightBlock(self, text) -> None:
|
34
|
+
jeditor_logger.info(f"PythonHighlighter highlightBlock text: {text}")
|
32
35
|
for pattern, pattern_format in self.highlight_rules:
|
33
36
|
match_iterator = pattern.globalMatch(text)
|
34
37
|
while match_iterator.hasNext():
|
{je_editor-0.0.182 → je_editor-0.0.183}/je_editor/pyside_ui/code/textedit_code_result/code_record.py
RENAMED
@@ -3,11 +3,13 @@ from PySide6.QtWidgets import QTextEdit
|
|
3
3
|
|
4
4
|
from je_editor.pyside_ui.dialog.search_ui.search_error_box import SearchResultBox
|
5
5
|
from je_editor.pyside_ui.main_ui.save_settings.user_setting_file import user_setting_dict
|
6
|
+
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
6
7
|
|
7
8
|
|
8
9
|
class CodeRecord(QTextEdit):
|
9
10
|
# Extend QTextEdit
|
10
11
|
def __init__(self):
|
12
|
+
jeditor_logger.info("Init CodeRecord")
|
11
13
|
super().__init__()
|
12
14
|
self.setLineWrapMode(self.LineWrapMode.NoWrap)
|
13
15
|
self.setReadOnly(True)
|
@@ -20,12 +22,14 @@ class CodeRecord(QTextEdit):
|
|
20
22
|
self.addAction(self.search_result_action)
|
21
23
|
|
22
24
|
def append(self, text: str) -> None:
|
25
|
+
jeditor_logger.info("CodeRecord append")
|
23
26
|
max_line: int = user_setting_dict.get("max_line_of_output", 200000)
|
24
27
|
if self.document().lineCount() >= max_line > 0:
|
25
28
|
self.setPlainText("")
|
26
29
|
super().append(text)
|
27
30
|
|
28
31
|
def start_search_result_dialog(self) -> None:
|
32
|
+
jeditor_logger.info("CodeRecord start_search_result_dialog")
|
29
33
|
# Binding search box
|
30
34
|
self.search_result_box = SearchResultBox()
|
31
35
|
self.search_result_box.search_back_button.clicked.connect(
|
@@ -37,11 +41,13 @@ class CodeRecord(QTextEdit):
|
|
37
41
|
self.search_result_box.show()
|
38
42
|
|
39
43
|
def find_next_text(self) -> None:
|
44
|
+
jeditor_logger.info("CodeRecord find_next_text")
|
40
45
|
if self.search_result_box.isVisible():
|
41
46
|
text = self.search_result_box.search_input.text()
|
42
47
|
self.find(text)
|
43
48
|
|
44
49
|
def find_back_text(self) -> None:
|
50
|
+
jeditor_logger.info("CodeRecord find_back_text")
|
45
51
|
if self.search_result_box.isVisible():
|
46
52
|
text = self.search_result_box.search_input.text()
|
47
53
|
self.find(text, QTextDocument.FindFlag.FindBackward)
|