mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed the "resumed" event handler of the variable types.
This commit is contained in:
parent
60b8ef73ba
commit
8ce89a5cc0
5 changed files with 47 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-08-05 Mikhail Khodjaiants
|
||||
Fixed the "resumed" event handler of the variable types.
|
||||
* CExpression.java
|
||||
* CGlobalVariable.java
|
||||
* CStackFrame.java
|
||||
* CVariable.java
|
||||
|
||||
2004-08-05 Mikhail Khodjaiants
|
||||
Added the abstract prototypes for some generic methods.
|
||||
* AbstractCValue.java
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.eclipse.cdt.debug.core.ICDebugConstants;
|
|||
import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIExpression;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
||||
import org.eclipse.cdt.debug.core.model.CVariableFormat;
|
||||
|
@ -74,10 +75,13 @@ public class CExpression extends CVariable implements IExpression {
|
|||
for( int i = 0; i < events.length; i++ ) {
|
||||
ICDIEvent event = events[i];
|
||||
if ( event instanceof ICDIResumedEvent ) {
|
||||
if ( event.getSource() instanceof ICDITarget && getCDITarget().equals( event.getSource() ) ) {
|
||||
setChanged( false );
|
||||
ICDIObject source = event.getSource();
|
||||
if ( source != null ) {
|
||||
ICDITarget cdiTarget = source.getTarget();
|
||||
if ( getCDITarget().equals( cdiTarget ) ) {
|
||||
setChanged( false );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.handleDebugEvents( events );
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
***********************************************************************/
|
||||
package org.eclipse.cdt.debug.internal.core.model;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
||||
import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
|
||||
|
||||
|
@ -38,4 +42,23 @@ public class CGlobalVariable extends CVariable implements ICGlobalVariable {
|
|||
public boolean canEnableDisable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener#handleDebugEvents(org.eclipse.cdt.debug.core.cdi.event.ICDIEvent[])
|
||||
*/
|
||||
public void handleDebugEvents( ICDIEvent[] events ) {
|
||||
for( int i = 0; i < events.length; i++ ) {
|
||||
ICDIEvent event = events[i];
|
||||
if ( event instanceof ICDIResumedEvent ) {
|
||||
ICDIObject source = event.getSource();
|
||||
if ( source != null ) {
|
||||
ICDITarget cdiTarget = source.getTarget();
|
||||
if ( getCDITarget().equals( cdiTarget ) ) {
|
||||
setChanged( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
super.handleDebugEvents( events );
|
||||
}
|
||||
}
|
|
@ -583,7 +583,7 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
|
|||
return;
|
||||
Iterator it = fVariables.iterator();
|
||||
while( it.hasNext() ) {
|
||||
((CVariable)it.next()).setChanged( false );
|
||||
((AbstractCVariable)it.next()).setChanged( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.eclipse.cdt.debug.core.cdi.event.ICDIEventListener;
|
|||
import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIValue;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
||||
|
@ -637,17 +638,16 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
ICDIObject source = event.getSource();
|
||||
if ( source == null )
|
||||
continue;
|
||||
if ( source instanceof ICDIVariable && iv.isSameVariable( (ICDIVariable)source ) ) {
|
||||
if ( source.getTarget().equals( getCDITarget() ) ) {
|
||||
if ( event instanceof ICDIChangedEvent ) {
|
||||
if ( source instanceof ICDIVariable ) {
|
||||
handleChangedEvent( (ICDIChangedEvent)event );
|
||||
}
|
||||
}
|
||||
else if ( event instanceof ICDIResumedEvent ) {
|
||||
handleResumedEvent( (ICDIResumedEvent)event );
|
||||
ICDITarget target = source.getTarget();
|
||||
if ( target.equals( getCDITarget() ) ) {
|
||||
if ( event instanceof ICDIChangedEvent ) {
|
||||
if ( source instanceof ICDIVariable && iv.isSameVariable( (ICDIVariable)source ) ) {
|
||||
handleChangedEvent( (ICDIChangedEvent)event );
|
||||
}
|
||||
}
|
||||
else if ( event instanceof ICDIResumedEvent ) {
|
||||
handleResumedEvent( (ICDIResumedEvent)event );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue