Open GoogleCodeExporter opened 9 years ago
Narrowed it down to the method. The problem comes when analyzing
TimeOptionHandler.handleOptions(String, SVGConverter). I presume it's something
about that anonymous inner class? All non-final variables appear to be locally
declared to me. v is local, and c is final.
public void handleOption(String optionValue, final SVGConverter c) {
try {
ClockParser p = new ClockParser(false);
p.setClockHandler(new ClockHandler() {
public void clockValue(float v) {
handleOption(v, c);
}
});
p.parse(optionValue);
} catch (ParseException e) {
throw new IllegalArgumentException();
}
}
Original comment by ciera.christopher
on 12 Nov 2010 at 9:24
[deleted comment]
aken problem to following:
The problem is local variables (in example, the float v). When creating a new
source variable, we have to determine whether the variable is local. The last
parameter determines this.
This line however is incorrect (in EclipseTAC, getVariable(IBinding), line 456):
result = new SourceVariable(vb.getName(), vb, method.equals(declaredIn));
The last param is meant to determine whether we have a local. However,
declaredIn is clockValue, and method is handleOption.
Not sure how to fix this. I considered changing method to a stack of methods,
but it doesn't seem that the visitor walks the entire thing right away. It
looks like instead, the TAC are created on demand. In which case, I need to
find an alternate way of determining whether the variable is a locally declared
variable.
Original comment by ciera.christopher
on 16 Nov 2010 at 6:11
Original issue reported on code.google.com by
ciera.christopher
on 12 Nov 2010 at 8:38Attachments: