Community
Participate
Working Groups
Given the following snippet, multiple "input" annotations will be generated for each line of the asList() expression. Furthermore the 'val' annotation doesn't seem calculated correctly in this case. package test; import java.util.Arrays; import java.util.List; public class Test { public void test () { foo(Arrays.asList( "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"), 0); } public void foo (List<String> input, int val) { } }
Created attachment 278381 [details] Parameter Annotations Incorrectly Drawn
Thanks for the report. I'll try to take care of it soon as I plan to spend some time in May on codeminings in general; but I'm currently working on higher priority stuff on m2e and Corrosion. So if anyone feels interested in working on it before I start, it'd be welcome ;) Note that there are probably 2 distinct issues here: erroneous code mining content (the `input` repeated on multiple lines) which is probably an issue in JDT code mining provider, and a drawing issue that's on Platform Text.
Simpler case would be Math.max(System.currentTimeMillis( ), 0);
I suspect the main problem comes from the draw of inlined annotation on the right of the previous character (before it was on the left of the next character if I remember). See https://github.com/eclipse/eclipse.platform.text/commit/f5879917fb106cf8bdc6a94a42805c6e4226a30b#diff-87e8a0bc35895d0b8a27e21c6605f14bR229
(In reply to Angelo ZERR from comment #4) > I suspect the main problem comes from the draw of inlined annotation on the > right of the previous character (before it was on the left of the next > character if I remember). See > https://github.com/eclipse/eclipse.platform.text/commit/ > f5879917fb106cf8bdc6a94a42805c6e4226a30b#diff- > 87e8a0bc35895d0b8a27e21c6605f14bR229 Yes, I also think so. I'm trying to write a failing test first for JDT, then will try to write a failing test for Platform.Text and then a fix.
New Gerrit change created: https://git.eclipse.org/r/141314
New Gerrit change created: https://git.eclipse.org/r/141343
Gerrit change https://git.eclipse.org/r/141343 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=b26b8782569616fcace8dcbd47a61c13ae694513
(In reply to Eclipse Genie from comment #8) > Gerrit change https://git.eclipse.org/r/141343 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=b26b8782569616fcace8dcbd47a61c13ae694513 > This introduced a compile warning in the official build. Fixed with https://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=1a653bc834f51a8a5a28fe89bd5ea0ac42c29a46
Gerrit change https://git.eclipse.org/r/141314 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=22e1a5c6ee7dd76d9bc36d0d6f288e045f0407a5