[
https://issues.apache.org/jira/browse/NETBEANS-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Javier A. Ortiz updated NETBEANS-326:
-------------------------------------
Affects Version/s: 10.0
> Autocomplete does not work inside a lambda expression
> -----------------------------------------------------
>
> Key: NETBEANS-326
> URL: https://issues.apache.org/jira/browse/NETBEANS-326
> Project: NetBeans
> Issue Type: Bug
> Components: java - Editor
> Affects Versions: 8.2, 10.0
> Environment: Windows 10 Enterprise
> Reporter: Morgan M
> Priority: Minor
> Labels: patch, usability
> Attachments: RLtLF.png, t51Jz.png
>
>
> When declaring an object with a lambda expression, autocomplete for variables
> inside the lambda does not seem to work, and instead I see global variables,
> suggestions for keywords amongst other things as shown below.
> {code:java}
> public class SOInner {
> private ActionListener listenerExampleLambda = e -> {
> //autocomplete DOES NOT work for these vars
> int testVarInner = 2;
> int testVarInner2 = 4;
> };
> private ActionListener listenerExampleClass = new ActionListener() {
> @Override
> public void actionPerformed(ActionEvent e) {
> //autocomplete works for these vars
> int testVarInner = 2;
> int testVarInner2 = 4;
> }
> };
> private Comparable<SOInner> comparableExampleLambda = o -> {
> //autocomplete DOES NOT work for these vars
> String testString = "Hello";
> String testString2 = "Hi";
> return 0;
> };
> private Comparable<SOInner> comparableExampleClass = new
> Comparable<SOInner>() {
> @Override
> public int compareTo(SOInner o) {
> //autocomplete works for these vars
> String testString = "Hello";
> String testString2 = "Hi";
> return 0;
> }
> };
> }
> {code}
> You can reproduce the bug by placing your cursor inside the lambda
> expression under the String variables and pressing Ctrl+Space. You will
> notice that testString and testString2 do not appear. They do appear if these
> steps are reproduced from within an anonymous inner class.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists