Download NetBeans!

20090708 Wednesday July 08, 2009

Wicket Plugin Ready for NetBeans IDE 6.7

I created a 'nb_67' branch on https://nbwicketsupport.dev.java.net today. I worked on the Wicket plugin in that space. Several small tweaks needed to be done to upgrade the plugin to 6.7, but now it's done. I tried it out on Ubuntu and then Ken Ganfield, technical writer colleague, tried it on his Mac. No problems.

Go here to download the ZIP containing the three NBM files you need to install:

http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3586

Some small differences between this release and the previous:

  • It works for 6.7 because I upgraded the version numbers of the NetBeans APIs used by the plugin. (The problem around pre61completion module can be fixed by updating the dependencies to their current version, see here.)

  • It only works for 6.7 because some APIs used are new compared to the previous version, especially the Classpath API, which wasn't there previously, with the applicable class being found in a different JAR at that time.

  • JARs for 1.4 RC-5 (instead of 1.4 RC-2 as before) are included. If you don't like this version, that's fine, then simply download the JARs you want from the Wicket site and add those to the NetBeans IDE Library Manager instead of the ones that the plugin provides.

  • Fewer JARs are included than before, maybe that will cause problems. Now, instead of a very long list of JARs bundled with Wicket distros, you only get the absolute minimum, the core Wicket JAR and the two mandatory logging JARs. (Thanks to Jesse Sightler for some insight and this reference.) The others you can download yourself. Or if there's enough disagreement, I'll put them back. (Or anyone else can too, of course.)

Some pics, the first showing the extension to the New Web Application wizard...

...with the second showing exactly what you get at the end of the above:

You should be able to deploy the above immediately, without any coding or configuring whatsoever.

And there are some special tools in the IDE for Wicket, such as the Navigator by Tim in the bottom left below, showing the Wicket IDs, letting you click them to navigate to the relevant place in the file:

Make sure that, when you click the "Download" button on the plugin page, you end up with "Wicket4NB67-2.zip", which will also get you Javadoc support for Wicket classes...

...as well as the ability to navigate into the Wicket sources (by holding down the Ctrl key and clicking on the reference to the class you're interested in):

Known issues: The logging sample by Tim is broken, somehow. Whoever fixes it wins a NetBeans pen. (Let me know how to fix it and I will send you a NetBeans pen. Or fix it and commit the changes yourself, which is even better.) By the way, I didn't manage to deploy Wicket to GlassFish v 2.1, although prelude 3 didn't have a problem.

For future reference, this is where I found various Wicket JARs.

If, in a week or two, no serious problems remain, I will prepare the plugin for inclusion in the Plugin Portal Update Center, so that it can be installed without your needing to download it from the Plugin Portal.

Jul 08 2009, 09:08:00 AM PDT Permalink

Trackback URL: http://blogs.sun.com/geertjan/entry/wicket_plugin_ready_for_netbeans
Comments:

Cool, thank you again.

Posted by aul on July 08, 2009 at 02:38 PM PDT #

Thanks for the update,
Unfortunately it's still not very maven-friendly.

The issue about explicit maven artifact coordinates missing in the library definition is not fixed even though I've filed it a year ago and provided a patch.

https://nbwicketsupport.dev.java.net/issues/show_bug.cgi?id=6

It also generates all code into the src/main/java folder including html and css files, that's plainly wrong and none of these files make it even into the war file. it has to be either in the webapp folder to be in the web root, or in resource folders to end up next to the class files. I can give hints or provide patches if you want (I prefer not to file another bug+patch without prior agreement)

Posted by Milos Kleint on July 09, 2009 at 12:17 PM PDT #

Sorry, didn't know about that issue. Will look into it. Your other comment, about where the code is generated, is the first time someone has mentioned this, so I'm surprised to hear this being a problem. Yes, of course, please pass on any hints and patches. In the next release of the plugin, I'll include all the patches you contribute.

Posted by Geertjan on July 09, 2009 at 12:21 PM PDT #

Integrated your patch into nb_67 branch.

Posted by Geertjan on July 09, 2009 at 12:33 PM PDT #

And, FYI, here's a picture of the WAR I get from building my "plainly wrong" Wicket applications:
http://blogs.sun.com/geertjan/resource/plainly_wrong.png

Posted by Geertjan Wielenga on July 09, 2009 at 12:41 PM PDT #

I"ve filed a new issue with a patch,
https://nbwicketsupport.dev.java.net/issues/show_bug.cgi?id=14

it makes sure the framework provider puts the files in correct locations

I guess similar code should be added to any file templates you have.

Posted by Milos Kleint on July 10, 2009 at 12:36 AM PDT #

"Wicket tags" always displays in the navigator when a html file is opened, even if I does not add wicket support.
I think this is a small defect.

Posted by hantsy on July 11, 2009 at 10:19 AM PDT #

True. You can file an issue at nbwicketsupport.dev.java.net about this.

Posted by Geertjan Wielenga on July 11, 2009 at 10:25 AM PDT #

plugins.netbeans.org has been unavailable for a good amount of time this weekend. Could you post the plugin here?

Posted by David Nedrow on July 11, 2009 at 07:34 PM PDT #

Never mind, grabbed it via CVS.

Posted by David Nedrow on July 11, 2009 at 09:14 PM PDT #

How can I upgrade the Wicket version used by the plugin? We are using 1.4.5 and the plugin contains 1.4.0

Posted by Thomas on January 20, 2010 at 12:46 AM PST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed