A Zesty e4

March 2, 2009 | 2 min Read

Over the past week I have ignored my daughters, gave-up on work, haven’t seem my wife, and managed to create a web-enabled version of Zest.  Ok, most of what I said is lie, however, I did manage to create a web-enabled version of Zest while still spending quality time with the family (and getting some “real work” done).

How you ask? The magic of “SWT Browser Edition” in e4. Since e4 is already able to  cross compile the Draw2D examples, I thought I would take a shot at producing an e4 Graph Widget based on Zest.

java public static void main(String\[\] args) { Display d = new Display(); Shell shell = new Shell(d); shell.setLayout(new FillLayout()); Graph g = new Graph(shell, SWT.NONE); GraphNode n1 = new GraphNode(g, SWT.NONE, "SWT"); GraphNode n2 = new GraphNode(g, SWT.NONE, "Action Script"); GraphNode n3 = new GraphNode(g, SWT.NONE, "Totally Awesome"); new GraphConnection(g, SWT.NONE, n1, n2); new GraphConnection(g, SWT.NONE, n2, n3); new GraphConnection(g, SWT.NONE, n3, n1); }

Using the SWT -> Action Script cross compiler, I was able to take the Zest widget and build an SWF file for it. I managed to create a small example.

There are a number of outstanding issues (no JFace adapters, no curved lines and some layouts are giving me grief), but it’s a start.

What do you think, should I bring this to e4?

Ian Bull

Ian Bull

Ian is an Eclipse committer and EclipseSource Distinguished Engineer with a passion for developer productivity.

He leads the J2V8 project and has served on several …