Archive for the ‘DSL’ Category

Eclipse JDT resource copy exclusion

Wednesday, May 30th, 2007

What a nice article title…. clear as mud ;-)

So, what the article is really about relates to my playing with a postfix notation DSL; and specifically, adding IDE support within Eclipse. Since I’m going to be using Java bytecode as the underlying execution mechanism for the DSL it makes sense to try to reuse some of the Eclipse JDT functionality; but the JDT does more than I want. Specifically, any files that the JDT finds that cannot be processed by its builder are merely copied to the output directories (i.e. whilst .java files are compiled into .class files, all other files such as .xml or .postfix are merely copied).

Well, I don’t want that; I want the JDT to ignore my files. So we need to add a copy exclusion filter.
(more…)

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…)