mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
"Load Symbols For All" doesn't work: CModuleManager does not implement ICDebugElement. Replaced by IAdapatable.
This commit is contained in:
parent
f4f9b8af69
commit
0d5ed9cb56
2 changed files with 14 additions and 3 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue