• Share this article:

Presentations in Eclipse

Saturday, October 4, 2008 - 15:03 by Wayne Beaton

I’ve been tinkering on-and-off for a couple of years on some Eclipse-based presentation software. My primary motivation is my distrust of existing presentation software. Curiously, I get a new head of steam on the “project” every time PowerPoint or Open Office fries one of my documents. Last week was one of those times.

The effort has been two-fold. Actually laying out slides is probably a pretty obvious first target. I’ve been using draw2d from GEF for this and have had some success. One of the things that drives me nuts about existing presentation software is the whole WYSIWYG editing paradigm. Frankly, I hate pushing pixels around to make stuff look right and to simply fit on a slide. Open Office is particularly annoying in this regard; in some of my presentations, the title is in a different place on almost every slide and, frankly, I can’t be bothered to spend the time to tweak each slide to make it right. Most of my effort in this area has been to automate the assembly process as possible.

Some of my effort has been around just making stuff automatically fit. I just specify a bunch of bullets, and slide render makes it fit by reducing the font size until everything fits. Its a simple algorithm, but it works. Want to add a picture? No problem, a few simple rules govern the placement and the text just flows around it. Graphics inside text is also easy using draw2d (the text management stuff is quite awesome).

The missing piece as always been the mechanism for editing slide content. A while back it occurred to me that content can just be specified using wiki markup. For example:

=Slide One Title=
* Bullet one
* Bullet two

=Slide Two Title=
[[Image:fascinating.png|right]]
* Bullet three
** Nested bullet one
** Nested bullet two
* Bullet four

The basic idea is that the heading, denoted by the equals sign (=), the slide title. Everything between this heading and the next is the content of the slide. The second slide shows a picture that will be rendered to the right of the bullets. I envision adding support for some other tags. For example, [[Method:/MyProject/src/org.eclipse.stuff.MyClass#myMethod()]] will render the contents of the specified method on the slide (taken live out of the workspace). I’m not quite there yet, but I think it’d be cool.

Using the wiki-style text will make it easier to collaborate, track changes, change templates, borrow slides from other presentations (imagine an “include slides” markup), and more. My presentations will just be projects in my workspace (images are found relative to the markup file). Most of my images are screen shots anyway, so they’ll be easy to include. More interesting images can be created with GIMP, or possibly with an SVG editor (I’ve read that GEF provides some SVG import support that I need to look into).

I’ve decided on using the MediaWiki markup for this as it’s what we use on Eclipsepedia, so I’m already familiar with it.

The best part is that most of the work has already been done. The WikiText SOC project (completed under the supervision of the Mylyn project) has implemented a Wiki parser that I’ve managed to leverage. I haven’t looked at the editors yet, but I imagine they’ll be helpful as well.

My intent is to clean up the code and contribute it to the Examples project. The initial version will provide basic image and text support. At some point in the future, I’ll sort out the method displaying option, and look into things like table support. I’ll post some pictures in the coming week.

In the meantime… is this a crazy idea?