Prefer connecting via JMX to process. New UI for show/refresh/hide

This commit is contained in:
aboyko
2024-04-02 10:31:23 -04:00
parent 88ae9318ed
commit eb3d46d400
28 changed files with 622 additions and 189 deletions

View File

@@ -17,6 +17,7 @@ public class Constants {
public static final String PLUGIN_ID = "org.springframework.tooling.boot.ls";
public static final String PREF_LIVE_INFORMATION_ALL_JVM_PROCESSES = "boot-java.live-information.all-local-java-processes";
public static final String PREF_LIVE_INFORMATION_FETCH_DATA_RETRY_MAX_NO = "boot-java.live-information.fetch-data.max-retries";
public static final String PREF_LIVE_INFORMATION_FETCH_DATA_RETRY_DELAY_IN_SECONDS = "boot-java.live-information.fetch-data.retry-delay-in-seconds";

View File

@@ -192,6 +192,7 @@ public class DelegatingStreamConnectionProvider implements StreamConnectionProvi
liveInformationFetchData.put("retry-delay-in-seconds", preferenceStore.getInt(Constants.PREF_LIVE_INFORMATION_FETCH_DATA_RETRY_DELAY_IN_SECONDS));
liveInformation.put("fetch-data", liveInformationFetchData);
liveInformation.put("all-local-java-processes", preferenceStore.getBoolean(Constants.PREF_LIVE_INFORMATION_ALL_JVM_PROCESSES));
supportXML.put("on", preferenceStore.getBoolean(Constants.PREF_SUPPORT_SPRING_XML_CONFIGS));
supportXML.put("scan-folders", preferenceStore.getString(Constants.PREF_XML_CONFIGS_SCAN_FOLDERS));

View File

@@ -53,13 +53,13 @@ public class LiveProcessCommandElement extends QuickAccessElement {
@Override
public String getLabel() {
if (COMMAND_REFRESH.equals(action)) {
return "Refresh Live Data for: " + label;
return "Refresh Live Data from: " + label;
}
else if (COMMAND_CONNECT.equals(action)) {
return "Show live data for: " + label;
return "Show Live Data from: " + label;
}
else if (COMMAND_DISCONNECT.equals(action)) {
return "Disconnect live data from: " + label;
return "Hide Live Data from: " + label;
}
else {
// error case

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023 VMware, Inc.
* Copyright (c) 2023, 2024 VMware, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -81,6 +81,7 @@ public class LiveInformationPreferencePage extends FieldEditorPreferencePage imp
Composite fieldEditorParent = getFieldEditorParent();
addField(new BooleanFieldEditor(Constants.PREF_LIVE_INFORMATION_ALL_JVM_PROCESSES, "Show all local JVM processes when connecting to Live Spring Boot App processes", fieldEditorParent));
addField(new StringFieldEditor(Constants.PREF_LIVE_INFORMATION_FETCH_DATA_RETRY_MAX_NO, "Live Information - Max number of retries (before giving up)", fieldEditorParent));
addField(new StringFieldEditor(Constants.PREF_LIVE_INFORMATION_FETCH_DATA_RETRY_DELAY_IN_SECONDS, "Live Information - Delay between retries in seconds", fieldEditorParent));

View File

@@ -62,6 +62,8 @@ public class PrefsInitializer extends AbstractPreferenceInitializer {
preferenceStore.setDefault(Constants.PREF_MODULITH, true);
preferenceStore.setDefault(Constants.PREF_LIVE_INFORMATION_ALL_JVM_PROCESSES, false);
}
}