diff --git a/.github/workflows/telegram-alerts.yml b/.github/workflows/telegram-alerts.yml new file mode 100644 index 00000000000..ba70310d6f6 --- /dev/null +++ b/.github/workflows/telegram-alerts.yml @@ -0,0 +1,17 @@ +name: Telegram Pull Request Notifier + +on: + pull_request: + types: [opened, review_requested] + +jobs: + notification: + runs-on: ubuntu-latest + + steps: + # Send a telegram message on pr open or review request + - name: Pull Request Telegram + uses: F2had/pr-telegram-action@v1.0.0 + with: + bot_token: '${{ secrets.BOTTOKEN }}' + chat_id: '${{ secrets.CHATID }}' diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index a64c326f1d0..76f917b0e5e 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -83,7 +83,7 @@ in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main The UI consists of a `MainWindow` that is made up of parts -e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, +e.g.`CommandBox`, `ResultDisplay`, `ContactListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI. @@ -98,7 +98,7 @@ The `UI` component, * executes user commands using the `Logic` component. * listens for changes to `Model` data so that the UI can be updated with the modified data. * keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands. -* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`. +* depends on some classes in the `Model` component, as it displays `Contact` object residing in the `Model`. ### Logic component @@ -122,7 +122,7 @@ PlantUML, the lifeline continues till the end of diagram. How the `Logic` component works: -1. When `Logic` is called upon to execute a command, it is passed to an `AddressBookParser` object which in turn creates +1. When `Logic` is called upon to execute a command, it is passed to an `CodeConnectParser` object which in turn creates a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command. 1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `DeleteCommand`) which is executed by the `LogicManager`. @@ -137,9 +137,9 @@ Here are the other classes in `Logic` (omitted from the class diagram above) tha How the parsing works: -* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a +* When called upon to parse a user command, the `CodeConnectParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse - the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as + the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `CodeConnectParser` returns back as a `Command` object. * All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing. @@ -154,9 +154,9 @@ in [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/m The `Model` component, -* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object). -* stores the currently 'selected' `Person` objects (e.g., results of a search query) as a separate _filtered_ list which - is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to +* stores the address book data i.e., all `Contact` objects (which are contained in a `UniqueContactList` object). +* stores the currently 'selected' `Contact` objects (e.g., results of a search query) as a separate _filtered_ list which + is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. * stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects. @@ -165,9 +165,11 @@ The `Model` component, -**Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, -which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of -each `Person` needing their own `Tag` objects.
+**Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `CodeConnect`, +which `Contact` references. This allows `CodeConnect + +` to only require one `Tag` object per unique tag, instead of +each `Contact` needing their own `Tag` objects.
@@ -184,14 +186,14 @@ The `Storage` component, * can save both address book data and user preference data in JSON format, and read them back into corresponding objects. -* inherits from both `AddressBookStorage` and `UserPrefStorage`, which means it can be treated as either one (if only +* inherits from both `CodeConnectStorage` and `UserPrefStorage`, which means it can be treated as either one (if only the functionality of only one is needed). * depends on some classes in the `Model` component (because the `Storage` component's job is to save/retrieve objects that belong to the `Model`) ### Common classes -Classes used by multiple components are in the `seedu.addressbook.commons` package. +Classes used by multiple components are in the `seedu.address.commons` package. -------------------------------------------------------------------------------------------------------------------- @@ -221,46 +223,46 @@ the command is executed: #### Proposed Implementation -The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo -history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the +The proposed undo/redo mechanism is facilitated by `VersionedCodeConnect`. It extends `CodeConnect` with an undo/redo +history, stored internally as `codeConnectStateList` and `currentStatePointer`. Additionally, it implements the following operations: -* `VersionedAddressBook#commit()` — Saves the current address book state in its history. -* `VersionedAddressBook#undo()` — Restores the previous address book state from its history. -* `VersionedAddressBook#redo()` — Restores a previously undone address book state from its history. +* `VersionedCodeConnect#commit()` — Saves the current address book state in its history. +* `VersionedCodeConnect#undo()` — Restores the previous address book state from its history. +* `VersionedCodeConnect#redo()` — Restores a previously undone address book state from its history. -These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` -and `Model#redoAddressBook()` respectively. +These operations are exposed in the `Model` interface as `Model#commitCodeConnect()`, `Model#undoCodeConnect()` +and `Model#redoCodeConnect()` respectively. Given below is an example usage scenario and how the undo/redo mechanism behaves at each step. -Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the +Step 1. The user launches the application for the first time. The `VersionedCodeConnect` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state. Step 2. The user executes `delete 5` command to delete the 5th contact in the address book. The `delete` command -calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes -to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book +calls `Model#commitCodeConnect()`, causing the modified state of the address book after the `delete 5` command executes +to be saved in the `codeConnectStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state. Step 3. The user executes `add n/David …​` to add a new contact. The `add` command also -calls `Model#commitAddressBook()`, causing another modified address book state to be saved into -the `addressBookStateList`. +calls `Model#commitCodeConnect()`, causing another modified address book state to be saved into +the `codeConnectStateList`. -**Note:** If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will -not be saved into the `addressBookStateList`. +**Note:** If a command fails its execution, it will not call `Model#commitCodeConnect()`, so the address book state will +not be saved into the `codeConnectStateList`. Step 4. The user now decides that adding the contact was a mistake, and decides to undo that action by executing -the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` +the `undo` command. The `undo` command will call `Model#undoCodeConnect()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state. @@ -268,8 +270,8 @@ once to the left, pointing it to the previous address book state, and restores t -**Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no -previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the +**Note:** If the `currentStatePointer` is at index 0, pointing to the initial CodeConnect state, then there are no +previous CodeConnect states to restore. The `undo` command uses `Model#canUndoCodeConnect()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the undo. @@ -290,24 +292,24 @@ Similarly, how an undo operation goes through the `Model` component is shown bel -The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state. +The `redo` command does the opposite — it calls `Model#redoCodeConnect()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state. -**Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address -book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` +**Note:** If the `currentStatePointer` is at index `codeConnectStateList.size() - 1`, pointing to the latest address +book state, then there are no undone CodeConnect states to restore. The `redo` command uses `Model#canRedoCodeConnect()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo. Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such -as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. -Thus, the `addressBookStateList` remains unchanged. +as `list`, will usually not call `Model#commitCodeConnect()`, `Model#undoCodeConnect()` or `Model#redoCodeConnect()`. +Thus, the `codeConnectStateList` remains unchanged. -Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not -pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be +Step 6. The user executes `clear`, which calls `Model#commitCodeConnect()`. Since the `currentStatePointer` is not +pointing at the end of the `codeConnectStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …​` command. This is the behavior that most modern desktop applications follow. @@ -400,7 +402,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli ### Use cases -(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise) +(For all use cases below, the **System** is the `CodeConnect` and the **Actor** is the `user`, unless specified otherwise) **Use case: UC01 - Delete a contact** @@ -508,7 +510,27 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli * 1b1. CodeConnect shows an empty list. Use case ends. -**Use case: UC07 - Sending an email to a specific contact** +**Use case: UC07 - Search a contact by tech stack** + +**MSS** + +1. User requests to look up contacts with specific tech stack. +2. CodeConnect checks each contact’s tech stack in the list. +3. CodeConnect shows a list of contacts that match the criteria. + + Use case ends. + +**Extensions** + +* 1a. No tech stack is given. + * 1a1. CodeConnect shows an error message. + Use case ends. + +* 1b. There are no contacts in the list that match the criteria. + * 1b1. CodeConnect shows an empty list. + Use case ends. + +**Use case: UC08 - Sending an email to a specific contact** **MSS** @@ -523,6 +545,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli * 1a. The default desktop mail application is not available on the system. * 1a1. CodeConnect displays an error message indicating that the desktop mail application is not supported. + Use case ends. *{More to be added}* diff --git a/docs/SettingUp.md b/docs/SettingUp.md index 03df0295bd2..47c1b22ce81 100644 --- a/docs/SettingUp.md +++ b/docs/SettingUp.md @@ -51,7 +51,7 @@ If you plan to use Intellij IDEA (highly recommended): 1. **Learn the design** - When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [AddressBook’s architecture](DeveloperGuide.md#architecture). + When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [CodeConnect’s architecture](DeveloperGuide.md#architecture). 1. **Do the tutorials** These tutorials will help you get acquainted with the codebase. diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 16390f15acd..cb5bcbfcdb2 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -17,11 +17,11 @@ CodeConnect (CC) is a **desktop app for managing student contacts, optimized for 1. Ensure you have Java `11` or above installed in your Computer. -1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases). +1. Download the latest `codeconnect.jar` from [here](https://github.com/se-edu/addressbook-level3/releases). -1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook. +1. Copy the file to the folder you want to use as the _home folder_ for your CodeConnect. -1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar addressbook.jar` command to run the application.
+1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar codeconnect.jar` command to run the application.
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
![Ui](images/Ui.png) @@ -150,6 +150,20 @@ Examples: - image to be replaced ![result for 'find alex david'](images/findAlexDavidResult.png) +#### Locating contacts by tech stack: `find-ts` + +Finds contacts whose tech stack contain all the given keywords. + +Format: `find-ts KEYWORD [MORE_KEYWORDS]` + +- The search is case-insensitive. e.g `java` will match `Java` +- Only the tech stack are searched. +- Only full words will be matched e.g. `java` will not match `javascript` +- contacts matching all keywords will be returned (i.e. `AND` search). + +Examples: +- image to be inserted + #### Deleting a contact : `delete` Deletes the specified contact from the address book. @@ -196,20 +210,20 @@ to refer to it, and then return back to your edited command to finish typing. #### Saving the data -AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +CodeConnect data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. #### Editing the data file -AddressBook data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. +CodeConnect data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. **Caution:** -If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
-Furthermore, certain edits can cause the AddressBook to behave in unexpected ways (e.g., if a value entered is outside the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly. +If your changes to the data file makes its format invalid, CodeConnect will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
+Furthermore, certain edits can cause the CodeConnect to behave in unexpected ways (e.g., if a value entered is outside the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly.
-### Archiving data files `[coming in v2.0]` +#### Archiving data files `[coming in v2.0]` _Details coming soon ..._ @@ -218,7 +232,7 @@ _Details coming soon ..._ ## FAQ **Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous AddressBook home folder. +**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous CodeConnect home folder. --- @@ -230,13 +244,15 @@ _Details coming soon ..._ ## Command summary -| Action | Format, Examples | -|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS g/GITHUB_USERNAME [t/TAG] [ts/TECH_STACK]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 g/Jamesho123 t/friend t/colleague ts/Java ts/C++` | -| **Clear** | `clear` | -| **Delete** | `delete INDEX`
e.g., `delete 3` | -| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GITHUB_USERNAME] [t/TAG]…​ [ts/TECH_STACK]…​ `
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | -| **Find by Names** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | -| **Find by Tags** | `find-tags KEYWORD [MORE_KEYWORDS]`
e.g., `find-tags School Work` | -| **List** | `list` | -| **Help** | `help` | + +| Action | Format, Examples | +|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS g/GITHUB_USERNAME [t/TAG] [ts/TECH_STACK]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 g/Jamesho123 t/friend t/colleague ts/Java ts/C++` | +| **Clear** | `clear` | +| **Delete** | `delete INDEX`
e.g., `delete 3` | +| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GITHUB_USERNAME] [t/TAG]…​ [ts/TECH_STACK]…​ `
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | +| **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | +| **Find by Tags** | `find-tags KEYWORD [MORE_KEYWORDS]`
e.g., `find-tags School Work` | +| **Find Tech Stack** | `find-ts KEYWORD [MORE_KEYWORDS]`
e.g., `find-ts Java Python` | +| **List** | `list` | +| **Help** | `help` | diff --git a/docs/diagrams/BetterModelClassDiagram.puml b/docs/diagrams/BetterModelClassDiagram.puml index 598474a5c82..7116311899b 100644 --- a/docs/diagrams/BetterModelClassDiagram.puml +++ b/docs/diagrams/BetterModelClassDiagram.puml @@ -4,18 +4,18 @@ skinparam arrowThickness 1.1 skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR -AddressBook *-right-> "1" UniquePersonList -AddressBook *-right-> "1" UniqueTagList -UniqueTagList -[hidden]down- UniquePersonList -UniqueTagList -[hidden]down- UniquePersonList +CodeConnect *-right-> "1" UniqueContactList +CodeConnect *-right-> "1" UniqueTagList +UniqueTagList -[hidden]down- UniqueContactList +UniqueTagList -[hidden]down- UniqueContactList UniqueTagList -right-> "*" Tag -UniquePersonList -right-> Person +UniqueContactList -right-> Contact -Person -up-> "*" Tag +Contact -up-> "*" Tag -Person *--> Name -Person *--> Phone -Person *--> Email -Person *--> Address +Contact *--> Name +Contact *--> Phone +Contact *--> Email +Contact *--> Address @enduml diff --git a/docs/diagrams/CommitActivityDiagram.puml b/docs/diagrams/CommitActivityDiagram.puml index 8c0892d6a70..39dc781c0ac 100644 --- a/docs/diagrams/CommitActivityDiagram.puml +++ b/docs/diagrams/CommitActivityDiagram.puml @@ -8,10 +8,10 @@ start 'Since the beta syntax does not support placing the condition outside the 'diamond we place it as the true branch instead. -if () then ([command commits AddressBook]) +if () then ([command commits CodeConnect]) :Purge redundant states; - :Save AddressBook to - addressBookStateList; + :Save CodeConnect to + CodeConnectStateList; else ([else]) endif stop diff --git a/docs/diagrams/DeleteSequenceDiagram.puml b/docs/diagrams/DeleteSequenceDiagram.puml index 5241e79d7da..a470f4dafeb 100644 --- a/docs/diagrams/DeleteSequenceDiagram.puml +++ b/docs/diagrams/DeleteSequenceDiagram.puml @@ -4,7 +4,7 @@ skinparam ArrowFontStyle plain box Logic LOGIC_COLOR_T1 participant ":LogicManager" as LogicManager LOGIC_COLOR -participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":CodeConnectParser" as CodeConnectParser LOGIC_COLOR participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR participant "r:CommandResult" as CommandResult LOGIC_COLOR @@ -17,17 +17,17 @@ end box [-> LogicManager : execute("delete 1") activate LogicManager -LogicManager -> AddressBookParser : parseCommand("delete 1") -activate AddressBookParser +LogicManager -> CodeConnectParser : parseCommand("delete 1") +activate CodeConnectParser create DeleteCommandParser -AddressBookParser -> DeleteCommandParser +CodeConnectParser -> DeleteCommandParser activate DeleteCommandParser -DeleteCommandParser --> AddressBookParser +DeleteCommandParser --> CodeConnectParser deactivate DeleteCommandParser -AddressBookParser -> DeleteCommandParser : parse("1") +CodeConnectParser -> DeleteCommandParser : parse("1") activate DeleteCommandParser create DeleteCommand @@ -37,19 +37,19 @@ activate DeleteCommand DeleteCommand --> DeleteCommandParser : deactivate DeleteCommand -DeleteCommandParser --> AddressBookParser : d +DeleteCommandParser --> CodeConnectParser : d deactivate DeleteCommandParser 'Hidden arrow to position the destroy marker below the end of the activation bar. -DeleteCommandParser -[hidden]-> AddressBookParser +DeleteCommandParser -[hidden]-> CodeConnectParser destroy DeleteCommandParser -AddressBookParser --> LogicManager : d -deactivate AddressBookParser +CodeConnectParser --> LogicManager : d +deactivate CodeConnectParser LogicManager -> DeleteCommand : execute(m) activate DeleteCommand -DeleteCommand -> Model : deletePerson(1) +DeleteCommand -> Model : deleteContact(1) activate Model Model --> DeleteCommand diff --git a/docs/diagrams/FindTechStackSequenceDiagram.puml b/docs/diagrams/FindTechStackSequenceDiagram.puml new file mode 100644 index 00000000000..a355d0eb043 --- /dev/null +++ b/docs/diagrams/FindTechStackSequenceDiagram.puml @@ -0,0 +1,70 @@ +@startuml +!include style.puml +skinparam ArrowFontStyle plain + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CodeConnectParser" as CodeConnectParser LOGIC_COLOR +participant ":FindTechStackCommandParser" as FindTechStackCommandParser LOGIC_COLOR +participant "fts:FindTechStackCommand" as FindTechStackCommand LOGIC_COLOR +participant "r:CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant "m:Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("find-ts Java") +activate LogicManager + +LogicManager -> CodeConnectParser : parseCommand("find-ts Java") +activate CodeConnectParser + +create FindTechStackCommandParser +CodeConnectParser -> FindTechStackCommandParser +activate FindTechStackCommandParser + +FindTechStackCommandParser --> CodeConnectParser +deactivate FindTechStackCommandParser + +CodeConnectParser -> FindTechStackCommandParser : parse("Java") +activate FindTechStackCommandParser + +create FindTechStackCommand +FindTechStackCommandParser -> FindTechStackCommand +activate FindTechStackCommand + +FindTechStackCommand --> FindTechStackCommandParser : +deactivate FindTechStackCommand + +FindTechStackCommandParser --> CodeConnectParser : fts +deactivate FindTechStackCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +FindTechStackCommandParser -[hidden]-> CodeConnectParser +destroy FindTechStackCommandParser + +CodeConnectParser --> LogicManager : fts +deactivate CodeConnectParser + +LogicManager -> FindTechStackCommand : execute(m) +activate FindTechStackCommand + +FindTechStackCommand -> Model : updateFilteredContactList(predicate) +activate Model + +Model --> FindTechStackCommand +deactivate Model + +create CommandResult +FindTechStackCommand -> CommandResult +activate CommandResult + +CommandResult --> FinTechStackCommand +deactivate CommandResult + +FindTechStackCommand --> LogicManager : r +deactivate FindTechStackCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml index 0de5673070d..23f495cfa57 100644 --- a/docs/diagrams/ModelClassDiagram.puml +++ b/docs/diagrams/ModelClassDiagram.puml @@ -5,20 +5,21 @@ skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR Package Model as ModelPackage <>{ -Class "<>\nReadOnlyAddressBook" as ReadOnlyAddressBook +Class "<>\nReadOnlyCodeConnect" as ReadOnlyCodeConnect Class "<>\nReadOnlyUserPrefs" as ReadOnlyUserPrefs Class "<>\nModel" as Model -Class AddressBook +Class CodeConnect Class ModelManager Class UserPrefs -Class UniquePersonList -Class Person +Class UniqueContactList +Class Contact Class Address Class Email Class Name Class Phone Class Tag +Class TechStack Class I #FFFFFF } @@ -26,29 +27,30 @@ Class I #FFFFFF Class HiddenOutside #FFFFFF HiddenOutside ..> Model -AddressBook .up.|> ReadOnlyAddressBook +CodeConnect .up.|> ReadOnlyCodeConnect ModelManager .up.|> Model Model .right.> ReadOnlyUserPrefs -Model .left.> ReadOnlyAddressBook -ModelManager -left-> "1" AddressBook +Model .left.> ReadOnlyCodeConnect +ModelManager -left-> "1" CodeConnect ModelManager -right-> "1" UserPrefs UserPrefs .up.|> ReadOnlyUserPrefs -AddressBook *--> "1" UniquePersonList -UniquePersonList --> "~* all" Person -Person *--> Name -Person *--> Phone -Person *--> Email -Person *--> Address -Person *--> "*" Tag +CodeConnect *--> "1" UniqueContactList +UniqueContactList --> "~* all" Contact +Contact *--> Name +Contact *--> Phone +Contact *--> Email +Contact *--> Address +Contact *--> "*" Tag +Contact *--> "*" Tech Stack -Person -[hidden]up--> I -UniquePersonList -[hidden]right-> I +Contact -[hidden]up--> I +UniqueContactList -[hidden]right-> I Name -[hidden]right-> Phone Phone -[hidden]right-> Address Address -[hidden]right-> Email -ModelManager --> "~* filtered" Person +ModelManager --> "~* filtered" Contact @enduml diff --git a/docs/diagrams/ParserClasses.puml b/docs/diagrams/ParserClasses.puml index ce4c5ce8c8d..b4d6292961d 100644 --- a/docs/diagrams/ParserClasses.puml +++ b/docs/diagrams/ParserClasses.puml @@ -9,7 +9,7 @@ Class XYZCommand package "Parser classes"{ Class "<>\nParser" as Parser -Class AddressBookParser +Class CodeConnectParser Class XYZCommandParser Class CliSyntax Class ParserUtil @@ -19,12 +19,12 @@ Class Prefix } Class HiddenOutside #FFFFFF -HiddenOutside ..> AddressBookParser +HiddenOutside ..> CodeConnectParser -AddressBookParser .down.> XYZCommandParser: <> +CodeConnectParser .down.> XYZCommandParser: <> XYZCommandParser ..> XYZCommand : <> -AddressBookParser ..> Command : <> +CodeConnectParser ..> Command : <> XYZCommandParser .up.|> Parser XYZCommandParser ..> ArgumentMultimap XYZCommandParser ..> ArgumentTokenizer diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml index a821e06458c..4a582668a0b 100644 --- a/docs/diagrams/StorageClassDiagram.puml +++ b/docs/diagrams/StorageClassDiagram.puml @@ -14,11 +14,11 @@ Class JsonUserPrefsStorage Class "<>\nStorage" as Storage Class StorageManager -package "AddressBook Storage" #F4F6F6{ -Class "<>\nAddressBookStorage" as AddressBookStorage -Class JsonAddressBookStorage -Class JsonSerializableAddressBook -Class JsonAdaptedPerson +package "CodeConnect Storage" #F4F6F6{ +Class "<>\nCodeConnectStorage" as CodeConnectStorage +Class JsonCodeConnectStorage +Class JsonSerializableCodeConnect +Class JsonAdaptedContact Class JsonAdaptedTag } @@ -29,15 +29,15 @@ HiddenOutside ..> Storage StorageManager .up.|> Storage StorageManager -up-> "1" UserPrefsStorage -StorageManager -up-> "1" AddressBookStorage +StorageManager -up-> "1" CodeConnectStorage Storage -left-|> UserPrefsStorage -Storage -right-|> AddressBookStorage +Storage -right-|> CodeConnectStorage JsonUserPrefsStorage .up.|> UserPrefsStorage -JsonAddressBookStorage .up.|> AddressBookStorage -JsonAddressBookStorage ..> JsonSerializableAddressBook -JsonSerializableAddressBook --> "*" JsonAdaptedPerson -JsonAdaptedPerson --> "*" JsonAdaptedTag +JsonCodeConnectStorage .up.|> CodeConnectStorage +JsonCodeConnectStorage ..> JsonSerializableCodeConnect +JsonSerializableCodeConnect --> "*" JsonAdaptedContact +JsonAdaptedContact --> "*" JsonAdaptedTag @enduml diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml index 95473d5aa19..5bf258bfe82 100644 --- a/docs/diagrams/UiClassDiagram.puml +++ b/docs/diagrams/UiClassDiagram.puml @@ -11,8 +11,8 @@ Class UiManager Class MainWindow Class HelpWindow Class ResultDisplay -Class PersonListPanel -Class PersonCard +Class ContactListPanel +Class ContactCard Class StatusBarFooter Class CommandBox } @@ -32,26 +32,26 @@ UiManager .left.|> Ui UiManager -down-> "1" MainWindow MainWindow *-down-> "1" CommandBox MainWindow *-down-> "1" ResultDisplay -MainWindow *-down-> "1" PersonListPanel +MainWindow *-down-> "1" ContactListPanel MainWindow *-down-> "1" StatusBarFooter MainWindow --> "0..1" HelpWindow -PersonListPanel -down-> "*" PersonCard +ContactListPanel -down-> "*" ContactCard MainWindow -left-|> UiPart ResultDisplay --|> UiPart CommandBox --|> UiPart -PersonListPanel --|> UiPart -PersonCard --|> UiPart +ContactListPanel --|> UiPart +ContactCard --|> UiPart StatusBarFooter --|> UiPart HelpWindow --|> UiPart -PersonCard ..> Model +ContactCard ..> Model UiManager -right-> Logic MainWindow -left-> Logic -PersonListPanel -[hidden]left- HelpWindow +ContactListPanel -[hidden]left- HelpWindow HelpWindow -[hidden]left- CommandBox CommandBox -[hidden]left- ResultDisplay ResultDisplay -[hidden]left- StatusBarFooter diff --git a/docs/diagrams/UndoRedoState0.puml b/docs/diagrams/UndoRedoState0.puml index 43a45903ac9..651d4dee573 100644 --- a/docs/diagrams/UndoRedoState0.puml +++ b/docs/diagrams/UndoRedoState0.puml @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA title Initial state package States { - class State1 as "ab0:AddressBook" - class State2 as "ab1:AddressBook" - class State3 as "ab2:AddressBook" + class State1 as "ab0:CodeConnect" + class State2 as "ab1:CodeConnect" + class State3 as "ab2:CodeConnect" } State1 -[hidden]right-> State2 State2 -[hidden]right-> State3 diff --git a/docs/diagrams/UndoRedoState1.puml b/docs/diagrams/UndoRedoState1.puml index 5a41e9e1651..1bfb18a7713 100644 --- a/docs/diagrams/UndoRedoState1.puml +++ b/docs/diagrams/UndoRedoState1.puml @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA title After command "delete 5" package States <> { - class State1 as "ab0:AddressBook" - class State2 as "ab1:AddressBook" - class State3 as "ab2:AddressBook" + class State1 as "ab0:CodeConnect" + class State2 as "ab1:CodeConnect" + class State3 as "ab2:CodeConnect" } State1 -[hidden]right-> State2 diff --git a/docs/diagrams/UndoRedoState2.puml b/docs/diagrams/UndoRedoState2.puml index ad32fce1b0b..a4331110974 100644 --- a/docs/diagrams/UndoRedoState2.puml +++ b/docs/diagrams/UndoRedoState2.puml @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA title After command "add n/David" package States <> { - class State1 as "ab0:AddressBook" - class State2 as "ab1:AddressBook" - class State3 as "ab2:AddressBook" + class State1 as "ab0:CodeConnect" + class State2 as "ab1:CodeConnect" + class State3 as "ab2:CodeConnect" } State1 -[hidden]right-> State2 diff --git a/docs/diagrams/UndoRedoState3.puml b/docs/diagrams/UndoRedoState3.puml index 9187a690036..37e35dcd61a 100644 --- a/docs/diagrams/UndoRedoState3.puml +++ b/docs/diagrams/UndoRedoState3.puml @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA title After command "undo" package States <> { - class State1 as "ab0:AddressBook" - class State2 as "ab1:AddressBook" - class State3 as "ab2:AddressBook" + class State1 as "ab0:CodeConnect" + class State2 as "ab1:CodeConnect" + class State3 as "ab2:CodeConnect" } State1 -[hidden]right-> State2 diff --git a/docs/diagrams/UndoRedoState4.puml b/docs/diagrams/UndoRedoState4.puml index 2bc631ffcd0..6b03fbcf93d 100644 --- a/docs/diagrams/UndoRedoState4.puml +++ b/docs/diagrams/UndoRedoState4.puml @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA title After command "list" package States <> { - class State1 as "ab0:AddressBook" - class State2 as "ab1:AddressBook" - class State3 as "ab2:AddressBook" + class State1 as "ab0:CodeConnect" + class State2 as "ab1:CodeConnect" + class State3 as "ab2:CodeConnect" } State1 -[hidden]right-> State2 diff --git a/docs/diagrams/UndoRedoState5.puml b/docs/diagrams/UndoRedoState5.puml index e77b04104aa..b9f94c27ad6 100644 --- a/docs/diagrams/UndoRedoState5.puml +++ b/docs/diagrams/UndoRedoState5.puml @@ -7,9 +7,9 @@ skinparam ClassBackgroundColor #FFFFAA title After command "clear" package States <> { - class State1 as "ab0:AddressBook" - class State2 as "ab1:AddressBook" - class State3 as "ab3:AddressBook" + class State1 as "ab0:CodeConnect" + class State2 as "ab1:CodeConnect" + class State3 as "ab3:CodeConnect" } State1 -[hidden]right-> State2 diff --git a/docs/diagrams/UndoSequenceDiagram-Logic.puml b/docs/diagrams/UndoSequenceDiagram-Logic.puml index e57368c5159..5b29b331995 100644 --- a/docs/diagrams/UndoSequenceDiagram-Logic.puml +++ b/docs/diagrams/UndoSequenceDiagram-Logic.puml @@ -4,7 +4,7 @@ skinparam ArrowFontStyle plain box Logic LOGIC_COLOR_T1 participant ":LogicManager" as LogicManager LOGIC_COLOR -participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":CodeConnectParser" as CodeConnectParser LOGIC_COLOR participant "u:UndoCommand" as UndoCommand LOGIC_COLOR end box @@ -14,23 +14,23 @@ end box [-> LogicManager : execute(undo) activate LogicManager -LogicManager -> AddressBookParser : parseCommand(undo) -activate AddressBookParser +LogicManager -> CodeConnectParser : parseCommand(undo) +activate CodeConnectParser create UndoCommand -AddressBookParser -> UndoCommand +CodeConnectParser -> UndoCommand activate UndoCommand -UndoCommand --> AddressBookParser +UndoCommand --> CodeConnectParser deactivate UndoCommand -AddressBookParser --> LogicManager : u -deactivate AddressBookParser +CodeConnectParser --> LogicManager : u +deactivate CodeConnectParser LogicManager -> UndoCommand : execute() activate UndoCommand -UndoCommand -> Model : undoAddressBook() +UndoCommand -> Model : undoCodeConnect() activate Model Model --> UndoCommand diff --git a/docs/diagrams/UndoSequenceDiagram-Model.puml b/docs/diagrams/UndoSequenceDiagram-Model.puml index 54d83208cb8..c3594d6f0c4 100644 --- a/docs/diagrams/UndoSequenceDiagram-Model.puml +++ b/docs/diagrams/UndoSequenceDiagram-Model.puml @@ -4,18 +4,18 @@ skinparam ArrowFontStyle plain box Model MODEL_COLOR_T1 participant ":Model" as Model MODEL_COLOR -participant ":VersionedAddressBook" as VersionedAddressBook MODEL_COLOR +participant ":VersionedCodeConnect" as VersionedCodeConnect MODEL_COLOR end box -[-> Model : undoAddressBook() +[-> Model : undoCodeConnect() activate Model -Model -> VersionedAddressBook : undo() -activate VersionedAddressBook +Model -> VersionedCodeConnect : undo() +activate VersionedCodeConnect -VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook) -VersionedAddressBook --> Model : -deactivate VersionedAddressBook +VersionedCodeConnect -> VersionedCodeConnect :resetData(ReadOnlyCodeConnect) +VersionedCodeConnect --> Model : +deactivate VersionedCodeConnect [<-- Model deactivate Model diff --git a/docs/diagrams/tracing/LogicSequenceDiagram.puml b/docs/diagrams/tracing/LogicSequenceDiagram.puml index 42bf46d3ce8..17074cecfed 100644 --- a/docs/diagrams/tracing/LogicSequenceDiagram.puml +++ b/docs/diagrams/tracing/LogicSequenceDiagram.puml @@ -3,7 +3,7 @@ skinparam ArrowFontStyle plain Participant ":LogicManager" as logic LOGIC_COLOR -Participant ":AddressBookParser" as abp LOGIC_COLOR +Participant ":CodeConnectParser" as abp LOGIC_COLOR Participant ":EditCommandParser" as ecp LOGIC_COLOR Participant "command:EditCommand" as ec LOGIC_COLOR @@ -14,7 +14,7 @@ create ecp abp -> ecp abp -> ecp ++: parse(arguments) create ec -ecp -> ec ++: index, editPersonDescriptor +ecp -> ec ++: index, editContactDescriptor ec --> ecp -- ecp --> abp --: command abp --> logic --: command diff --git a/docs/index.md b/docs/index.md index 8acbdd73507..8e78aadeab2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,17 +3,17 @@ title: "" --- -# AddressBook Level-3 +# CodeConnect [![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) [![codecov](https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg)](https://codecov.io/gh/se-edu/addressbook-level3) ![Ui](images/Ui.png) -**AddressBook is a desktop application for managing your contact details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). +**CodeConnect is a desktop application for managing your contact details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). -* If you are interested in using AddressBook, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). -* If you are interested about developing AddressBook, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. +* If you are interested in using CodeConnect, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). +* If you are interested about developing CodeConnect, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. **Acknowledgements** diff --git a/docs/team/johndoe.md b/docs/team/johndoe.md index 86aa7ebfc34..2bd25ddc384 100644 --- a/docs/team/johndoe.md +++ b/docs/team/johndoe.md @@ -3,9 +3,9 @@ title: "John Doe's Project Portfolio Page" --- -### Project: AddressBook Level 3 +### Project: CodeConnect -AddressBook - Level 3 is a desktop address book application used for teaching Software Engineering principles. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. +CodeConnect is a desktop address book application used for teaching Software Engineering principles. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. Given below are my contributions to the project. diff --git a/docs/tutorials/AddRemark.md b/docs/tutorials/AddRemark.md index fbfc27e654f..efbba18ac02 100644 --- a/docs/tutorials/AddRemark.md +++ b/docs/tutorials/AddRemark.md @@ -8,7 +8,7 @@ Let's walk you through the implementation of a new command — `remark`. -This command allows users of the AddressBook application to add optional remarks to people in their address book and edit it if required. The command should have the following format: +This command allows users of the CodeConnect application to add optional remarks to people in their address book and edit it if required. The command should have the following format: `remark INDEX r/REMARK` (e.g., `remark 2 r/Likes baseball`) @@ -46,7 +46,7 @@ public class RemarkCommand extends Command { ### Hook `RemarkCommand` into the application -Now that we have our `RemarkCommand` ready to be executed, we need to update `AddressBookParser#parseCommand()` to recognize the `remark` keyword. Add the new command to the `switch` block by creating a new `case` that returns a new instance of `RemarkCommand`. +Now that we have our `RemarkCommand` ready to be executed, we need to update `CodeConnectParser#parseCommand()` to recognize the `remark` keyword. Add the new command to the `switch` block by creating a new `case` that returns a new instance of `RemarkCommand`. You can refer to the changes in this [diff](https://github.com/se-edu/addressbook-level3/commit/35eb7286f18a029d39cb7a29df8f172a001e4fd8#diff-399c284cb892c20b7c04a69116fcff6ccc0666c5230a1db8e4a9145def8fa4ee). @@ -217,7 +217,7 @@ public RemarkCommand parse(String args) throws ParseException { -Don’t forget to update `AddressBookParser` to use our new `RemarkCommandParser`! +Don’t forget to update `CodeConnectParser` to use our new `RemarkCommandParser`! @@ -226,7 +226,7 @@ If you are stuck, check out the sample ## Add `Remark` to the model -Now that we have all the information that we need, let’s lay the groundwork for propagating the remarks added into the in-memory storage of contact data. We achieve that by working with the `Person` model. Each field in a Person is implemented as a separate class (e.g. a `Name` object represents the contact’s name). That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a contact. +Now that we have all the information that we need, let’s lay the groundwork for propagating the remarks added into the in-memory storage of contact data. We achieve that by working with the `Contact` model. Each field in a Contact is implemented as a separate class (e.g. a `Name` object represents the contact’s name). That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a contact. ### Add a new `Remark` class @@ -245,7 +245,7 @@ Without getting too deep into `fxml`, let’s go on a 5 minute adventure to get Simply add the following to [`seedu.address.ui.ContactCard`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-639834f1e05afe2276a86372adf0fe5f69314642c2d93cfa543d614ce5a76688). -**`PersonCard.java`:** +**`ContactCard.java`:** ```java @FXML @@ -255,9 +255,9 @@ private Label remark; `@FXML` is an annotation that marks a private or protected field and makes it accessible to FXML. It might sound like Greek to you right now, don’t worry — we will get back to it later. -Then insert the following into [`main/resources/view/PersonListCard.fxml`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-d44c4f51c24f6253c277a2bb9bc440b8064d9c15ad7cb7ceda280bca032efce9). +Then insert the following into [`main/resources/view/ContactListCard.fxml`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-d44c4f51c24f6253c277a2bb9bc440b8064d9c15ad7cb7ceda280bca032efce9). -**`PersonListCard.fxml`:** +**`ContactListCard.fxml`:** ``` xml