Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Validator error method and EStructuralFeature
Validator error method and EStructuralFeature [message #696206] Wed, 13 July 2011 13:23 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

in Xtext 2.0 error and warning methods which used to get an integer
representing an EStructuralFeature now require an EStructuralFeature
(and this can be dealt with by using the Literals of the generate EPackage).

(by the way, the documentation concerning Validation has to be updated I
guess, since it still uses integers).

However, what If I don't want to specify any EStructuralFeature, but
only an EObject? In Xtext 1.0 there used to be such error/warning
overloaded method but this is not available anymore in Xtext 2.0.

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: Validator error method and EStructuralFeature [message #696269 is a reply to message #696206] Wed, 13 July 2011 15:39 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

wasn't it always necessary to provide the "int" for the feature, only that you could put there what you wanted?

As a workaround for your use case (which I don't quite understand as I'd rather not mark too much) you could make the container of the object X the error source and use feature that contains X as the required feature.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Validator error method and EStructuralFeature [message #696384 is a reply to message #696269] Wed, 13 July 2011 20:28 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Alex,

the validator handles 'null'-features gracefully.

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

On 13.07.11 17:39, Alexander Nittka wrote:
> Hi,
>
> wasn't it always necessary to provide the "int" for the feature, only
> that you could put there what you wanted?
>
> As a workaround for your use case (which I don't quite understand as I'd
> rather not mark too much) you could make the container of the object X
> the error source and use feature that contains X as the required feature.
>
> Alex
Previous Topic:Help with MWE Reader
Next Topic:[xtext] Split grammar (multiple grammars) in 1 project?
Goto Forum:
  


Current Time: Fri Apr 26 03:30:50 GMT 2024

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

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

Back to the top