1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 12:55:40 +02:00

The qualified name should be chached in the InternalVariable.

This commit is contained in:
Mikhail Khodjaiants 2003-09-11 20:57:55 +00:00
parent 8bd60b7ecd
commit 73a655acfe

View file

@ -176,6 +176,8 @@ public abstract class CVariable extends CDebugElement
private ICType fType = null; private ICType fType = null;
private String fQualifiedName = null;
public InternalVariable( ICDIVariableObject varObject ) public InternalVariable( ICDIVariableObject varObject )
{ {
setCDIVariableObject( varObject ); setCDIVariableObject( varObject );
@ -292,7 +294,11 @@ public abstract class CVariable extends CDebugElement
protected String getQualifiedName() throws CDIException protected String getQualifiedName() throws CDIException
{ {
return ( fCDIVariableObject != null ) ? fCDIVariableObject.getQualifiedName() : null; if ( fQualifiedName == null )
{
fQualifiedName = ( fCDIVariableObject != null ) ? fCDIVariableObject.getQualifiedName() : null;
}
return fQualifiedName;
} }
} }
@ -321,11 +327,6 @@ public abstract class CVariable extends CDebugElement
*/ */
private String fName = null; private String fName = null;
/**
* The full name of this variable.
*/
protected String fQualifiedName = null;
/** /**
* Change flag. * Change flag.
*/ */
@ -902,18 +903,16 @@ public abstract class CVariable extends CDebugElement
protected String getQualifiedName() throws DebugException protected String getQualifiedName() throws DebugException
{ {
if ( fQualifiedName == null ) String result = null;
try
{ {
try result = getInternalVariable().getQualifiedName();
{
fQualifiedName = getInternalVariable().getQualifiedName();
}
catch( CDIException e )
{
requestFailed( "Qualified name is not available.", e );
}
} }
return fQualifiedName; catch( CDIException e )
{
requestFailed( "Qualified name is not available.", e );
}
return result;
} }
/* (non-Javadoc) /* (non-Javadoc)