This weblog is not used anymore, please go to http://blog.leenarts.net for my new blog.
Or: How to get your users
pissed unhappy.
Simple: Hack to span an Eclipse RCP screen accross more than one monitor. Don't ask me why, it wasn't my idea. I've just seen this in code somewhere.
Here's how it works:
Mess up the
Window.getInitialSize() so it takes all your screen real estate into acount, you've got two displays 1200 pixels wide? Ok, then we make the initial size's width 2400. Don't forget to
mutilate alter the
Window.constrainShellSize() method accordingly, else Eclipse will act up a bit. (How naughty.)
Now comes the best part. make sure you
filter any occurences of SWT.RESIZE when
Window.setShellStyle(int newShellStyle) gets called. Yes I said
filter. Imagine some gullable developer passing by who thinks restricting window resizing is an excelent end-user screw.
Did I mention that all this was achieved by some aspectj crosscutting??
In the end, it works, sort of. Maximizing is disabled and resizing is disabled. So you end up with a huge piece of
crap window plastered all over your screen real estate. You see, users are just dumb people. Letting them decide how to set their window sizes can only result in trouble. Well, atleast that seems to be the idea.
I hope you all got the point that I think the above is an "excellent" idea. (No, ofcourse I don't think the above is a good idea.)