Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorPatrick Chuong2011-12-15 20:05:02 +0000
committerPatrick Chuong2011-12-15 20:05:02 +0000
commit349cdb089d6d56c6e7a8d8b2b5e86e608885b48c (patch)
tree3a376e5a59ab7202e682576ee28fc8334131f95f /debug
parentbe303b5ca214f0fc7e6c931d6044c8c17c181454 (diff)
downloadorg.eclipse.cdt-349cdb089d6d56c6e7a8d8b2b5e86e608885b48c.tar.gz
org.eclipse.cdt-349cdb089d6d56c6e7a8d8b2b5e86e608885b48c.tar.xz
org.eclipse.cdt-349cdb089d6d56c6e7a8d8b2b5e86e608885b48c.zip
Bug 358135 - [Pin&Clone] Pinned view shows wrong content for multiple
selection
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java
index 1e7a4f20ad6..5687cadbdc7 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugEventFilterService.java
@@ -7,9 +7,11 @@
*
* Contributors:
* Patrick Chuong (Texas Instruments) - Pin and Clone Supports (331781)
+ * Patrick Chuong (Texas Instruments) - Bug 358135
*****************************************************************/
package org.eclipse.cdt.debug.internal.ui.pinclone;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -20,6 +22,7 @@ import org.eclipse.debug.ui.contexts.IDebugContextListener;
import org.eclipse.debug.ui.contexts.IDebugContextService;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchPart;
/**
@@ -45,16 +48,18 @@ public class DebugEventFilterService {
public void debugContextChanged(DebugContextEvent event) {
ISelection eventContext = event.getContext();
if (eventContext instanceof IStructuredSelection) {
-
+ List<Object> filteredContextList = new ArrayList<Object>();
List<?> eventContextList = ((IStructuredSelection)eventContext).toList();
for (Object o : eventContextList) {
if (fProvider.isPinnedTo(o)) {
if (fProvider != event.getDebugContextProvider()) {
- fProvider.delegateEvent(new DebugContextEvent(fProvider, event.getContext(), event.getFlags()));
+ filteredContextList.add(o);
}
- return;
}
}
+ if (filteredContextList.size() > 0) {
+ fProvider.delegateEvent(new DebugContextEvent(fProvider, new StructuredSelection(filteredContextList), event.getFlags()));
+ }
}
}

Back to the top