Check this out : http://xzfv.appspot.com/s/about.html
you can use it to format your source code before paste it in the blog.
Just copy your code, submit and copy the result
Example :
package org.joke.ui;
import java.net.URL;
import org.eclipse.e4.xwt.XWT;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
public class Hello extends Composite {
public Hello(Composite parent, int style) {
super(parent, style);
}
/**
* @param event
*/
public void onSelectionEvent(Event event) {
MessageDialog.openInformation(getShell(), "test", "Hello");
}
public static void main(String[] args) throws Exception {
URL url = Hello.class.getResource("Hello.xwt");
// Shell shell = XWT.load(url).getShell();
// shell.pack();
// shell.open();
// while (!shell.isDisposed()) {
// if (!shell.getDisplay().readAndDispatch()) {
// shell.getDisplay().sleep();
// }
// }
try {
XWT.open(url);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Comments
but surprised with presented simplicity!!
good one
Anyway there is a lot other ways to do that but this google app is cool :)
My way till now:
1)Copy text from eclipse
2)Paste it into Microsoft Word.
3)Save the file as HTML,
4)Open it with notepad and copy.
the result was nice eclipse like colors and fonts which is better but its too slow.
thank you for the info!