Skip to content

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Feb 17, 2025

Currently if one wants to extend a Project launcher it is required to completely reimplement the launch() method even if one only wants to add some argument to the commandline. Also things like returncode handling and reporting of results need to be implemented again.

This now adds a new method ProjectLauncher#getCommand() that externalize the process of creating a commandline, this also allows to access the final commandline from the outside (e.g. to show it to the user) or further customize it.

Currently if one wants to extend a Project launcher it is required to
completely reimplement the launch() method even if one only wants to add
some argument to the commandline. Also things like returncode handling
and reporting of results need to be implemented again.

This now adds a new method ProjectLauncher#getCommand() that externalize
the process of creating a commandline, this also allows to access the
final commandline from the outside (e.g. to show it to the user).

Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@pkriens pkriens merged commit 3842a0d into bndtools:master Feb 17, 2025
9 checks passed
@pkriens
Copy link
Member

pkriens commented Feb 17, 2025

nice work. I nowadays always try to have either control (decides flow) or worker (calculates some value) methods, never mix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants