Here are some larger examples of DSLDs. All scripts here are available under an EPL license:
Delegate
Singleton
// need to use a bind pointcut here since we want to bind to the outermost pointcut
bind( type : currentType(annotatedBy(Singleton))).accept {
method name:"getInstance", type:type, isStatic:true, declaringType:type, doc:"Get the singleton instance of this Class"
property name:"instance", type:type, isStatic:true, declaringType:type, doc:"Get the singleton instance of this Class"
}
DSLD Meta Script
This script defines editing support for DSLDs themselves.
Labels