diff --git a/java_tools/ts_plugin/src/main/java/com/rusefi/ts_plugin/RemoteTab.java b/java_tools/ts_plugin/src/main/java/com/rusefi/ts_plugin/RemoteTab.java index 384dc59adf..8e048270b1 100644 --- a/java_tools/ts_plugin/src/main/java/com/rusefi/ts_plugin/RemoteTab.java +++ b/java_tools/ts_plugin/src/main/java/com/rusefi/ts_plugin/RemoteTab.java @@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicReference; import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; /** - * see RemoteTabSandbox + * @see RemoteTabSandbox */ public class RemoteTab { private static final String APPLICATION_PORT = "application_port"; diff --git a/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/PluginBodySandbox.java b/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/PluginBodySandbox.java index aa8dc15c1b..c7fdacc9be 100644 --- a/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/PluginBodySandbox.java +++ b/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/PluginBodySandbox.java @@ -14,7 +14,9 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; /** - * @see PluginLauncherSandbox + * Sandbox for plugin body + * + * @see PluginLauncherSandbox for plugin auto-update launcher */ public class PluginBodySandbox { diff --git a/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/RemoteTabSandbox.java b/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/RemoteTabSandbox.java index f2f8ee4b61..12facbfd40 100644 --- a/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/RemoteTabSandbox.java +++ b/java_tools/ts_plugin/src/test/java/com/rusefi/ts_plugin/RemoteTabSandbox.java @@ -2,6 +2,9 @@ package com.rusefi.ts_plugin; import com.rusefi.ui.util.FrameHelper; +/** + * @see PluginBodySandbox + */ public class RemoteTabSandbox { public static void main(String[] args) { new FrameHelper().showFrame(new RemoteTab().getContent()); diff --git a/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/PluginLauncherSandbox.java b/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/PluginLauncherSandbox.java index 7805fbca63..61f375c8bb 100644 --- a/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/PluginLauncherSandbox.java +++ b/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/PluginLauncherSandbox.java @@ -2,6 +2,9 @@ package com.rusefi.ts_plugin; import javax.swing.*; +/** + * Sandbox for {@link TsPluginLauncher} + */ public class PluginLauncherSandbox { public static void main(String[] args) { JFrame frame = new JFrame(); diff --git a/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/TsPluginLauncher.java b/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/TsPluginLauncher.java index 0f47aca0a2..c07cab8391 100644 --- a/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/TsPluginLauncher.java +++ b/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/TsPluginLauncher.java @@ -7,7 +7,12 @@ import org.putgemin.VerticalFlowLayout; import javax.swing.*; /** + * This class is the more permanent part of the plug, it's responsible for refreshing and launcher PluginEntry via reflections. + * which downloads the main more volatile UI part (PluginEntry) + * * by the way TS installs stuff into %user%\.efianalytics\TunerStudio\plugins folder + * @see PluginLauncherSandbox sandbox for this + * see PluginEntry */ public class TsPluginLauncher implements ApplicationPlugin { public static final int BUILD_VERSION = 3; diff --git a/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/Updater.java b/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/Updater.java index 3fdb229e5d..2a91be9391 100644 --- a/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/Updater.java +++ b/java_tools/ts_plugin_launcher/src/com/rusefi/ts_plugin/Updater.java @@ -20,9 +20,13 @@ import java.util.concurrent.atomic.AtomicInteger; import static com.rusefi.ts_plugin.TsPluginLauncher.VERSION; +/** + * Download fresh copy of {@link #PLUGIN_BODY_JAR} and launch {@link #PLUGIN_ENTRY_CLASS} via reflection. + */ public class Updater { + private static final String PLUGIN_ENTRY_CLASS = "com.rusefi.ts_plugin.PluginEntry"; private static final String PLUGIN_BODY_JAR = "rusefi_plugin_body.jar"; - public static final String LOCAL_JAR_FILE_NAME = FileUtil.RUSEFI_SETTINGS_FOLDER + File.separator + PLUGIN_BODY_JAR; + private static final String LOCAL_JAR_FILE_NAME = FileUtil.RUSEFI_SETTINGS_FOLDER + File.separator + PLUGIN_BODY_JAR; private static final String TITLE = "rusEFI plugin installer " + VERSION; private final JPanel content = new JPanel(new VerticalFlowLayout()); @@ -187,7 +191,7 @@ public class Updater { private static Class getPluginClass() throws MalformedURLException, ClassNotFoundException { URLClassLoader jarClassLoader = AutoupdateUtil.getClassLoaderByJar(LOCAL_JAR_FILE_NAME); - return Class.forName("com.rusefi.ts_plugin.PluginEntry", true, jarClassLoader); + return Class.forName(PLUGIN_ENTRY_CLASS, true, jarClassLoader); } private void replaceWith(TsPluginBody instance) {