Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » tip: workaround for Xtext 2.0 and 'An object may not circularly contain itself' validation problem
tip: workaround for Xtext 2.0 and 'An object may not circularly contain itself' validation problem [message #651899] Tue, 01 February 2011 18:14
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2426
Registered: July 2009
Senior Member
Hi, I upgraded Xtext 2.0 to M5 and ran into the issue
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322639 'An object may not
circularly contain itself' validation problem, caused by having an
external model for which I want to run @check validation...

As the bug states, there is a flag that can be set to work around the
issue. If you need to do that, you need to add this to your guice bindings:

public void configureEObjectValidator(com.google.inject.Binder binder) {
binder.bindConstant().annotatedWith( //
com.google.inject.name.Names.named(//
CompositeEValidator.USE_EOBJECT_VALIDATOR)).to(false);
}

This cured it for me.
- henrik
Previous Topic:Using Xtext to transform XML to XML with XSLT
Next Topic:code generation in a different source folder
Goto Forum:
  


Current Time: Sat May 18 19:52:57 EDT 2013

Powered by FUDForum. Page generated in 0.02346 seconds