Closed HeuristicLab-Trac-Bot closed 11 years ago
- created argument handling infrastructure
- added
StartArgument
It is now possible to automatically start applications using the
StartArgument
. The syntax is as follows:
/start:ApplicationName
Examples:
/start:Optimizer
/start:"Persistence Configuration"
We have a very old ticket for this #45 (which I have just closed as duplicate).
Replying to [comment:5 gkronber]:
We have a very old ticket for this #45 (which I have just closed as duplicate).
Oh, I missed that one. Thanks!
Thanks very much for implementing this, here are my reviewing comments:
- The white space in the regex should be replaced with \s
- GetArguments in the ArgumentHandling class should throw an exception if the argument is not valid or null so that the user gets notified if there is a problem with the argument
- The StartToken string should be moved to the StartArgument class so that everything concerning this argument is in one place
- Maybe this Token string should also be in the interface as all arguments will need one
- Please remove the public StarterForm(string appName) method from the StarterForm class as it is not used anywhere
r8677: refactored argument handling infrastructure based on the changes suggested by ascheibe in comment:7:#1926
Thanks for the review.
Thanks, looks good!
I'm reassigning this ticket to mkommend as he also wanted to have a look at it.
I wondered if we could have a way to hide the starter. Can you omit showing the starter if the /start command is given? I think we don't really need to show it in this case.
Reviewing comments:
Argument.GetHashCode()
is strangely implemented. Normally it should reflect the implementation ofEquals
.- A better name for the folder containing the files would be CommandLineArguments or CommandLineArgumentHandling. ArgumentHandling is little bit too generic IMHO.
- Why was it decided to implement command line parsing manually and not use existing libraries, that provide more functionality? (e.g., http://stackoverflow.com/questions/491595/best-way-to-parse-command-line-arguments-in-c)
- Please address the comment by abeham.
- addressed the suggestion by abeham in comment:13:#1926
- applied the changes suggested by mkommend in comment:14:#1926
- refactored argument handling infrastructure
Thanks for the detailed review. It is now possible to hide the starter by using the
HideStarterArgument
(/hideStarter
).
r8749: made generic type parameter in
ICommandLineArgument<T>
invariant
- added
OpenArgument
- refactored argument handling infrastructure
CommandLineArgumentHandlingRegistryEntries.reg
(0.9 KiB)All valid command line arguments are now passed to any started application through the
PluginManager
and theApplicationManager
to enable specific handling. As a result it is now possible to load saved HeuristicLab files via command line arguments. A new instance of the Optimizer will be started automatically and the files will be opened. I also attached the [attachment:CommandLineArgumentHandlingRegistryEntries.reg registry entries] needed to associate HeuristicLab files with HeuristicLab. Keep in mind that you probably have to change the specified path to the HeuristicLab executable.
Replying to [comment:25 jkarder]:
- added
OpenArgument
- refactored argument handling infrastructure In r8818 you introduced a command line property in the
IMainForm
interface, which should be removed as it is not needed and and command line arguments should not be handled be a form object.
r8821: reverted the changes addressed by mkommend in comment:29:#1926
Replying to [comment:29 mkommend]:
Replying to [comment:25 jkarder]:
- added
OpenArgument
- refactored argument handling infrastructure In r8818 you introduced a command line property in the
IMainForm
interface, which should be removed as it is not needed and and command line arguments should not be handled be a form object.Thanks for the hint.
Issue migrated from trac ticket # 1926
milestone: HeuristicLab 3.3.8 | component: PluginInfrastructure | priority: low | resolution: done
2012-09-04 10:15:45: @jkarder created the issue