This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248385 - Improve support of Project Lombok's 'val'
Summary: Improve support of Project Lombok's 'val'
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.1
Hardware: PC All
: P3 normal with 6 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-04 08:13 UTC by xwinus
Modified: 2017-05-21 16:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example of code completion defect (12.05 KB, image/png)
2014-11-04 08:13 UTC, xwinus
Details
screenshot showing lombok's val not working in netbeans (172.19 KB, image/png)
2016-11-03 15:41 UTC, jason3421
Details
Lombok val feature not working on netbeans 8.2 (147.55 KB, image/png)
2017-05-21 16:35 UTC, pedrohidalgo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xwinus 2014-11-04 08:13:48 UTC
Created attachment 150256 [details]
Example of code completion defect

Hello there,

one of the great features of Lombok Project is the possibility to use keyword 'val' for local variables, instead of defining their type (http://projectlombok.org/features/val.html). When used in code, everything compiles right, however, the IDE code completion used on variable defined using this is incorrect (please see the attached image). Is it possible to fix this feature to show correct method completion list, based on real variable type?
Comment 1 Martin Balin 2016-07-07 07:17:17 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 2 jason3421 2016-11-03 15:41:16 UTC
Created attachment 162750 [details]
screenshot showing lombok's val not working in netbeans
Comment 3 jason3421 2016-11-03 15:43:57 UTC
The screenshot I just attached shows lombok's val support doesn't work in Netbeans Dev Version 2016110200002 (last night's development build). The maven build works, but the IDE improperly reports an error via the red squiggly underline which states: "NewClass.java:8: error: incompatible types: int cannot be converted to val". To reproduce just follow the screenshot - create a new maven project, import lombok, create your public static void main, and use 'val'.
Comment 4 pedrohidalgo 2017-05-21 16:35:02 UTC
Created attachment 164369 [details]
Lombok val feature not working on netbeans 8.2

Same issue here:

NetBeans doesn't provide autocompletion on variable created using the Lombok's val feature, see screenshot attached:


Lombok 1.16.16
Netbeans 8.2 
Macos 10.12.5