Splitting an editor pane in Eclipse

I’ve been using Eclipse since June and only just now figured out how to split an editor into two panes, something which was such a frequent gesture in XEmacs that it became reflexive years ago and my brain can’t remember the keychord required, although I’m sure my fingers could.

You have to select “Window -> New Editor” in the menus. This will create a new editor in a tab. Drag and drop the new tab to the bottom of the pane (to split horizontally) or the side of the pane (to split vertically). [I Googled for 'splitting an editor pane' and found this page, and then realised the instructions were wrong so I corrected it.]

This is the first Eclipsism that has really gotten on my nerves. Mousing breaks concentration. Splitting the editor is the sort of thing one needs to do without breaking concentration, so that one can very quickly look at both ends of a file or two different files.

But I’m not even sure that it’s possible to bind a key to get the equivalent of the drag-tab stuff.

Proposal for a simple object-relational db class

Oh no my Perl blog is dying, time to kick it with a brief outline of something I don’t have time to work on right now.

One of my current projects is built around a $PROJECTNAME::Record class which is basically a simple rip-off of some of the features I liked from ActiveRecord in Rails. The base class is around 1k loc and provides methods like $invoice->get_customer or $invoice->get_items, where the get_customer and get_items methods are
handled by an AUTOLOAD method looking up the class relations and despatching to things like get_has_many or get_has_one.

For $PROJECTNAME, I was writing the database schema as well, so I came up with a bunch of conventions for table, key and class names and made the Record class follow those. What I want to do is provide it with the ability to be applied to existing legacy databases which don’t follow a naming convention or have all their foreign keys in the right place. I’m having to develop apps on such databases (actually it’s mostly just one in particular) all the time, and it would be really good to have a way to write nice modern-ish code for them and have the mess tucked away in a Blah::Record subclass, without having to change the database.

Before I do this, though, I need to do some research to see if there’s anything out there that this overlaps with.

Ranges in Template::Toolkit

The ‘..’ range operator in Template::Toolkit works just as you would expect it to in Perl:

[% FOREACH day IN [ 1 .. 31 ] %]
    <option value="[% day %]">[% day %]</option>
[% END %]

Not a very interesting post, but then it hasn’t been a very interesting couple of weeks.