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

[Cheah Yan (Xie Yan)] iP #486

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
d839859
Add Gradle support
May 24, 2020
11af5b5
Level-1
CheahYan Aug 19, 2021
0caf30f
Level-2
CheahYan Aug 19, 2021
b228ba5
Level-3
CheahYan Aug 19, 2021
07274fb
Level-4
CheahYan Aug 21, 2021
0b02f80
Level-5
CheahYan Aug 21, 2021
c11d4f6
Level-6
CheahYan Aug 21, 2021
6f0ba24
ui testing
CheahYan Aug 21, 2021
24bb9e5
Level-7
CheahYan Aug 29, 2021
3feae08
Level-7 update
CheahYan Aug 29, 2021
881bfc1
Level-8
CheahYan Aug 29, 2021
b489ae1
Revert "Level-8"
CheahYan Aug 29, 2021
588650b
Merge branch 'branch-Level-7'
CheahYan Aug 29, 2021
cb928b3
Level-8
CheahYan Aug 29, 2021
4c03146
debugging after merge conflicts
CheahYan Aug 29, 2021
ffb8151
OOP
CheahYan Sep 1, 2021
eacfa44
oop updates
CheahYan Sep 3, 2021
77cb385
A-MoreOOP
CheahYan Sep 3, 2021
e48671c
updates
CheahYan Sep 6, 2021
259f0dd
A-JUnit
CheahYan Sep 7, 2021
b4671e3
A-Jar
CheahYan Sep 7, 2021
c06a62d
A-JavaDoc
CheahYan Sep 8, 2021
82a5af5
A-CodingStandard
CheahYan Sep 8, 2021
de2dab3
Level-9
CheahYan Sep 9, 2021
93d8803
Merge branch 'branch-A-JavaDoc'
CheahYan Sep 9, 2021
e7834d4
Merge branch 'branch-Level-9'
CheahYan Sep 9, 2021
d94a1ea
Merge remote-tracking branch 'origin/add-gradle-support'
CheahYan Sep 13, 2021
571b9f1
Gradle and CheckStyle
CheahYan Sep 14, 2021
aa2e2b2
not sure whats going on
CheahYan Sep 14, 2021
9c5ec82
idk
CheahYan Sep 14, 2021
e5bdf9f
idk
CheahYan Sep 14, 2021
860fa28
idk
CheahYan Sep 14, 2021
4315658
idk
CheahYan Sep 14, 2021
f162e12
WHAT IS GOING ON
CheahYan Sep 14, 2021
5bcc063
WHAT IS GOING ON
CheahYan Sep 14, 2021
f0ba15b
WHAT IS GOING ON
CheahYan Sep 14, 2021
fef4323
debugging
CheahYan Sep 14, 2021
7bfa996
Merge branch 'master' of https://github.com/CheahYan/ip
CheahYan Sep 14, 2021
6d9bcae
updates
CheahYan Sep 14, 2021
0e0a9b8
Merge branch 'master' of https://github.com/CheahYan/ip
CheahYan Sep 14, 2021
3aa26c4
updates
CheahYan Sep 14, 2021
b0c8db7
Merge branch 'reset-to-gradle'
CheahYan Sep 14, 2021
4f13f5f
updates
CheahYan Sep 15, 2021
de42740
Level-7 update
CheahYan Sep 16, 2021
d6aa8d4
GUI
CheahYan Sep 20, 2021
dd466c1
debug
CheahYan Sep 20, 2021
53f0877
level 10
CheahYan Sep 20, 2021
36101c6
update
CheahYan Sep 20, 2021
ff4e22b
Update DialogBox.java
CheahYan Sep 20, 2021
b654417
update
CheahYan Sep 20, 2021
f6ce0f9
Add assertions
CheahYan Sep 20, 2021
6c5ee40
Updates to GUI
CheahYan Sep 20, 2021
192813f
Improve Code Quality to all files
CheahYan Sep 22, 2021
4a4d536
Merge branch 'master' into branch-A-Assertions
CheahYan Sep 22, 2021
6cc0fc7
Merge pull request #2 from CheahYan/branch-A-Assertions
CheahYan Sep 22, 2021
e89f694
Merge branch 'master' into branch-A-CodeQuality
CheahYan Sep 22, 2021
afbc471
Merge pull request #3 from CheahYan/branch-A-CodeQuality
CheahYan Sep 22, 2021
e6b2ed4
B-Reminders
CheahYan Sep 22, 2021
0bd4ee1
Add Ui.png and updated MainWindow.fxml
CheahYan Sep 23, 2021
76b4453
Set theme jekyll-theme-cayman
CheahYan Sep 23, 2021
08f7db2
updates to code
CheahYan Sep 23, 2021
394c1c8
Merge branch 'master' of https://github.com/CheahYan/ip
CheahYan Sep 23, 2021
3f2132e
A-UserGuide
CheahYan Sep 23, 2021
24bfe32
more SLAP for Storage
CheahYan Sep 24, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ bin/

