|
|
|
|
|
Re: How to implement specific "Dublicate Check" in XText [message #638781 is a reply to message #638560] |
Fri, 12 November 2010 15:03 |
|
Hi
this looks related to my thread "Scoping and the name attribute"; by
reading the documentation I didn't find this
INamesAreUniqueValidationHelper mentioned... it might be worth saying
something about this.
By the way, what does "cluster" mean? From what I see as the default
behavior in my DSL I guess that cluster means container? Can it be?
thanks
cheers
Lorenzo
On 11/11/2010 05:02 PM, Fernando Gonzalez wrote:
> I debuged inside NamesAreUniqueValidator. It finally delegates to this
> interface[1] and there is nothing in the parameters regarding scope or
> context.
> I think it may be possible to override NamesAreuniqueValidator to make
> it pass the delegate just the IEobjectDescription objects in the scope
> you are interested in.
>
> Best regards,
> Fernando.
>
>
> [1] public interface INamesAreUniqueValidationHelper {
>
> /**
> * Create errors for objects that have the same name. Objects, that do
> not belong to
> * the same cluster will not get any errors.
> * @see INamesAreUniqueValidationHelper#checkUniqueNames(Iterable,
> CancelIndicator, ValidationMessageAcceptor)
> */
> void checkUniqueNames(Iterable<IEObjectDescription> descriptions,
> ValidationMessageAcceptor acceptor);
>
> /**
> * Create errors for objects that have the same name. Objects, that do
> not belong to
> * the same cluster will not get any errors. The cancel indicator may be
> used to interrupt * the validation.
> */
> void checkUniqueNames(Iterable<IEObjectDescription> descriptions,
> CancelIndicator cancelIndicator, ValidationMessageAcceptor acceptor);
>
> }
--
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
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
|
Powered by
FUDForum. Page generated in 0.02802 seconds