Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #225 from bwangpj/reuse
Browse files Browse the repository at this point in the history
Include reuse
  • Loading branch information
Cloud7050 authored Nov 26, 2023
2 parents 514cbd7 + 3ceb5f4 commit 7432b8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/swe/context/ui/CommandBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ private void handleCommandEntered() {
}
}

//Solution below inspired by
//https://github.com/se-edu/addressbook-level4/blob/master/src/main/java/seedu/address/ui/CommandBox.java
//(implemented first, then modified after learning about the approach in AB4, which is slightly different)
/**
* Handles the up or down button pressed event.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/swe/context/ui/CommandBoxHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import java.util.List;
import java.util.NoSuchElementException;

//Solution below inspired by
//https://github.com/se-edu/addressbook-level4/blob/master/src/main/java/seedu/address/ui/ListElementPointer.java
//(implemented first, then modified after learning about the approach in AB4, which is slightly different)
/**
* Stores the history of entered commands and a pointer indicating the current position in the list.
* The list always behaves externally as if its last element is the empty string.
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/swe/context/ui/CommandBoxHistoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

import org.junit.jupiter.api.Test;

//Solution below inspired by
//https://github.com/se-edu/addressbook-level4/blob/master/src/test/java/seedu/address/ui/ListElementPointerTest.java
public class CommandBoxHistoryTest {
private static final String FIRST_COMMAND = "list";
private static final String SECOND_COMMAND = "clear";
Expand Down

0 comments on commit 7432b8d

Please sign in to comment.