57: Create an empty dummy Soda Task Manager bootstrap
This commit is contained in:
@@ -7,10 +7,12 @@ 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 com.r35157.nenjim.ntt.NenjimTestTool;
|
||||
import com.r35157.nenjim.ntt.impl.ref.NenjimTestToolImpl;
|
||||
import com.r35157.stm.SodaTaskManager;
|
||||
import com.r35157.stm.impl.ref.SodaTaskManagerImpl;
|
||||
import crypto.r35157.nenjim.NenjimProcess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -57,6 +59,7 @@ public class NenjimHubImpl implements NenjimHub {
|
||||
startNenjimComposer();
|
||||
startNenjimProcessManager();
|
||||
startNenjimTestTool();
|
||||
startSodaTaskManager();
|
||||
|
||||
// TODO: Old but more correct way to auto start plugins - but it is currently broken.
|
||||
/*
|
||||
@@ -192,6 +195,21 @@ public class NenjimHubImpl implements NenjimHub {
|
||||
|
||||
}
|
||||
|
||||
private void startSodaTaskManager() {
|
||||
Thread thread = new Thread(() -> {
|
||||
try {
|
||||
SodaTaskManager stm = new SodaTaskManagerImpl();
|
||||
stm.start();
|
||||
} catch (Throwable throwable) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
}, "Nenjim Plugin - Soda Task Manager");
|
||||
|
||||
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.stm;
|
||||
|
||||
public interface SodaTaskManager {
|
||||
void start();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.r35157.stm.impl.ref;
|
||||
|
||||
import com.r35157.libs.javafx.JavaFxRuntime;
|
||||
import com.r35157.stm.SodaTaskManager;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public final class SodaTaskManagerImpl implements SodaTaskManager {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
JavaFxRuntime.runLater(this::showWindow);
|
||||
}
|
||||
|
||||
private void showWindow() {
|
||||
Stage window = new Stage();
|
||||
window.setTitle("Soda Task Manager");
|
||||
window.show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user