Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] how to uniquely identify a temp?

hello, i have an ast-related question:

i have 2 ASTs - one is a slightly modified version of the other (1
identifier (of  a temp) changed)
now, i'd like to make sure that temp names still mean the same:
for each temp refererence i get an IBinding. i thought calling getKey()
would give me a unique id for the binding (i could then compare them in both
trees, expecting them to be equal) - but i get a null.

if the IBinding is a IVariableBinding i can call getVariableId() but that
gives me only an int.
would that int (together with IBinding::getKey() called on
MethodDeclaration - method declaring the temp) be enough to uniquely
identify the temp?

i entered a bug report for that too:
http://dev.eclipse.org/bugs/show_bug.cgi?id=11529

but the list is probably a better forum for a question like this
a.



Back to the top