Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 413230

Summary: [Shell] Optional flag arguments improvements
Product: [ECD] Orion Reporter: Maciej Bendkowski <maciej.bendkowski>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Maciej Bendkowski CLA 2013-07-18 05:55:14 EDT
To make an argument optional I have to assign a default value to it. Note that it HAS to be a default value - I can't assign undefined, since it would make my argument required. In order to assure I don't assign something meaningful I have to assign a different type as a default value, e. g. if the parameter has the type string I have to assign something NOT being a string.

Another, perhaps more UX oriented, problem is the representation of those optional parameters. Usually I'd expect something starting with '--' to indicate it's a flag parameter. In the shell UI we do not distinguish between optional and required parameters which is quite confusing.
Comment 1 Maciej Bendkowski CLA 2013-07-18 06:21:12 EDT
To make matters worse, I can't create an optional flag, which might be applied to non- as well as argument- command calls, e. g. --verbose.
Comment 2 Maciej Bendkowski CLA 2013-08-02 08:49:39 EDT
Making an argument optional may be accomplished using null as the default value. Nevertheless, I strongly suggest we need to allow providing flag arguments quite the same way it works in a standard console, like bash. Perhaps the suggested GCLI approach, where the user has to define multiple commands for better auto-completion is not the best way to actually solve the problem. We need to rethink this.
Comment 3 John Arthorne CLA 2015-05-05 16:19:33 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html