mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Set debug target on creation.
This commit is contained in:
parent
26fc07b6cf
commit
20c3795a65
1 changed files with 10 additions and 0 deletions
|
@ -87,6 +87,16 @@ public class AddExpressionActionDelegate implements IWorkbenchWindowActionDelega
|
|||
}
|
||||
window.getPartService().addPartListener( this );
|
||||
window.getSelectionService().addSelectionListener( IDebugUIConstants.ID_DEBUG_VIEW, this );
|
||||
IAdaptable context = DebugUITools.getDebugContext();
|
||||
if ( context != null && context instanceof IDebugElement )
|
||||
{
|
||||
IDebugTarget target = ((IDebugElement)context).getDebugTarget();
|
||||
if ( target != null && target instanceof ICExpressionEvaluator )
|
||||
{
|
||||
setDebugTarget( target );
|
||||
}
|
||||
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue