Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorMikhail Khodjaiants2007-02-13 18:30:19 +0000
committerMikhail Khodjaiants2007-02-13 18:30:19 +0000
commit0d5ed9cb565cda4203d03eaa90871cb935ebd6ac (patch)
treef7e5e7a630465da4d060a1cc912c83cb3706d8d3 /debug
parentf4f9b8af690763098f0a72007705cdae4b1a9d41 (diff)
downloadorg.eclipse.cdt-0d5ed9cb565cda4203d03eaa90871cb935ebd6ac.tar.gz
org.eclipse.cdt-0d5ed9cb565cda4203d03eaa90871cb935ebd6ac.tar.xz
org.eclipse.cdt-0d5ed9cb565cda4203d03eaa90871cb935ebd6ac.zip
"Load Symbols For All" doesn't work: CModuleManager does not implement ICDebugElement. Replaced by IAdapatable.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java11
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java6
2 files changed, 14 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java
index e65196890f3..4b584249145 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CModuleManager.java
@@ -13,9 +13,11 @@ package org.eclipse.cdt.debug.internal.core.model;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
+
import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
+import org.eclipse.cdt.debug.core.model.ICDebugTarget;
import org.eclipse.cdt.debug.core.model.ICModule;
import org.eclipse.cdt.debug.core.model.IModuleRetrieval;
import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
@@ -151,4 +153,13 @@ public class CModuleManager extends PlatformObject implements IModuleRetrieval {
}
return null;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
+ */
+ public Object getAdapter( Class adapter ) {
+ if ( adapter.equals( ICDebugTarget.class ) )
+ return getDebugTarget();
+ return super.getAdapter( adapter );
+ }
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
index 4954d6239df..3b14809fcde 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
@@ -15,13 +15,13 @@ import org.eclipse.cdt.debug.core.CDebugUtils;
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.IAdaptable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugEvent;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.jface.action.IAction;
/**
@@ -85,8 +85,8 @@ public class LoadSymbolsForAllActionDelegate extends AbstractViewActionDelegate
}
private ICDebugTarget getDebugTarget( Object element ) {
- if ( element instanceof IDebugElement ) {
- return (ICDebugTarget)((IDebugElement)element).getDebugTarget().getAdapter( ICDebugTarget.class );
+ if ( element instanceof IAdaptable ) {
+ return (ICDebugTarget)((IAdaptable)element).getAdapter( ICDebugTarget.class );
}
return null;
}

Back to the top