Sunday 2 December 2012

Copy as HTML Eclipse plugin

'Copy as HTML' eclipse plugin
'Copy as HTML' eclipse plugin
Usually we face problems while copying our code to many of the blog sites or forums, as they require us to convert our code to html form so that it can be best displayed in its pure form.

The Copy as HTML eclipse IDE plugin allows us to directly copy our code as HTML and paste it to our blogs or forums without any formatting.
Download Copy as HTML eclipse plugin Copy as HTML eclipse plugin

Steps to install the plugin:
  1. Download the Copy as HTML eclipse plugin
  2. Copy it to the 'dropins' folder of your eclipse installation
  3. If 'dropins' folder is not present then copy it to the 'plugins' folder of your eclipse installation
  4. Restart eclipse IDE
  5. That's it
`Steps to Use
  1. Select the code or text to be copied
  2. Select 'Copy as HTML' option or press 'cntrl+shift+3'
  3. Paste it your superb blog
Eclipse Plugin - Copy as HTML
Copy as HTML

Modify default settings of Copy as HTML Eclipse plugin

The Copy as HTML eclipse plugin gives you some flexibility to make modifications to its default settings which require some changes to the plugin.properties file that comes with the plugin jar file.

Steps to modify default settings in windows (having Winrar installed):
  1. Close eclipse and take the backup of the jar file (in case something goes wrong, we can always replace the file)
  2. Open the jar file using Winrar
  3. Double click on plugin.properties file
  4. Make and Save changes to the file and close it
  5. Winrar will prompt you to confirm the updation. Press Yes.
  6. Close Winrar and restart eclipse
In case Winrar is not installed on your system then we can use the 'jar' command utility to extract the contents, make changes in the plugin.properties file and then again create a jar file.

There are 3 properties that can be changed:
  1. com.blogspot.javasampleprogram.fontsize - valid values are 10px,11px etc
  2. com.blogspot.javasampleprogram.codeblockheight - valid values are auto, 100%, 100px, 200px etc
  3. com.blogspot.javasampleprogram.alternatebackground - valid values are Y or N. Set Y if you need alternate background else N
Please do let me know, if you face any issues or want any new feature to be added.