You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jenny Brown <je...@gmail.com> on 2012/02/01 02:22:01 UTC

Wicket-Source: Click-through from browser back to Java source

Working on someone else's complex wicket pages can result in a lot of time
spent hunting for components in the source. What if you could click on an
item in the web page and jump straight to the line of Java source that
created it?

The net.ftlines.wicket-source module, plus a couple of plugins, lets you do
just that. There are three parts - a module for your WicketApplication, a
Firefox plugin, and an Eclipse plugin.

1. Wicket module records where in the source code each component is
constructed and saves it in an HTML attribute.
2. Firebug extension displays the html attribute in Firebug's sidebar and
lets you click to open it in Eclipse. (Chrome extension pending.)
3. Eclipse plugin listens for clicks from Firefox and opens the file to
that line of the Java source.

These three pieces together close the circle from wicket components and
html rendering, to the browser, and back to the wicket component source,
speeding work on existing but unfamiliar pages, and making minor wording
tweaks quick and easy.

For more information and installation, check out
https://www.42lines.net/2012/01/31/announcing-wicket-source/

Release 1.5.0_06 is available in maven central.  1.5.0.7-SNAPSHOT contains
a bug fix for ajax components.


Jenny Brown

Re: Wicket-Source: Click-through from browser back to Java source

Posted by "robert.mcguinness" <ro...@gmail.com>.
looks awesome.  can't wait to try it.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4346698.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket-Source: Click-through from browser back to Java source

Posted by Jenny Brown <je...@gmail.com>.
Thanks!  When you have a project url for the port, let me know, and I'll
link it in from the project wiki.

Jenny


On Mon, Feb 6, 2012 at 12:30 PM, Minas Manthos <mi...@gmail.com>wrote:

> Thanks for explanations Jenny. It was very easy to port... :-)
>
> And thank you again for your great work and for sharing. Well done.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4362279.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket-Source: Click-through from browser back to Java source

Posted by Minas Manthos <mi...@gmail.com>.
Thanks for explanations Jenny. It was very easy to port... :-)

And thank you again for your great work and for sharing. Well done.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4362279.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket-Source: Click-through from browser back to Java source

Posted by Jenny Brown <je...@gmail.com>.
On Wed, Feb 1, 2012 at 3:57 AM, Minas Manthos <mi...@gmail.com>wrote:

> Sounds great! Would be nice to have it for IDEA too... will look into it.
> :-)
>

I'm glad it sounds useful!  :)

Let me know if I can be of any assistance in the porting effort.  The core
behavior is simply listening for an http get request with a parameter for
which file to open, and optionally a password (to reduce dev team
pranks!).  So, it's hopefully very straightforward.


Jenny Brown

Re: Wicket-Source: Click-through from browser back to Java source

Posted by Minas Manthos <mi...@gmail.com>.
Sounds great! Would be nice to have it for IDEA too... will look into it. :-)


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4347366.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket-Source: Click-through from browser back to Java source

Posted by danisevsky <da...@gmail.com>.
Great work Jenny, thank you! It would be nice to have this feature in
wicket live examples.

Regards.

2012/2/6 Minas Manthos <mi...@gmail.com>:
> @armhold
> I've also already started a plugin, but was too busy and had not the time to
> test and to do some cleanup. :-) I think it's better to have a independent
> plugin rather than integrate in WicketForge, so each plugin can have own
> deploy cycle. Anyway... I'm glad that you already deployed your work.
>
> I forked and pushed my work for documentation purpose. If you like look into
> https://github.com/minman/wicket-source/tree/master/sourceopener-idea. Feel
> free to reuse some code (maybe ConfigurationPanel usind IDEA's PasswordSafe
> or whatever). I will not further work on it nor deploy.
>
> Thank you for the plugin. Regards. :-)
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4362375.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket-Source: Click-through from browser back to Java source

Posted by Jenny Brown <je...@gmail.com>.
I've updated the Firefox plugin for wicket-source to include support for
Firefox 10.  This is just metadata so that Firefox updates will stop
complaining, as it was already code compatible.

The new wicketsource@gmail.com.xpi plugin file is available from the
downloads area.
https://github.com/42Lines/wicket-source/downloads


So far no bug reports, but do let me know if anything gives you trouble, so
I can get it fixed.  Thanks!


Jenny Brown

