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

Fix documentation and personal TA code issues #86

Merged
merged 3 commits into from
Nov 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ We are a team of students studying CS2103 based in the [School of Computing, Nat
* Features implemented:
* [Support for non floating task and integration of Date Time Model](https://github.com/CS2103AUG2016-T14-C4/main/pull/45)
* [Ability to Change Storage](https://github.com/CS2103AUG2016-T14-C4/main/pull/64)
* [More natural commands]()
* [Google Calendar Integration(IP)]()
* Code written: [[functional code]()][[test code]()][[docs]()]
* [More natural commands](https://github.com/CS2103AUG2016-T14-C4/main/pull/69)
* [Alias Commands](https://github.com/CS2103AUG2016-T14-C4/main/pull/82)
* Code written: [[functional code](https://github.com/CS2103AUG2016-T14-C4/main/blob/master/collated/main/A0144939R.md)][[test code](https://github.com/CS2103AUG2016-T14-C4/main/blob/master/collated/test/A0144939R.md)][[docs](https://github.com/CS2103AUG2016-T14-C4/main/blob/master/collated/docs/A0144939R.md)]
* Other major contributions:
* Did the initial refactoring from AddressBook to ToDoList [[#39](https://github.com/CS2103AUG2016-T14-C4/main/pull/39) ]
* Set up Codacy
Expand Down
27 changes: 26 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,17 @@ Priority | As a ... | I want to ... | So that I can...
`* * *` | user | add a task without start time and deadline| keep track of general, non-time based tasks
`* * *` | user | add an event with start time and close time|
`* * *` | user | add an event/task with tag|
`* * *` | user | add recurring tasks
`* * *` | user | delete a task| remove tasks that I do not have to take any further action on
`* * *` |user | undo my previous action | recover from commands entered by mistake
`* * *` | user | find a task from to-do list| find details of tasks without having to go through the entire list
`* * *` | user | update a task | change the specifications of a specific task
`* * *` | user | see the entire to-do list | know the number of task/ event that I have
`* * *` | user | specify the file location of the task list | store the list in a more convenient location (such as Dropbox)
`* *` | user | mark a task as completed | distinguish between completed and pending tasks
`* *` | user | sync events and tasks with due dates with Google Calendar| collate my tasks
`* *` |user | be able to mark certain tasks as important | easily distinguish tasks that require attention/action to be taken
`* *` | user | alias commands to symbols
`* *` | user | do a live search for commands

## Appendix B : Use Cases

Expand All @@ -283,7 +285,30 @@ Use case ends.
1b. The task name already exists on the list.
> MESS shows a message to inform user that task already exists
Use case ends.

<!-- @@author A0144939R -->
#### Use case: Alias command

**MSS**

1. User requests to alias a command
2. MESS aliases the command to the given symbol<br>
Use case ends.

**Extensions**

1a. The symbol is already aliased to another command
> MESS changes the mapping to the new command.
Use case ends.

1b. The symbol is a standard command name(Eg: add, edit)
> MESS shows an error message.
Use case ends.

1c. The command already has an alias
> MESS maps the given symbol to the command, as a command can have multiple aliases
Use case ends.
<!- @@author -->

#### Use case: Delete task by task name

Expand Down
39 changes: 28 additions & 11 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
e.g. typing **`help`** and pressing <kbd>Enter</kbd> will open the help window.
5. Some example commands you can try:
* **`list`** : lists all tasks
* **`add`**`meeting`: adds a task named CS2103 Tutorial
* **`find`**`meeting `: searches the task named tutorial
* **`add`**`CS2103 Tutorial`: adds a task named CS2103 Tutorial
* **`alias`**`add a`: aliases the add command to the 'a' key
* **`find`**`tutorial `: searches the task named tutorial
* **`delete`**`1`: delete the first task in the list
* **`complete`** `1`: mark the first task as completed
* **`uncomplete`** `1`: mark the completed first task on the list as not completed
* **`update`**`1 presentation c/10/10/2016:1200` : updates first task on the list to presentation having a deadline on 10/10/2016 on 12:00 while the number '1' is the index of task on the list
* **`update`**`1 name presentation ends tomorrow` : updates first task on the list to presentation having a deadline tomorrow while the number '1' is the index of task on the list
* **`undo`** : undo previous one action
* **`pin`**`1` : pin the first task in the list
* **'change-to'**`1`: change the storage location
* **'change-to'**`data/taskmanager.xml`: change the storage location
* **`unpin`**`1` : unpin the pinned first task in the list
* **`exit`** :exit the program
6. Refer to the [Features](#features) section below for details of each command.<br>
Expand All @@ -41,6 +42,7 @@
* The order of parameters is fixed.
* Words in `UPPER_CASE` are the parameters.
* Words in `SQUARE_BRACKET` are optional.
<!--@@author A0144939R -->

#### Adding a task or event: `add`
Adds a task to the to-do list<br>
Expand All @@ -54,7 +56,6 @@ Format: `add TASK_NAME [starts START_DATETIME ends CLOSE_DATETIME tag TAG recurs
* `TAG` is for users to write tags for different tasks. Mulitple tags are available by typing `tag TAG tag TAG`.
* `NUMBER_OF_RECURRING TASK` is for users to create weekly recurring task. For example, when NUMBER_OF_WEEKLY_RECURRING_TASK is 1 which means one more tasks will be created with the openTime and endTime one weekly later.

<!--@@author A0144939R -->
Examples:
* `add proposal ends tomorrow` <br> Adds a proposal task with a deadline 24 hours from now
* `add meeting starts tomorrow 1pm ends tomorrow 3pm`<br> Adds a meeting event which start tomorrow at 1pm and ends tomorrow at 3pm
Expand All @@ -64,6 +65,20 @@ Examples:
* `add test starts today recurs 1` <br> Adds a task start today and recur for one more week.


#### Aliasing a command: `alias`
Aliases a command to a symbol <br>
Format: `alias COMMAND_NAME SYMBOL`

> Once aliased, the original command will still continue to work. Hence, symbols cannot be command names.
> One symbol can map to at most one command

* `COMMAND_NAME` Must be a valid command
* `SYMBOL` refers to the symbol you wish to alias to. SYMBOL cannot be a command name.

Examples:
* `alias add +` <br> Aliases the add command to the symbol +
* `alias alias q`<br> Aliases the alias command to the symbol q

<!--@@author -->

#### Deleting a task : `delete`
Expand Down Expand Up @@ -164,15 +179,15 @@ Format: `update INDEX [name TASKNAME starts STARTDATETIME ends ENDDATETIME tag T

Examples:
* `update 2 name shopping ends 9pm`<br>
update the taks name of the second task on the list to shopping and the start time to 3/10/2016 9 p.m.
update the task name of the second task on the list to shopping and the start time to 3/10/2016 9 p.m.

* `update 1 tag cs2103`<br>
add the tag of the first task on to-do list to cs2103

* `update 3 ends three hours later` <br>
update the taks name of the third task on the list to a deadline three hours after you type this command
update the task name of the third task on the list to a deadline three hours after you type this command

* `update 2 starts family rt/friends` <br>
* `update 2 tag family remove-tag friends` <br>
add a tag family to the second task and remove the tag named friends

<!-- @@author -->
Expand Down Expand Up @@ -208,7 +223,7 @@ Example: 'change-to data/taskmanager.xml'
## FAQ
**Q**: Can I add event which have a start date and time to my to-do list ?<br>

**A**: Yes, you can create an event by typing command with a start and end date. For example, you have a trip from 10/10/2016 8:00 to 13/10/2016 21:00. You can type command like this: `add trip s/8am 10th October c/9pm 13th October`.
**A**: Yes, you can create an event by typing command with a start and end date. For example, you have a trip from 10/10/2016 8:00 to 13/10/2016 21:00. You can type command like this: `add trip starts 8am 10th October ends 9pm 13th October`.

**Q**: If I don't know the deadline of my task yet, can I still add my task?<br>

Expand All @@ -221,16 +236,18 @@ In this example, you can see shopping is a floating task without a start time an

Command | Format
-------- | :--------
Add | `add TASK_NAME [s/START_DATE:START_TIME c/CLOSE_DATE:CLOSE_TIME t/TAG]`
Add | `add TASK_NAME [starts START_DATE_TIME ends CLOSE_DATE_TIME tag TAG]`
Alias | `alias add a`
Delete | `delete TASK_NAME` or `delete INDEX`
Complete | `complete INDEX`
Uncomplete | `uncomplete INDEX`
List | `list`
Find | `find KEYWORD` or `find t/TAG`
Update | `update INDEX [TASKNAME s/START_DATE:START_TIME c/CLOSE_DATE:CLOSE_TIME t/TAG rt/TO_REMOVE_TAG]`
Update | `update INDEX [name NAME starts START_DATE_TIME ends CLOSE_DATE_TIME tag TAG remove-tag TAG]`
Undo | `undo`
Pin | `pin`
Unpin | `unpin`
Live Search | `searchbox`
Change Storage | `change-to`
Help | `help`
Exit | `exit`
16 changes: 6 additions & 10 deletions src/main/java/seedu/task/model/task/ReadOnlyTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public interface ReadOnlyTask {
default boolean isSameVisualStateAs(ReadOnlyTask other) {
return other == this // short circuit if same object
|| (other != null // this is first to avoid NPE below
&& other.getName().equals(this.getName()) // state checks here onwards

// state checks here onwards
&& other.getName().equals(this.getName())
&& other.getOpenTime().toPrettyString().equals(this.getOpenTime().toPrettyString())
&& other.getCloseTime().toPrettyString().equals(this.getCloseTime().toPrettyString())
&& other.getImportance() == this.getImportance());
Expand All @@ -39,7 +41,9 @@ default boolean isSameVisualStateAs(ReadOnlyTask other) {
default boolean isSameStateAs(ReadOnlyTask other) {
return other == this // short circuit if same object
|| (other != null // this is first to avoid NPE below
&& other.getName().equals(this.getName()) // state checks here onwards

// state checks here onwards
&& other.getName().equals(this.getName())
&& other.getOpenTime().equals(this.getOpenTime())
&& other.getCloseTime().equals(this.getCloseTime())
&& other.getImportance() == this.getImportance());
Expand All @@ -51,14 +55,6 @@ default boolean isSameStateAs(ReadOnlyTask other) {
default String getAsText() {
final StringBuilder builder = new StringBuilder();
builder.append(getName())
/**
.append(" Open Time: ")
.append(getOpenTime())
.append(" Close Time: ")
.append(getCloseTime())
.append("Important: ")
.append(getImportance())
**/
.append(" Tags: ");
getTags().forEach(builder::append);
return builder.toString();
Expand Down