Skip to content

Commit

Permalink
Merge pull request #23 from erik0704/master
Browse files Browse the repository at this point in the history
fix AddressBook parser, documentation update
  • Loading branch information
erik0704 authored Oct 24, 2017
2 parents 7d8b133 + 8a2add2 commit 54b1582
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif::[]
ifdef::env-github,env-browser[:outfilesuffix: .adoc]
:repoURL: https://github.com/se-edu/addressbook-level4/tree/master

By: `Team B4`      Since: `Jun 2016`      Licence: `MIT`
By: `Team W10-B4`      Since: `Jun 2016`      Licence: `MIT`

== Setting up

Expand Down
34 changes: 27 additions & 7 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ifdef::env-github[]
endif::[]
:repoURL: https://github.com/se-edu/addressbook-level4

By: `Team SE-EDU` Since: `Jun 2016` Licence: `MIT`
By: `Team W10-B4` Since: `Jun 2016` Licence: `MIT`

== Quick Start

Expand Down Expand Up @@ -92,7 +92,7 @@ Edits the phone number and email address of the 1st person to be `91234567` and
* `edit 91212332 n/Betsy Crower t/` +
Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.

=== Update a tag name on all contacts: `updateTag`
=== Update a tag name on all contacts: `updateTag` (coming in v2.0)

Update a specified tag name with a new tag name on all contacts in addressbook. +
Format: 'updateTag [t/oldTAG] [t/newTAG]'
Expand Down Expand Up @@ -129,7 +129,7 @@ Returns `john` and `John Doe`
* `find Betsy Tim John` +
Returns any person having names `Betsy`, `Tim`, or `John`

=== Locating persons by phone number: `phone`
=== Locating persons by phone number: `phone` (since v1.1)

Finds person whose phone numbers match with at least a phone number in the specified list // Note that we plan to add multiple phone numbers to a person
Format: 'phone NUMBER [MORE_NUMBERS]'
Expand All @@ -147,7 +147,7 @@ Returns person with phone number 123456
* 'phone 123456 654321'
Returns persons with phone numbers matching with '123456' or '654321'.

=== Locating persons by tags: `findTag`
=== Locating persons by tags: `findTag` (since v1.1)

Finds persons whose tags include all of the given keywords. +
Format: `findTag KEYWORD [MORE_KEYWORDS]`
Expand Down Expand Up @@ -188,7 +188,7 @@ Deletes the 2nd person in the address book.
`delete 1` +
Deletes the 1st person in the results of the `find` command.

=== Deletes a list of persons with specified indices: `deleteList`
=== Deletes a list of persons with specified indices: `deleteList` (since v1.2)

Deletes all persons with the specified indices from the address book. +
Format: 'deleteList INDEX [MORE_INDICES]'
Expand All @@ -209,7 +209,7 @@ Deletes the 4th and 6th person in the address book.
`delete 1 2` +
Deletes the 1st and 2nd person in the results of the `find` command.

=== Deleting all contacts edded before a specific date: `deleteBefore`
=== Deleting all contacts added before a specific date: `deleteBefore` (coming in v2.0)

Deletes all persons added before the date specified from the address book. +
Format: `deleteBefore [DATE]/[MONTH]/[YEAR]`
Expand Down Expand Up @@ -245,7 +245,27 @@ Selects the 2nd person in the address book.
`select 1` +
Selects the 1st person in the results of the `find` command.

=== Adding an event: `addEvent`
=== Locating a person's address : `locate` (since v1.3)

Locate the person's address identified by the index number used in the last person listing. +
Format: `locate INDEX`

****
* Loads the Google map page of the person's address at the specified `INDEX`.
* The index refers to the index number shown in the most recent listing.
* The index *must be a positive integer* `1, 2, 3, ...`
****

Examples:

* `list` +
`locate 2` +
Locates the 2nd person's address in the address book.
* `find Betsy` +
`locate 1` +
Locates the 1st person in the results of the `find` command.

=== Adding an event: `addEvent` (since v1.2)

Adds a person to the address book +
Format: `addEvent INDEX n/EVENT_NAME d/DD-MM-YY [e/EXTRA]`
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public class MainApp extends Application {

public static final Version VERSION = new Version(0, 6, 0, true);
public static final Version VERSION = new Version(1, 2, 2, true);

private static final Logger logger = LogsCenter.getLogger(MainApp.class);

Expand Down
12 changes: 12 additions & 0 deletions src/main/java/seedu/address/logic/parser/AddressBookParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
import java.util.regex.Pattern;

import seedu.address.logic.commands.AddCommand;
import seedu.address.logic.commands.AddEventCommand;
import seedu.address.logic.commands.ClearCommand;
import seedu.address.logic.commands.Command;
import seedu.address.logic.commands.DeleteCommand;
import seedu.address.logic.commands.DeleteListCommand;
import seedu.address.logic.commands.EditCommand;
import seedu.address.logic.commands.ExitCommand;
import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.commands.FindTagCommand;
import seedu.address.logic.commands.FindPhoneCommand;
import seedu.address.logic.commands.HelpCommand;
import seedu.address.logic.commands.HistoryCommand;
import seedu.address.logic.commands.ListCommand;
Expand Down Expand Up @@ -52,6 +55,9 @@ public Command parseCommand(String userInput) throws ParseException {
case AddCommand.COMMAND_WORD:
return new AddCommandParser().parse(arguments);

case AddEventCommand.COMMAND_WORD:
return new AddEventCommandParser().parse(arguments);

case EditCommand.COMMAND_WORD:
return new EditCommandParser().parse(arguments);

Expand All @@ -61,6 +67,9 @@ public Command parseCommand(String userInput) throws ParseException {
case DeleteCommand.COMMAND_WORD:
return new DeleteCommandParser().parse(arguments);

case DeleteListCommand.COMMAND_WORD:
return new DeleteListCommandParser().parse(arguments);

case ClearCommand.COMMAND_WORD:
return new ClearCommand();

Expand All @@ -70,6 +79,9 @@ public Command parseCommand(String userInput) throws ParseException {
case FindTagCommand.COMMAND_WORD:
return new FindTagCommandParser().parse(arguments);

case FindPhoneCommand.COMMAND_WORD:
return new FindPhoneCommandParser().parse(arguments);

case ListCommand.COMMAND_WORD:
return new ListCommand();

Expand Down

0 comments on commit 54b1582

Please sign in to comment.