Skip to content
Jenny Brown edited this page Aug 26, 2016 · 73 revisions

August 2016: The wicket-source project has been unattended for a while - I'm working on reviving it, updating to all the latest related software.

Chrome plugin is updated in the web store, and should work right again.

Eclipse plugin is updated for Eclipse Neon, and is downloadable as a binary jar which goes into your Eclipse dropins folder. (Eclipse Marketplace is still too difficult to figure out, with self-hosting and all.)

Firefox plugin is dead. It requires a rewrite from scratch once Firebug 3 releases and the Web Extensions API is stable and sufficient.

Wicket Application plugin update is still pending, although the existing older one for Wicket 7 should still work fine under the older net.ftlines.wicket-source name.

New package name is com.github.jennybrown8.wicketsource

We currently have two issue trackers, due to the forked project.

https://github.com/42Lines/wicket-source/issues

https://github.com/jennybrown8/wicket-source/issues


About Wicket-Source and Wicket Source Opener

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 browser 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.

The server-side component adds an attribute to wicket component html tags, specifying the file and line they were created from.

HTML WicketSource HTML Attribute

The web browser extension borrows from Inspect behavior to give you a right-side pane with a clickable link.

Chrome WicketSource Chrome

Clicking the link takes you to your open Eclipse workspace, where the Eclipse plugin searches for matching source code and opens it to the right line. (You do have to Show View > Wicket Source Opener > Wicket Source Opener before this behavior will work.)

Eclipse WicketSource Eclipse

Wicket Module wicket-source

Versioning of everything is based off of Wicket version ala wicketstuff's recommendations.

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: wicketsource="net.ftlines.wicketsource.demo:HomePage.java:59"

Maven dependency for Wicket 7:

<dependency>
      <groupId>net.ftlines.wicket-source</groupId>
      <artifactId>wicket-source</artifactId>
      <version>7.0.0</version>
</dependency>

Maven dependency for Wicket 6:

 <dependency>
      <groupId>net.ftlines.wicket-source</groupId>
      <artifactId>wicket-source</artifactId>
      <version>6.0.0.8</version>
 </dependency>

or for Wicket 1.5:

 <dependency>
      <groupId>net.ftlines.wicket-source</groupId>
      <artifactId>wicket-source</artifactId>
      <version>1.5.0.7</version>
 </dependency>

Usage, inside a debug flag check in your WicketApplication:

 WicketSource.configure(this);

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:

 https://oss.sonatype.org/content/repositories/snapshots/

WicketSource Chrome Extension

Chrome extension is compatible with Chrome 48 and later. The Chrome extension hangs off of "inspect element" and adds its own panel to the tool area.

Install through the Chrome Web Store, here:

https://chrome.google.com/webstore/search/WicketSource

Wicket Source Opener Eclipse Plug-in for Eclipse Neon

The WicketSourceOpener plugin for Eclipse is the final step.

Download as a binary jar

To install, download the jar, and place it in your Eclipse dropins folder. The location of the dropins folder varies depending on your OS; google search "eclipse dropins folder location" for hints.

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 your browser. To reopen a line, double-click any item in the "Wicket Source Opener" tab.

WicketSource for browsers and WicketSourceOpener 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.

Enjoy!

IDE port for NetBeans

Joachim Rohde ported the IDE plugin to NetBeans. Thanks!!

NBWicketSourcePlugin is a NetBeans plugin that works with the Wicket-Source browser extension.

https://github.com/JoachimRohde/NBWicketSourcePlugin

IDE port for Intellij

George Armhold ported the IDE plugin to IntelliJ. 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.

Clone this wiki locally
You can’t perform that action at this time.