Community
Participate
Working Groups
Past the following code in a java text editor public void foo() { String aString = "AAAAAAAAAAAAAAAAA"; String s1[] = new String[]{aString}; String s2[] = new String[]{"aaaa"}; Object o1[] = new Object[][]{{aString},{aString}}; } 1) Doubleclick after { in the line "String s1[]". It will select the code between { and }. Good. 2) Now doubleclick after the first { in the line "String s2[]". It will select aaaa without including the ". It should select everything between { and }. 3) Now doubleclick after the first { in the line "Object o1[]". It will select the contents of the second { instead of the first one.
*** Bug 16952 has been marked as a duplicate of this bug. ***
Related to #9503 and #9151.
*** Bug 23089 has been marked as a duplicate of this bug. ***
Can this be considered for 2.1? Thanks
I hope this does get changed. BTW, "Highlight matching brackets" has the same problem and needs to use the same algorithm.
Build > 20030304 for those who cannot stand having a cursor right or left of a '{' :-)
This does not work in RC2. RC2 behavior is: int a = 1(2int3)4long; double-clicking at: 1 - does nothing, working 2 - selects text, working 3 - does nothing, broken 4 - selects text, broken, should do nothing. Also: String foo = 1"2foo3"4; double-clicking should only be supported at 2&3, but 1 also works.
As you have seen the current behavior is that selection is only triggered when the cursor/mouse event is/happens right of a bracket. Thus, when being inside nested brackets you always know for which one the matching bracket is computed and highlighted. This resolves the ambiguities you initially complained about.