Skip to content

Commit 9ac974c

Browse files
committed
Fixed #21 - convert project to maven; Fixed #20 - insert time later gui throws NullPointerException
1 parent b6cabe5 commit 9ac974c

35 files changed

+245
-122
lines changed

.classpath

+33-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry excluding="core/CreateMe.java|core/CurrentWork.java|userInterface/CopyOfUserInterfaceController.java|userInterface/Save.java" kind="src" path="src"/>
4-
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/controlsfx"/>
5-
<classpathentry combineaccessrules="false" kind="src" path="/_Tools"/>
6-
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/SQLite"/>
7-
<classpathentry combineaccessrules="false" kind="src" path="/JSON"/>
8-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
9-
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/GSON"/>
10-
<classpathentry kind="output" path="class"/>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
</attributes>
13+
</classpathentry>
14+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
15+
<attributes>
16+
<attribute name="optional" value="true"/>
17+
<attribute name="maven.pomderived" value="true"/>
18+
</attributes>
19+
</classpathentry>
20+
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
21+
<attributes>
22+
<attribute name="maven.pomderived" value="true"/>
23+
</attributes>
24+
</classpathentry>
25+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
26+
<attributes>
27+
<attribute name="maven.pomderived" value="true"/>
28+
</attributes>
29+
</classpathentry>
30+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
31+
<attributes>
32+
<attribute name="maven.pomderived" value="true"/>
33+
</attributes>
34+
</classpathentry>
35+
<classpathentry kind="output" path="target/classes"/>
1136
</classpath>

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
class/
1+
class/
2+
bin/
3+
target/
4+
5+
build/[0-9]*.[0-9]*.[0-9]*

.project

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>SmartTime-v5.0</name>
3+
<name>SmartTime</name>
44
<comment></comment>
55
<projects>
66
</projects>
@@ -11,13 +11,13 @@
1111
</arguments>
1212
</buildCommand>
1313
<buildCommand>
14-
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
1515
<arguments>
1616
</arguments>
1717
</buildCommand>
1818
</buildSpec>
1919
<natures>
20-
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
2120
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
2222
</natures>
2323
</projectDescription>

.settings/org.eclipse.jdt.core.prefs

+1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
99
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
1010
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
1111
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
1213
org.eclipse.jdt.core.compiler.source=1.8

.settings/org.eclipse.m2e.core.prefs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1

build.fxbuild

-8
This file was deleted.

