From eb8f6afecddc9baf4ae7356cc1a1d3e994a886aa Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 26 Apr 2020 02:43:40 +0200 Subject: [PATCH] rename extensionserver to extensionhandler --- .../java/gearth/extensions/Extension.java | 4 +--- .../ExtensionHandler.java} | 16 +++++++-------- .../extensions/ExtensionListener.java | 2 +- .../extensions/GEarthExtension.java | 2 +- .../extensionproducers/ExtensionProducer.java | 2 +- .../ExtensionProducerFactory.java | 6 +++--- .../ExtensionProducerObserver.java | 7 +++++++ .../extensions/network/NetworkExtension.java | 9 ++------- .../network/NetworkExtensionInfo.java | 2 +- .../network/NetworkExtensionsProducer.java | 8 ++++---- .../network/authentication/Authenticator.java | 4 ++-- .../network/executer/ExecutionInfo.java | 2 +- .../network/executer/ExtensionRunner.java | 2 +- .../executer/ExtensionRunnerFactory.java | 2 +- .../executer/NormalExtensionRunner.java | 4 ++-- .../extensions/simple/ExampleExtension.java | 7 ++----- .../extensions/simple/README.md | 0 .../simple/SimpleExtensionProducer.java | 6 +++--- .../ExtensionProducerObserver.java | 8 -------- .../ui/extensions/ExtensionItemContainer.java | 10 +++++----- .../ExtensionItemContainerProducer.java | 3 +-- .../java/gearth/ui/extensions/Extensions.java | 20 +++++++++---------- 22 files changed, 56 insertions(+), 70 deletions(-) rename G-Earth/src/main/java/gearth/services/{extensionserver/ExtensionServer.java => extensionhandler/ExtensionHandler.java} (93%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/ExtensionListener.java (88%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/GEarthExtension.java (98%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/extensionproducers/ExtensionProducer.java (58%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/extensionproducers/ExtensionProducerFactory.java (62%) create mode 100644 G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducerObserver.java rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/NetworkExtension.java (95%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/NetworkExtensionInfo.java (99%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/NetworkExtensionsProducer.java (90%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/authentication/Authenticator.java (95%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/executer/ExecutionInfo.java (96%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/executer/ExtensionRunner.java (82%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/executer/ExtensionRunnerFactory.java (81%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/network/executer/NormalExtensionRunner.java (97%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/simple/ExampleExtension.java (94%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/simple/README.md (100%) rename G-Earth/src/main/java/gearth/services/{extensionserver => extensionhandler}/extensions/simple/SimpleExtensionProducer.java (56%) delete mode 100644 G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducerObserver.java diff --git a/G-Earth/src/main/java/gearth/extensions/Extension.java b/G-Earth/src/main/java/gearth/extensions/Extension.java index 5376f5a..4eddf0d 100644 --- a/G-Earth/src/main/java/gearth/extensions/Extension.java +++ b/G-Earth/src/main/java/gearth/extensions/Extension.java @@ -2,9 +2,7 @@ package gearth.extensions; import gearth.protocol.HMessage; import gearth.protocol.HPacket; -import gearth.services.extensionserver.ExtensionServer; -import gearth.services.extensionserver.extensions.network.NetworkExtensionInfo; -import gearth.ui.extensions.Extensions; +import gearth.services.extensionhandler.extensions.network.NetworkExtensionInfo; import java.io.*; import java.net.Socket; diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/ExtensionServer.java b/G-Earth/src/main/java/gearth/services/extensionhandler/ExtensionHandler.java similarity index 93% rename from G-Earth/src/main/java/gearth/services/extensionserver/ExtensionServer.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/ExtensionHandler.java index 1e3d2ab..cce13e7 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/ExtensionServer.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/ExtensionHandler.java @@ -1,26 +1,26 @@ -package gearth.services.extensionserver; +package gearth.services.extensionhandler; import gearth.Main; import gearth.misc.harble_api.HarbleAPIFetcher; import gearth.protocol.HConnection; import gearth.protocol.HMessage; import gearth.protocol.HPacket; -import gearth.services.extensionserver.extensions.ExtensionListener; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducer; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducerFactory; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducerObserver; -import gearth.services.extensionserver.extensions.GEarthExtension; +import gearth.services.extensionhandler.extensions.ExtensionListener; +import gearth.services.extensionhandler.extensions.extensionproducers.ExtensionProducer; +import gearth.services.extensionhandler.extensions.extensionproducers.ExtensionProducerFactory; +import gearth.services.extensionhandler.extensions.extensionproducers.ExtensionProducerObserver; +import gearth.services.extensionhandler.extensions.GEarthExtension; import java.util.*; -public class ExtensionServer { +public class ExtensionHandler { private final List gEarthExtensions = new ArrayList<>(); private final HConnection hConnection; private List extensionProducers; - public ExtensionServer(HConnection hConnection) { + public ExtensionHandler(HConnection hConnection) { this.hConnection = hConnection; initialize(); } diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/ExtensionListener.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/ExtensionListener.java similarity index 88% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/ExtensionListener.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/ExtensionListener.java index 60bf0c5..f7120ca 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/ExtensionListener.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/ExtensionListener.java @@ -1,4 +1,4 @@ -package gearth.services.extensionserver.extensions; +package gearth.services.extensionhandler.extensions; import gearth.protocol.HMessage; import gearth.protocol.HPacket; diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/GEarthExtension.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/GEarthExtension.java similarity index 98% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/GEarthExtension.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/GEarthExtension.java index 3f7ecdf..3765a1d 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/GEarthExtension.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/GEarthExtension.java @@ -1,4 +1,4 @@ -package gearth.services.extensionserver.extensions; +package gearth.services.extensionhandler.extensions; import gearth.protocol.HMessage; import gearth.protocol.HPacket; diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducer.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducer.java similarity index 58% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducer.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducer.java index 92702ba..4f4902d 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducer.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducer.java @@ -1,4 +1,4 @@ -package gearth.services.extensionserver.extensions.extensionproducers; +package gearth.services.extensionhandler.extensions.extensionproducers; public interface ExtensionProducer { diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducerFactory.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducerFactory.java similarity index 62% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducerFactory.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducerFactory.java index df222d8..9b65d02 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducerFactory.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducerFactory.java @@ -1,7 +1,7 @@ -package gearth.services.extensionserver.extensions.extensionproducers; +package gearth.services.extensionhandler.extensions.extensionproducers; -import gearth.services.extensionserver.extensions.network.NetworkExtensionsProducer; -import gearth.services.extensionserver.extensions.simple.SimpleExtensionProducer; +import gearth.services.extensionhandler.extensions.network.NetworkExtensionsProducer; +import gearth.services.extensionhandler.extensions.simple.SimpleExtensionProducer; import java.util.Arrays; import java.util.List; diff --git a/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducerObserver.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducerObserver.java new file mode 100644 index 0000000..18a6a18 --- /dev/null +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/extensionproducers/ExtensionProducerObserver.java @@ -0,0 +1,7 @@ +package gearth.services.extensionhandler.extensions.extensionproducers; + +import gearth.services.extensionhandler.extensions.GEarthExtension; + +public interface ExtensionProducerObserver { + void onExtensionConnect(GEarthExtension extension); +} diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtension.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtension.java similarity index 95% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtension.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtension.java index b5ba05f..c5ec4b8 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtension.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtension.java @@ -1,18 +1,13 @@ -package gearth.services.extensionserver.extensions.network; +package gearth.services.extensionhandler.extensions.network; -import gearth.Main; import gearth.protocol.HMessage; -import gearth.services.extensionserver.extensions.GEarthExtension; -import javafx.beans.InvalidationListener; +import gearth.services.extensionhandler.extensions.GEarthExtension; import gearth.protocol.HPacket; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; -import gearth.services.extensionserver.extensions.network.authentication.Authenticator; import java.net.Socket; -import java.util.ArrayList; -import java.util.List; /** * Created by Jonas on 21/06/18. diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtensionInfo.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtensionInfo.java similarity index 99% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtensionInfo.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtensionInfo.java index 9c99cb8..8f45e81 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtensionInfo.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtensionInfo.java @@ -1,4 +1,4 @@ -package gearth.services.extensionserver.extensions.network; +package gearth.services.extensionhandler.extensions.network; public class NetworkExtensionInfo { diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtensionsProducer.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtensionsProducer.java similarity index 90% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtensionsProducer.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtensionsProducer.java index 23c594d..0cddc5a 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/NetworkExtensionsProducer.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/NetworkExtensionsProducer.java @@ -1,9 +1,9 @@ -package gearth.services.extensionserver.extensions.network; +package gearth.services.extensionhandler.extensions.network; import gearth.protocol.HPacket; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducer; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducerObserver; -import gearth.services.extensionserver.extensions.network.authentication.Authenticator; +import gearth.services.extensionhandler.extensions.extensionproducers.ExtensionProducer; +import gearth.services.extensionhandler.extensions.extensionproducers.ExtensionProducerObserver; +import gearth.services.extensionhandler.extensions.network.authentication.Authenticator; import java.io.DataInputStream; import java.io.IOException; diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/authentication/Authenticator.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/authentication/Authenticator.java similarity index 95% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/authentication/Authenticator.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/authentication/Authenticator.java index 302b6a8..7c2c299 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/authentication/Authenticator.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/authentication/Authenticator.java @@ -1,7 +1,7 @@ -package gearth.services.extensionserver.extensions.network.authentication; +package gearth.services.extensionhandler.extensions.network.authentication; import gearth.misc.ConfirmationDialog; -import gearth.services.extensionserver.extensions.network.NetworkExtension; +import gearth.services.extensionhandler.extensions.network.NetworkExtension; import javafx.application.Platform; import javafx.scene.control.Alert; import javafx.scene.control.ButtonType; diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExecutionInfo.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExecutionInfo.java similarity index 96% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExecutionInfo.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExecutionInfo.java index 0effac4..d77df81 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExecutionInfo.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExecutionInfo.java @@ -1,4 +1,4 @@ -package gearth.services.extensionserver.extensions.network.executer; +package gearth.services.extensionhandler.extensions.network.executer; import java.util.ArrayList; import java.util.HashMap; diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExtensionRunner.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExtensionRunner.java similarity index 82% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExtensionRunner.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExtensionRunner.java index f864684..95f5a7d 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExtensionRunner.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExtensionRunner.java @@ -1,4 +1,4 @@ -package gearth.services.extensionserver.extensions.network.executer; +package gearth.services.extensionhandler.extensions.network.executer; /** * Created by Jonas on 21/09/18. diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExtensionRunnerFactory.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExtensionRunnerFactory.java similarity index 81% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExtensionRunnerFactory.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExtensionRunnerFactory.java index 2717b44..429e4be 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/ExtensionRunnerFactory.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/ExtensionRunnerFactory.java @@ -1,4 +1,4 @@ -package gearth.services.extensionserver.extensions.network.executer; +package gearth.services.extensionhandler.extensions.network.executer; /** * Created by Jonas on 22/09/18. diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/NormalExtensionRunner.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/NormalExtensionRunner.java similarity index 97% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/NormalExtensionRunner.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/NormalExtensionRunner.java index 5309b44..4dc7740 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/network/executer/NormalExtensionRunner.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/network/executer/NormalExtensionRunner.java @@ -1,7 +1,7 @@ -package gearth.services.extensionserver.extensions.network.executer; +package gearth.services.extensionhandler.extensions.network.executer; import gearth.Main; -import gearth.services.extensionserver.extensions.network.authentication.Authenticator; +import gearth.services.extensionhandler.extensions.network.authentication.Authenticator; import java.io.BufferedReader; import java.io.File; diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/ExampleExtension.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/ExampleExtension.java similarity index 94% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/ExampleExtension.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/ExampleExtension.java index d02be61..8b01404 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/ExampleExtension.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/ExampleExtension.java @@ -1,10 +1,7 @@ -package gearth.services.extensionserver.extensions.simple; +package gearth.services.extensionhandler.extensions.simple; import gearth.protocol.HMessage; -import gearth.protocol.HPacket; -import gearth.services.extensionserver.extensions.GEarthExtension; - -import java.util.Arrays; +import gearth.services.extensionhandler.extensions.GEarthExtension; public class ExampleExtension extends GEarthExtension { @Override diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/README.md b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/README.md similarity index 100% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/README.md rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/README.md diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/SimpleExtensionProducer.java b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/SimpleExtensionProducer.java similarity index 56% rename from G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/SimpleExtensionProducer.java rename to G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/SimpleExtensionProducer.java index fbf9a7c..3317379 100644 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/simple/SimpleExtensionProducer.java +++ b/G-Earth/src/main/java/gearth/services/extensionhandler/extensions/simple/SimpleExtensionProducer.java @@ -1,7 +1,7 @@ -package gearth.services.extensionserver.extensions.simple; +package gearth.services.extensionhandler.extensions.simple; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducer; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducerObserver; +import gearth.services.extensionhandler.extensions.extensionproducers.ExtensionProducer; +import gearth.services.extensionhandler.extensions.extensionproducers.ExtensionProducerObserver; public class SimpleExtensionProducer implements ExtensionProducer { diff --git a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducerObserver.java b/G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducerObserver.java deleted file mode 100644 index 1e0e243..0000000 --- a/G-Earth/src/main/java/gearth/services/extensionserver/extensions/extensionproducers/ExtensionProducerObserver.java +++ /dev/null @@ -1,8 +0,0 @@ -package gearth.services.extensionserver.extensions.extensionproducers; - -import gearth.services.extensionserver.extensions.GEarthExtension; -import gearth.services.extensionserver.extensions.network.NetworkExtension; - -public interface ExtensionProducerObserver { - void onExtensionConnect(GEarthExtension extension); -} diff --git a/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainer.java b/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainer.java index e84e7e9..ca4fef7 100644 --- a/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainer.java +++ b/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainer.java @@ -1,6 +1,6 @@ package gearth.ui.extensions; -import gearth.services.extensionserver.extensions.GEarthExtension; +import gearth.services.extensionhandler.extensions.GEarthExtension; import javafx.application.Platform; import javafx.event.EventHandler; import javafx.geometry.Insets; @@ -12,10 +12,10 @@ import javafx.scene.paint.Paint; import javafx.scene.text.Font; import gearth.misc.ConfirmationDialog; import gearth.ui.buttons.*; -import gearth.services.extensionserver.extensions.network.executer.ExecutionInfo; -import gearth.services.extensionserver.extensions.network.executer.ExtensionRunner; -import gearth.services.extensionserver.extensions.network.executer.ExtensionRunnerFactory; -import gearth.services.extensionserver.extensions.network.executer.NormalExtensionRunner; +import gearth.services.extensionhandler.extensions.network.executer.ExecutionInfo; +import gearth.services.extensionhandler.extensions.network.executer.ExtensionRunner; +import gearth.services.extensionhandler.extensions.network.executer.ExtensionRunnerFactory; +import gearth.services.extensionhandler.extensions.network.executer.NormalExtensionRunner; import java.nio.file.Paths; diff --git a/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainerProducer.java b/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainerProducer.java index 636f915..3ce3ba0 100644 --- a/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainerProducer.java +++ b/G-Earth/src/main/java/gearth/ui/extensions/ExtensionItemContainerProducer.java @@ -1,7 +1,6 @@ package gearth.ui.extensions; -import gearth.services.extensionserver.extensions.GEarthExtension; -import gearth.services.extensionserver.extensions.network.NetworkExtension; +import gearth.services.extensionhandler.extensions.GEarthExtension; import javafx.scene.Node; import javafx.scene.control.ScrollPane; import javafx.scene.layout.VBox; diff --git a/G-Earth/src/main/java/gearth/ui/extensions/Extensions.java b/G-Earth/src/main/java/gearth/ui/extensions/Extensions.java index 47c9af8..2aabfb0 100644 --- a/G-Earth/src/main/java/gearth/ui/extensions/Extensions.java +++ b/G-Earth/src/main/java/gearth/ui/extensions/Extensions.java @@ -1,11 +1,10 @@ package gearth.ui.extensions; -import gearth.services.extensionserver.ExtensionServer; -import gearth.services.extensionserver.extensions.extensionproducers.ExtensionProducer; -import gearth.services.extensionserver.extensions.network.NetworkExtensionsProducer; -import gearth.services.extensionserver.extensions.network.executer.ExecutionInfo; -import gearth.services.extensionserver.extensions.network.executer.ExtensionRunner; -import gearth.services.extensionserver.extensions.network.executer.ExtensionRunnerFactory; +import gearth.services.extensionhandler.ExtensionHandler; +import gearth.services.extensionhandler.extensions.network.NetworkExtensionsProducer; +import gearth.services.extensionhandler.extensions.network.executer.ExecutionInfo; +import gearth.services.extensionhandler.extensions.network.executer.ExtensionRunner; +import gearth.services.extensionhandler.extensions.network.executer.ExtensionRunnerFactory; import gearth.ui.SubForm; import javafx.application.Platform; import javafx.event.ActionEvent; @@ -17,7 +16,6 @@ import javafx.scene.layout.VBox; import javafx.stage.FileChooser; import java.io.File; -import java.util.function.Predicate; /** * Created by Jonas on 06/04/18. @@ -34,7 +32,7 @@ public class Extensions extends SubForm { public ScrollPane scroller; private ExtensionRunner extensionRunner = null; - private ExtensionServer extensionServer; + private ExtensionHandler extensionHandler; private NetworkExtensionsProducer networkExtensionsProducer; // needed for port @@ -44,14 +42,14 @@ public class Extensions extends SubForm { protected void onParentSet() { ExtensionItemContainerProducer producer = new ExtensionItemContainerProducer(extensioncontainer, scroller); - extensionServer = new ExtensionServer(getHConnection()); - extensionServer.onExtensionConnected((e -> { + extensionHandler = new ExtensionHandler(getHConnection()); + extensionHandler.onExtensionConnected((e -> { Platform.runLater(() -> producer.extensionConnected(e)); })); //noinspection OptionalGetWithoutIsPresent networkExtensionsProducer - = (NetworkExtensionsProducer) extensionServer.getExtensionProducers().stream() + = (NetworkExtensionsProducer) extensionHandler.getExtensionProducers().stream() .filter(producer1 -> producer1 instanceof NetworkExtensionsProducer) .findFirst().get();