Respect actuator on classpath. Launch config attr for auto-connect
This commit is contained in:
@@ -134,6 +134,9 @@ public class BootLaunchConfigurationDelegate extends AbstractBootLaunchConfigura
|
||||
|
||||
public static final String SPRING_PROJECT_NAME_ATTRIBUTE = "spring.boot.project.name";
|
||||
|
||||
public static final String AUTO_CONNECT = "spring.boot.auto-connect";
|
||||
public static final boolean DEFAULT_AUTO_CONNECT = true;
|
||||
|
||||
// Preference for Eclipse ANSI Console support.
|
||||
// See org.eclipse.ui.internal.console.ansi.preferences.AnsiConsolePreferenceConstants
|
||||
// Because this class is only available in Eclipse 4.25 and higher, we cannot add a
|
||||
@@ -363,6 +366,7 @@ public class BootLaunchConfigurationDelegate extends AbstractBootLaunchConfigura
|
||||
setMainType(wc, mainType);
|
||||
}
|
||||
setEnableJMX(wc, DEFAULT_ENABLE_JMX);
|
||||
setAutoConnect(wc, false);
|
||||
setEnableLiveBeanSupport(wc, DEFAULT_ENABLE_LIVE_BEAN_SUPPORT());
|
||||
setEnableLifeCycle(wc, DEFAULT_ENABLE_LIFE_CYCLE);
|
||||
setTerminationTimeout(wc,""+DEFAULT_TERMINATION_TIMEOUT);
|
||||
@@ -442,6 +446,19 @@ public class BootLaunchConfigurationDelegate extends AbstractBootLaunchConfigura
|
||||
return "";
|
||||
}
|
||||
|
||||
public static boolean getAutoConnect(ILaunchConfiguration conf) {
|
||||
try {
|
||||
return conf.getAttribute(AUTO_CONNECT, DEFAULT_AUTO_CONNECT);
|
||||
} catch (CoreException e) {
|
||||
Log.log(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void setAutoConnect(ILaunchConfigurationWorkingCopy conf, boolean autoConnect) {
|
||||
conf.setAttribute(AUTO_CONNECT, autoConnect);
|
||||
}
|
||||
|
||||
public static void setEnableLiveBeanSupport(ILaunchConfigurationWorkingCopy conf, boolean value) {
|
||||
conf.setAttribute(ENABLE_LIVE_BEAN_SUPPORT, value);
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ public class BootLaunchUIModel {
|
||||
public final LaunchTabSelectionModel<Boolean> enableDebug;
|
||||
public final EnableJmxFeaturesModel enableJmx;
|
||||
public final LaunchTabSelectionModel<Boolean> hideFromDash;
|
||||
public final LaunchTabSelectionModel<Boolean> autoConnect;
|
||||
public final LaunchTabSelectionModel<Boolean> ansiConsoleOutput;
|
||||
public final LaunchTabSelectionModel<Boolean> fastStartup;
|
||||
public final LaunchTabSelectionModel<Boolean> useThinWrapper;
|
||||
@@ -82,6 +83,7 @@ public class BootLaunchUIModel {
|
||||
enableDebug = CheckboxLaunchTabModel.create(ENABLE_DEBUG_OUTPUT, DEFAULT_ENABLE_DEBUG_OUTPUT);
|
||||
enableJmx = new EnableJmxFeaturesModel();
|
||||
hideFromDash = CheckboxLaunchTabModel.create(HIDE_FROM_BOOT_DASH, DEFAULT_HIDE_FROM_BOOT_DASH);
|
||||
autoConnect = CheckboxLaunchTabModel.create(AUTO_CONNECT, DEFAULT_AUTO_CONNECT);
|
||||
ansiConsoleOutput = CheckboxLaunchTabModel.create(ANSI_CONSOLE_OUTPUT, BootLaunchConfigurationDelegate.supportsAnsiConsoleOutput());
|
||||
fastStartup = CheckboxLaunchTabModel.create(FAST_STARTUP, BootActivator.getDefault().getPreferenceStore()
|
||||
.getBoolean(BootPreferences.PREF_BOOT_FAST_STARTUP_DEFAULT));
|
||||
|
||||
@@ -54,6 +54,7 @@ public class BootMainTab extends LaunchConfigurationTabWithSections implements I
|
||||
jvmArgsSections.add(new EnableDebugSection(this, model.enableDebug));
|
||||
jvmArgsSections.add(new HideFromBootDashSection(this, model.hideFromDash));
|
||||
jvmArgsSections.add(new FastStartupLaunchTabSection(this, model.fastStartup));
|
||||
jvmArgsSections.add(new DelegatingLaunchConfigurationTabSection(this, model.autoConnect, new CheckboxSection(this, model.autoConnect, "Auto-connect to fetch Live Data")));
|
||||
/*
|
||||
* Show UI for enabling/disabling ANSI console output only if
|
||||
* IDE supports ANSI console output
|
||||
|
||||
Reference in New Issue
Block a user