Skip to content

Commit 202707a

Browse files
committed
updated debug logging.
1 parent 6ba260f commit 202707a

File tree

5 files changed

+53
-27
lines changed

5 files changed

+53
-27
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dependencies {
5858
compile 'org.controlsfx:controlsfx:8.40.13'
5959

6060
compile 'com.github.JavaSaBr:RlibFX:4.1.3'
61-
compile 'com.github.JavaSaBr:RLib:6.5.2'
61+
compile 'com.github.JavaSaBr:RLib:6.5.3'
6262
compile 'com.github.JavaSaBr:JME3-JFX:1.6.1'
6363

6464
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3

src/main/java/com/ss/editor/Editor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public void simpleInitApp() {
274274
final EditorConfig editorConfig = EditorConfig.getInstance();
275275
final OperatingSystem system = new OperatingSystem();
276276

277-
LOGGER.info(this, "OS: " + system.getDistribution());
277+
LOGGER.debug(this, "OS: " + system.getDistribution());
278278

279279
final AssetManager assetManager = getAssetManager();
280280
assetManager.registerLocator("", FolderAssetLocator.class);

src/main/java/com/ss/editor/config/CommandLineConfig.java

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,38 @@
88
public class CommandLineConfig {
99

1010
/**
11-
* Args.
12-
*
1311
* @param args the args
1412
*/
1513
public static void args(final String[] args) {
1614
for (final String arg : args) {
15+
16+
if (!arg.contains("=")) {
17+
continue;
18+
}
19+
20+
final String[] values = arg.split("=");
21+
if (values.length != 2) {
22+
continue;
23+
}
24+
25+
final String name = values[0];
26+
final String value = values[1];
27+
28+
if ("Dev.debug".equals(name)) {
29+
Config.DEV_DEBUG = Boolean.parseBoolean(value);
30+
} else if ("Dev.cameraDebug".equals(name)) {
31+
Config.DEV_CAMERA_DEBUG = Boolean.parseBoolean(value);
32+
} else if ("Dev.transformsDebug".equals(name)) {
33+
Config.DEV_TRANSFORMS_DEBUG = Boolean.parseBoolean(value);
34+
} else if ("Dev.jfxMouseInput".equals(name)) {
35+
Config.DEV_DEBUG_JFX_MOUSE_INPUT = Boolean.parseBoolean(value);
36+
} else if ("Dev.jfxKeyInput".equals(name)) {
37+
Config.DEV_DEBUG_JFX_KEY_INPUT = Boolean.parseBoolean(value);
38+
} else if ("Dev.debugJFX".equals(name)) {
39+
Config.DEV_DEBUG_JFX = Boolean.parseBoolean(value);
40+
} else if ("Graphics.enablePBR".equals(name)) {
41+
Config.ENABLE_PBR = Boolean.parseBoolean(value);
42+
}
1743
}
1844
}
1945
}

src/main/java/com/ss/editor/config/Config.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,39 +69,39 @@ public final class Config {
6969
public static final OperatingSystem OPERATING_SYSTEM;
7070

7171
/**
72-
* The flat to enable debug mode.
72+
* The flag to enable debug mode.
7373
*/
74-
public static final boolean DEV_DEBUG;
74+
public static boolean DEV_DEBUG;
7575

7676
/**
77-
* The flat to enable camera debug mode.
77+
* The flag to enable camera debug mode.
7878
*/
79-
public static final boolean DEV_CAMERA_DEBUG;
79+
public static boolean DEV_CAMERA_DEBUG;
8080

8181
/**
82-
* The flat to enable transformations debug mode.
82+
* The flag to enable transformations debug mode.
8383
*/
84-
public static final boolean DEV_TRANSFORMS_DEBUG;
84+
public static boolean DEV_TRANSFORMS_DEBUG;
8585

8686
/**
87-
* The flat to enable JavaFX debug mode.
87+
* The flag to enable JavaFX debug mode.
8888
*/
89-
public static final boolean DEV_DEBUG_JFX;
89+
public static boolean DEV_DEBUG_JFX;
9090

9191
/**
92-
* The flat to enable JavaFX mouse input debug mode.
92+
* The flag to enable JavaFX mouse input debug mode.
9393
*/
94-
public static final boolean DEV_DEBUG_JFX_MOUSE_INPUT;
94+
public static boolean DEV_DEBUG_JFX_MOUSE_INPUT;
9595

9696
/**
97-
* The flat to enable javaFX key input debug mode.
97+
* The flag to enable javaFX key input debug mode.
9898
*/
99-
public static final boolean DEV_DEBUG_JFX_KEY_INPUT;
99+
public static boolean DEV_DEBUG_JFX_KEY_INPUT;
100100

101101
/**
102-
* The flat to enable PBR render.
102+
* The flag to enable PBR render.
103103
*/
104-
public static final boolean ENABLE_PBR;
104+
public static boolean ENABLE_PBR;
105105

106106
static {
107107

src/main/java/com/ss/editor/manager/ExecutorManager.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private ExecutorManager() {
8888

8989
this.nextBackgroundTaskExecutor = new AtomicInteger(0);
9090

91-
LOGGER.info("initialized.");
91+
LOGGER.debug("initialized.");
9292
}
9393

9494
/**
@@ -137,32 +137,32 @@ public void addJMETask(@NotNull final Runnable task) {
137137
/**
138138
* @return the list of background tasks executors.
139139
*/
140-
@NotNull
141-
private EditorTaskExecutor[] getBackgroundTaskExecutors() {
140+
@FromAnyThread
141+
private @NotNull EditorTaskExecutor[] getBackgroundTaskExecutors() {
142142
return backgroundTaskExecutors;
143143
}
144144

145145
/**
146146
* @return the executor of javaFX tasks.
147147
*/
148-
@NotNull
149-
private EditorTaskExecutor getFxTaskExecutor() {
148+
@FromAnyThread
149+
private @NotNull EditorTaskExecutor getFxTaskExecutor() {
150150
return fxEditorTaskExecutor;
151151
}
152152

153153
/**
154154
* @return the index of a next background executor.
155155
*/
156-
@NotNull
157-
private AtomicInteger getNextBackgroundTaskExecutor() {
156+
@FromAnyThread
157+
private @NotNull AtomicInteger getNextBackgroundTaskExecutor() {
158158
return nextBackgroundTaskExecutor;
159159
}
160160

161161
/**
162162
* @return the executor of editor tasks.
163163
*/
164-
@NotNull
165-
private JMEThreadExecutor getJmeTasksExecutor() {
164+
@FromAnyThread
165+
private @NotNull JMEThreadExecutor getJmeTasksExecutor() {
166166
return jmeTasksExecutor;
167167
}
168168

0 commit comments

Comments
 (0)