Skip to content

Conversation

prokopyl
Copy link
Member

The goal of this new version is to bring more flexibility and new features to the already existing API :

  • A commands tree model, enabling single commands and n-deep sub-commands to be registered.
  • Refactoring the Command class to be only a read-only execution context, allowing deferred (or threaded) usage.
  • Genericizing commands, so they can share similar behaviour when used in different sub-commands.
  • Adding localization to the help texts and messages.

@AmauryCarrade AmauryCarrade added C ⋅ API Component – API-related (generic) C ⋅ Commands Component – Commands API T ⋅ Feature Type – Feature Request labels Sep 18, 2016
@prokopyl prokopyl force-pushed the feature-newcommands branch from 31adc67 to 1aadfe7 Compare March 4, 2018 14:36
prokopyl added 2 commits March 4, 2018 18:40
* NEW: Added exception types for all raised command parsing errors.
* NEW: Removed type parameter on Field, Flag and Parameter types.
* NEW: Overall better error handling.
@Vlammar
Copy link
Member

Vlammar commented Nov 12, 2020

Composite can be a good thing. For example when you need an optionnal width and length. In the actual state you have to check in the plugin if there is none or both. Adding a solution like an optionnalComposite will allow to solve this issue, something like this

@About("Size")
@Flag(composite = {"w","h"}
public OptionnalComposite<ArrayList<Composant<Integer>>> size;

@About("The width")
@Flag(shortName = "w")
public Composant<Integer> width;

@About("The height")
@Flag(shortName = "h")
public Composant<Integer> height;

@prokopyl prokopyl marked this pull request as draft November 12, 2020 17:05
@prokopyl
Copy link
Member Author

Made obsolete by #55

@prokopyl prokopyl closed this Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C ⋅ API Component – API-related (generic) C ⋅ Commands Component – Commands API T ⋅ Feature Type – Feature Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants