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

Summary: Improve support of Project Lombok's 'val'
Product: java Reporter: xwinus
Component: EditorAssignee: Dusan Balek <dbalek>
Status: REOPENED ---    
Severity: normal CC: jason3421, pedrohidalgo
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Example of code completion defect
screenshot showing lombok's val not working in netbeans
Lombok val feature not working on netbeans 8.2

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