Re: Wicket-Source: Click-through from browser back to Java source

Posted by Maarten Bosteels <mb...@gmail.com>.
I have not yet checked which URL's are used by the 42lines wicket-source
Firefox/Chrome extension
but just wanted to let you know that a few years ago I created an IntelliJ
IDEA plugin to jump from a URL to a specific line of code in IntelliJ

The plugin still works in recent IntelliJ versions

http://plugins.intellij.net/plugin/?id=1894

source-code:
http://code.google.com/p/firewood/source/browse/#svn%2Ftags%2FJumpToCode-0.7%253Fstate%253Dclosed

regards
Maarten


On Wed, Feb 8, 2012 at 2:19 PM, armhold <ar...@gmail.com> wrote:

> Thanks Minas, I'll take a look.
>
> I do have a bug in my plugin in that the configuration panel seems to
> always
> appear twice in the "IDE Settings" popup, so your existing code might be
> helpful in figuring that out.
>
> The Intellij documentation on plugin API documentation isn't the best,
> unfortunately.
>
> Thanks again,
> George
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4369389.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket-Source: Click-through from browser back to Java source

Posted by armhold <ar...@gmail.com>.
Thanks Minas, I'll take a look. 

I do have a bug in my plugin in that the configuration panel seems to always
appear twice in the "IDE Settings" popup, so your existing code might be
helpful in figuring that out.

The Intellij documentation on plugin API documentation isn't the best,
unfortunately.

Thanks again,
George


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4369389.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket-Source: Click-through from browser back to Java source

Posted by Minas Manthos <mi...@gmail.com>.
@armhold
I've also already started a plugin, but was too busy and had not the time to
test and to do some cleanup. :-) I think it's better to have a independent
plugin rather than integrate in WicketForge, so each plugin can have own
deploy cycle. Anyway... I'm glad that you already deployed your work.

I forked and pushed my work for documentation purpose. If you like look into
https://github.com/minman/wicket-source/tree/master/sourceopener-idea. Feel
free to reuse some code (maybe ConfigurationPanel usind IDEA's PasswordSafe
or whatever). I will not further work on it nor deploy.

Thank you for the plugin. Regards. :-)




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4362375.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket-Source: Click-through from browser back to Java source

Posted by Jenny Brown <je...@gmail.com>.
Chrome extension is available in the github downloads area now.

The extension uses devtools APIs (but no longer experimental) which are
currently only ready in the chrome dev channel version.  However the plugin
should be stable, so as chrome moves into beta and then stable release I
believe it will continue to work.

Note that when you install the extension, it will ask for permission for
all your web pages (although it does nothing with that data; but it's the
only way to read the wicketsource="" attributes).  If there's enough
interest, I can try making a version that only needs permissions for
localhost and shuts itself off for other websites.  That does limit remote
debugging uses a bit though.


Jenny

Re: Wicket-Source: Click-through from browser back to Java source

Posted by Jenny Brown <je...@gmail.com>.
Wicket-source 1.5.0.7 is available now as a full release in maven central.

This fixes a bug where ajax components were skipped; should work solidly
now in all cases.  If you have a bug report, there's an issue tracker on
the github project site.  https://github.com/42Lines/wicket-source

I also backported for wicket 1.4.x compatibility and that is available as a
full release in maven central now.

Version numbering is (wicket_version).(my_version).


Jenny Brown

Re: Wicket-Source: Click-through from browser back to Java source

Posted by Jenny Brown <je...@gmail.com>.
Yay, another platform! Thank you for porting it.

Jenny


On Fri, Feb 3, 2012 at 6:39 PM, armhold <ar...@gmail.com> wrote:

> Wow this is really handy, thanks Jenny. Looking forward to the Chrome port!
>
> 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.
>
> Minas: I've never done an Intellij plugin before so this is probably not
> the
> most idiomatic code, but feel free to copy the relevant bits into
> wicketforge if you find it useful.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4356257.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket-Source: Click-through from browser back to Java source

Posted by armhold <ar...@gmail.com>.
Wow this is really handy, thanks Jenny. Looking forward to the Chrome port!

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. 

Minas: I've never done an Intellij plugin before so this is probably not the
most idiomatic code, but feel free to copy the relevant bits into
wicketforge if you find it useful. 


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Source-Click-through-from-browser-back-to-Java-source-tp4346532p4356257.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org