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 - Take into account code generated by Lombok in Java model
Summary: Take into account code generated by Lombok in Java model
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 5 votes (vote)
Assignee: Svata Dedic
Depends on:
Blocks: 173063
  Show dependency tree
Reported: 2009-09-29 14:47 UTC by Petr Jiricka
Modified: 2013-09-02 14:22 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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();
4. Add the Lombok library to the project:
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