Skip to content

Commit 731cfa6

Browse files
committed
feat: ajout de l'option --bcasl à la commande gui pour ouvrir l'éditeur de pipeline
1 parent 5a94850 commit 731cfa6

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

Ui/Cli/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,14 @@ def run_bcasl_cmd(timeout, parallel, list_plugins, verbose):
326326

327327
@cli.command("gui")
328328
@click.option("--legacy", is_flag=True)
329-
def gui_cmd(legacy):
329+
@click.option("--bcasl", is_flag=True)
330+
def gui_cmd(legacy, bcasl):
330331
"""Launch the ARK GUI."""
331332
if legacy:
332333
click.echo(
333334
"LIMITATION: The classic GUI does not support full UI feature integration.\nFor full functionality, use 'ark gui'."
334335
)
335-
raise click.exceptions.Exit(launch_gui(legacy=legacy))
336+
raise click.exceptions.Exit(launch_gui(legacy=legacy, bcasl=bcasl))
336337

337338
@cli.group("set")
338339
def set_group():

Ui/Cli/helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,10 @@ def append(self, msg: str):
651651
status.stop()
652652

653653

654-
def launch_gui(*, legacy: bool = False) -> int:
654+
def launch_gui(*, legacy: bool = False, bcasl: bool = False) -> int:
655655
return launch_main_application(
656656
no_splash=False,
657657
ide_gui=not legacy,
658658
classic_gui=legacy,
659+
bcasl_gui=bcasl,
659660
)

Ui/Cli/launchers.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ def _apply_small_screen_compaction(app, window) -> None:
5454

5555

5656
def launch_main_application(
57-
no_splash: bool = False, ide_gui: bool = False, classic_gui: bool = False
57+
no_splash: bool = False,
58+
ide_gui: bool = False,
59+
classic_gui: bool = False,
60+
bcasl_gui: bool = False,
5861
) -> int:
5962
try:
6063
from PySide6.QtCore import Qt, QTimer
@@ -132,6 +135,16 @@ def _launch_main():
132135
window = PyCompilerArkGui()
133136
set_window_icon(window)
134137
window.show()
138+
139+
if bcasl_gui:
140+
try:
141+
from bcasl.Loader import open_bc_loader_dialog
142+
143+
window.apply_workspace_selection(os.getcwd(), source="cli")
144+
open_bc_loader_dialog(window)
145+
except Exception as e:
146+
warn(f"Failed to open BCASL dialog: {e}")
147+
135148
_apply_small_screen_compaction(app, window)
136149
try:
137150
splash.finish(window)
@@ -149,6 +162,16 @@ def _launch_main():
149162
window = PyCompilerArkGui()
150163
set_window_icon(window)
151164
window.show()
165+
166+
if bcasl_gui:
167+
try:
168+
from bcasl.Loader import open_bc_loader_dialog
169+
170+
window.apply_workspace_selection(os.getcwd(), source="cli")
171+
open_bc_loader_dialog(window)
172+
except Exception as e:
173+
warn(f"Failed to open BCASL dialog: {e}")
174+
152175
_apply_small_screen_compaction(app, window)
153176

154177
return app.exec()

0 commit comments

Comments
 (0)