Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Checks for Generic EMF Form Editor using Xtend in combination with Java method
Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536536] Fri, 28 May 2010 15:29 Go to next message
Gerd Kainz is currently offline Gerd KainzFriend
Messages: 23
Registered: May 2010
Junior Member
Hello,

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: Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536556 is a reply to message #536536] Fri, 28 May 2010 16:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Which project provides this generic form's editor? It's not part of EMF
itself...


Gerd Kainz wrote:
> Hello,
>
> 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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536576 is a reply to message #536556] Fri, 28 May 2010 17:54 Go to previous messageGo to next message
Aleksander Bandelj is currently offline Aleksander BandeljFriend
Messages: 98
Registered: July 2009
Member
It is/was part of OpenArchitectureWare, now at Eclipse M2T.

-a

On 05/28/2010 06:25 PM, Ed Merks wrote:
> Which project provides this generic form's editor? It's not part of
> EMF itself...
>
>
> Gerd Kainz wrote:
>> Hello,
>>
>> 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: Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536580 is a reply to message #536576] Fri, 28 May 2010 18:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060306020306040901010105
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

I wonder if the editor itself is part of Xtext though. I vaguely recall
that being the case...


Aleksander Bandelj wrote:
> It is/was part of OpenArchitectureWare, now at Eclipse M2T.
>
> -a
>
> On 05/28/2010 06:25 PM, Ed Merks wrote:
>
>> Which project provides this generic form's editor? It's not part of
>> EMF itself...
>>
>>
>> Gerd Kainz wrote:
>>
>>> Hello,
>>>
>>> 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
>>>
>
>

--------------060306020306040901010105
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I wonder if the editor itself is part of Xtext though.  I vaguely
recall that being the case...<br>
<br>
<br>
Aleksander Bandelj wrote:
<blockquote cite="mid:htp03g$l9t$1@build.eclipse.org" type="cite">
<pre wrap="">It is/was part of OpenArchitectureWare, now at Eclipse M2T.

-a

On 05/28/2010 06:25 PM, Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Which project provides this generic form's editor? It's not part of
EMF itself...


Gerd Kainz wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello,

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
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>

--------------060306020306040901010105--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536687 is a reply to message #536580] Sat, 29 May 2010 21:49 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Ed Merks wrote on Fri, 28 May 2010 14:02

I wonder if the editor itself is part of Xtext though. I vaguely recall
that being the case...

Aleksander Bandelj wrote:
> It is/was part of OpenArchitectureWare, now at Eclipse M2T.


Yeah, that sounds right, it could have been XPand tho which makes more sense. But anyway, this sounds like a question for thea XPand forum. Gerd, I have exactly the same setup and it works, but I vaguely remember some kind of workflow change i had to make a while back. You might check the migration docs for oaw -> M2T. If you don't figure it out in M2T forum and I forget to chek over there you can ping me at milesparker at the very common email domain that begins w/ "g".
Re: Checks for Generic EMF Form Editor using Xtend in combination with Java method [message #536747 is a reply to message #536687] Sun, 30 May 2010 17:01 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
So far the generic editor is shipped as an 'example' of m2t.xpand.

Sven

Miles Parker schrieb:
> Ed Merks wrote on Fri, 28 May 2010 14:02
>> I wonder if the editor itself is part of Xtext though. I vaguely
>> recall that being the case...
>>
>> Aleksander Bandelj wrote:
>> > It is/was part of OpenArchitectureWare, now at Eclipse M2T.
>
>
> Yeah, that sounds right, it could have been XPand tho which makes more
> sense. But anyway, this sounds like a question for thea XPand forum.
> Gerd, I have exactly the same setup and it works, but I vaguely remember
> some kind of workflow change i had to make a while back. You might check
> the migration docs for oaw -> M2T. If you don't figure it out in M2T
> forum and I forget to chek over there you can ping me at milesparker at
> the very common email domain that begins w/ "g".


--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Previous Topic:Save model from GEF-App with EMF
Next Topic:Meta-model (ecore) versioning support
Goto Forum:
  


Current Time: Fri Mar 29 06:16:13 GMT 2024

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

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

Back to the top