forked from nusCS2113-AY1920S1/PersonalAssistant-Duke
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add static CommandDictionary method to get standardized command usage messages #283
Merged
cyanoei
merged 9 commits into
AY1920S1-CS2113T-F09-3:master
from
Raghav-B:IO-standardization
Nov 1, 2019
Merged
Add static CommandDictionary method to get standardized command usage messages #283
cyanoei
merged 9 commits into
AY1920S1-CS2113T-F09-3:master
from
Raghav-B:IO-standardization
Nov 1, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cyanoei
reviewed
Nov 1, 2019
|
||
// Lost Commands | ||
commandDict.add(new Pair<>("lost", "<Stock Code> <Quantity>")); | ||
commandDict.add(new Pair<>("lost", "<StockCode> <Quantity>")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
standardised yes v good
cyanoei
approved these changes
Nov 1, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a very useful update. thanks
cyanoei
added a commit
to cyanoei/eggventory-team
that referenced
this pull request
Nov 1, 2019
* 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main: Add static CommandDictionary method to get standardized command usage messages (AY1920S1-CS2113T-F09-3#283) Ui.png update (AY1920S1-CS2113T-F09-3#282) Test commands (AY1920S1-CS2113T-F09-3#280) Help YanBo tag his code (AY1920S1-CS2113T-F09-3#279)
cyanoei
added a commit
to cyanoei/eggventory-team
that referenced
this pull request
Nov 1, 2019
… into authortags_update * 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main: Loan add backend (AY1920S1-CS2113T-F09-3#284) Add static CommandDictionary method to get standardized command usage messages (AY1920S1-CS2113T-F09-3#283) Ui.png update (AY1920S1-CS2113T-F09-3#282) Test commands (AY1920S1-CS2113T-F09-3#280) Help YanBo tag his code (AY1920S1-CS2113T-F09-3#279) Fixed error with loading of stock from .csv (AY1920S1-CS2113T-F09-3#278) List stocktype multi args (AY1920S1-CS2113T-F09-3#275) Ug in Markdown (AY1920S1-CS2113T-F09-3#276) Input fix for cross-platform use cases (AY1920S1-CS2113T-F09-3#277) List person command (AY1920S1-CS2113T-F09-3#271) Update ug (AY1920S1-CS2113T-F09-3#274) # Conflicts: # src/main/java/eggventory/model/items/UniqueStock.java
This was referenced Nov 1, 2019
18 tasks
19 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, formatting of usage error messages resulting from incomplete or invalid user input in Parser was explicitly typed as a String for every InsufficientInfoException thrown in Parser.
This makes these messages unstandardized, and begs the need for some sort of abstraction of functionality. To do this, I've added a static method in CommandDictionary called getCommandUsage(), which takes in any part of a command and returns all possible usages of that command.
For example, appropriate inputs would be list, list stock, delete, delete person, etc.
Perhaps we could look into calling this within the HelpCommand for even further standardization?