You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Alternative 1**: Create `Priority` as a separate class [current implementation]
@@ -336,16 +336,18 @@ Regarding the situation when the bug's priority is not indicated:
336
336
### Search feature
337
337
338
338
#### Implementation
339
-
The proposed search command is facilitated by `ModelManager`. It generates a filtered list (updated by a specified `Predicate<Bug>` as an argument), stored internally as `FilteredList<Bug>`. It should have its own class named `SearchCommand` and inherits from the abstract class `Command`. The command then returns an instance of `CommandResult` upon success and prints feedback to the users.
339
+
The `search` command is facilitated by `ModelManager`. It generates a filtered list (updated by a specified `Predicate<Bug>` as an argument), stored internally as `FilteredList<Bug>`. It should have its own class named `SearchCommand` and inherits from the abstract class `Command`. The command then returns an instance of `CommandResult` upon success and prints feedback to the users.
340
340
Additionally, it implements the following operations:
341
-
*`SearchCommand#execute()` - Executes the search command.
341
+
*`SearchCommand#execute()` - Executes the `search` command.
342
342
*`ModelManager#updateFilteredBugList(Predicate<Bug>)` - Filters internal data storage via its argument `Predicate<Bug>`
343
343
344
-
The following class diagram shows the structure of the search command implementation:
344
+
The following class diagram shows the structure of the `search` command implementation:
Given below is an example usage scenario and how the search feature behaves at each step.
348
-
Step 1. The user launches the application for the first time. The `KanBugTracker` will be initialized with the initial KanBug tracker state.
348
+
Given below is an example usage scenario and how the `search` feature behaves at each step:
349
+
350
+
Step 1. The user launches the application for the first time. The `KanBugTracker` will be initialized with the initial KanBug Tracker state.
349
351
350
352
Step 2. The user executes `add n/Ui bug d/Displays wrongly the information s/todo t/Ui.java` command to add a new bug to the KanBug tracker. A new bug with the following information is added:
351
353
@@ -354,27 +356,28 @@ Step 2. The user executes `add n/Ui bug d/Displays wrongly the information s/tod
354
356
- state: **todo**
355
357
- tag: **Ui.java**
356
358
357
-
Step 3. When there are a lot of bugs in the tracker, it is difficult for the user to look for the particular bug.
359
+
Step 3. When there are a lot of bugs in the tracker, it is difficult for the user to look for a particular bug.
358
360
The user wants to see the information of the above bug. Then, the user executes `search q/Ui bug`.
359
361
360
362
Step 4. This `search` command checks if the input is valid and then parses before using it to create a `BugContainsQueryStringPredicate` instance.
361
363
The predicate is internally passed and used to filter `FilteredList`.
362
-
This results in the information of all the bugs of which name or description or tag contains <code>Ui bug</code> as a substring displays in the tracker.
364
+
This results in the information of all the bugs of which the name, description or tags contain <code>Ui bug</code> as a substring displays in the tracker.
365
+
366
+
The following sequence diagram summarizes what happens when a user executes the search command:
363
367
364
-
The following sequence diagram summarizes what happens when a user executes the search command:
<divmarkdown="span"class="alert alert-info">:information_source: Note: The query-string given by the user cannot be empty and is case-insensitive.
370
+
<divmarkdown="span"class="alert alert-info">:information_source: Note: The query-string given by the user is <b>case-insensitive</b> and cannot be <b>empty</b>.
368
371
</div>
369
372
370
-
#### Design consideration:
371
-
**Alternative 1 (current choice)**: Use `q/`new prefix as a query-string to search
372
-
-Pro: Flexible search
373
-
-Con: Might be a long list of relevant bugs
373
+
#### Design considerations
374
+
**Alternative 1 (current choice)**: Use new prefix `q/`to take query-string from the users.
375
+
-Pros: Easier for the users to search for the bug they want.
376
+
-Cons: Might have a lot of relevant bugs shown in the filtered list of records.
374
377
375
-
**Alternative 2**: Use current field prefixes to search
376
-
-Pro: Might be complicated because the user needs to remember exactly some information of a particular field
377
-
-Con: Restricted search
378
+
**Alternative 2**: Use current field prefixes such as `n/`, `d/` or `t/`to search.
379
+
-Pros: No need to create a new prefix.
380
+
-Cons: Difficult for the users to search for the bug they want.
378
381
379
382
380
383
@@ -406,7 +409,7 @@ The following activity diagram summarizes what happens when a user executes the
@@ -620,9 +623,9 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
620
623
***Graphical User Interface (GUI)**: A visual way of interacting with a device using a variety of items (e.g. windows, tables, icons, etc.).
621
624
***OOP**: Object-Oriented Programming.
622
625
***Prefix**: A set of characters placed before a specified parameter when typing a command.
623
-
***Query-string**: The user keyword input to find matches when the search command is executed.
626
+
***Query-string**: The user keyword input (that can be one word or multiple words) to find matches when the search command is executed.
624
627
625
-
We provide more glossaries for non-technical terms of KanBug Tracker in [Understanding KanBug Tracker ](https://ay2021s1-cs2103t-w17-1.github.io/tp/UserGuide.html#4-understanding-kanbug-tracker) section of the User Guide.
628
+
We also provide a glossary for non-technical terms of KanBug Tracker in [Understanding KanBug Tracker ](https://ay2021s1-cs2103t-w17-1.github.io/tp/UserGuide.html#4-understanding-kanbug-tracker) section of the User Guide.
0 commit comments