X

Geertjan's Blog

  • May 8, 2006

Refactoring Support for Wicket

Geertjan Wielenga
Product Manager
While in Johannesburg, I got an e-mail from Prague from my JavaOne BOF co-presenter Petr Pisl with an update on Wicket support work he's been doing in preparation for our BOF. Now, when you rename a Java class that has a corresponding HTML file, as below...

...you (unsurprisingly) get this dialog box to type the new name:

However, the Refactoring window shows you that not only the Java class and its reference in the Java application class will be renamed, but also its corresponding HTML file (highlighted below):

After that, you can also undo the rename action, which will result in both the Java class and the HTML file reverting to their original names:

In addition, when you move a Java class, its corresponding HTML file will be moved too, as can be seen in the screenshot below:

I think these are pretty useful features when you're working with Wicket, because they allow you to treat the Java side and the HTML side together as a single file. Only at the end, when you hand off the HTML side to an HTML designer, only at that stage do the two sides truly separate from each other. Until that point, they need to be kept synchronized, but with as little overhead as possible. The features above go a long way to make that possible.

Join the discussion

Comments ( 3 )
  • Igor Vaynberg Monday, May 8, 2006
    This is exactly why I started what is now wicket-bench plugin for eclipse :) Well, that and a tabbed editor that lets you quicky switch between the class and associated markup/property files. With a help of a few people we made that a reality and have been enjoying these great features for a while now. So, from experience, I can say that features like these make a wicket developer's life that much more enjoyable.
    Another good refactor to have is the move class refactor which should move all the markup and property files along with the class
    Looking sweet! Keep it up
  • Eelco Hillenius Monday, May 8, 2006
    Cool stuf Geertjan and Petr! Thanks!
  • Geertjan Wednesday, May 10, 2006
    Hi Igor, thanks for the encouragement (and look at the last screnshot in this blog entry, that's "move class refactor", to which you refer in your comment).

    Hi Eelco, thanks also for the encouragement. I hope you're (and Igor and other Wicket folks) going to be at JavaOne!

    By the way, watch this blog for another very exciting announcement in the NetBeans-Wicket area, either today or tomorrow...

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.