Skip to main content

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

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.


import metamodel;

extension extend::metamodel;

context MainObject ERROR "Error": this.test();

import metamodel;

Boolean test(MainObject object): JAVA javacode.Library.test(metamodel.MainObject)

package javacode;

import metamodel.MainObject;

public class Library {
  public static boolean test(MainObject object) {
    return true;

Thanks for your help
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: 13313
Registered: July 2009
Senior Member

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

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:[Xtend] Lists in JAVA extensions
Next Topic:[Xtend] Deleting Objects
Goto Forum:

Current Time: Tue Jan 21 17:59:33 GMT 2020

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

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

Back to the top