Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: java

jdk:
- oraclejdk8
29 changes: 29 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apply plugin: 'java'
apply plugin: 'eclipse'

sourceCompatibility = 1.8

sourceSets {
test {
java {
srcDir 'src/test'
}
}
}
repositories {
mavenCentral()
}

dependencies {
testCompile 'junit:junit:4.12'
}

jar {
manifest {
attributes 'Main-Class': 'main.java.gui.MainApp'
}
}

task wrapper(type: Wrapper) {
gradleVersion = '2.11'
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Thu Mar 31 11:57:16 SGT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip
160 changes: 160 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/main/java/gui/CommandBarController.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* This class handles the TextField that users input commands in and the Label
* that shows feedback.
*
*
* @author Sebastian Quek
*
*/
Expand All @@ -24,7 +24,7 @@ public class CommandBarController extends BorderPane {
@FXML
private TextField commandBar;

private static final String COMMAND_BAR_LAYOUT_FXML = "/main/resources/layouts/CommandBar.fxml";
private static final String COMMAND_BAR_LAYOUT_FXML = "/layouts/CommandBar.fxml";

private MainApp mainApp;

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/gui/FileStatsController.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
/**
* This class controls the view that shows an author's individual contributions
* to the source files.
*
*
* @author Sebastian Quek
*
*/
public class FileStatsController extends BorderPane {

@FXML
private ListView<FileStatsItem> fileStats;

@FXML
private Label title;

private static final String FILE_STATS_FXML = "/main/resources/layouts/FileStats.fxml";
private static final String FILE_STATS_FXML = "/layouts/FileStats.fxml";

private ArrayList<FileStatsItem> items;

Expand All @@ -43,26 +43,26 @@ public FileStatsController(String authorName,
} catch (IOException e) {
e.printStackTrace();
}

title.setText(authorName);
initStats(statistics);
}

private void initStats(HashMap<SourceFile, Integer> statistics) {
items = new ArrayList<FileStatsItem>();

for (SourceFile sourceFile : statistics.keySet()) {
addFileStatsItem(sourceFile, statistics.get(sourceFile));
}

Collections.sort(items);
fileStats.setItems(FXCollections.observableList(items));
}

/**
* Each FileStatsItem corresponds to a source file and is displayed as a row
* in this custom view.
*
*
* @param currentFile
* @param currentNumLines
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/gui/FileStatsItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* This class represents each row in the custom FileStats view.
* It implements Comparable so that they can be sorted by their percentage
* values.
*
*
* @author Sebastian Quek
*
*/
Expand All @@ -35,7 +35,7 @@ public class FileStatsItem extends BorderPane implements
@FXML
private Shape circle;

private static final String FILE_STATS_ITEM_FXML = "/main/resources/layouts/FileStatsItem.fxml";
private static final String FILE_STATS_ITEM_FXML = "/layouts/FileStatsItem.fxml";

private static final String STRING_TRUNCATED_FORMAT = "...%s";
private static final String STRING_LINES_OF_CODE_FORMAT = "%s lines";
Expand Down
Loading