You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (JIRA)" <ji...@apache.org> on 2019/03/10 07:03:00 UTC
[jira] [Resolved] (NETBEANS-326) Autocomplete does not work inside
a lambda expression
[ https://issues.apache.org/jira/browse/NETBEANS-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Laszlo Kishalmi resolved NETBEANS-326.
--------------------------------------
Resolution: Fixed
Fix Version/s: Next
Marked resolved as the corresponding PR got merged.
> 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
> Assignee: Sarvesh Kesharwani
> Priority: Critical
> Labels: patch, pull-request-available, usability
> Fix For: Next
>
> Attachments: RLtLF.png, t51Jz.png
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> 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: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists