tea-pot/earl-grey — Issue #12: Lookup
Author: mazanma3
Created: 2011-12-16 19:56:55+00:00
State: open

Use idea of NetBeans Lookup method to load OCL validation rules.

**@ClassmodelJavaValidator.java**

public void register(EValidatorRegistrar registrar) {
Collection rules = RuleLookup.lookupAll(ClassModelRule.class);
...
...
}

**@MyRule.java in Project A**

class MyRule extends ClassModelRule {
...
}

**@TestRule.java in Project B**

class TestRule extends ClassModelRule {
...
}

**References:**
http://wiki.netbeans.org/DevFaqLookup
http://www.antonioshome.net/blog/2008/20081023-1.php
http://www.antonioshome.net/blog/2008/20081024-1.php