Geertjan's Blog

  • July 13, 2005

Sources for Wicket Sample Plug-in for NetBeans IDE

Geertjan Wielenga
Product Manager
In Brand New Tutorial: Project Sample Plug-ins, I reported that I'd made a plug-in that installs NetBeans projectized Wicket samples in the IDE's New Project wizard. Now, you can download the plug-in and try it out for yourself. Download it here, open it in NetBeans IDE Dev, right-click the project, and choose Install/Reload in Target Platform. A new instance of the IDE will open which will include a large bunch of Wicket samples that you can play with, break, re-create, play with, break, re-create, and so on, until... you've learnt a whole bunch of cool things about Wicket. Because that's what those tutorials are about.

So, after setting these things up, let's deploy the "Hello World" sample.

  1. Get the basis project. First we'll get the project sample that contains information shared by all other Wicket samples. It contains things like a header file that gives a uniform look and feel to all Wicket projects. Click Ctrl-Shift-N (which opens the New Project wizard) and expand Samples, then Web, and then Wicket. Choose the first project, called "Basis for All Wicket Samples", as shown below:

    Click Next, find somewhere to store the project, and then click Finish. Right-click the new project in the Projects window, choose Resolve Reference Problems, click Resolve, and create a library called "wicket" that contains all the JARs provided by the Wicket API.

  2. Get the Hello World project. Click Ctrl-Shift-N again, and again expand Samples, then Web, and then Wicket. This time, select the project called "Hello World". Click Next and Finish. Right-click the Hello World project in the Projects window, choose Resolve Reference Problems, click Resolve, and browse to where the "Basis for All Wicket Samples" is stored in your filesystem. Select it and click Open Project Folder. The reference problem is now resolved.

  3. Run the Hello World project. Right click the project and choose Run Project. The project deploys and displays the Hello World application in the IDE's default browser. You can apply the same process to all the other Wicket samples in the New Project wizard, except for Display Tags, which has a few additional dependencies.

One cool thing about this plug-in is that it includes the sources of the plug-in itself -- in the form of a project sample! So, the final sample in the list in the New Project wizard's Wicket category (selected below), creates a sample project that is the plug-in that installs the Wicket samples, including itself.

The selected project sample above makes sense when examined in combination with the NetBeans Project Sample Plug-in Tutorial. For example, the tutorial explains how to modify the layer.xml file to install the samples in the New Project wizard.

Join the discussion

Comments ( 1 )
  • guest Monday, February 20, 2006
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.