Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerng committed Mar 6, 2019
1 parent b5976b7 commit c559c5d
Show file tree
Hide file tree
Showing 16 changed files with 682 additions and 674 deletions.
9 changes: 9 additions & 0 deletions .idea/dictionaries/FRC.xml

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

3 changes: 3 additions & 0 deletions .idea/misc.xml

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

2 changes: 1 addition & 1 deletion src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Manifest-Version: 1.0
MainTest-Class: org.usfirst.frc.team25.scouting.client.ui.MainTest
Main-Class: org.usfirst.frc.team25.scouting.client.ui.MainTest

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.usfirst.frc.team25.scouting.data.models.ScoutEntry;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;

Expand All @@ -32,14 +31,14 @@ public class MainController {
private TextField analysisTeamOne, analysisTeamTwo, analysisTeamThree, teamNumEventCode, analysisOppTeamOne,
analysisOppTeamTwo, analysisOppTeamThree, analysisMatchNum;

TextField[] allianceBasedGroup;
TextField[] matchBasedGroup;
private TextField[] allianceBasedGroup;
private TextField[] matchBasedGroup;

private EventReport eventReport;
private ArrayList<File> jsonFileList;
private String eventName;

private File currentDataDirectory, teamNameList;
private File currentDataDirectory;

public void initialize() {

Expand Down Expand Up @@ -100,9 +99,7 @@ public void initialize() {
enableTextFieldGroup(matchBasedGroup, matchBasedReport.isSelected());
});

generateFilesButton.setOnAction(event -> {
processData();
});
generateFilesButton.setOnAction(event -> processData());

downloadDataButton.setOnAction(event -> {
String response;
Expand All @@ -123,9 +120,7 @@ public void initialize() {
addStatus(response);
});

displayReportButton.setOnAction(event -> {
displayAggregateReport();
});
displayReportButton.setOnAction(event -> displayAggregateReport());
}

private void enableTextFieldGroup(TextField[] textFields, boolean enable) {
Expand Down Expand Up @@ -252,10 +247,9 @@ private void processData() {
retrieveEventReport();

if (backupJson.isSelected()) {
try {
FileManager.createBackup(jsonFileList, currentDataDirectory);
if (FileManager.createBackup(jsonFileList, currentDataDirectory)) {
status += "\nBackup JSON files created";
} catch (FileNotFoundException e) {
} else {
status += "\nJSON file backup failed";
}

Expand Down Expand Up @@ -331,7 +325,7 @@ private void retrieveEventReport() {

ArrayList<ScoutEntry> scoutEntries = FileManager.deserializeData(jsonFileList);

this.teamNameList = FileManager.getTeamNameList(currentDataDirectory);
File teamNameList = FileManager.getTeamNameList(currentDataDirectory);

this.eventReport = new EventReport(scoutEntries, eventName, currentDataDirectory);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class MatchPredictionController {

@FXML
Text redTeamOneNum, eventKey, matchNumText;
Scene scene;
private Scene scene;

public void initialize(AllianceReport redAlliance, AllianceReport blueAlliance) {

Expand Down
Loading

0 comments on commit c559c5d

Please sign in to comment.