code comments
This commit is contained in:
parent
a7f6fefc2f
commit
8237e2dab9
|
@ -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";
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue