Archive for the ‘Java’ Category

Byte code generation to support a DSL - 101

Tuesday, May 8th, 2007

As part of my investigations into the benefits of model driven techniques and DSLs I’ve been looking into some Java byte-code generation mechanisms. After I’d managed to get my masochistic hacker tendencies under control, I decided not to write a whole new class file generation framework myself and instead downloaded ASM and BCEL.

Essentially, I wanted to be able to generate Java classes on the fly from a DSL, and because I wanted to look at both ASM and BCEL, I setup the basics of my scenario to allow different class generators to be plugged in.
(more…)

Customising directory structures in Eclipse

Monday, April 30th, 2007

In my why have all your eggs in one basket? blog post, I described how you could completely customise the structure of your Eclipse projects to be almost any thing you wanted. Perhaps though, I may have been a little misleading, and could have implied that I think that this kind of frigging around is a good thing.
(more…)

EMF Containment behaviour

Wednesday, April 18th, 2007

Whilst doing something with EMF (Eclipse Modelling Framework) recently I noticed some interesting behaviour when dealing with containment. I’ll describe it using two scenarios, each with an alternative.
(more…)

Why have all your eggs in one basket?

Thursday, March 8th, 2007

I’m a great fan of Eclipse but sometimes I’m disappointed with how people use it. I’ll give you a simple example; when you create a Java project you get the option to “Create separate source and output folders“. In my opinion, it’s good practice to always do this - and hopefully there are few these days who would try to argue that having source and generated artefacts together is a good thing.

But why do so many developers stop there; why put your test cases in the same directories as your application classes, why put the configuration in there too? The simple answer is don’t - create additional source folders. Right click the project and select “New->Source Folder” - it’s as simple as that.
(more…)

Filtering out WID generated projects

Wednesday, February 28th, 2007

If you’ve ever used WebSphere Integration Developer (WID) and also do Java development, like me you’ll probably find having all the generated projects cluttering up your workspace quite annoying.
(more…)

Open any Windows directory as an Eclipse workspace

Tuesday, February 13th, 2007

I have many versions of Eclipse and Eclipse based IDEs installed and for each of these I like to be able to open my workspaces from the Windows explorer rather than from the Eclipse workspace launcher dialog. To acheive this I add an entry to the registry to add an entry when you right-click a directory.
(more…)