Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Xtext 2] Replacement for Check?
[Xtext 2] Replacement for Check? [message #671016] Mon, 16 May 2011 14:43 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

what technology would you currently suggest to specify validation rules for EMF models conveniently?

So far we used the Check language that came with XPand. Is there any comfortable replacement for Xtext2/Xtend2? Any other general experiences?

I'd like to avoid registering pure Java methods as validation rules. Instead something more abstract like OCL or Check would be nice. Any hints?

Cheers,
Hauke
(no subject) [message #671047 is a reply to message #671016] Mon, 16 May 2011 15:33 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6836
Registered: July 2009
Senior Member
Hi Hauke

My EclipseCon tutorial
( http://www.eclipsecon.org/summiteurope2010/sessions/?page=se ssions&id=1710)
explains how
after embedding OCL in Ecore (using the OCLinEcore Xtext editor) or
complementing a meta-model with OCL (using the Complete OCL Xtext editor)
you may use the resulting Ecore plus OCL as a validation language within
Xtext.

The tutorial was done with Indigo M6, where a few aspects were a bit
flaky. Use at least M7.

Regards

Ed Willink

On 16/05/2011 15:43, Hauke Fuhrmann wrote:
> Hi there,
>
> what technology would you currently suggest to specify
> validation rules for EMF models conveniently?
>
> So far we used the Check language that came with XPand. Is
> there any comfortable replacement for Xtext2/Xtend2? Any
> other general experiences?
> I'd like to avoid registering pure Java methods as
> validation rules. Instead something more abstract like OCL
> or Check would be nice. Any hints?
>
> Cheers,
> Hauke
(no subject) [message #671101 is a reply to message #671016] Mon, 16 May 2011 19:00 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Hi Hauke,

I'd use Xtend2 together with Xtext's @Check-Framework.

Sven

Am 5/16/11 4:43 PM, schrieb Hauke Fuhrmann:
> Hi there,
>
> what technology would you currently suggest to specify
> validation rules for EMF models conveniently?
>
> So far we used the Check language that came with XPand. Is
> there any comfortable replacement for Xtext2/Xtend2? Any
> other general experiences?
> I'd like to avoid registering pure Java methods as
> validation rules. Instead something more abstract like OCL
> or Check would be nice. Any hints?
>
> Cheers,
> Hauke


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
(no subject) [message #671102 is a reply to message #671016] Mon, 16 May 2011 19:00 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Hi Hauke,

I'd use Xtend2 together with Xtext's @Check-Framework.

Sven

Am 5/16/11 4:43 PM, schrieb Hauke Fuhrmann:
> Hi there,
>
> what technology would you currently suggest to specify
> validation rules for EMF models conveniently?
>
> So far we used the Check language that came with XPand. Is
> there any comfortable replacement for Xtext2/Xtend2? Any
> other general experiences?
> I'd like to avoid registering pure Java methods as
> validation rules. Instead something more abstract like OCL
> or Check would be nice. Any hints?
>
> Cheers,
> Hauke


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: (no subject) [message #671197 is a reply to message #671102] Tue, 17 May 2011 05:53 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi Sven,

do you have documentation or an example for this? In the new Xtext2 examples delivered with your Xtend2-Beta Eclipse 3.7M6 only uses Java Validators if I see it right.

Cheers,
Hauke
Re: (no subject) [message #671248 is a reply to message #671197] Tue, 17 May 2011 09:26 Go to previous messageGo to next message
Victor Noël is currently offline Victor NoëlFriend
Messages: 112
Registered: June 2010
Senior Member
Hi,

I think he means the Java Validators with the @Check annotation on methods.
Re: (no subject) [message #694256 is a reply to message #671248] Fri, 08 July 2011 08:09 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 15
Registered: June 2010
Junior Member
If in an Xtend2 class I use the annotation
@Check(CheckType::NORMAL)

in the generated Java class, there is only
@Check(CheckType.)

How do I work around this?
Cheers
Re: (no subject) [message #694287 is a reply to message #694256] Fri, 08 July 2011 09:16 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
That's a bug. Could you file a bugzilla?

Am 08.07.11 10:09, schrieb forums-noreply@eclipse.org:
> If in an Xtend2 class I use the annotation
> @Check(CheckType::NORMAL)
> in the generated Java class, there is only
> @Check(CheckType.)
> How do I work around this?
> Cheers


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Grammar Mixin and Formatter
Next Topic:[Xtext 2.0] Model editor problem after migrating to 2.0 with imports
Goto Forum:
  


Current Time: Fri Sep 18 15:10:55 GMT 2020

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

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

Back to the top