Wicket-source shows wicket component origin locations in source code, in an html attribute, speeding the modification of existing wicket pages.
It lets you Inspect-Element from your web browser, click on a link in a Firebug sidebar, and then Eclipse opens the Java source code to the location of that wicket component. It is meant primarily as a wicket developer tool.
There are three parts.
Versioning of everything is based off of Wicket version ala wicketstuff's recommendations. So, the following resources are matched to the 1.5.x version of Wicket.
The module wicket-source plugs in to your Wicket application to record the class and line number where each component is created. It produces an html attribute on each dom node, like so:
Maven dependency for Wicket 6:
<dependency> <groupId>net.ftlines.wicket-source</groupId> <artifactId>wicket-source</artifactId> <version>18.104.22.168</version> </dependency>
or for Wicket 1.5:
<dependency> <groupId>net.ftlines.wicket-source</groupId> <artifactId>wicket-source</artifactId> <version>22.214.171.124</version> </dependency>
For Wicket 7 use
Usage, inside a debug flag check in your WicketApplication:
Obviously, whatever debug check you do, ensure that the matching debug flag is set to true in your dev environment or you won't see any useful output. The process used to discover instantiation locations is a bit slow and should not be used in a production environment.
There is also a
wicket-source-demo web application available via maven central. It's a wicket quick start app modified to show what wicket-source can do. It's a great way to test out your Firefox plugin and Eclipse drop-in setups.
If you need to track a snapshot release for bug fixes, the snapshot repo is:
and the current snapshot version as of Feb 2012 is
This is a Firebug extension, so yes, you need Firebug as well.
The WicketSource (click to install) firebug extension lets you inspect an element and request that the file be opened in Eclipse.
Inspect an element with Firebug, and then go to the WicketSource sidebar pane to see where in the Java code its Wicket component was created. Click the hyperlink to send a request to Eclipse to open the file (you'll need the Eclipse plug-in below for that to work).
Chrome extension is compatible with Chrome 18 and later. Just like the FireBug extension, the Chrome extension hangs off of "inspect element" and adds its own panel to the tool area.
The BEST way to install is through the Chrome Web Store, here:
Uninstall/delete your existing version of the plugin before installing from the web store.
If for some reason that is taken down, or you want the older version of the plugin, you can still install from the Downloads area. But Chrome has recently changed their extension installation options. You can no longer install directly from a web page on github (or any third party website), for security reasons. If you choose to use it, here's how.
The SourceOpener plugin for Eclipse is the final step.
To install, copy the net.ftlines.wicketsource.sourceopener_VERSION.jar from the Downloads area of this github project, into your \eclipse\dropins\ folder and restart Eclipse. Then go to the menu "Window", "Show View", "Other", "Source Opener", "Recent File Locations", and put the resulting tab wherever you like.
The listener starts up by default, so it should be usable immediately. The first open-file click from Firefox will be slow while the Eclipse search engine initializes; the rest should be quite fast.
Eclipse will open directly to the line in the Java file when it receives the click from Firefox. To reopen a line, double-click any item in the "Recent File Locations" tab.
WicketSource for browsers and SourceOpener for Eclipse communicate across a port. You can set a different port through the preferences (make sure they both match!) and optionally require a password as well.
You can also stop and start the listener in Eclipse (red square to stop, green play button to start). It will pick up preference changes automatically, so you may never need to manually stop or start it.
George Armhold ported the IDE plugin. Thanks!! He says:
I just whipped up a plugin for Intellij. It might not be publicly available until they have a chance to review it, but here's the link: http://plugins.intellij.net/plugin/?idea&id=6846
You can https://github.com/armhold/wicket-source-intellij/tree/master/artifacts install the jar manually if you don't feel like waiting for it to show up in the public repo.
In the mean time source is on github: https://github.com/armhold/wicket-source-intellij.