Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Check] Checks for Generic EMF Form Editor using Xtend in combination with Java method
[Check] Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536730] Sun, 30 May 2010 13:58 Go to next message
Gerd Kainz is currently offline Gerd KainzFriend
Messages: 23
Registered: May 2010
Junior Member
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
Re: [Check] Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536735 is a reply to message #536730] Sun, 30 May 2010 15:44 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Hello,

the problem is in imho that you try to apply a usecase the generic editor validation was not been built for: JAVA Extensions. I can re produce your problem and by debugging into the java code i found out that the actual exception is:

[AnalysationIssueType not found] - Couldn't find Java type metamodel.Helper : metamodel.Helper


(im my case the class the JAVA Extension calls)

This is cause the Java Class cannot be found by the classloader - in the case the one of the bundle org.eclipse.emf.mwe.core is used.

As I said before I cannot tell if it is a bug or a (missing) feature so feel free to file a bug..

Regards Christian


Previous Topic:[JET] How to Dynamically call JET transform api through a plugin?
Next Topic:[Acceleo] How to generate code from Actions in Activity diagram in control flow order?
Goto Forum:
  


Current Time: Mon Dec 22 15:04:28 GMT 2014

Powered by FUDForum. Page generated in 0.01635 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software