New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netbeans support #93

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

Comments

Projects
None yet
1 participant
@lombokissues
Collaborator

lombokissues commented Jul 14, 2015

Migrated from Google Code (issue 20)

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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).

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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.

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 r.spilker   🕗 Dec 01, 2009 at 23:10 UTC

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

Collaborator

lombokissues commented Jul 14, 2015

👤 r.spilker   🕗 Dec 01, 2009 at 23:10 UTC

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

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

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.

Collaborator

lombokissues commented Jul 14, 2015

👤 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

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

End of migration

Collaborator

lombokissues commented Jul 14, 2015

End of migration

Tradunsky pushed a commit to Tradunsky/lombok that referenced this issue Aug 19, 2015

Tradunsky pushed a commit to Tradunsky/lombok that referenced this issue Aug 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment