Community
Participate
Working Groups
If setting up breakpint in nested class method which is implemented in parent class method. Then trying to view in "Exspressions view" a variable declared in parent class method, the variable cannot be resolved. Variable is in the scope of children class method were the breakpoint is set of so it should be resolved. Screen shot attached explaining all visually. -------------------------------------------------------------------------------- eclipse.buildId=M20060629-1905 eclipse.commands=-os win32 -ws win32 -arch x86 -launcher C:\Program Files\eclipse\eclipse.exe -name Eclipse -showsplash 600 -exitdata f1c_64 -vm C:\j2sdk1.4.2_10\bin\javaw.exe eclipse.ee.install.verify=false eclipse.product=org.eclipse.sdk.ide eclipse.startTime=1153893927744 eclipse.vm=C:\j2sdk1.4.2_10\bin\javaw.exe eclipse.vmargs=-Xms40m -Xmx256m -jar
Created attachment 46805 [details] visual explanation
Not planned for 3.3
Created attachment 66213 [details] patch Work in progress that adds finals as local variables to the evaluation. Not sure how portable it is across compilers.
*** Bug 80039 has been marked as a duplicate of this bug. ***
Would love to see this fixed. Any plans of this getting fixed?
(In reply to comment #5) > Would love to see this fixed. Any plans of this getting fixed? No plans currently.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
I don't know if this is the intended behaviour. This is what I see with 2018-12 if I try with these simple classes: package test; public class Test { public static void main(String[] args) { new MyClass().doSomething(); } } ---- package test; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JTable; public class MyClass { void doSomething() { final JTable table = new JTable(); JButton button = new JButton(); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.out.println("test"); table.clearSelection(); } }); button.doClick(); } } --- If I put a breakpoint on "System.out..." with this code, I do see "val$table" under "this" reference in Variables view AND "table" is correctly resolved by the Expressions view. If however I remove the call to "table.clearSelection()" from the anonymous inner class (which is more like the example provided by Aurius), then val$table is missing from the variables view and the Expressions view does not resolve "table" any more. Maybe some kind of compiler optimisation regarding the closure of the anonymous inner class?
Yes, still reproducible.
This "stale bug" system is very annoying... Still reproducible with at least Eclipse 2020-09.
@Gayan, Can you look into this?
Sure @Sarika
@Gayan Any progress? Possibly related to https://github.com/microsoft/vscode-java-debug/issues/754 Also I found bugs where evaluation fails if inside of lambdas. Would be nice to have some improvement there as well.