Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 173275 - Take into account code generated by Lombok in Java model
Take into account code generated by Lombok in Java model
Status: NEW
Product: java
Classification: Unclassified
Component: Hints
6.x
All All
: P3 with 5 votes (vote)
: TBD
Assigned To: Svata Dedic
issues@java
:
Depends on:
Blocks: 173063
  Show dependency treegraph
 
Reported: 2009-09-29 14:47 UTC by Petr Jiricka
Modified: 2013-09-02 14:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

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();
    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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo