mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +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
|
2004-08-05 Mikhail Khodjaiants
|
||||||
Added the abstract prototypes for some generic methods.
|
Added the abstract prototypes for some generic methods.
|
||||||
* AbstractCValue.java
|
* 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.ICDIEvent;
|
||||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIResumedEvent;
|
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.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.ICDITarget;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
||||||
import org.eclipse.cdt.debug.core.model.CVariableFormat;
|
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++ ) {
|
for( int i = 0; i < events.length; i++ ) {
|
||||||
ICDIEvent event = events[i];
|
ICDIEvent event = events[i];
|
||||||
if ( event instanceof ICDIResumedEvent ) {
|
if ( event instanceof ICDIResumedEvent ) {
|
||||||
if ( event.getSource() instanceof ICDITarget && getCDITarget().equals( event.getSource() ) ) {
|
ICDIObject source = event.getSource();
|
||||||
setChanged( false );
|
if ( source != null ) {
|
||||||
|
ICDITarget cdiTarget = source.getTarget();
|
||||||
|
if ( getCDITarget().equals( cdiTarget ) ) {
|
||||||
|
setChanged( false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.handleDebugEvents( events );
|
super.handleDebugEvents( events );
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.debug.internal.core.model;
|
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.cdi.model.ICDIVariableObject;
|
||||||
import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
|
import org.eclipse.cdt.debug.core.model.ICGlobalVariable;
|
||||||
|
|
||||||
|
@ -38,4 +42,23 @@ public class CGlobalVariable extends CVariable implements ICGlobalVariable {
|
||||||
public boolean canEnableDisable() {
|
public boolean canEnableDisable() {
|
||||||
return true;
|
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;
|
return;
|
||||||
Iterator it = fVariables.iterator();
|
Iterator it = fVariables.iterator();
|
||||||
while( it.hasNext() ) {
|
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.event.ICDIResumedEvent;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIArgumentObject;
|
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.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.ICDIValue;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariable;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
|
||||||
|
@ -637,17 +638,16 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
||||||
ICDIObject source = event.getSource();
|
ICDIObject source = event.getSource();
|
||||||
if ( source == null )
|
if ( source == null )
|
||||||
continue;
|
continue;
|
||||||
if ( source instanceof ICDIVariable && iv.isSameVariable( (ICDIVariable)source ) ) {
|
ICDITarget target = source.getTarget();
|
||||||
if ( source.getTarget().equals( getCDITarget() ) ) {
|
if ( target.equals( getCDITarget() ) ) {
|
||||||
if ( event instanceof ICDIChangedEvent ) {
|
if ( event instanceof ICDIChangedEvent ) {
|
||||||
if ( source instanceof ICDIVariable ) {
|
if ( source instanceof ICDIVariable && iv.isSameVariable( (ICDIVariable)source ) ) {
|
||||||
handleChangedEvent( (ICDIChangedEvent)event );
|
handleChangedEvent( (ICDIChangedEvent)event );
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ( event instanceof ICDIResumedEvent ) {
|
|
||||||
handleResumedEvent( (ICDIResumedEvent)event );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( event instanceof ICDIResumedEvent ) {
|
||||||
|
handleResumedEvent( (ICDIResumedEvent)event );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue