Netbeans support is here!!! (beta)

183 views
Skip to first unread message

Reinier Zwitserloot

unread,
Dec 2, 2009, 6:30:27 PM12/2/09
to Project Lombok
With the help from some patches contributed by Jan Lahoda from the
NetBeans team, lombok has preliminary NetBeans support!

Give it a spin by downloading the beta from here:
http://projectlombok.googlecode.com/files/lombok-0.9.2-BETA3.jar

We're aware that your fields tend to get 'unused' warnings.

Reinier Zwitserloot

unread,
Dec 2, 2009, 6:35:21 PM12/2/09
to Project Lombok
Oh, forgot to mention: Only works on NetBeans 6.8, but that's in RC
right now, so that shouldn't be a problem.

David Goodenough

unread,
Dec 3, 2009, 5:42:26 AM12/3/09
to Project Lombok
Are any changes needed at the annotation handler level for this
support?

David

Reinier Zwitserloot

unread,
Dec 3, 2009, 6:23:05 AM12/3/09
to project-lombok
Nope; netbeans is using the javac handlers.

--Reinier Zwitserloot

Need to receive donations via the web?
Check https://tipit.to/



--
You received this message because you are subscribed to the Google
Groups group for http://projectlombok.org/

To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/project-lombok?hl=en

§atrapu'

unread,
Dec 9, 2009, 4:08:30 AM12/9/09
to Project Lombok
Hello,

I have installed NetBeans 6.8 RC2 on my machine and then I have run
lombok-0.9.2-BETA3.jar.
It has been successfully installed, but afterwards, I am not able to
start NetBeans, neither from the desktop shortcut nor from the
netbeans.exe file.
I have checked the netbeans.conf and there I can find the "-J-
javaagent: ..." option.
Do you have any suggestions ?

Thank you very much !

§atrapu'

unread,
Dec 9, 2009, 4:35:12 AM12/9/09
to Project Lombok
I have installed NetBeans 6.8 RC1 and still I cannot start the IDE
after Lombok has been successfully installed.
By the way, I saw in the cast posted at
http://blogs.sun.com/alexismp/entry/lombok_meets_netbeans_and_java
that the presenter uses Linux (Ubuntu I think) - I am using WinXP SP3
- could this be the problem ?

Roel Spilker

unread,
Dec 9, 2009, 4:39:18 AM12/9/09
to Project Lombok
We did test it in WinXP as well, and that worked on our pc. Do you
have the JDK installed? What happens if you open a command prompt and
run javac? Is it in the path?

On Dec 9, 10:35 am, §atrapu' <bogdan.maria...@gmail.com> wrote:
> I have installed NetBeans 6.8 RC1 and still I cannot start the IDE
> after Lombok has been successfully installed.
> By the way, I saw in the cast posted athttp://blogs.sun.com/alexismp/entry/lombok_meets_netbeans_and_java

Bogdan Marian

unread,
Dec 9, 2009, 4:49:14 AM12/9/09
to project...@googlegroups.com
Hello Roel,

I have opened a command prompt and I typed "javac -version" - the output is "javac 1.5.0_13".
Does Lombok target another JDK version ?

Roel Spilker

unread,
Dec 9, 2009, 4:51:28 AM12/9/09
to Project Lombok
Yes, you need JDK 1.6. Is that a problem for you?

On Dec 9, 10:49 am, Bogdan Marian <bogdan.maria...@gmail.com> wrote:
> Hello Roel,
>
> I have opened a command prompt and I typed "javac -version" - the output is
> "javac 1.5.0_13".
> Does Lombok target another JDK version ?
>
> > Groups group forhttp://projectlombok.org/
>
> > To post to this group, send email to project...@googlegroups.com
> > To unsubscribe from this group, send email to
> > project-lombo...@googlegroups.com<project-lombok%2Bunsu...@googlegroups.com>

Bogdan Marian

unread,
Dec 9, 2009, 4:53:21 AM12/9/09
to project...@googlegroups.com
No, not at all, is just this requirement was not obvious for me.
I will give it a shot.
Thanks!

PS: I have succesfully ran a Lombok based application inside an Eclipse J2EE with J2SE 1.5 and it worked.

Groups group for http://projectlombok.org/


To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com

Roel Spilker

unread,
Dec 9, 2009, 5:20:10 AM12/9/09
to Project Lombok
Thanks for trying this out. We'll update the documentation a.s.a.p. It
should however be possible to use JDK 1.6 to compile to 1.5 class
files and run your lomboked code on a 1.5 jvm.


On Dec 9, 10:53 am, Bogdan Marian <bogdan.maria...@gmail.com> wrote:
> No, not at all, is just this requirement was not obvious for me.
> I will give it a shot.
> Thanks!
>
> PS: I have succesfully ran a Lombok based application inside an Eclipse J2EE
> with J2SE 1.5 and it worked.
>
> > <project-lombok%2Bunsu...@googlegroups.com<project-lombok%252Buns...@googlegroups.com>

Reinier Zwitserloot

unread,
Dec 9, 2009, 5:30:27 AM12/9/09
to project-lombok
Roel, if lombok fails on netbeans running on jdk1.5 (and I'm guessing it will), we should generate some sort of dialog box explaining what's going on. Yes, end-of-lifed, and all that, but, a significant chunk of netbeans users are going to run into this. I'm guessing we should make this a crucial issue before we release hailbunny final. agreed?

--Reinier Zwitserloot

Bogdan Marian

unread,
Dec 9, 2009, 5:33:43 AM12/9/09
to project...@googlegroups.com
I have discovered another issue:
If I use the Lombok installer to enable Lombok support inside NetBeans 6.8 RC2, the installation runs smoothly, but I cannot open my IDE afterwards. If I run again the Lombok installer, but this time I choose to unsinstall it from the IDE, I can open my IDE and if I compile the project with JDK 1.6, the @Data annotation is working. I have not encountered this issue while working with Eclipse.

It seems that the Lombok installer does not need to be run with NetBeans 6.8 RC2 - in order to check this, I have uninstalled the RC2 and then re-installed it, but without running the Lombok installer for this version.
I have used the JDK 1.6 and the @Data annotation is working. This conclusion is kind of strange for me, since I was expecting that only by running the Lombok installer would trigger the compilation of the Lombok annotations.

Hope this helps !

Groups group for http://projectlombok.org/


To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com

Roel Spilker

unread,
Dec 9, 2009, 5:34:27 AM12/9/09
to Project Lombok
Yes, we should definately try to inform the user. But the problem here
it that NetBeans won't start, so I'm not sure if we are able to give a
dialog if the user tries to start NetBeans using JDK 1.5 of even JRE
1.6.


On Dec 9, 11:30 am, Reinier Zwitserloot <reini...@gmail.com> wrote:
> Roel, if lombok fails on netbeans running on jdk1.5 (and I'm guessing it
> will), we should generate some sort of dialog box explaining what's going
> on. Yes, end-of-lifed, and all that, but, a significant chunk of netbeans
> users are going to run into this. I'm guessing we should make this a crucial
> issue before we release hailbunny final. agreed?
>
> --Reinier Zwitserloot
>
> On Wed, Dec 9, 2009 at 10:53 AM, Bogdan Marian <bogdan.maria...@gmail.com>wrote:
>
> > No, not at all, is just this requirement was not obvious for me.
> > I will give it a shot.
> > Thanks!
>
> > PS: I have succesfully ran a Lombok based application inside an Eclipse
> > J2EE with J2SE 1.5 and it worked.
>
> >> <project-lombok%2Bunsu...@googlegroups.com<project-lombok%252Buns...@googlegroups.com>

Reinier Zwitserloot

unread,
Dec 9, 2009, 5:39:58 AM12/9/09
to project-lombok
Bogdan, if you explicitly compile source in netbeans, lombok has always worked, as netbeans will run annotation processors (actually, it'll run javac, which will run annotation processors, which makes javac pick up lombok automatically). The problem is: The auto-complete and source errors parts of netbeans don't, so you'd still get red wavy underlines in your source editor and no .getX() in your outline and autocomplete windows, even if it does compile.

Support for that's what the installer adds.

Roel, I'm guessing the failure is due to some incompatibility with the 1.5 version of amongst other things tools.jar - basically, we stuff a call into lombok's javac processor straight into netbeans, and that javac processor has dependencies on 1.6-only classes. If we put one layer of indirection in, we can detect this (ClassNotFoundError) and take the appropriate action.

--Reinier Zwitserloot



Groups group for http://projectlombok.org/


To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com

Reinier Zwitserloot

unread,
Dec 9, 2009, 6:13:03 AM12/9/09
to Project Lombok
http://code.google.com/p/projectlombok/issues/detail?id=82
> > > >> > > project-lombo...@googlegroups.com<project-lombok%2Bunsubscribe@go oglegroups.com>
> > <project-lombok%2Bunsu...@googlegroups.com<project-lombok%252Bunsubscri b...@googlegroups.com>
>
> > > >> <project-lombok%2Bunsu...@googlegroups.com<project-lombok%252Bunsubscri b...@googlegroups.com>
> > <project-lombok%252Buns...@googlegroups.com<project-lombok%25252Bunsub scr...@googlegroups.com>
>
> > > >> > > For more options, visit this group at
> > > >> > >http://groups.google.com/group/project-lombok?hl=en
>
> > > >> --
> > > >> You received this message because you are subscribed to the Google
> > > >> Groups group forhttp://projectlombok.org/
>
> > > >> To post to this group, send email to project...@googlegroups.com
> > > >> To unsubscribe from this group, send email to
> > > >> project-lombo...@googlegroups.com<project-lombok%2Bunsubscribe@go oglegroups.com>
> > <project-lombok%2Bunsu...@googlegroups.com<project-lombok%252Bunsubscri b...@googlegroups.com>
>
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/project-lombok?hl=en
>
> > > >  --
> > > > You received this message because you are subscribed to the Google
> > > > Groups group forhttp://projectlombok.org/
>
> > > > To post to this group, send email to project...@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > project-lombo...@googlegroups.com<project-lombok%2Bunsubscribe@go oglegroups.com>
> > <project-lombok%2Bunsu...@googlegroups.com<project-lombok%252Bunsubscri b...@googlegroups.com>
>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/project-lombok?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups group forhttp://projectlombok.org/
>
> > To post to this group, send email to project...@googlegroups.com
> > To unsubscribe from this group, send email to
> > project-lombo...@googlegroups.com<project-lombok%2Bunsubscribe@go oglegroups.com>

Reinier Zwitserloot

unread,
Dec 12, 2009, 8:34:36 AM12/12/09
to Project Lombok
The 1.5 issue has now been 'fixed'. Running netbeans on a 1.5 JVM will
not work, but instead of blowing up your entire netbeans install,
lombok detects it, disables itself, waits for netbeans to fully load,
and then shows a popup window explaining what just happened and how to
fix it.

Actually making lombok work on a netbeans that runs on 1.5 is not
feasible.
Reply all
Reply to author
Forward
0 new messages