Skip to content

Commit 0df9afe

Browse files
committed
Finaly switched to maven
1 parent 2edc7dd commit 0df9afe

File tree

3 files changed

+70
-53
lines changed

3 files changed

+70
-53
lines changed

pom.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>idaesbasic</groupId>
4+
<artifactId>idaesbasic</artifactId>
5+
<version>0.0.1-SNAPSHOT</version>
6+
<build>
7+
<plugins>
8+
<plugin>
9+
<artifactId>maven-compiler-plugin</artifactId>
10+
<version>3.8.1</version>
11+
<configuration>
12+
<release>17</release>
13+
</configuration>
14+
</plugin>
15+
<plugin>
16+
<groupId>org.openjfx</groupId>
17+
<artifactId>javafx-maven-plugin</artifactId>
18+
<version>0.0.8</version>
19+
<configuration>
20+
<mainClass>org.idaesbasic.Main</mainClass>
21+
</configuration>
22+
</plugin>
23+
</plugins>
24+
</build>
25+
<dependencies>
26+
<dependency>
27+
<groupId>org.openjfx</groupId>
28+
<artifactId>javafx-controls</artifactId>
29+
<version>17</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.openjfx</groupId>
33+
<artifactId>javafx-fxml</artifactId>
34+
<version>17</version>
35+
</dependency>
36+
</dependencies>
37+
</project>

src/main/java/org/idaesbasic/controllers/MainController.java

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919

2020
import org.idaesbasic.controllers.todolist.TodolistController;
2121

22-
import com.github.cliftonlabs.json_simple.JsonException;
23-
import com.github.cliftonlabs.json_simple.JsonObject;
24-
import com.github.cliftonlabs.json_simple.Jsoner;
25-
2622
import javafx.application.Platform;
2723
import javafx.event.ActionEvent;
2824
import javafx.fxml.FXML;
@@ -67,12 +63,12 @@ public class MainController {
6763

6864
@FXML
6965
void initialize() {
70-
try {
71-
loadProjectList();
72-
} catch (IOException | JsonException e1) {
73-
// TODO Auto-generated catch block
74-
e1.printStackTrace();
75-
}
66+
// try {
67+
// loadProjectList();
68+
// } catch (IOException | JsonException e1) {
69+
// // TODO Auto-generated catch block
70+
// e1.printStackTrace();
71+
// }
7672
// Set date from date button
7773
dateButton.setText(LocalDate.now().toString());
7874
Timer timer = new Timer();
@@ -372,36 +368,36 @@ void addViewToCurrentTab(Node view) {
372368
}
373369

374370
void saveProjectList() throws IOException {
375-
//Saves the registered projects in an json file
376-
//Create json
377-
JsonObject json = new JsonObject();
378-
json.put("registeredProjects", registered_projects);
379-
//Write json to file
380-
String userDirectoryPath = System.getProperty("user.home") + "/.ideasbasic";
381-
Path userDirectory = Paths.get(userDirectoryPath);
382-
if (!Files.exists(userDirectory)) {
383-
Files.createDirectory(userDirectory);
384-
}
385-
Path file = Paths.get(userDirectoryPath + "/config.json");
386-
if (!Files.exists(file)) {
387-
Files.createFile(file);
388-
}
389-
Files.writeString(file, json.toJson());
371+
// //Saves the registered projects in an json file
372+
// //Create json
373+
// JsonObject json = new JsonObject();
374+
// json.put("registeredProjects", registered_projects);
375+
// //Write json to file
376+
// String userDirectoryPath = System.getProperty("user.home") + "/.ideasbasic";
377+
// Path userDirectory = Paths.get(userDirectoryPath);
378+
// if (!Files.exists(userDirectory)) {
379+
// Files.createDirectory(userDirectory);
380+
// }
381+
// Path file = Paths.get(userDirectoryPath + "/config.json");
382+
// if (!Files.exists(file)) {
383+
// Files.createFile(file);
384+
// }
385+
// Files.writeString(file, json.toJson());
390386
}
391387

392-
void loadProjectList() throws IOException, JsonException {
388+
void loadProjectList() throws IOException {
393389
//Read the config.json file
394-
String userDirectoryPath = System.getProperty("user.home") + "/.ideasbasic";
395-
Path userDirectory = Paths.get(userDirectoryPath);
396-
if(Files.exists(userDirectory)) {
397-
Reader reader = Files.newBufferedReader(Paths.get(userDirectoryPath + "/config.json"));
398-
JsonObject parser = (JsonObject) Jsoner.deserialize(reader);
399-
//Get the registered projects from parser
400-
registered_projects = (List<String>) parser.get("registeredProjects");
401-
//Create the listmenu
402-
createProjectList();
403-
}
404-
390+
// String userDirectoryPath = System.getProperty("user.home") + "/.ideasbasic";
391+
// Path userDirectory = Paths.get(userDirectoryPath);
392+
// if(Files.exists(userDirectory)) {
393+
// Reader reader = Files.newBufferedReader(Paths.get(userDirectoryPath + "/config.json"));
394+
// JsonObject parser = (JsonObject) Jsoner.deserialize(reader);
395+
// //Get the registered projects from parser
396+
// registered_projects = (List<String>) parser.get("registeredProjects");
397+
// //Create the listmenu
398+
// createProjectList();
399+
// }
400+
//
405401
}
406402

407403
Tab get_current_tab() {

src/test/java/ainm/LibraryTest.java

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)