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();
}
}
}
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();
}
}
}
Recent Comments