/text-ui-test/ACTUAL.txt
text-ui-test/EXPECTED-UNIX.TXT
build.gradle
63 changes: 63 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
plugins {
id 'java'
id 'application'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'org.openjfx.javafxplugin' version '0.0.10'
}

repositories {
mavenCentral()
}

dependencies {
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.0'

String javaFxVersion = '11'

implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'

}

test {
useJUnitPlatform()

testLogging {
events "passed", "skipped", "failed"

showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
showStandardStreams = false
}
}

application {
mainClassName = "duke.Launcher"
}

shadowJar {
archiveBaseName = "duke"
archiveClassifier = null
}

checkstyle {
toolVersion = '8.29'
}

run{
standardInput = System.in
}
9 changes: 9 additions & 0 deletions data/duke.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
todo run
deadline return book /by 11/04/2020 2000
done 2
deadline return book /by 04/11/2020 2000
todo run
event project meeting /at 25/09/2021 2200
todo tell Tom to wash the dishes
event meet Tommy at his house /at 02/11/2021 1000
done 2
Binary file added docs/ExampleDelete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ExampleDone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ExampleFind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ExampleList.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 69 additions & 15 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,83 @@
# User Guide
# User Guide for Duke

## Features

### Feature-ABC
### Adding task to be done: `todo`

Description of the feature.
Adds a task to be done to Duke.

### Feature-XYZ
Format: `todo TASK_TO_BE_DONE`

Description of the feature.
Examples:
- `todo running`
- `todo wash the dishes`

## Usage
### Adding event to attend: `event`

### `Keyword` - Describe action
Adds an event to be attended to Duke.

Describe the action and its outcome.
Format: `event EVENT_TO_ATTEND /at DATE_TIME`
- DATE_TIME is to be in the format of dd/mm/yyyy HHmm, time will follow the 24hour clock format.

Example of usage:
Examples:
- `event project meeting /at 25/09/2021 2200`
- `event concert /at 25/12/2022 1500`

`keyword (optional arguments)`
### Adding deadline to be completed: `deadline`

Expected outcome:
Adds a task with a deadline to be completed by to Duke. It will also be added as a reminder.

Description of the outcome.
Format: `deadline TASK_TO_COMPLETED_BY_DEADLINE /at DATE_TIME`
- DATE_TIME is to be in the format of dd/mm/yyyy HHmm, time will follow the 24hour clock format.

```
expected output
```
Examples:
- `deadline project /by 25/09/2021 2200`
- `deadline buy presents /by 25/12/2022 1200`

### Listing all tasks and reminders for deadlines to be completed: `list`

Shows a list of all tasks in Duke and also shows a list of all deadlines to be completed as a reminder.

Format: `list`

Examples: `list`
![Example](ExampleList.png)

### Marking task as done: `done`

Marks a task in Duke as done. If the task has a deadline, it will be removed from the reminder list in Duke.

Format: `done INDEX`
- Deletes the task at the specified `INDEX`.
- The index refers to the index number shown in the displayed task list.
- The index **must be a positive integer** 1, 2, 3, ...

Example:
- `done 2` marks the second task in the task list as done.
![Example](ExampleDone.png)

### Deleting task from Duke: `delete`

Deletes a task from the task list in Duke. If the task has a deadline, it will be removed from the reminder
list in Duke.

Format: `delete INDEX`
- Deletes the task at the specified `INDEX`.
- The index refers to the index number shown in the displayed task list.
- The index **must be a positive integer** 1, 2, 3, ...

Examples:
- `delete 2` removes the second task in the task list. If it
has a deadline, remove it from the reminder list too.
![Example](ExampleDelete.png)

### Finding tasks from Duke: `find`

Finds tasks which descriptions contain the given String.

Format: `find ANY_STRING`
- Description of the tasks does not include the date and time of the task.

Examples:
- `find Tom` returns a list of tasks that contains the string Tom.
![Example](ExampleFind.png)
Binary file added docs/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
183 changes: 183 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
echo "$*"
}

die () {
echo
echo "$*"
echo
exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "$@"
Loading