Migrated from Google Code (issue 20)
👤 reinierz 🕗 Aug 05, 2009 at 20:21 UTC
Lombok doesn't currently work with netbeans.
netbeans internally uses the Javac AST model, so the only thing that needs to be done is to make
netbeans hand off generated JCCompilationUnit objects to lombok at the appropriate time.
Shouldn't be /too/ difficult.
There's a branch named 'addNetbeans' with ongoing development effort for this issue, and there's
some background on what's been done so far on the wiki:
👤 reinierz 🕗 Oct 31, 2009 at 20:16 UTC
See also netbeans umbrella issue: http://www.netbeans.org/issues/show_bug.cgi?id=173063
as well as netbeans wiki page: http://wiki.netbeans.org/Lombok
👤 reinierz 🕗 Nov 04, 2009 at 02:58 UTC
Some relevant API documentation:
(These last 2 links found by Marvin Hansen via the google groups).
👤 lahoda 🕗 Nov 27, 2009 at 22:31 UTC
I experimented a bit with NetBeans support for Lombok. My current set of patches is here:
There are three patches:
-netbeans.diff (patch for NetBeans sources (trunk)): introduces TaskListenerProvider,
which is used to create TaskListener, which is attached to each internal javac
instance used by the NetBeans Java support. Also fixes a few places which were not
prepared to get -1 positions.
-lombok.diff (patch for Lombok sources, against revision
e10d58e): the actual support for Lombok in NetBeans.
Consists of two parts: a NetBeans module (in src/netbeans), which uses the
TaskListenerProvider to create a TaskListener. The TaskListener implementation is
src/core/lombok/javac/netbeans/NetBeans.java, which performs needed transformations
after parsing any file. Both parts will need improvements. netbeans/NetBeans.java and
apt/Processor.java could probably share a lot of code. Also includes a change to
JavaAST.java, which ensures that the newly-generated elements have (-1) position.
-nb-javac.diff (patch for nb-javac): prebuilt version of nb-javac with this patch is
referenced from netbeans.diff
With these patches, the Lombok generated methods (e.g. getProperty()) appear in
navigator, are visible in code completion, and can be used from other source files.
👤 r.spilker 🕗 Dec 01, 2009 at 23:10 UTC
Just added to master basic netbeans support! Now just need to update installer.
👤 reinierz 🕗 Dec 02, 2009 at 23:33 UTC
0.9.2 beta 3 is out with netbeans support. It's still in the early phases.
I haven't actually used your patches, Jan (lahoda) - in order to stick with the lombok install model (lombok
installs into a vanilla IDE installation without replacing anything, just by adding to your config file, as a
separate agent), I've agent-ified the stuff you've done in the patch. Still, the patch told me exactly what to
change, so, you're awesome!
The plus side is that lombok.jar now installs cleanly and easily into any netbeans. It does have to be 6.8, it
doesn't seem to work at all in 6.7. Should be okay though - 6.8 is in RC.
End of migration
Fixed #93 : IntelliJ unable to resolve constructor when using @Builder …
…and @Value together