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

Improve find command #219

Open
wants to merge 346 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
346 commits
Select commit Hold shift + click to select a range
f68b40b
Update link to UI image
annabeleng Oct 19, 2016
8e127fb
Enhance find command to find only floating task, deadline or schedule
KhooDesmond Oct 19, 2016
804e17e
Fix bug that displays wrong find result
KhooDesmond Oct 19, 2016
89889ec
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
KhooDesmond Oct 19, 2016
37b11d6
Update Parser to send the correct parameters to EditCommand
kwonn Oct 19, 2016
462f384
Refactor all tests to match latest model
KhooDesmond Oct 19, 2016
fdebb77
Fixed error in DeadlineListPanel
KhooDesmond Oct 19, 2016
121cfa2
Support deletion of events and deadlines
KhooDesmond Oct 19, 2016
f6ba06a
Merge pull request #26 from CS2103AUG2016-T13-C3/modify_edit_function
kwonn Oct 19, 2016
7f66c81
Merge branch 'find_command'
kwonn Oct 19, 2016
873e58f
Merge branch 'delete_command'
kwonn Oct 19, 2016
96c5ef0
Fix some minor errors caused by merge.
kwonn Oct 19, 2016
4d819d5
Support listing a specific type of task
kwonn Oct 19, 2016
9248b45
Fix delete function
kwonn Oct 19, 2016
dd2e126
Merge pull request #30 from CS2103AUG2016-T13-C3/list_command
kwonn Oct 19, 2016
de1563a
Fix error in test case
kwonn Oct 19, 2016
a7d378c
Update Storage API documentation, fixes #18
KhooDesmond Oct 20, 2016
48ccc91
Make sure events start time is before end time
KhooDesmond Oct 20, 2016
f0d3821
Fix some errors, ensure editted events have start time before end time
KhooDesmond Oct 20, 2016
336401b
Merge pull request #34 from CS2103AUG2016-T13-C3/ensure_valid_events
KhooDesmond Oct 20, 2016
9fbfe33
Fixed bugs in delete command
KhooDesmond Oct 20, 2016
df4b17d
Fix shadowJar creation
kwonn Oct 20, 2016
de0d6ac
Update Model Class Diagram
annabeleng Oct 20, 2016
c1a4035
1) Update TypicalTestTasks to fill in test events and deadlines as we…
annabeleng Oct 20, 2016
ff82933
Remove duplicate getter methods for due, start and end.
annabeleng Oct 21, 2016
d87b775
Merge pull request #32 from CS2103AUG2016-T13-C3/update_junit_test
annabeleng Oct 21, 2016
6e8cb8c
1) Corrected isSameStateAs() in ReadOnlyDeadline/Event.
annabeleng Oct 21, 2016
87b8329
Remove Select Command as well as its related tests
annabeleng Oct 22, 2016
c1e6cbb
Undo Command supports undo of add and delete commands
annabeleng Oct 22, 2016
bb79d8c
Undo command can now undo after edit command has been called
annabeleng Oct 22, 2016
524060d
Fix bugs in delete command, update find and delete command usage mess…
KhooDesmond Oct 22, 2016
9bf7e20
Undo now supports clear command
annabeleng Oct 22, 2016
681b24b
Update UserGuide to reflect current features.
annabeleng Oct 22, 2016
e6481e0
Merge pull request #35 from CS2103AUG2016-T13-C3/update-userguide
annabeleng Oct 22, 2016
010757c
Undo now automatically list all panels upon undo-ing a command.
annabeleng Oct 22, 2016
3d3b6d4
Modified Edit Command to support only editting tags
annabeleng Oct 22, 2016
11389e6
Update list functionality to allow list by date
kwonn Oct 23, 2016
3d20259
Update list to search both list/deadlines with just datetime parameter
kwonn Oct 23, 2016
c0c6798
Update list documentation
kwonn Oct 23, 2016
fc05ddb
Make code look cleaner
kwonn Oct 23, 2016
6520c33
Merge branch 'list_command'
kwonn Oct 23, 2016
5284de2
Remove prepareSelect method
kwonn Oct 23, 2016
b228c14
Patch: Storage now stores tags for events and deadlines, edit command…
annabeleng Oct 23, 2016
410ed6c
Update tests for find command
KhooDesmond Oct 23, 2016
0957ae4
Update author documentation
kwonn Oct 23, 2016
1cd4e0b
Merge branch 'master' into add_undo_command
annabeleng Oct 23, 2016
2e39c3e
Update test for delete command
KhooDesmond Oct 23, 2016
01186ca
Merge branch 'master' into add_undo_command
annabeleng Oct 23, 2016
e517e14
Merge pull request #45 from CS2103AUG2016-T13-C3/add_undo_command
annabeleng Oct 23, 2016
9c1711f
Add grey bar under deadline card and event card
annabeleng Oct 23, 2016
cac413f
Merge pull request #46 from CS2103AUG2016-T13-C3/Minor_Fix_to_UI_Display
annabeleng Oct 23, 2016
29d575d
Flexible date format according to natty for add command only
KhooDesmond Oct 23, 2016
808c301
Clicking on the panels will now list the task details. Bug not fixed yet
annabeleng Oct 24, 2016
c75dc5f
Fix test cases to make them natty-friendly
KhooDesmond Oct 24, 2016
675ac61
Update parser for edit function to be natty-friendly
KhooDesmond Oct 24, 2016
8cb8203
Update UserGuide.md
KhooDesmond Oct 24, 2016
4af648a
Documentation for marking purposes
KhooDesmond Oct 24, 2016
3606854
Merge branch 'implement_natty' of https://github.com/CS2103AUG2016-T1…
KhooDesmond Oct 24, 2016
df8854c
updated part of complete command
shusiner Oct 25, 2016
812213c
Merge pull request #47 from CS2103AUG2016-T13-C3/implement_natty
KhooDesmond Oct 25, 2016
ace20fe
Changes to examples with implementation of Natty
kwonn Oct 25, 2016
e412bda
Untrack this file
kwonn Oct 25, 2016
a335afa
Add .classpath to gitignore
kwonn Oct 25, 2016
7d46307
Add edit tests for floating tasks and deadlines. To be completed: edi…
annabeleng Oct 25, 2016
9653e1a
Working save command
KhooDesmond Oct 25, 2016
672e65c
Refactor some methods
KhooDesmond Oct 25, 2016
c78d380
Update UserGuide.md
KhooDesmond Oct 25, 2016
5bde43f
Fixed some small issue
KhooDesmond Oct 25, 2016
7fcc833
Update UserGuide.md
KhooDesmond Oct 25, 2016
020fb4f
fixed complete command part 1:model.(part 2 is doing the ui)
shusiner Oct 25, 2016
dba96a3
updated complete with strikethrough view.
shusiner Oct 25, 2016
5762b27
Add edit tests for events.
annabeleng Oct 26, 2016
1c1150d
Merge pull request #48 from CS2103AUG2016-T13-C3/save_command
KhooDesmond Oct 26, 2016
4c58bdf
Add collated tests
annabeleng Oct 26, 2016
b322622
Merge branch 'master' into add_edit_tests_natty
annabeleng Oct 26, 2016
b5078f5
Merge branch 'master' into add_edit_tests_natty
annabeleng Oct 26, 2016
58af11f
Merge pull request #51 from CS2103AUG2016-T13-C3/add_edit_tests_natty
annabeleng Oct 26, 2016
c7332d2
Update Userguide.md
annabeleng Oct 26, 2016
c5adbaa
Merge pull request #52 from CS2103AUG2016-T13-C3/update-edit-redo-undo
annabeleng Oct 26, 2016
60c1b88
Implement Mark Command
kwonn Oct 26, 2016
9863eb0
small changes
shusiner Oct 26, 2016
a6a2981
Update Developer's Guide : Model picture + description
annabeleng Oct 26, 2016
7631c0b
Merge branch 'complete_command'
shusiner Oct 26, 2016
550e7e4
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
shusiner Oct 26, 2016
f548df1
small error fix
shusiner Oct 26, 2016
77850c6
Implement Unmark Command
kwonn Oct 26, 2016
db49c9c
Update documentation on mark/unmark command
kwonn Oct 26, 2016
121a450
Update acknowledgement
KhooDesmond Oct 26, 2016
11c37fb
Update Undo command to support mark/unmark command
annabeleng Oct 26, 2016
c30a48d
Clicking on the card now display the task details
annabeleng Oct 26, 2016
4ec8f5e
Merge branch 'master' into add_manual_select
annabeleng Oct 26, 2016
b84ce33
Minor fix to display name of deadline
annabeleng Oct 26, 2016
b0ba652
Merge pull request #55 from CS2103AUG2016-T13-C3/add_manual_select
annabeleng Oct 26, 2016
2c2cd4e
Update UserGuide.md
shusiner Oct 26, 2016
793b20f
Update UserGuide.md
shusiner Oct 26, 2016
b592a65
Update UserGuide.md
shusiner Oct 26, 2016
682539e
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main…
KhooDesmond Oct 26, 2016
efebdb4
Merge pull request #49 from CS2103AUG2016-T13-C3/find_and_delete_testing
KhooDesmond Oct 26, 2016
2d45800
added author
shusiner Oct 26, 2016
180f0fb
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
shusiner Oct 26, 2016
3f3584c
Fix header of edit command
annabeleng Oct 26, 2016
3ad81bc
Merge pull request #56 from CS2103AUG2016-T13-C3/fix-userguide-edit-c…
annabeleng Oct 26, 2016
a2f1c39
Update Annabel's details in AboutUs.md
annabeleng Oct 26, 2016
f2997b4
Merge pull request #57 from CS2103AUG2016-T13-C3/annabeleng-aboutus
annabeleng Oct 26, 2016
849c8f8
Update AboutUs.md
annabeleng Oct 26, 2016
14952e2
Fixes to delete command
KhooDesmond Oct 26, 2016
1bd7f8a
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
KhooDesmond Oct 26, 2016
3925bea
Update AboutUs.md
annabeleng Oct 26, 2016
29eff8c
Fixes save bug
KhooDesmond Oct 26, 2016
6a58c6a
Fix bugs in delete
KhooDesmond Oct 26, 2016
2978b38
Support marking and unmarking events
kwonn Oct 26, 2016
e076b41
Fix bugs with save command
KhooDesmond Oct 26, 2016
e751593
Update documentation
KhooDesmond Oct 26, 2016
77cb00d
Update UserGuide.md
KhooDesmond Oct 26, 2016
df4c82b
Fix undo/redo bug
kwonn Oct 26, 2016
137d039
Merge branch 'mark_command'
kwonn Oct 26, 2016
d2a56f1
Merge pull request #58 from CS2103AUG2016-T13-C3/fixing_bugs
KhooDesmond Oct 26, 2016
d1740da
make project compilable
KhooDesmond Oct 26, 2016
9225a63
Update diagrams for Logic
kwonn Oct 26, 2016
ac3505b
Add ListCommand testing
kwonn Oct 26, 2016
b8b057f
added test cases for complete command
shusiner Oct 26, 2016
723882a
updated collate folder
shusiner Oct 26, 2016
1da049f
Update AboutUs.md
shusiner Oct 26, 2016
3f27488
Minor update to user guide
KhooDesmond Oct 27, 2016
80ba9f6
Update AboutUs.md
KhooDesmond Oct 27, 2016
9a63a1c
Fix bugs in saving, particularly deleting a file and then save bug, w…
KhooDesmond Oct 27, 2016
f8a4b0e
Refactor
KhooDesmond Oct 27, 2016
2ed4020
Update AboutUs.md
kwonn Oct 27, 2016
fc60d3f
Update AboutUs.md
kwonn Oct 27, 2016
2200708
Update DeveloperGuide.md
kwonn Oct 27, 2016
66e6c46
Update collated folder
kwonn Oct 27, 2016
b636045
Fix hyperlink error
kwonn Oct 27, 2016
722f5a6
uncomplete command and test case
shusiner Oct 28, 2016
35ce760
change completed marker as strikeout and gray out.
shusiner Oct 28, 2016
784b5bf
update filter deadlines when it is completed and overdue and filter e…
shusiner Oct 28, 2016
20a2f9a
some other feature such as pressing esc key to clear command box
shusiner Oct 28, 2016
8ae0074
Refactor addTask in Malitio and Model manager to support adding of an…
annabeleng Oct 29, 2016
05827d7
Refactor InputHistory Classes and Add/Edit/Redo/Undo Command
annabeleng Oct 29, 2016
07d52f9
Update Travis CI Build Link
annabeleng Oct 29, 2016
92a855a
Refactor delete command
KhooDesmond Oct 29, 2016
ac7644d
Refactor Mark method in malitio and modelmanager
annabeleng Oct 29, 2016
7f7e846
Refactor Undo Command
annabeleng Oct 29, 2016
5be01d8
Fix delete command testing
KhooDesmond Oct 29, 2016
e53a6a3
Fix find command test
KhooDesmond Oct 29, 2016
cd07e89
Fix save bug where typing save in the commandbox throws no error
KhooDesmond Oct 30, 2016
3dedbca
Refactor testing method names
KhooDesmond Oct 30, 2016
c15bf13
Merge pull request #63 from CS2103AUG2016-T13-C3/uncomplete_command
shusiner Oct 30, 2016
6be2ef9
Merge pull request #64 from CS2103AUG2016-T13-C3/esc_key_to_clear_com…
shusiner Oct 30, 2016
241741a
Add test case for FileUtilTest
KhooDesmond Oct 30, 2016
d7a0ee8
Add testing for save command
KhooDesmond Oct 30, 2016
0c35550
Merge pull request #66 from CS2103AUG2016-T13-C3/improving_testing
KhooDesmond Oct 30, 2016
7575132
Merge pull request #65 from CS2103AUG2016-T13-C3/Update_Travis_CI_Bui…
annabeleng Oct 30, 2016
d520436
Correct test in LogicManagerTest
annabeleng Oct 30, 2016
f2a66b8
fixed error for complete test cases
shusiner Oct 30, 2016
caecd54
Fix bugs in edit and undo Command
annabeleng Oct 30, 2016
85b067b
Merge master to Refactoring
annabeleng Oct 30, 2016
e8a43db
Update README.md
annabeleng Oct 30, 2016
2f05b71
Merge pull request #67 from CS2103AUG2016-T13-C3/Refactoring
annabeleng Oct 30, 2016
1e4a675
Fix bugs in Redo and Undo Command.
annabeleng Oct 30, 2016
cba73d1
added showall command to showall items from begnning of time, added c…
shusiner Oct 30, 2016
21d79ee
Merge pull request #68 from CS2103AUG2016-T13-C3/showall_command_and_…
shusiner Oct 31, 2016
7fa47e0
Refactor redo and undo command.
annabeleng Oct 31, 2016
9c37f3c
Refactor InputHistory classes
annabeleng Oct 31, 2016
6a7b95c
Add tags as part of search field in find function. Additionally, find…
KhooDesmond Oct 31, 2016
6d7f0e6
Update find test cases
KhooDesmond Oct 31, 2016
9205619
Modify LogicManagerTest to include deadline and event
annabeleng Oct 31, 2016
10e95ee
Remove UndoCommandTest
annabeleng Oct 31, 2016
80bab49
Merge branch 'Refactor_ModelManager_and_Malitio' of https://github.co…
annabeleng Oct 31, 2016
e851540
Modify LogicManagerTest to include deadline and event
annabeleng Oct 31, 2016
c1933a7
Merge pull request #69 from CS2103AUG2016-T13-C3/enhance_find_command
KhooDesmond Nov 1, 2016
ad10fcf
Update user guide for find command
KhooDesmond Nov 1, 2016
8cc50fc
Merge branch 'enhance_find_command'
KhooDesmond Nov 1, 2016
04c6e80
Add undo and redo tests in LogicManagerTest
annabeleng Nov 1, 2016
a40d374
Refactor Mark/Unmark to reduce code size.
kwonn Nov 1, 2016
876370d
Merge branch 'Refactor_ModelManager_and_Malitio' of https://github.co…
kwonn Nov 1, 2016
83407dd
Refactor LogicManagerTest and EditCommand
annabeleng Nov 1, 2016
5460e7c
Merge branch 'master' into Refactor_ModelManager_and_Malitio
annabeleng Nov 1, 2016
a925e9c
Update find command test in LogicManagerTest
annabeleng Nov 1, 2016
127c1f1
Merge pull request #74 from CS2103AUG2016-T13-C3/Refactor_ModelManage…
annabeleng Nov 1, 2016
ab54b9e
refactor complete and uncomplete command
shusiner Nov 1, 2016
8224d3b
updated test cases for complete and uncomplete command in LogicManage…
shusiner Nov 1, 2016
390280e
edited the format of codes
shusiner Nov 1, 2016
515be17
changed showall to listall command
shusiner Nov 1, 2016
46fda9f
Update UserGuide.md
shusiner Nov 1, 2016
db92b81
Update DeveloperGuide.md
shusiner Nov 1, 2016
862f3a5
Resize task cards
KhooDesmond Nov 2, 2016
2df281e
Change output format of DateTime
KhooDesmond Nov 2, 2016
298645a
Update find test to match the new output format
KhooDesmond Nov 2, 2016
f5ac1c7
Add title to each panel list
KhooDesmond Nov 2, 2016
a26ec98
Fix font style for title of panels and the status footholder bar
KhooDesmond Nov 2, 2016
2a23177
minor edit on parser: add a white space after by, start and end
annabeleng Nov 2, 2016
ba2e00d
Fix #62
KhooDesmond Nov 2, 2016
9d8d88f
Refactor test cases
KhooDesmond Nov 2, 2016
04cb5a2
Fix panel title font style
KhooDesmond Nov 2, 2016
1c92404
Change datetime display format to show day of week
KhooDesmond Nov 2, 2016
809d661
correct checker method containsWithTag in unique<task>list to ensure …
annabeleng Nov 2, 2016
47a78b2
updated event to disappear after endTime and other minor changes
shusiner Nov 2, 2016
03815db
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
shusiner Nov 2, 2016
aeccec7
modify parser to capture start and end times correctly
annabeleng Nov 2, 2016
ea6b36d
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
annabeleng Nov 2, 2016
82f972b
Implement clear expired function, to clear all completed floating tas…
KhooDesmond Nov 2, 2016
250ee82
Update tests for clear expired command
KhooDesmond Nov 2, 2016
38bf727
Update user guide for clear expired command
KhooDesmond Nov 2, 2016
b494fea
Merge pull request #78 from CS2103AUG2016-T13-C3/refactor_test_cases
KhooDesmond Nov 2, 2016
f64b5c8
revert back parser because of regression bug
annabeleng Nov 2, 2016
5fa2858
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
annabeleng Nov 2, 2016
88d31fa
Merge pull request #79 from CS2103AUG2016-T13-C3/clear_expired_feature
KhooDesmond Nov 2, 2016
c27e41c
Merge branch 'improve_ui'
KhooDesmond Nov 3, 2016
8cead9e
Fix incorrect merge
KhooDesmond Nov 3, 2016
df98b91
Revert error with UI
kwonn Nov 3, 2016
4737f79
Resize task cards
KhooDesmond Nov 2, 2016
5c97fe2
Add title to each panel list
KhooDesmond Nov 2, 2016
7d2d002
Fix font style for title of panels and the status footholder bar
KhooDesmond Nov 2, 2016
82220b4
Fix panel title font style
KhooDesmond Nov 2, 2016
3189111
Fix ellipsis of index problem
KhooDesmond Nov 3, 2016
4e7eb1c
Merge pull request #82 from CS2103AUG2016-T13-C3/improve_ui_and_errors
KhooDesmond Nov 3, 2016
ae3c82b
edit parser to parse input correctly by ignoring suffix of keywords.
annabeleng Nov 3, 2016
37e1a10
Merge pull request #83 from CS2103AUG2016-T13-C3/edit_parser_to_check…
annabeleng Nov 3, 2016
a039cf8
updated grayout events that are overdue
shusiner Nov 3, 2016
4e99996
UI will scroll to the task which is changed/added
annabeleng Nov 5, 2016
26f23f2
change to (un)completing (un)completed task message.
shusiner Nov 5, 2016
5dd5051
Merge pull request #84 from CS2103AUG2016-T13-C3/UI_scroll_to_new_or_…
annabeleng Nov 5, 2016
ce86120
Refactor EditCommand
annabeleng Nov 5, 2016
3a76457
display day of week, fix find command to accommodate this change
KhooDesmond Nov 5, 2016
3f007bc
Update README.md
shusiner Nov 5, 2016
325b796
Add header comments for methods in some classes.
annabeleng Nov 5, 2016
b99c805
Merge pull request #85 from CS2103AUG2016-T13-C3/refactor_edit_comman…
annabeleng Nov 5, 2016
1309833
Update UserGuide.md
annabeleng Nov 5, 2016
0748160
Update UserGuide.md
annabeleng Nov 5, 2016
604deb7
Merge pull request #87 from CS2103AUG2016-T13-C3/annabeleng-patch-1
annabeleng Nov 5, 2016
983d805
Update UserGuide.md
annabeleng Nov 5, 2016
3295b65
Merge pull request #88 from CS2103AUG2016-T13-C3/annabeleng-patch-2
annabeleng Nov 5, 2016
4f7b479
Update UserGuide.md
annabeleng Nov 5, 2016
aff29ad
Merge pull request #89 from CS2103AUG2016-T13-C3/annabeleng-patch-3
annabeleng Nov 5, 2016
3396132
Update DeveloperGuide.md
annabeleng Nov 5, 2016
1c171ba
Remove browser icon from architecture
annabeleng Nov 5, 2016
37fb6ab
Merge pull request #90 from CS2103AUG2016-T13-C3/annabeleng-patch-4
annabeleng Nov 5, 2016
5e9efc5
Fix bug with parsing, in particular parsing name from events and dead…
KhooDesmond Nov 5, 2016
6252717
Merge branch 'display_date_format'
KhooDesmond Nov 5, 2016
000e684
Fix add deadline bug
KhooDesmond Nov 5, 2016
d1df69f
refactor save command
KhooDesmond Nov 5, 2016
6cc579b
Merge pull request #92 from CS2103AUG2016-T13-C3/refactor_save_command
kwonn Nov 5, 2016
5cc1b4b
fixed bug in index error
shusiner Nov 5, 2016
dc98c2f
Edit message for already marked and unmarked tasks
kwonn Nov 5, 2016
edbaedb
edit parser to display correct error message for missing start and en…
annabeleng Nov 5, 2016
06e911c
Merge branch 'master' of https://github.com/CS2103AUG2016-T13-C3/main
kwonn Nov 5, 2016
4b962cb
edit EditCommand to check for invalid use of keywords
annabeleng Nov 5, 2016
55207c5
more inclusive save directory format
KhooDesmond Nov 5, 2016
b1c555f
find now only searches tasks in the last shown list
KhooDesmond Nov 5, 2016
e39c743
Fix listcommand failing bug
KhooDesmond Nov 6, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,13 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="lib" path="lib/antlr-runtime-3.5.2.jar"/>
<classpathentry kind="lib" path="lib/backport-util-concurrent-3.1.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.5.jar"/>
<classpathentry kind="lib" path="lib/commons-lang-2.6.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="lib/ical4j-1.0.2.jar"/>
<classpathentry kind="lib" path="lib/natty-0.12.jar"/>
<classpathentry kind="lib" path="lib/slf4j-api-1.7.10.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ lib/*
*.log
*.log.*
*.csv
.classpath
config.json
src/test/data/sandbox/
preferences.json
Expand Down
4 changes: 2 additions & 2 deletions .project
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>addressbook-level4</name>
<comment>Project addressbook-level4 created by Buildship.</comment>
<name>[Team] main</name>
<comment>Project [Team] main created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
Expand Down
2 changes: 2 additions & 0 deletions .settings/org.eclipse.ltk.core.refactoring.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
104 changes: 104 additions & 0 deletions A0122460W.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# A0122460W
###### \java\seedu\malitio\logic\commands\CompleteCommand.java
``` java
public class CompleteCommand extends Command{

public static final String COMMAND_WORD = "complete";

public static final String MESSAGE_USAGE = COMMAND_WORD
+ ": complete the task or deadline identified by the index number used in the last task listing.\n"
+ "Parameters: INDEX (must be either 'f'/'d' and a positive integer) "
+ "Example: " + COMMAND_WORD + " f1";

public static final String MESSAGE_COMPLETED_TASK = "The floating task is completed in Malitio";

public static final String MESSAGE_COMPLETED_DEADLINE = "The deadline is completed in Malitio";

public static final String MESSAGE_COMPLETED_TASK_SUCCESS = "Successfully completed floating task.";

public static final String MESSAGE_COMPLETED_DEADLINE_SUCCESS = "Successfully completed deadline.";

private final char taskType;

private final int targetIndex;

public CompleteCommand(char taskType, int targetIndex) throws IllegalValueException {
assert taskType == 'd' || taskType == 'f';
this.taskType = taskType;
this.targetIndex = targetIndex;
}

@Override
public CommandResult execute() {
CommandResult result;
if (taskType=='f') {
result = executeCompleteFloatingTask();
model.getFuture().clear();
return result;
}
else {
result = executeCompleteDeadline();
model.getFuture().clear();
return result;
}
}

private CommandResult executeCompleteFloatingTask() {
UnmodifiableObservableList<ReadOnlyFloatingTask> lastShownList = model.getFilteredFloatingTaskList();
if (lastShownList.size() < targetIndex) {
indicateAttemptToExecuteIncorrectCommand();
return new CommandResult(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);
}

ReadOnlyFloatingTask taskToComplete = lastShownList.get(targetIndex - 1);

try {
assert model != null;
model.completeFloatingTask(taskToComplete);
} catch (FloatingTaskNotFoundException pnfe) {
assert false : "The target task cannot be missing";
} catch (UniqueFloatingTaskList.FloatingTaskCompletedException e) {
return new CommandResult(MESSAGE_COMPLETED_TASK);
}
return new CommandResult(String.format(MESSAGE_COMPLETED_TASK_SUCCESS, taskToComplete));
}

private CommandResult executeCompleteDeadline() {
UnmodifiableObservableList<ReadOnlyDeadline> lastShownList = model.getFilteredDeadlineList();
if (lastShownList.size() < targetIndex) {
indicateAttemptToExecuteIncorrectCommand();
return new CommandResult(Messages.MESSAGE_INVALID_DEADLINE_DISPLAYED_INDEX);
}

ReadOnlyDeadline deadlineToComplete = lastShownList.get(targetIndex - 1);

try {
assert model != null;
model.completeDeadline(deadlineToComplete);
} catch (DeadlineNotFoundException pnfe) {
assert false : "The target deadline cannot be missing";
} catch (UniqueDeadlineList.DeadlineCompletedException e) {
return new CommandResult(MESSAGE_COMPLETED_DEADLINE);
}
return new CommandResult(String.format(MESSAGE_COMPLETED_DEADLINE_SUCCESS, deadlineToComplete));
}

}
```
###### \java\seedu\malitio\model\ModelManager.java
``` java
@Override
public void completeFloatingTask(ReadOnlyFloatingTask taskToComplete) throws FloatingTaskCompletedException, FloatingTaskNotFoundException {
malitio.completeTask(taskToComplete);
updateFilteredTaskListToShowAll();
indicateMalitioChanged();
}

@Override
public void completeDeadline(ReadOnlyDeadline deadlineToEdit) throws DeadlineCompletedException, DeadlineNotFoundException {
malitio.completeDeadline(deadlineToEdit);
updateFilteredDeadlineListToShowAll();
indicateMalitioChanged();
}

```
Loading