Eclipse plugin programming quick tips

Getting the IWorkbench

To get the IWorkbench from a plugin use IWorkbench wb = PlatformUI.getWorkbench();

Getting the IWorkspace

The workspace can be gotten using ResourcesPlugin.getWorkspace();

Getting the "root" IResource of the workspace

This can be gotten from IWorkspace.getRoot()

Getting the "active" editor from an Action/command

public ITextEditor getTextEditor()
{
IWorkbench wb = PlatformUI.getWorkbench();
IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
IWorkbenchPage page = win.getActivePage();
IEditorPart editor = page.getActiveEditor();
return (ITextEditor) editor;
}

Walhalla 20: Beyond the grave

This was inspired by the song "Beyond the grave" by Barclay James Harvest. It contains quotes from the story "Het oog in de driehoek" (the eye in the triangle) from the collection "Been onder het zand" (Leg under the sand) by Cees Simhoffe.

It was created by Herco de Boer, Hans de Bruin, Peter Melchiors en Hans van der Pas.


Music in this episode:

The Sound" "Skeletons" from the album "From the lyon's mouth"

 

Stan Ridgway: Back in flesh, from the album "The Index Masters"

Walhalla 30: Bo Diddley

Walhalla 34 "Bo Diddley" is again a very nice Symphony. For mofre info on Bo Diddley look here. It contains the following numbers:

The Motels, from the album "All four one" the song "Change my mind":

I bet you guessed where I was some time ago
And I bet that you really didn't know
I don't need you
I don't want you
But I might change my mind

We could take off for Paris on a cruise
You and me couuld make front page news
But it don't mean nothing
Don't mean a thing
Cause I might change my mind

There was a time when it was good
We laughed and danced all over the neighborhood
You'd take my hand
I apologize
But I just might change my mind

I got to know if I've been or gone
Need to know if it's worth hangin' on
Time is mine
What's mine is yours
And I just might change my mind
I just might change my mind
I just might change my mind

All Alone in the Universe

The original playlist: page 1

[img_assist|nid=35|title=Walhalla 1 page 1|desc=|link=popup|align=top|width=73|height=100]

Page 2

[img_assist|nid=36|title=Walhalla 1 page 2|desc=|link=popup|align=top|width=73|height=100]

The version I have is a "reissue" of the original Walhalla Symphony. Music in this Walhalla Symphony (as discovered this far) is by:

Klaatu: The loneliest of creatures from the album "Hope".

Sometimes I feel like I'm the loneliest of all creatures in the universe
Oh no! Oh no! Oh no! Oh no!
Oh no you're not the loneliest of all creatures in the universe
Oh no! Oh no!

If I am not the loneliest of creatures
There must be someone lonelier than me
But I can't believe despair could be much deeper
When I'm as lonely as a man can be

Oh no! Oh no! Oh no! Oh no!
Oh no you're not the loneliest of all creatures in the universe!
Oh no! Oh no!

Suppose I'm not the loneliest of creatures
Then tell me who this wretched soul might be
In the dark of night there lives a lighthouse keeper
And the lone survivor of his world is he
The lone survivor of his world
Is he

But I feel like I'm the loneliest of all creatures in the universe
Yet I know I'm not the loneliest of all creatures in the universe

Java Advanced Imaging: resizing tiffs

The Java Advanced Imaging toolkit contains lots of stuff to work with images. The documentation leaves a lot to be desired though: it is often factually incorrect due to version differences, and examples for common operations are hard to come by.

I needed a way to "resize" monochrome tiffs. The default "scale" operation leaves the result as a black-and-white image, and this results in a reduced image with a lousy quality. To get a better quality the image must be converted to grayscale and then rescaled using a resampler filter.

Most examples tell you to use either the "ColorConvert" or the "BandCombine" JAI operations. But sadly all of the examples I tried threw exceptions at one part or another.

Common misconceptions about JSP tag librari

There are some common misconceptions on how tag handlers work, and what methods get called at what time and when. This document contains a collection of pitfalls you can encounter when writing tag libraries.

release()

Misconception: release() gets called at the end of a page. This is not true! Some idiot writing JSP 1.2 decided that release should only be called just before the tag handler is released to the garbage collector! This means that when a tag handler gets cached by a container (like Tomcat's Jasper engine does by default) the release() method gets called at most once(!) even if the tag gets reused many times on several pages! There is currently NO failsafe way to clean up your tag handler between invocations. The best you can do is to cleanup at your own known exit points. This clearly sucks, but what can you do..

Installing Oracle 10gR2 on Gentoo 2005.1

Always nice to see that my free versions of Postgresql and mysql compile and run EVERYWHERE, but my grossly expensive licensed copy of Oracle as usual does not install. What a bunch of shit.

Nice image

Just saw this image today. It nicely tells you what the EU council is full of.

Walhalla Symfonie

Walhalla Symphony (or Walhalla Symfonie in Dutch spelling) was a program which was broadcast in the Netherlands in the '80 by the KRO, between 23.00 and 0.00hrs on Sunday. Each episode was a collage of music and sound fragments centered around a single theme, seamlessly connected. This program was produced by Theo Stokkink.

New Kate Bush album

After lots of years of silence Kate Bush has released a new album: Aerial. And it is great! I especially like "Mrs. Bartolozzi", track #4, but most of the music is very nice.

Syndicate content