Trying VEP

I spent yesterday hacking on medi8 a little. I got thumbnails
working again as well as they ever did — meaning that we show some
image that is somehow related to your movie, just not the right
ones.

I also rewrote the monitor widget using VEP, the visual editor plugin
for Eclipse.

VEP has a couple of unusual features. First, it is not specific
to a particular widget set. It comes set up to handle AWT, Swing, and
SWT, and supposedly you can add your own toolkits to it as well.

Second, VEP uses the Java DOM that is built by Eclipse. All GUI
editors face a fundamental problem: how to represent the generated UI
in the user’s code. These days the consensus approach seems to be to
create an XML file describing the UI, and then provide a library that
turns this into a widget hierarchy. VEP’s approach is to understand
your source code; you can edit the VEP-generated code and it will
preserve your changes even while you modify the GUI.

So, this is cool and high tech. I’m not in a very good position
to say how well it works in practice; my edits were limited to adding
event handlers to buttons. It was able to recognize my own home-grown
widget as a bean with no fuss, and I was able to build a little
monitor widget with VCR-like controls pretty quickly, and without
knowing anything useful about SWT. … but that is about what I’d
expect.

However, VEP still has a long way to go. The handling of widget
layout leaves a lot to be desired, I had a lot of trouble figuring out
how to make it work. You have to know that the “layout” property of a
bean is editable in this general properties view, and then muck with
the settings there; sometimes it pulls up a dialog for you to mess
with. VEP could take a huge usability lesson from Matisse here.
Ideally I barely want to deal with layout at all.

Also VEP has an unusual implementation in another way — it runs a
second JVM to display your widget tree as you edit it, and then it (as
I understand) screen scrapes this to show you what you are editing.
This doesn’t perform very well and at least on my machine results in a
VEP window permanently hiding near the bottom of the screen.
Eww.

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.