mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Check for ICDIArgument and ICDIVariable
This commit is contained in:
parent
7f590106ed
commit
22bf3e3fd6
1 changed files with 25 additions and 4 deletions
|
@ -145,8 +145,13 @@ public class VariableManager extends SessionObject implements ICDIVariableManage
|
|||
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#createArgument(ICDIArgumentObject)
|
||||
*/
|
||||
public ICDIArgument createArgument(ICDIArgumentObject a) throws CDIException {
|
||||
ArgumentObject argObj = null;
|
||||
if (a instanceof ArgumentObject) {
|
||||
ArgumentObject argObj = (ArgumentObject)a;
|
||||
argObj = (ArgumentObject)a;
|
||||
} else if (a instanceof Argument) {
|
||||
argObj = ((Argument)a).getArgumentObject();
|
||||
}
|
||||
if (argObj != null) {
|
||||
Variable variable = findVariable(argObj);
|
||||
Argument argument = null;
|
||||
if (variable != null && variable instanceof Argument) {
|
||||
|
@ -287,8 +292,13 @@ public class VariableManager extends SessionObject implements ICDIVariableManage
|
|||
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#getVariableObjectAsArray(ICDIVariableObject, String, int, int)
|
||||
*/
|
||||
public ICDIVariableObject getVariableObjectAsArray(ICDIVariableObject object, String type, int start, int end) throws CDIException {
|
||||
VariableObject obj = null;
|
||||
if (object instanceof VariableObject) {
|
||||
VariableObject obj = (VariableObject)object;
|
||||
obj = (VariableObject)object;
|
||||
} else if (object instanceof Variable) {
|
||||
obj = ((Variable)object).getVariableObject();
|
||||
}
|
||||
if (obj != null) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("*(");
|
||||
buffer.append('(');
|
||||
|
@ -324,8 +334,13 @@ public class VariableManager extends SessionObject implements ICDIVariableManage
|
|||
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#getVariableObjectAsArray(ICDIVariableObject, String, int, int)
|
||||
*/
|
||||
public ICDIVariableObject getVariableObjectAsType(ICDIVariableObject object, String type) throws CDIException {
|
||||
VariableObject obj = null;
|
||||
if (object instanceof VariableObject) {
|
||||
VariableObject obj = (VariableObject)object;
|
||||
obj = (VariableObject)object;
|
||||
} else if (object instanceof Variable) {
|
||||
obj = ((Variable)object).getVariableObject();
|
||||
}
|
||||
if (obj != null) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (type != null && type.length() > 0) {
|
||||
// Check if the type is valid.
|
||||
|
@ -405,8 +420,14 @@ public class VariableManager extends SessionObject implements ICDIVariableManage
|
|||
* @see org.eclipse.cdt.debug.core.cdi.ICDIVariableManager#createVariable(ICDIVariableObject)
|
||||
*/
|
||||
public ICDIVariable createVariable(ICDIVariableObject v) throws CDIException {
|
||||
VariableObject varObj = null;
|
||||
if (v instanceof VariableObject) {
|
||||
VariableObject varObj = (VariableObject)v;
|
||||
varObj = (VariableObject)v;
|
||||
}
|
||||
if (v instanceof Variable) {
|
||||
varObj = ((Variable)v).getVariableObject();
|
||||
}
|
||||
if (varObj != null) {
|
||||
Variable variable = findVariable(varObj);
|
||||
if (variable == null) {
|
||||
String name = varObj.getName();
|
||||
|
|
Loading…
Add table
Reference in a new issue