Skip to content
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 'tab' command #90

Merged
merged 11 commits into from
Oct 11, 2020
Merged

Conversation

ianyong
Copy link
Member

@ianyong ianyong commented Oct 11, 2020

Changes:

  • Add ability to programmatically switch tabs.
  • Add tab command.
    • Usage: tab <1-based index of tab>
  • Add respective test classes.
  • Fix wrong stubs being used in FinanceTrackerParserTest.

Resolves #89.

@ianyong ianyong added type.enhancement 👍 New feature or request priority.medium 🥈 Todo for current iteration labels Oct 11, 2020
@ianyong ianyong added this to the v1.2 milestone Oct 11, 2020
@ianyong ianyong requested a review from a team October 11, 2020 12:36
@codecov-io
Copy link

codecov-io commented Oct 11, 2020

Codecov Report

Merging #90 into master will decrease coverage by 0.14%.
The diff coverage is 60.97%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #90      +/-   ##
============================================
- Coverage     69.18%   69.04%   -0.15%     
- Complexity      458      470      +12     
============================================
  Files            83       85       +2     
  Lines          1548     1586      +38     
  Branches        143      145       +2     
============================================
+ Hits           1071     1095      +24     
- Misses          438      449      +11     
- Partials         39       42       +3     
Impacted Files Coverage Δ Complexity Δ
...a/ay2021s1_cs2103_w16_3/finesse/ui/MainWindow.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...s2103_w16_3/finesse/logic/commands/TabCommand.java 63.63% <63.63%> (ø) 3.00 <3.00> (?)
...03_w16_3/finesse/logic/commands/CommandResult.java 100.00% <100.00%> (+11.76%) 16.00 <5.00> (+6.00)
...6_3/finesse/logic/parser/FinanceTrackerParser.java 100.00% <100.00%> (ø) 17.00 <0.00> (+1.00)
...3_w16_3/finesse/logic/parser/TabCommandParser.java 100.00% <100.00%> (ø) 2.00 <2.00> (?)
...java/ay2021s1_cs2103_w16_3/finesse/ui/UiState.java 82.35% <100.00%> (+1.10%) 4.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ff9fc5...9f332e5. Read the comment docs.

@ianyong ianyong marked this pull request as draft October 11, 2020 12:39
@ianyong ianyong marked this pull request as ready for review October 11, 2020 13:03
Index index = ParserUtil.parseIndex(args);
if (index.getOneBased() > TabCommand.NUM_OF_TABS) {
throw new ParseException(
String.format(MESSAGE_INVALID_COMMAND_FORMAT, TabCommand.MESSAGE_TAB_DOES_NOT_EXIST));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, inputting tab 5 will return the same error message as other invalid formats instead of MESSAGE_TAB_DOES_NOT_EXIST.

This is in line with the EditCommand and DeleteCommand
@ianyong ianyong requested review from zhaojj2209 and a team October 11, 2020 14:08
Copy link

@yongping827 yongping827 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@zhaojj2209 zhaojj2209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ianyong ianyong merged commit 862b9de into AY2021S1-CS2103T-W16-3:master Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.medium 🥈 Todo for current iteration type.enhancement 👍 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add 'tab' command
4 participants