Javadoc2Haxe: Chrome extension that create a Java extern for Haxe in one-click

Worldwide Haxe 2012(wwx) has just ended. The long awaited Haxe Java and C# targets by Cauê Waneck (@cwaneck) were pushed to the official Haxe trunk (For now you have to build the Haxe compiler from source in order to use it).

Cauê is kind enough to let me play with it before wwx and I coded two little Processing demos for him to shown during his talk. The Java target is very well designed such that using “native” Java class is extremely easy. It is very similar to creating externs for Haxe/JS. I used a little jQuery script to help me building extern from Javadoc pages (BTW @Dr_Emann@razaina also had similar ideas). Later I think it would be fun and useful to create a Chrome extension for the script. Since there is already a Haxe extern of Chrome extension, it is pretty easy to implement it in Haxe.

Here it is from Chrome store

Go install Javadoc2Haxe from Chrome store.

How to use

Go to a Javadoc page (e.g. Processing’s). Select a class from the class menu and you should see a orange icon next to the class name:

Javadoc2Haxe button

Click on the button, see the magic:

Javadoc2Haxe output

Copy and paste the output to your project.

Edit it as you find appropriate, since the generated extern may contain unwanted methods(maybe referencing another Java type that you don’t want to create extern for it).

You’re more than welcome to fill issues, or even fork the extension from Github. Just beware of its quick and dirty code ;)

comments powered by Disqus