Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Kubitz2021-12-02 10:20:33 +0000
committerJörg Kubitz2021-12-02 15:17:19 +0000
commit0edcbdffd4260475f88e26b0c13a4571aebf3dac (patch)
tree40134777f03cf230e9811576a303b2ee45037a95
parent3a1df4f41677fbc73fdce85ed2a17c066ccff979 (diff)
downloadeclipse.platform.debug-I20211204-0500.tar.gz
eclipse.platform.debug-I20211204-0500.tar.xz
eclipse.platform.debug-I20211204-0500.zip
Clicking on parent node in Launch configuration view did start all launch groups Change-Id: I7a3753dda86621a8f512590554bc332985d2f3f5 Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/188461 Tested-by: Platform Bot <platform-bot@eclipse.org>
-rw-r--r--org.eclipse.debug.ui.launchview/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.ui.launchview/pom.xml2
-rw-r--r--org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/impl/DebugCoreProvider.java3
-rw-r--r--org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchAction.java3
-rw-r--r--org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchViewImpl.java2
-rw-r--r--org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/RelaunchAction.java6
-rw-r--r--org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/TerminateAction.java6
7 files changed, 17 insertions, 7 deletions
diff --git a/org.eclipse.debug.ui.launchview/META-INF/MANIFEST.MF b/org.eclipse.debug.ui.launchview/META-INF/MANIFEST.MF
index f68dd6941..ebd63af50 100644
--- a/org.eclipse.debug.ui.launchview/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.ui.launchview/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.ui.launchview;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.0.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.debug.ui.launchview/pom.xml b/org.eclipse.debug.ui.launchview/pom.xml
index b1d877538..77a024240 100644
--- a/org.eclipse.debug.ui.launchview/pom.xml
+++ b/org.eclipse.debug.ui.launchview/pom.xml
@@ -24,6 +24,6 @@
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.ui.launchview</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/impl/DebugCoreProvider.java b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/impl/DebugCoreProvider.java
index 84fef7dd2..4f341f970 100644
--- a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/impl/DebugCoreProvider.java
+++ b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/impl/DebugCoreProvider.java
@@ -131,7 +131,8 @@ public class DebugCoreProvider extends AbstractLaunchObjectProvider implements I
@CanExecute
public boolean isEnabled() {
- return selected.get().stream().allMatch(e -> e instanceof DebugCoreLaunchObject && findLaunchConfiguration(e.getType(), e.getId()) != null);
+ Set<ILaunchObject> elements = selected.get();
+ return !elements.isEmpty() && elements.stream().allMatch(e -> e instanceof DebugCoreLaunchObject && findLaunchConfiguration(e.getType(), e.getId()) != null);
}
});
diff --git a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchAction.java b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchAction.java
index df876f7d9..df92b38b6 100644
--- a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchAction.java
+++ b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchAction.java
@@ -64,7 +64,8 @@ public class LaunchAction {
@CanExecute
public boolean isEnabled() {
- return view.get().stream().allMatch((m) -> {
+ Set<ILaunchObject> elements = view.get();
+ return !elements.isEmpty() && elements.stream().allMatch((m) -> {
try {
return m.getType().getDelegates(Collections.singleton(mode.getIdentifier())).length > 0;
} catch (CoreException e) {
diff --git a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchViewImpl.java b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchViewImpl.java
index 3a76ffbe2..522bba63e 100644
--- a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchViewImpl.java
+++ b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/LaunchViewImpl.java
@@ -254,7 +254,7 @@ public class LaunchViewImpl implements Supplier<Set<ILaunchObject>> {
// expand selection if containers are selected
for (Object selected : structuredSelection.toList()) {
if (selected instanceof LaunchObjectContainerModel) {
- elements.addAll(((LaunchObjectContainerModel) selected).getChildren());
+ // skip container nodes (Bug 577581)
} else if (selected instanceof LaunchObjectModel) {
elements.add((LaunchObjectModel) selected);
}
diff --git a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/RelaunchAction.java b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/RelaunchAction.java
index 8268ae14c..210397aad 100644
--- a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/RelaunchAction.java
+++ b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/RelaunchAction.java
@@ -13,8 +13,11 @@
*******************************************************************************/
package org.eclipse.debug.ui.launchview.internal.view;
+import java.util.Set;
+
import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo;
import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages;
+import org.eclipse.debug.ui.launchview.services.ILaunchObject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem;
@@ -42,7 +45,8 @@ public class RelaunchAction {
@CanExecute
public boolean isEnabled() {
- return view.get().stream().allMatch(m -> m.canTerminate());
+ Set<ILaunchObject> elements = view.get();
+ return !elements.isEmpty() && elements.stream().allMatch(m -> m.canTerminate());
}
@Execute
diff --git a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/TerminateAction.java b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/TerminateAction.java
index 50cb02f0b..5544e2754 100644
--- a/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/TerminateAction.java
+++ b/org.eclipse.debug.ui.launchview/src/org/eclipse/debug/ui/launchview/internal/view/TerminateAction.java
@@ -13,8 +13,11 @@
*******************************************************************************/
package org.eclipse.debug.ui.launchview.internal.view;
+import java.util.Set;
+
import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo;
import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages;
+import org.eclipse.debug.ui.launchview.services.ILaunchObject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem;
@@ -42,7 +45,8 @@ public class TerminateAction {
@CanExecute
public boolean isEnabled() {
- return view.get().stream().allMatch(m -> m.canTerminate());
+ Set<ILaunchObject> elements = view.get();
+ return !elements.isEmpty() && elements.stream().allMatch(m -> m.canTerminate());
}
@Execute

Back to the top