56: Add Nenjim Test Tool dummy to autostart
This commit is contained in:
@@ -7,6 +7,8 @@ import com.r35157.nenjim.composer.NenjimComposer;
|
||||
import com.r35157.nenjim.composer.impl.ref.NenjimComposerImpl;
|
||||
import com.r35157.nenjim.hubd.NenjimHub;
|
||||
import com.r35157.nenjim.hubd.journal.Journal;
|
||||
import com.r35157.nenjim.ntt.NenjimTestTool;
|
||||
import com.r35157.nenjim.ntt.impl.ref.NenjimTestToolImpl;
|
||||
import com.r35157.nenjim.npm.NenjimProcessManager;
|
||||
import com.r35157.nenjim.npm.impl.ref.NenjimProcessManagerImpl;
|
||||
import crypto.r35157.nenjim.NenjimProcess;
|
||||
@@ -54,6 +56,7 @@ public class NenjimHubImpl implements NenjimHub {
|
||||
startEvelynMissionControl();
|
||||
startNenjimComposer();
|
||||
startNenjimProcessManager();
|
||||
startNenjimTestTool();
|
||||
|
||||
// TODO: Old but more correct way to auto start plugins - but it is currently broken.
|
||||
/*
|
||||
@@ -174,6 +177,21 @@ public class NenjimHubImpl implements NenjimHub {
|
||||
|
||||
}
|
||||
|
||||
private void startNenjimTestTool() {
|
||||
Thread thread = new Thread(() -> {
|
||||
try {
|
||||
NenjimTestTool ntt = new NenjimTestToolImpl();
|
||||
ntt.start();
|
||||
} catch (Throwable throwable) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
}, "Nenjim Plugin - Nenjim Test Tool");
|
||||
|
||||
thread.setDaemon(false);
|
||||
thread.start();
|
||||
|
||||
}
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(NenjimHubImpl.class);
|
||||
private final CountDownLatch shutdownLatch = new CountDownLatch(1);
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.r35157.nenjim.ntt;
|
||||
|
||||
public interface NenjimTestTool {
|
||||
void start();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.r35157.nenjim.ntt.impl.ref;
|
||||
|
||||
import com.r35157.libs.javafx.JavaFxRuntime;
|
||||
import com.r35157.nenjim.ntt.NenjimTestTool;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public final class NenjimTestToolImpl implements NenjimTestTool {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
JavaFxRuntime.runLater(this::showWindow);
|
||||
}
|
||||
|
||||
private void showWindow() {
|
||||
Stage window = new Stage();
|
||||
window.setTitle("Nenjim Test Tool");
|
||||
window.show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user