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 Replenish List #122
Add Replenish List #122
Conversation
…CS2103T-F11-2/main into P-replenishlist-addons # Conflicts: # src/main/java/io/xpire/logic/commands/ViewCommand.java # src/main/java/io/xpire/logic/parser/ViewCommandParser.java # src/test/java/io/xpire/logic/commands/CommandTestUtil.java # src/test/java/io/xpire/logic/commands/DeleteCommandTest.java
@@ -100,6 +100,7 @@ | |||
return objectMapper.readValue(json, instanceClass); | |||
} | |||
|
|||
|
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.
Extra line here haha.
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.
When I didn't leave the extra line here I got an error from Travis 🤔
} | ||
|
||
@Override | ||
public CommandResult execute(String commandText) throws CommandException, ParseException { | ||
logger.info("----------------[USER COMMAND][" + commandText + "]"); | ||
|
||
CommandResult commandResult; | ||
Command command = this.xpireParser.parseCommand(commandText); | ||
if (this.model.getCurrentFilteredItemList() == this.model.getFilteredXpireItemList()) { |
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.
Are the return values primitives here? Otherwise should call .equals() method.
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.
Okays, will update! :)
|
||
@Override | ||
public CommandResult execute(Model model) { | ||
requireNonNull(model); | ||
String output = String.format(MESSAGE_SUCCESS, "the"); |
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.
When will the message be "Displayed all items in the list"? Maybe just say "tracking list" it it's the xpireItem list?
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.
Currently, the message "Displayed all items in the list" is displayed when just "view" is called without a list argument, whereas a specific list will be mentioned if it is specified.
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.
So both lists will be displayed? Okay!
import io.xpire.model.tag.TagComparator; | ||
|
||
/** | ||
* Adds a {@code ToBuyItem} to the Replenish List. |
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.
Hi sy, did you perhaps mean Item
instead of ToBuyItem
here?
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.
Yeps, I have updated it in my latest commit and will push the changes later on 😝
* Adds the given item. | ||
* {@code item} must not already exist in xpire. | ||
* Deletes the given xpireItem. | ||
* The xpireItem must exist in xpire. |
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.
Perhaps The xpireItem
here can be replaced with {@code xpireItem} to match with the rest of the code :)
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.
Alright!
* Adds a item to xpire. | ||
* The item must not already exist in xpire. | ||
* Adds a xpireItem to xpire. | ||
* The xpireItem must not already exist in xpire. |
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.
Perhaps The xpireItem
can be replaced with {@code xpireItem}
to match with the rest of the code :)
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.
Noted! :)
This resolves #36, #70, #115, #116, #117, #118.
Todo: