Hello,
I posted this already under EMF, but has been directed to M2T.
I'm trying to write checks for my model and trigger them from the Generic EMF Form Editor. Everything is working fine as long as the check file does not contain a rule using a call to a Java method. If it does I get a message "An Error occured during checking: java.util.NoSuchElementException" in the title bar when I press the Check button in the Generic EMF Form Editor or save the file.
I'm working with Eclipse 3.5 and EMF 2.5. I'm working with dynamic instances of EMF and does not create any editor code. I only create the model code for my Java methods.
E.g.
metamodel/Checks.chk
import metamodel;
extension extend::metamodel;
context MainObject ERROR "Error": this.test();
extend/metamodel.ext
import metamodel;
Boolean test(MainObject object): JAVA javacode.Library.test(metamodel.MainObject)
javacode/Library.java
package javacode;
import metamodel.MainObject;
public class Library {
public static boolean test(MainObject object) {
return true;
}
}
Thanks for your help
Gerd