[jira] [Commented] (NETBEANS-2762) for* code completion has gotten dumber
[ https://issues.apache.org/jira/browse/NETBEANS-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879034#comment-16879034 ] Luca Mambretti commented on NETBEANS-2762: -- I can confirm this is now fixed in beta 3. > for* code completion has gotten dumber > -- > > Key: NETBEANS-2762 > URL: https://issues.apache.org/jira/browse/NETBEANS-2762 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 9.0, 10.0, 11.0, 11.1 > Environment: Product Version: Apache NetBeans IDE 11.1 > Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 > Runtime: Java(TM) SE Runtime Environment 11+28 > System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) > User directory: C:\Users\luca.mambretti.BZDOMAIN\AppData\Roaming\NetBeans\11.1 > Cache directory: > C:\Users\luca.mambretti.BZDOMAIN\AppData\Local\NetBeans\Cache\11.1 >Reporter: Luca Mambretti >Priority: Major > Labels: pull-request-available, regresion > Fix For: 11.1 > > Time Spent: 40m > Remaining Estimate: 0h > > I've noticed that the usual code completion for "for* cycles" has gotten way > dumber than the oracle powered version 8.2. > > In 8.2 if you had code like this: > > {{ public static void main(String[] args)}} > {{ {}} > {{ String[] strings = \{"1","2","3"};}} > {{ }} > {{ }}} > > and you wrote "fore" then invoked code completion via shortcut it would > generate the following block: > {{}}{{ for (String string : strings)}} > {{ {}} > {{ }} > {{ }}} > > now in 11.1 but I've also tried with 9.0 and it's the same it generates: > {{}}{{ for (Object object : col)}} > {{ {}} > {{ }} > {{ }}} > > not really that bad but definitely annoying compared to the previous version. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-2762) for* code completion has gotten dumber
[ https://issues.apache.org/jira/browse/NETBEANS-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16878885#comment-16878885 ] Eric Bresie commented on NETBEANS-2762: --- Just looking through open tickets and noticed NETBEANS-45 "Code completion is blocked for an extended period of time" Does this in any way relate to that one? Could 45 be resolved as part of changes here? > for* code completion has gotten dumber > -- > > Key: NETBEANS-2762 > URL: https://issues.apache.org/jira/browse/NETBEANS-2762 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 9.0, 10.0, 11.0, 11.1 > Environment: Product Version: Apache NetBeans IDE 11.1 > Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 > Runtime: Java(TM) SE Runtime Environment 11+28 > System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) > User directory: C:\Users\luca.mambretti.BZDOMAIN\AppData\Roaming\NetBeans\11.1 > Cache directory: > C:\Users\luca.mambretti.BZDOMAIN\AppData\Local\NetBeans\Cache\11.1 >Reporter: Luca Mambretti >Priority: Major > Labels: pull-request-available, regresion > Fix For: 11.1 > > Time Spent: 40m > Remaining Estimate: 0h > > I've noticed that the usual code completion for "for* cycles" has gotten way > dumber than the oracle powered version 8.2. > > In 8.2 if you had code like this: > > {{ public static void main(String[] args)}} > {{ {}} > {{ String[] strings = \{"1","2","3"};}} > {{ }} > {{ }}} > > and you wrote "fore" then invoked code completion via shortcut it would > generate the following block: > {{}}{{ for (String string : strings)}} > {{ {}} > {{ }} > {{ }}} > > now in 11.1 but I've also tried with 9.0 and it's the same it generates: > {{}}{{ for (Object object : col)}} > {{ {}} > {{ }} > {{ }}} > > not really that bad but definitely annoying compared to the previous version. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-2762) for* code completion has gotten dumber
[ https://issues.apache.org/jira/browse/NETBEANS-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874967#comment-16874967 ] Eric Bresie commented on NETBEANS-2762: --- Suspect not but could this be impacted by anything around this pull [https://github.com/apache/netbeans/pull/1211] ? > for* code completion has gotten dumber > -- > > Key: NETBEANS-2762 > URL: https://issues.apache.org/jira/browse/NETBEANS-2762 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 9.0, 10.0, 11.0, 11.1 > Environment: Product Version: Apache NetBeans IDE 11.1 > Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 > Runtime: Java(TM) SE Runtime Environment 11+28 > System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) > User directory: C:\Users\luca.mambretti.BZDOMAIN\AppData\Roaming\NetBeans\11.1 > Cache directory: > C:\Users\luca.mambretti.BZDOMAIN\AppData\Local\NetBeans\Cache\11.1 >Reporter: Luca Mambretti >Priority: Major > Labels: regresion > > I've noticed that the usual code completion for "for* cycles" has gotten way > dumber than the oracle powered version 8.2. > > In 8.2 if you had code like this: > > {{ public static void main(String[] args)}} > {{ {}} > {{ String[] strings = \{"1","2","3"};}} > {{ }} > {{ }}} > > and you wrote "fore" then invoked code completion via shortcut it would > generate the following block: > {{}}{{ for (String string : strings)}} > {{ {}} > {{ }} > {{ }}} > > now in 11.1 but I've also tried with 9.0 and it's the same it generates: > {{}}{{ for (Object object : col)}} > {{ {}} > {{ }} > {{ }}} > > not really that bad but definitely annoying compared to the previous version. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-2762) for* code completion has gotten dumber
[ https://issues.apache.org/jira/browse/NETBEANS-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874926#comment-16874926 ] Luca Mambretti commented on NETBEANS-2762: -- I'd say it's a bit harder than that, it does not recognize arrays or collections already present in the source code anymore. Before it would try to guess the closest array or collection and generate the correct implementation of the for* cycle; in this example case it should detect the variable "strings" is an array and generate an enhanced for loop with "String" as the object type and "string" as the variable name, using "strings" as the data source (sorry now I realize using strings as variable name was a very bad choice). Instead it generates a generic enhanced for loop with no reference to existing code, if you then modify the "col" variable it corrects the code to the expected value, but it should have done that from the start. Unfortunately I've no idea of where exactly in the codebase this bit is handled, but I'd bet some money java 9 support might have something to do with it since java 8 was already there in NB 8.X where this bit was working as expected. > for* code completion has gotten dumber > -- > > Key: NETBEANS-2762 > URL: https://issues.apache.org/jira/browse/NETBEANS-2762 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 9.0, 10.0, 11.0, 11.1 > Environment: Product Version: Apache NetBeans IDE 11.1 > Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 > Runtime: Java(TM) SE Runtime Environment 11+28 > System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) > User directory: C:\Users\luca.mambretti.BZDOMAIN\AppData\Roaming\NetBeans\11.1 > Cache directory: > C:\Users\luca.mambretti.BZDOMAIN\AppData\Local\NetBeans\Cache\11.1 >Reporter: Luca Mambretti >Priority: Major > Labels: regresion > > I've noticed that the usual code completion for "for* cycles" has gotten way > dumber than the oracle powered version 8.2. > > In 8.2 if you had code like this: > > {{ public static void main(String[] args)}} > {{ {}} > {{ String[] strings = \{"1","2","3"};}} > {{ }} > {{ }}} > > and you wrote "fore" then invoked code completion via shortcut it would > generate the following block: > {{}}{{ for (String string : strings)}} > {{ {}} > {{ }} > {{ }}} > > now in 11.1 but I've also tried with 9.0 and it's the same it generates: > {{}}{{ for (Object object : col)}} > {{ {}} > {{ }} > {{ }}} > > not really that bad but definitely annoying compared to the previous version. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-2762) for* code completion has gotten dumber
[ https://issues.apache.org/jira/browse/NETBEANS-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874879#comment-16874879 ] Geertjan Wielenga commented on NETBEANS-2762: - I guess it is probably here: https://github.com/apache/netbeans/tree/master/java/java.completion It's strange, I can reproduce with JDK 8 too, in Apache NetBeans 11, while with the same JDK in 8.2, the problem does not occur, so it doesn't seem to be JDK related but NetBeans related. > for* code completion has gotten dumber > -- > > Key: NETBEANS-2762 > URL: https://issues.apache.org/jira/browse/NETBEANS-2762 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 9.0, 10.0, 11.0, 11.1 > Environment: Product Version: Apache NetBeans IDE 11.1 > Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 > Runtime: Java(TM) SE Runtime Environment 11+28 > System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) > User directory: C:\Users\luca.mambretti.BZDOMAIN\AppData\Roaming\NetBeans\11.1 > Cache directory: > C:\Users\luca.mambretti.BZDOMAIN\AppData\Local\NetBeans\Cache\11.1 >Reporter: Luca Mambretti >Priority: Major > Labels: regresion > > I've noticed that the usual code completion for "for* cycles" has gotten way > dumber than the oracle powered version 8.2. > > In 8.2 if you had code like this: > > {{ public static void main(String[] args)}} > {{ {}} > {{ String[] strings = \{"1","2","3"};}} > {{ }} > {{ }}} > > and you wrote "fore" then invoked code completion via shortcut it would > generate the following block: > {{}}{{ for (String string : strings)}} > {{ {}} > {{ }} > {{ }}} > > now in 11.1 but I've also tried with 9.0 and it's the same it generates: > {{}}{{ for (Object object : col)}} > {{ {}} > {{ }} > {{ }}} > > not really that bad but definitely annoying compared to the previous version. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-2762) for* code completion has gotten dumber
[ https://issues.apache.org/jira/browse/NETBEANS-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874873#comment-16874873 ] Eric Bresie commented on NETBEANS-2762: --- Where in the codebase is “code completion” covered? So just to clarify, the issue is it now puts Object instead of String in the for each of expression? Could this be a side effect of inference changes in Java 8 area? On a slight tangent but with java8 there is a foreach expression used with Streams. Could any changes around this have introduced this? > for* code completion has gotten dumber > -- > > Key: NETBEANS-2762 > URL: https://issues.apache.org/jira/browse/NETBEANS-2762 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 9.0, 10.0, 11.0, 11.1 > Environment: Product Version: Apache NetBeans IDE 11.1 > Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 > Runtime: Java(TM) SE Runtime Environment 11+28 > System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) > User directory: C:\Users\luca.mambretti.BZDOMAIN\AppData\Roaming\NetBeans\11.1 > Cache directory: > C:\Users\luca.mambretti.BZDOMAIN\AppData\Local\NetBeans\Cache\11.1 >Reporter: Luca Mambretti >Priority: Major > Labels: regresion > > I've noticed that the usual code completion for "for* cycles" has gotten way > dumber than the oracle powered version 8.2. > > In 8.2 if you had code like this: > > {{ public static void main(String[] args)}} > {{ {}} > {{ String[] strings = \{"1","2","3"};}} > {{ }} > {{ }}} > > and you wrote "fore" then invoked code completion via shortcut it would > generate the following block: > {{}}{{ for (String string : strings)}} > {{ {}} > {{ }} > {{ }}} > > now in 11.1 but I've also tried with 9.0 and it's the same it generates: > {{}}{{ for (Object object : col)}} > {{ {}} > {{ }} > {{ }}} > > not really that bad but definitely annoying compared to the previous version. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-2762) for* code completion has gotten dumber
[ https://issues.apache.org/jira/browse/NETBEANS-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874153#comment-16874153 ] Geertjan Wielenga commented on NETBEANS-2762: - Yes, I can reproduce this. Strange. We'll need to figure out why and fix it. > for* code completion has gotten dumber > -- > > Key: NETBEANS-2762 > URL: https://issues.apache.org/jira/browse/NETBEANS-2762 > Project: NetBeans > Issue Type: Bug > Components: java - Editor >Affects Versions: 9.0, 10.0, 11.0, 11.1 > Environment: Product Version: Apache NetBeans IDE 11.1 > Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 > Runtime: Java(TM) SE Runtime Environment 11+28 > System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) > User directory: C:\Users\luca.mambretti.BZDOMAIN\AppData\Roaming\NetBeans\11.1 > Cache directory: > C:\Users\luca.mambretti.BZDOMAIN\AppData\Local\NetBeans\Cache\11.1 >Reporter: Luca Mambretti >Priority: Major > Labels: regresion > > I've noticed that the usual code completion for "for* cycles" has gotten way > dumber than the oracle powered version 8.2. > > In 8.2 if you had code like this: > > {{ public static void main(String[] args)}} > {{ {}} > {{ String[] strings = \{"1","2","3"};}} > {{ }} > {{ }}} > > and you wrote "fore" then invoked code completion via shortcut it would > generate the following block: > {{}}{{ for (String string : strings)}} > {{ {}} > {{ }} > {{ }}} > > now in 11.1 but I've also tried with 9.0 and it's the same it generates: > {{}}{{ for (Object object : col)}} > {{ {}} > {{ }} > {{ }}} > > not really that bad but definitely annoying compared to the previous version. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists