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 173275

Summary: Take into account code generated by Lombok in Java model
Product: java Reporter: Petr Jiricka <pjiricka>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 173063    

Description Petr Jiricka 2009-09-29 14:47:17 UTC
1. Create a Java SE application
2. Create a JavaBean (from our template) beans.MyBean in this application
3. Put the following code in the Main class:
    MyBean b = new MyBean();
    b.setSampleProperty("x");
    System.out.println(b.getSampleProperty());
4. Add the Lombok library to the project: http://projectlombok.org/
5. Annotate the MyBean class with the @lombok.Data annotation and delete the getter and setter for 'sampleProperty'

This is a valid application, as Lombok will generate the getter and setter during build and everything will work.
However, the IDE displays unsuitable hints: it marks 'sampleProperty' as unused, and displays a "can not find symbol" on
the usages of the getter/setter in the Main class. It would be nice if it could take into account the code generated by
the build.
Comment 1 kedi 2010-05-24 19:50:40 UTC
1. add lombok to build path (and disable compile on save)
2. create a new class
3. annotate it with @lombok.Data
4. create some fields
5. build the project
-> nb still shows the fields as unused
6. add some method to the class
7. use any auto-generated getter in that method (auto-complete lists the getters well)
-> hints of fields being unused are gone.
9. save the java file.
-> fields are again marked as unused

I didnt create a separate bug as the issue resembles with this bug.

NB version 6.8