pom.xml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>de.deadlocker8</groupId>
4+
<artifactId>SmartTime</artifactId>
5+
<version>5.2.0</version>
6+
<build>
7+
<plugins>
8+
<plugin>
9+
<groupId>org.apache.maven.plugins</groupId>
10+
<artifactId>maven-compiler-plugin</artifactId>
11+
<version>3.7.0</version>
12+
<configuration>
13+
<source>1.8</source>
14+
<target>1.8</target>
15+
</configuration>
16+
</plugin>
17+
<plugin>
18+
<artifactId>maven-assembly-plugin</artifactId>
19+
<configuration>
20+
<outputDirectory>build/${project.version}</outputDirectory>
21+
<finalName>SmartTime-v${project.version}</finalName>
22+
<appendAssemblyId>false</appendAssemblyId>
23+
<archive>
24+
<manifest>
25+
<mainClass>de.deadlocker8.smarttime.main.Main</mainClass>
26+
</manifest>
27+
</archive>
28+
<descriptorRefs>
29+
<descriptorRef>jar-with-dependencies</descriptorRef>
30+
</descriptorRefs>
31+
</configuration>
32+
<executions>
33+
<execution>
34+
<id>make-assembly</id> <!-- this is used for inheritance merges -->
35+
<phase>package</phase> <!-- bind to the packaging phase -->
36+
<goals>
37+
<goal>single</goal>
38+
</goals>
39+
</execution>
40+
</executions>
41+
</plugin>
42+
<!-- LAUNCH4J -->
43+
<plugin>
44+
<groupId>com.akathist.maven.plugins.launch4j</groupId>
45+
<artifactId>launch4j-maven-plugin</artifactId>
46+
<version>1.7.21</version>
47+
<executions>
48+
<execution>
49+
<id>l4j-clui</id>
50+
<phase>package</phase>
51+
<goals>
52+
<goal>launch4j</goal>
53+
</goals>
54+
<configuration>
55+
<headerType>gui</headerType>
56+
<jar>build/${project.version}/SmartTime-v${project.version}.jar</jar>
57+
<outfile>build/${project.version}/SmartTime-v${project.version}.exe</outfile>
58+
<downloadUrl>http://java.com/download</downloadUrl>
59+
<classPath>
60+
<mainClass>de.deadlocker8.smarttime.main.Main</mainClass>
61+
</classPath>
62+
<jre>
63+
<bundledJre64Bit>false</bundledJre64Bit>
64+
<bundledJreAsFallback>false</bundledJreAsFallback>
65+
<minVersion>1.8.0</minVersion>
66+
<jdkPreference>preferJre</jdkPreference>
67+
<runtimeBits>64/32</runtimeBits>
68+
</jre>
69+
<icon>build/Icon.ico</icon>
70+
</configuration>
71+
</execution>
72+
</executions>
73+
</plugin>
74+
</plugins>
75+
</build>
76+
77+
<dependencies>
78+
<dependency>
79+
<groupId>de.deadlocker8</groupId>
80+
<artifactId>tools</artifactId>
81+
<version>1.0.0</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>com.google.code.gson</groupId>
85+
<artifactId>gson</artifactId>
86+
<version>2.8.1</version>
87+
</dependency>
88+
<dependency>
89+
<groupId>org.xerial</groupId>
90+
<artifactId>sqlite-jdbc</artifactId>
91+
<version>3.21.0</version>
92+
</dependency>
93+
</dependencies>
94+
</project>

src/charts/BarChartGenerator.java renamed to src/main/java/de/deadlocker8/smarttime/charts/BarChartGenerator.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
package charts;
1+
package de.deadlocker8.smarttime.charts;
22

33
import java.util.ArrayList;
44
import java.util.Calendar;
55

6+
import de.deadlocker8.smarttime.core.LogObject;
7+
import de.deadlocker8.smarttime.core.SQL;
8+
import de.deadlocker8.smarttime.core.Utils;
69
import javafx.geometry.Point2D;
710
import javafx.scene.Node;
811
import javafx.event.*;
@@ -14,9 +17,6 @@
1417
import javafx.scene.chart.XYChart.Series;
1518
import javafx.scene.control.Tooltip;
1619
import javafx.scene.input.MouseEvent;
17-
import core.LogObject;
18-
import core.SQL;
19-
import core.Utils;
2020

