pharo-launcher icon indicating copy to clipboard operation
pharo-launcher copied to clipboard

Implement better initialization of Pharo launcher model for CLI

Open Bajger opened this issue 2 years ago • 0 comments

Describe the request Currently, new instance of PharoLauncherModel is created every time the accessor launcherModel is invoked. This could be several times during program execution. PharoLauncherModel should be initialized just once, during image startup and command activation.

Expected behavior Instead of using ClapContext we should use PhLCliClapContext, that uses proper accessors for launcher model (that are already initialized).

Expected development cost It seems that ClapContext is activated in the ClapCommandLineHandler>>activate. Probably we should use something like own PhLCliCommandLineHandler>>activate that would have 'launcher' id (of command) and activate PhLCliClapContext instance. As an consequence, command line usage would not need clap as a first command, but only launcher command. Refactoring of PhLCliCommand would be needed, since this command already uses launcher id (so that launcher is used just in cmd line handler activation).

Bajger avatar Jun 05 '22 21:06 Bajger