mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Bug 102077: The DebugLabelViewDecorato asking info out of context. Added a new flag to CVariable indicate the disposed state and prevent target requests.
This commit is contained in:
parent
d3ee3bfc24
commit
249408c1cb
4 changed files with 31 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-07-11 Mikhail Khodjaiants
|
||||
Bug 102077: The DebugLabelViewDecorato asking info out of context.
|
||||
Added a new flag to CVariable indicate the disposed state and prevent target requests.
|
||||
* CExpression.java
|
||||
* CGlobalVariable.java
|
||||
* CVariable.java
|
||||
|
||||
2005-07-11 Mikhail Khodjaiants
|
||||
Bug 102563: Break points not working.
|
||||
Temporary switching back to use file names instead of full paths.
|
||||
|
|
|
@ -183,12 +183,15 @@ public class CExpression extends CVariable implements IExpression {
|
|||
fValue = CValueFactory.NULL_VALUE;
|
||||
}
|
||||
internalDispose( true );
|
||||
setDisposed( true );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.model.ICVariable#getType()
|
||||
*/
|
||||
public ICType getType() throws DebugException {
|
||||
if ( isDisposed() )
|
||||
return null;
|
||||
if ( fType == null ) {
|
||||
synchronized( this ) {
|
||||
if ( fType == null ) {
|
||||
|
|
|
@ -79,5 +79,6 @@ public class CGlobalVariable extends CVariable implements ICGlobalVariable {
|
|||
*/
|
||||
public void dispose() {
|
||||
internalDispose( true );
|
||||
setDisposed( true );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
}
|
||||
|
||||
private ICDIVariableDescriptor getCDIVariableObject() {
|
||||
if (fCDIVariable != null) {
|
||||
if ( fCDIVariable != null ) {
|
||||
return fCDIVariable;
|
||||
}
|
||||
return fCDIVariableObject;
|
||||
|
@ -349,6 +349,11 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
*/
|
||||
private CVariableFormat fFormat = CVariableFormat.getFormat( CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT ) );
|
||||
|
||||
/**
|
||||
* Whether this variable has been disposed.
|
||||
*/
|
||||
private boolean fIsDisposed = false;
|
||||
|
||||
/**
|
||||
* Constructor for CVariable.
|
||||
*/
|
||||
|
@ -382,6 +387,8 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
* @see org.eclipse.cdt.debug.core.model.ICVariable#getType()
|
||||
*/
|
||||
public ICType getType() throws DebugException {
|
||||
if ( isDisposed() )
|
||||
return null;
|
||||
InternalVariable iv = getCurrentInternalVariable();
|
||||
return ( iv != null ) ? iv.getType() : null;
|
||||
}
|
||||
|
@ -436,7 +443,7 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
* @see org.eclipse.debug.core.model.IVariable#getValue()
|
||||
*/
|
||||
public IValue getValue() throws DebugException {
|
||||
if ( isEnabled() ) {
|
||||
if ( !isDisposed() && isEnabled() ) {
|
||||
InternalVariable iv = getCurrentInternalVariable();
|
||||
if ( iv != null ) {
|
||||
try {
|
||||
|
@ -475,6 +482,8 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
* @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
|
||||
*/
|
||||
public boolean hasValueChanged() throws DebugException {
|
||||
if ( isDisposed() )
|
||||
return false;
|
||||
InternalVariable iv = getCurrentInternalVariable();
|
||||
return ( iv != null ) ? iv.isChanged() : false;
|
||||
}
|
||||
|
@ -782,6 +791,7 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
public void dispose() {
|
||||
// Hack: do not destroy local variables
|
||||
internalDispose( false );
|
||||
setDisposed( true );
|
||||
}
|
||||
|
||||
protected int sizeof() {
|
||||
|
@ -837,4 +847,12 @@ public class CVariable extends AbstractCVariable implements ICDIEventListener {
|
|||
if ( iv != null )
|
||||
iv.dispose( destroy );
|
||||
}
|
||||
|
||||
protected boolean isDisposed() {
|
||||
return fIsDisposed;
|
||||
}
|
||||
|
||||
protected void setDisposed( boolean isDisposed ) {
|
||||
fIsDisposed = isDisposed;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue