Home Eclipse Plugins Editor Save Any Eclipse Editor as HTML
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Save Any Eclipse Editor as HTML

Advertisement
Often I have wanted to save Java or other languages as html. There are several tools online that does this, but many are commercial and they are cumbersome to use (you often have to cut and paste the java into a webpage).

Save Any Eclipse Editor as HTML

     

Often I have wanted to save Java or other languages as html. There are several tools online that does this, but many are commercial and they are cumbersome to use (you often have to cut and paste the java into a webpage).

So I figured, Eclipse has the style information needed, why not just extract it and generate HTML directly from Eclipse editors.

The HTML is stored in a file and also in the clipboard. You can cancel the save file action and the HTML will still be stored in the clipboard. It will use your exact settings including font settings, formatting and colors.

How to make your editor work with htmlSave:

The plug-in can work with any text editor in Eclipse, but it needs to know how to get a hold of the StyledText widget in it. This is done by using an extension point HtmlSave.sourceViewerFinder. An example of one of one of these extensions is the java class exampled above.

Version 1.1 of htmlSave has gotten a little "smarter" and works with more editors than before, but it still might not be able to find the style information needed. Also, if you extend IAdaptable and return the StyledText widget when asked for it, that works as well.

 Know click for more information.

http://eclipse.moelleryoung.com/htmlsave/index.php

     

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: March 3, 2008

Ask Questions?    Discuss: Save Any Eclipse Editor as HTML  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Boss
November 1, 2011
ixvRutRksWRxX

I told my kids we'd play after I found what I neeedd. Damnit.
DMCA.com