Skip to content

Commit 51491f5

Browse files
committed
Remove legacy Spring Boot CLI support and Spring Cloud CLI
Signed-off-by: ab003976 <alex.boyko@broadcom.com>
1 parent 2abb2bd commit 51491f5

49 files changed

Lines changed: 53 additions & 4794 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash.test/src/org/springframework/ide/eclipse/boot/dash/test/BootDashModelTest.java‎

Lines changed: 20 additions & 221 deletions
Large diffs are not rendered by default.

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash.test/src/org/springframework/ide/eclipse/boot/dash/test/BootDashViewModelHarness.java‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2016 Pivotal, Inc.
2+
* Copyright (c) 2015, 2026 Pivotal, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -143,10 +143,6 @@ public void reload() throws Exception {
143143
// return privateProperties;
144144
// }
145145
//
146-
// @Override
147-
// public BootInstallManager getBootInstallManager() {
148-
// return bootI
149-
// }
150146
// }
151147

152148
public BootDashModel getRunTargetModel(RunTargetType type) {
@@ -253,7 +249,6 @@ public void assertLabelContains(String expectSnippet, Color expectedColor, Gener
253249
fail("Snippet found but not the right color");
254250
}
255251

256-
257252
public StyledString getStyledLabel(Object element) {
258253
Stylers stylers = new Stylers(null);
259254
try (BootDashLabels labels = new BootDashLabels(context.injections, stylers)) {
@@ -329,5 +324,4 @@ public BootProjectDashElement waitForElement(long timeout, IProject project) thr
329324
return waitForCallable("Element for project "+project.getName(), timeout, () -> getElementFor(project));
330325
}
331326

332-
333327
}

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash.test/src/org/springframework/ide/eclipse/boot/dash/test/TestBootDashModelContext.java‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2016 Pivotal Software, Inc.
2+
* Copyright (c) 2015, 2026 Pivotal Software, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@
2323
import org.eclipse.core.runtime.Path;
2424
import org.eclipse.debug.core.ILaunchManager;
2525
import org.springframework.ide.eclipse.boot.core.BootPreferences;
26-
import org.springframework.ide.eclipse.boot.core.cli.BootInstallManager;
2726
import org.springframework.ide.eclipse.boot.dash.api.RunTargetType;
2827
import org.springframework.ide.eclipse.boot.dash.console.CloudAppLogManager;
2928
import org.springframework.ide.eclipse.boot.dash.di.SimpleDIContext;
@@ -44,7 +43,6 @@
4443
public class TestBootDashModelContext extends BootDashModelContext {
4544

4645
private File stateLoc;
47-
private File installLoc;
4846
private ILaunchManager launchManager;
4947
private IWorkspace workspace;
5048
SecuredCredentialsStore secureStore = new MockSecuredCredentialStore();
@@ -53,16 +51,13 @@ public class TestBootDashModelContext extends BootDashModelContext {
5351
private LiveVariable<Pattern> bootProjectExclusion = new LiveVariable<>(BootPreferences.DEFAULT_BOOT_PROJECT_EXCLUDE);
5452
private IPropertyStore viewProperties = new InMemoryPropertyStore();
5553
private IPropertyStore privateProperties = new InMemoryPropertyStore();
56-
private IPropertyStore installProperties = new InMemoryPropertyStore();
57-
private BootInstallManager bootInstalls;
5854

5955
public TestBootDashModelContext(IWorkspace workspace, ILaunchManager launchMamager) {
6056
super(createInjections());
6157
try {
6258
this.workspace = workspace;
6359
this.launchManager = launchMamager;
6460
stateLoc = StsTestUtil.createTempDirectory("plugin-state", null);
65-
installLoc = StsTestUtil.createTempDirectory("boot-installs", null);
6661
this.projectProperties = new MockScopedPropertyStore<>();
6762
this.runTargetProperties = new MockScopedPropertyStore<>();
6863
reload();
@@ -131,17 +126,11 @@ public IPropertyStore getPrivatePropertyStore() {
131126
return privateProperties;
132127
}
133128

134-
@Override
135-
public BootInstallManager getBootInstallManager() {
136-
return bootInstalls;
137-
}
138-
139129
/**
140130
* Simulates reloading
141131
* @return
142132
*/
143133
public TestBootDashModelContext reload() throws Exception {
144-
this.bootInstalls = new BootInstallManager(installLoc, installProperties);
145134
injections.reload();
146135
return this;
147136
}

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash.test/src/org/springframework/ide/eclipse/boot/dash/test/ToggleFiltersModelTest.java‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2017 Pivotal, Inc.
2+
* Copyright (c) 2015, 2026 Pivotal, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -38,7 +38,7 @@ public class ToggleFiltersModelTest {
3838

3939
private static final String HIDE_NON_WORKSPACE_ELEMENTS = "Hide non-workspace elements";
4040
private static final String HIDE_SOLITARY_CONF = "Hide solitary launch configs";
41-
private static final String HIDE_LOCAL_SERVICES = "Hide local cloud services";
41+
private static final String HIDE_NOT_RUNNABLE_APPS = "Hide local non-runnable apps";
4242

4343
private InMemoryPropertyStore propertyStore = new InMemoryPropertyStore();
4444

@@ -49,11 +49,23 @@ public void testAvailableFilters() throws Exception {
4949
arrayContaining(
5050
hasToString("FilterChoice("+HIDE_NON_WORKSPACE_ELEMENTS+")"),
5151
hasToString("FilterChoice("+HIDE_SOLITARY_CONF+")"),
52-
hasToString("FilterChoice("+HIDE_LOCAL_SERVICES+")")
52+
hasToString("FilterChoice("+HIDE_NOT_RUNNABLE_APPS+")")
5353
)
5454
);
5555
}
5656

57+
@Test
58+
public void testRemovedLocalServicesFilterIsIgnored() throws Exception {
59+
propertyStore.put("hide.local-cloud-services", "true");
60+
propertyStore.put(ToggleFiltersModel.FILTER_CHOICE_HIDE_NON_WORKSPACE_ELEMENTS.getId(), "true");
61+
62+
ToggleFiltersModel model = new ToggleFiltersModel(propertyStore);
63+
64+
assertEquals(ImmutableSet.of(
65+
ToggleFiltersModel.FILTER_CHOICE_HIDE_SOLITARY_CONFS,
66+
ToggleFiltersModel.FILTER_CHOICE_HIDE_NON_WORKSPACE_ELEMENTS), model.getSelectedFilters().getValues());
67+
}
68+
5769
@Test
5870
public void testHideNonWorkspaceElementsToleratesNull() throws Exception {
5971
//Case: element == null
@@ -152,18 +164,17 @@ public void testToggleFiltersPersistAndRestore() throws Exception {
152164

153165
FilterChoice nonWorkspace = getFilter(model, HIDE_NON_WORKSPACE_ELEMENTS);
154166
FilterChoice solitaryConf = getFilter(model, HIDE_SOLITARY_CONF);
155-
FilterChoice localService = getFilter(model, HIDE_LOCAL_SERVICES);
156167

157168
//initially the defaults should be set.
158-
assertEquals(ImmutableSet.of(solitaryConf, localService), model.getSelectedFilters().getValues());
169+
assertEquals(ImmutableSet.of(solitaryConf), model.getSelectedFilters().getValues());
159170

160171
model.getSelectedFilters().remove(solitaryConf);
161172
model.getSelectedFilters().add(nonWorkspace);
162173

163174
//Simulate model reload (i.e. just instantiate it with the same property store).
164175
model = new ToggleFiltersModel(propertyStore);
165176

166-
assertEquals(ImmutableSet.of(nonWorkspace, localService), model.getSelectedFilters().getValues());
177+
assertEquals(ImmutableSet.of(nonWorkspace), model.getSelectedFilters().getValues());
167178
}
168179

169180
private Filter<BootDashElement> getFilter(String withLabel) {

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash/META-INF/MANIFEST.MF‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ Export-Package: org.springframework.ide.eclipse.boot.dash,
6565
org.springframework.ide.eclipse.boot.dash.model,
6666
org.springframework.ide.eclipse.boot.dash.model.actuator,
6767
org.springframework.ide.eclipse.boot.dash.model.actuator.env,
68-
org.springframework.ide.eclipse.boot.dash.model.local,
6968
org.springframework.ide.eclipse.boot.dash.model.remote,
7069
org.springframework.ide.eclipse.boot.dash.model.runtargettypes,
7170
org.springframework.ide.eclipse.boot.dash.util,

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash/plugin.xml‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,6 @@
117117
type="org.springframework.ide.eclipse.boot.dash.model.BootProjectDashElement">
118118
</input>
119119
</propertySection>
120-
<propertySection
121-
class="org.springframework.ide.eclipse.boot.dash.views.properties.LocalCloudServiceGeneralPropertiesSection"
122-
id="org.springframework.ide.eclipse.boot.dash.section.LocalCloudServiceGeneral"
123-
tab="org.springframework.ide.eclipse.boot.dash.tab.General">
124-
<input
125-
type="org.springframework.ide.eclipse.boot.dash.model.LocalCloudServiceDashElement">
126-
</input>
127-
</propertySection>
128120
<propertySection
129121
class="org.springframework.ide.eclipse.boot.dash.views.properties.BeansPropertiesSection"
130122
id="org.springframework.ide.eclipse.boot.dash.section.BeansSection"

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/BootDashModelContext.java‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2016 Pivotal Software, Inc.
2+
* Copyright (c) 2015, 2026 Pivotal Software, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@
1616
import org.eclipse.core.resources.IWorkspace;
1717
import org.eclipse.core.runtime.IPath;
1818
import org.eclipse.debug.core.ILaunchManager;
19-
import org.springframework.ide.eclipse.boot.core.cli.BootInstallManager;
2019
import org.springframework.ide.eclipse.boot.dash.api.RunTargetType;
2120
import org.springframework.ide.eclipse.boot.dash.di.SimpleDIContext;
2221
import org.springsource.ide.eclipse.commons.core.pstore.IPropertyStore;
@@ -64,8 +63,6 @@ public abstract class BootDashModelContext {
6463
*/
6564
public abstract LiveExpression<Pattern> getBootProjectExclusion();
6665

67-
public abstract BootInstallManager getBootInstallManager();
68-
6966
public final UserInteractions getUi() {
7067
return injections.getBean(UserInteractions.class);
7168
}

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/DefaultBootDashModelContext.java‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2016 Pivotal Software, Inc.
2+
* Copyright (c) 2015, 2026 Pivotal Software, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@
1919
import org.eclipse.debug.core.DebugPlugin;
2020
import org.eclipse.debug.core.ILaunchManager;
2121
import org.springframework.ide.eclipse.boot.core.BootPreferences;
22-
import org.springframework.ide.eclipse.boot.core.cli.BootInstallManager;
2322
import org.springframework.ide.eclipse.boot.dash.BootDashActivator;
2423
import org.springframework.ide.eclipse.boot.dash.api.RunTargetType;
2524
import org.springframework.ide.eclipse.boot.dash.console.CloudAppLogManager;
@@ -50,8 +49,6 @@ public class DefaultBootDashModelContext extends BootDashModelContext {
5049

5150
private IPropertyStore viewProperties = PropertyStores.backedBy(BootDashActivator.getDefault().getPreferenceStore());
5251

53-
private BootInstallManager bootInstalls = BootInstallManager.getInstance();
54-
5552
public static BootDashModelContext create() {
5653
SimpleDIContext injections = new SimpleDIContext();
5754
injections.defInstance(UIContext.class, UIContext.DEFAULT);
@@ -114,9 +111,4 @@ public IPropertyStore getViewProperties() {
114111
return viewProperties;
115112
}
116113

117-
@Override
118-
public BootInstallManager getBootInstallManager() {
119-
return bootInstalls;
120-
}
121-
122114
}

‎eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/LocalBootDashModel.java‎

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2017 Pivotal, Inc.
2+
* Copyright (c) 2015, 2026 Pivotal, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -40,7 +40,6 @@
4040
import org.springframework.ide.eclipse.boot.dash.api.Deletable;
4141
import org.springframework.ide.eclipse.boot.dash.api.RunTargetType;
4242
import org.springframework.ide.eclipse.boot.dash.devtools.DevtoolsPortRefresher;
43-
import org.springframework.ide.eclipse.boot.dash.model.local.LocalServicesModel;
4443
import org.springframework.ide.eclipse.boot.dash.util.LaunchConfRunStateTracker;
4544
import org.springframework.ide.eclipse.boot.dash.util.LaunchConfigurationTracker;
4645
import org.springframework.ide.eclipse.boot.dash.views.BootDashModelConsoleManager;
@@ -56,8 +55,6 @@
5655
import org.springsource.ide.eclipse.commons.livexp.core.AsyncLiveExpression.AsyncMode;
5756
import org.springsource.ide.eclipse.commons.livexp.core.LiveExpression;
5857
import org.springsource.ide.eclipse.commons.livexp.core.LiveSetVariable;
59-
import org.springsource.ide.eclipse.commons.livexp.core.LiveSets;
60-
import org.springsource.ide.eclipse.commons.livexp.core.LiveVariable;
6158
import org.springsource.ide.eclipse.commons.livexp.core.ObservableSet;
6259
import org.springsource.ide.eclipse.commons.livexp.core.ValueListener;
6360
import org.springsource.ide.eclipse.commons.livexp.util.Log;
@@ -81,7 +78,6 @@ public class LocalBootDashModel extends AbstractBootDashModel implements Deletio
8178
final LaunchConfigurationTracker launchConfTracker = new LaunchConfigurationTracker(BootLaunchConfigurationDelegate.TYPE_ID);
8279

8380
private LiveSetVariable<BootProjectDashElement> applications; //lazy created
84-
private ObservableSet<BootDashElement> allElements;
8581

8682
private BootDashModelConsoleManager consoleManager;
8783

@@ -91,11 +87,6 @@ public class LocalBootDashModel extends AbstractBootDashModel implements Deletio
9187

9288
private IPropertyStore modelStore;
9389

94-
private LocalServicesModel localServices;
95-
96-
private LiveVariable<RefreshState> bootAppsRefreshState = new LiveVariable<>(RefreshState.READY);
97-
98-
private LiveExpression<RefreshState> refreshState;
9990
private BundleListener bundleListener;
10091

10192
public class WorkspaceListener implements ProjectChangeListener, ClasspathListener {
@@ -114,19 +105,6 @@ public void classpathChanged(IJavaProject jp) {
114105
public LocalBootDashModel(BootDashModelContext context, BootDashViewModel parent) {
115106
super(RunTargets.LOCAL, parent);
116107
this.workspace = context.getWorkspace();
117-
this.localServices = new LocalServicesModel(getViewModel(), this, context.getBootInstallManager().getDefaultInstallExp());
118-
this.refreshState = new LiveExpression<>() {
119-
{
120-
dependsOn(bootAppsRefreshState);
121-
dependsOn(localServices.getRefreshState());
122-
addListener((e,v) -> notifyModelStateChanged());
123-
}
124-
125-
@Override
126-
protected RefreshState compute() {
127-
return RefreshState.merge(bootAppsRefreshState.getValue(), localServices.getRefreshState().getValue());
128-
}
129-
};
130108
this.launchConfElementFactory = new LaunchConfDashElementFactory(this, context.getLaunchManager());
131109
this.projectElementFactory = new BootProjectDashElementFactory(this, context.getProjectProperties(), launchConfElementFactory);
132110
this.consoleManager = new LocalElementConsoleManager();
@@ -170,12 +148,8 @@ public void bundleChanged(BundleEvent event) {
170148
}
171149

172150
void init() {
173-
if (allElements == null) {
151+
if (applications == null) {
174152
this.applications = new LiveSetVariable<>(AsyncMode.SYNC);
175-
this.allElements = LiveSets.union(
176-
this.applications,
177-
this.localServices.getCloudCliServices()
178-
);
179153
WorkspaceListener workspaceListener = new WorkspaceListener();
180154
this.openCloseListenerManager = new ProjectChangeListenerManager(workspace, workspaceListener);
181155
this.classpathListenerManager = new ClasspathListenerManager(workspaceListener);
@@ -272,14 +246,6 @@ public void dispose() {
272246
projectExclusion.removeListener(projectExclusionListener);
273247
projectExclusionListener=null;
274248
}
275-
if (localServices != null) {
276-
localServices.dispose();
277-
localServices = null;
278-
}
279-
if (allElements != null) {
280-
allElements.dispose();
281-
allElements = null;
282-
}
283249
launchConfTracker.dispose();
284250
launchConfRunStateTracker.dispose();
285251
// Remove bundle listener
@@ -317,12 +283,7 @@ private void doUpdateElementsFromWorkspace() {
317283

318284
public synchronized ObservableSet<BootDashElement> getElements() {
319285
init();
320-
return allElements;
321-
}
322-
323-
@Override
324-
public ObservableSet<ButtonModel> getButtons() {
325-
return localServices.getButtons();
286+
return (ObservableSet<BootDashElement>) (ObservableSet<?>) applications;
326287
}
327288

328289
/**
@@ -331,7 +292,6 @@ public ObservableSet<ButtonModel> getButtons() {
331292
public void refresh(UserInteractions ui) {
332293
updateElementsFromWorkspace();
333294
applications.getValue().stream().forEach(e -> e.refreshHasMainMethod());
334-
localServices.refresh();
335295
}
336296

337297
@Override
@@ -377,9 +337,4 @@ public String getDeletionConfirmationMessage(Collection<BootDashElement> value)
377337
public IPropertyStore getModelStore() {
378338
return modelStore;
379339
}
380-
381-
@Override
382-
public RefreshState getRefreshState() {
383-
return refreshState.getValue();
384-
}
385340
}

0 commit comments

Comments
 (0)