Format and Color Code Snippets For Blog

java Add comments

I need formatting java code snippets at my blogs so i use an eclipse plugin, simply you can copy html code to editor.

java2html Eclipse Plugin

I think the most practical way to format html and xml code snippets is using:
http://www.manoli.net/csharpformat

Thanks to Truong Hong Thi for sharing :)

Edit: I also found a brilliant wordpress plugin for formatting source code.
SyntaxHighlighter

Easy to use, just add source language=’java’ tag :)


public class FileComponent implements Serializable{
private String fileName;
private String contentType;
private int size;
private String localPath;

public String getFileName() {
return fileName;
}

public void setFileName(String fileName) {
this.fileName = fileName;
}

}
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Leave a Reply