2121
public class BarChartGenerator
2222
{

src/charts/ChartGUIController.java renamed to src/main/java/de/deadlocker8/smarttime/charts/ChartGUIController.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package charts;
1+
package de.deadlocker8.smarttime.charts;
22

33
import java.util.ArrayList;
44
import java.util.Collections;
55
import java.util.HashSet;
66

7-
import core.LogObject;
8-
import core.SQL;
9-
import core.Settings;
10-
import core.Utils;
7+
import de.deadlocker8.smarttime.core.LogObject;
8+
import de.deadlocker8.smarttime.core.SQL;
9+
import de.deadlocker8.smarttime.core.Settings;
10+
import de.deadlocker8.smarttime.core.Utils;
1111
import javafx.beans.value.ChangeListener;
1212
import javafx.beans.value.ObservableValue;
1313
import javafx.fxml.FXML;

src/charts/PieChartGenerator.java renamed to src/main/java/de/deadlocker8/smarttime/charts/PieChartGenerator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
package charts;
1+
package de.deadlocker8.smarttime.charts;
22

33
import java.util.ArrayList;
44
import java.util.HashSet;
55

6+
import de.deadlocker8.smarttime.core.LogObject;
7+
import de.deadlocker8.smarttime.core.SQL;
68
import javafx.collections.FXCollections;
79
import javafx.collections.ObservableList;
810
import javafx.event.EventHandler;
@@ -12,8 +14,6 @@
1214
import javafx.scene.control.Tooltip;
1315
import javafx.scene.input.MouseEvent;
1416
import tools.ConvertTo;
15-
import core.LogObject;
16-
import core.SQL;
1717

1818
public class PieChartGenerator
1919
{

src/charts/SummaryGenerator.java renamed to src/main/java/de/deadlocker8/smarttime/charts/SummaryGenerator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package charts;
1+
package de.deadlocker8.smarttime.charts;
22

33
import java.util.ArrayList;
44
import java.util.HashSet;
55

6-
import core.LogObject;
7-
import core.SQL;
6+
import de.deadlocker8.smarttime.core.LogObject;
7+
import de.deadlocker8.smarttime.core.SQL;
88
import javafx.geometry.Insets;
99
import javafx.geometry.Pos;
1010
import javafx.scene.control.Label;

src/userInterface/EditController.java renamed to src/main/java/de/deadlocker8/smarttime/controller/EditController.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package userInterface;
1+
package de.deadlocker8.smarttime.controller;
22

33
import java.util.ArrayList;
44
import java.util.Collections;
55
import java.util.Optional;
66

7-
import core.LogObject;
8-
import core.SQL;
9-
import core.Settings;
10-
import core.Utils;
7+
import de.deadlocker8.smarttime.core.LogObject;
8+
import de.deadlocker8.smarttime.core.SQL;
9+
import de.deadlocker8.smarttime.core.Settings;
10+
import de.deadlocker8.smarttime.core.Utils;
1111
import javafx.beans.value.ChangeListener;
1212
import javafx.beans.value.ObservableValue;
1313
import javafx.event.ActionEvent;

src/userInterface/InsertTimeController.java renamed to src/main/java/de/deadlocker8/smarttime/controller/InsertTimeController.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package userInterface;
1+
package de.deadlocker8.smarttime.controller;
22

33
import java.sql.Timestamp;
44
import java.text.DateFormat;
@@ -12,10 +12,10 @@
1212
import java.util.Collections;
1313
import java.util.Date;
1414

15-
import core.LogObject;
16-
import core.SQL;
17-
import core.Settings;
18-
import core.Utils;
15+
import de.deadlocker8.smarttime.core.LogObject;
16+
import de.deadlocker8.smarttime.core.SQL;
17+
import de.deadlocker8.smarttime.core.Settings;
18+
import de.deadlocker8.smarttime.core.Utils;
1919
import fontAwesome.FontIcon;
2020
import fontAwesome.FontIconType;
2121
import javafx.beans.value.ChangeListener;

src/userInterface/ProjektFensterController.java renamed to src/main/java/de/deadlocker8/smarttime/controller/ProjektFensterController.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package userInterface;
1+
package de.deadlocker8.smarttime.controller;
22

33
import java.util.ArrayList;
44
import java.util.Collections;
55

6-
import core.SQL;
7-
import core.Settings;
8-
import core.Utils;
6+
import de.deadlocker8.smarttime.core.SQL;
7+
import de.deadlocker8.smarttime.core.Settings;
8+
import de.deadlocker8.smarttime.core.Utils;
99
import javafx.beans.value.ChangeListener;
1010
import javafx.beans.value.ObservableValue;
1111
import javafx.event.ActionEvent;

src/userInterface/TimePickerController.java renamed to src/main/java/de/deadlocker8/smarttime/controller/TimePickerController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package userInterface;
1+
package de.deadlocker8.smarttime.controller;
22

33
import java.net.URL;
44
import java.util.ResourceBundle;

0 commit comments

Comments
 (0)