Netbeans support #93

Closed
lombokissues opened this Issue Jul 14, 2015 · 7 comments

Projects

None yet

1 participant

@lombokissues
Collaborator

Migrated from Google Code (issue 20)

@lombokissues
Collaborator

πŸ‘€ 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:

http://wiki.github.com/rzwitserloot/lombok/netbeans

@lombokissues
Collaborator

πŸ‘€ 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

@lombokissues
Collaborator

πŸ‘€ reinierz Β  πŸ•— Nov 04, 2009 at 02:58 UTC

Some relevant API documentation:

http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-
source/org/netbeans/api/java/source/CompilationInfo.html

http://forums.netbeans.org/topic18270.html

(These last 2 links found by Marvin Hansen via the google groups).

@lombokissues
Collaborator

πŸ‘€ lahoda Β  πŸ•— Nov 27, 2009 at 22:31 UTC

I experimented a bit with NetBeans support for Lombok. My current set of patches is here:
http://lahoda.info/hg/lombok/
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.

@lombokissues
Collaborator

πŸ‘€ r.spilker Β  πŸ•— Dec 01, 2009 at 23:10 UTC

Just added to master basic netbeans support! Now just need to update installer.

@lombokissues
Collaborator

πŸ‘€ 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.

@lombokissues
Collaborator

End of migration

@Tradunsky Tradunsky pushed a commit to Tradunsky/lombok that referenced this issue Aug 19, 2015
Michail Plushnikov Fixed #93 : IntelliJ unable to resolve constructor when using @Builder …
…and @Value together
4b33111
@Tradunsky Tradunsky pushed a commit to Tradunsky/lombok that referenced this issue Aug 19, 2015
Michail Plushnikov Fixed #93 : IntelliJ unable to resolve constructor when using @Builder …
…and @Value together
81004ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment