Community
Participate
Working Groups
After fixing Bug 572629, when hovering over local array variables doesn't show the length value when hovering over length identifier.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/180255
Created attachment 286366 [details] Hovering on Local @Gayan, look at this.
@Sarika i checked the screencast and it seems like the changes are not applied. Does your workspace source contains the previous hover fix we did for chain objects?
(In reply to Gayan Perera from comment #3) > @Sarika i checked the screencast and it seems like the changes are not > applied. Does your workspace source contains the previous hover fix we did > for chain objects? The changes from https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/180255 are in my local on top of master? Anything else expected?
@Sarika can you try without using mark occurrences on the length identifier ? To see if that make a difference in the hover ?
Created attachment 286373 [details] Gayan's Hover over Local
(In reply to Gayan Perera from comment #5) > @Sarika can you try without using mark occurrences on the length identifier > ? To see if that make a difference in the hover ? I tried. Doesn't help. I debugged and see that evaluateQualifiedNode method fails. the evaluator gets the result with empty value.
Ok something I didn’t do today is pull jdt.core changes. I will check tomorrow. But meantime does the tests also fails ?
@Sarika i ran against the later jdt.core master as well. But it still it works, this is my code snippet package app; public class Application { public static void main(String[] args) { char[] name1 = new char[] {'g', 'y', 'm'}; char[] name2 = new char[] {'g', 'y', 'm'}; System.out.println(name1.hashCode()); System.out.println(name2.length); System.out.println(args.length); } }
Very strange, Test is passing. Will have to debug further.
(In reply to Sarika Sinha from comment #10) > Very strange, Test is passing. Will have to debug further. Finally, mystery solved. If you have a breakpoint inside the lambda Stream.of(name).forEach(a -> { System.out.println(a.length); }); Then names/name is not resolved. Outside of lambda it is resolved. Without the patch, even if I hover at names.length, names is shown and not length.
Ohh got it @Sarika, will update the fix to support the outer-scope variable chain resolution as well.
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/180255 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=cef2aa3f6dfe5cf75120c8bbddfd472b11868162