Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2006-05-31 18:35:49 +0000
committerMikhail Khodjaiants2006-05-31 18:35:49 +0000
commit263add60a92486ba3faec91aab0dccd3bb74b6f8 (patch)
treead345a660f4bdcced39b8ff348bfd52507a6774b
parent1236d27b747af188fe479157c3357cf82dac5daf (diff)
downloadorg.eclipse.cdt-263add60a92486ba3faec91aab0dccd3bb74b6f8.tar.gz
org.eclipse.cdt-263add60a92486ba3faec91aab0dccd3bb74b6f8.tar.xz
org.eclipse.cdt-263add60a92486ba3faec91aab0dccd3bb74b6f8.zip
Bug 144719: [Modules view] Modules from from different sessions are mixed up.
-rw-r--r--debug/org.eclipse.cdt.debug.core/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java3
-rw-r--r--debug/org.eclipse.cdt.debug.ui/ChangeLog4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesViewEventHandler.java21
4 files changed, 26 insertions, 6 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog
index 06e2ce5c22..2fc6ffe42b 100644
--- a/debug/org.eclipse.cdt.debug.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.core/ChangeLog
@@ -1,3 +1,7 @@
+2006-05-31 Mikhail Khodjaiants
+ Bug 144719: [Modules view] Modules from from different sessions are mixed up.
+ * CDebugElement.java
+
2006-05-29 Mikhail Khodjaiants
Bug 108472: Debug continues to fail.
* DebugCoreMessages.properties
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
index b10c2e4432..f23897cfa5 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
@@ -21,6 +21,7 @@ import org.eclipse.cdt.debug.core.model.CDebugElementState;
import org.eclipse.cdt.debug.core.model.ICDebugElement;
import org.eclipse.cdt.debug.core.model.ICDebugElementStatus;
import org.eclipse.cdt.debug.core.model.ICDebugTarget;
+import org.eclipse.cdt.debug.core.model.IModuleRetrieval;
import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.PlatformObject;
@@ -307,6 +308,8 @@ abstract public class CDebugElement extends PlatformObject implements ICDebugEle
// See bug #100261
if ( adapter.equals( IMemoryBlockRetrieval.class ) )
return getDebugTarget().getAdapter( adapter );
+ if ( adapter.equals( IModuleRetrieval.class ) )
+ return getDebugTarget().getAdapter( adapter );
if ( adapter.equals( ILaunch.class ) )
return getDebugTarget().getLaunch();
return super.getAdapter( adapter );
diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog
index 71e8355322..4918ec67f8 100644
--- a/debug/org.eclipse.cdt.debug.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog
@@ -1,4 +1,8 @@
2006-05-31 Mikhail Khodjaiants
+ Bug 144719: [Modules view] Modules from from different sessions are mixed up.
+ * ModulesViewEventHandler.java
+
+2006-05-31 Mikhail Khodjaiants
Bug 144684: [Modules view] Collapse all action doesn't work.
* CollapseAllModulesAction.java
* ModulesViewer.java
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesViewEventHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesViewEventHandler.java
index d08e49145f..44827c0398 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesViewEventHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModulesViewEventHandler.java
@@ -58,11 +58,15 @@ public class ModulesViewEventHandler extends DebugEventHandler {
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handleCreate(org.eclipse.debug.core.DebugEvent)
*/
protected void handleCreate( DebugEvent event ) {
- if ( event.getSource() instanceof IDebugTarget ) {
+ Object source = event.getSource();
+ if ( source instanceof IDebugTarget ) {
refreshRoot( event );
}
- else if ( event.getSource() instanceof ICModule ) {
- fireDelta( (ICModule)event.getSource(), IModelDelta.ADDED );
+ else if ( source instanceof ICModule ) {
+ if ( accept( (ICModule)source ) ) {
+ ICModule module = (ICModule)source;
+ fireDelta( module, IModelDelta.ADDED );
+ }
}
}
@@ -70,11 +74,12 @@ public class ModulesViewEventHandler extends DebugEventHandler {
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handleTerminate(org.eclipse.debug.core.DebugEvent)
*/
protected void handleTerminate( DebugEvent event ) {
- if ( event.getSource() instanceof IDebugTarget ) {
+ Object source = event.getSource();
+ if ( source instanceof IDebugTarget ) {
refreshRoot( event );
}
- else if ( event.getSource() instanceof ICModule ) {
- fireDelta( (ICModule)event.getSource(), IModelDelta.REMOVED );
+ else if ( source instanceof ICModule ) {
+ fireDelta( (ICModule)source, IModelDelta.REMOVED );
}
}
@@ -91,4 +96,8 @@ public class ModulesViewEventHandler extends DebugEventHandler {
super.dispose();
fModuleRetrieval = null;
}
+
+ private boolean accept( ICModule module ) {
+ return fModuleRetrieval.equals( module.getAdapter( IModuleRetrieval.class ) );
+ }
}

Back to the top