Skipping validations of features from EMF Model [message #995815] |
Mon, 31 December 2012 07:18 |
|
Hi,
I am creating DSL for existing EMF Model who persistence format is xmi. The DSL will be just an alternate representation of xmi format.
The DSL contains many less features because i want only relevant features available to user and system specific stuff is kept hidden.
These features in DSL are marked optional in grammar. But they are not optional in ECore model.
Hence in the DSL i see error reporting that "... feature is not optional and should be specified ...". One way is to change the ECore model but I can't do this because i don't have authorizations to change the ECore model. Is it possible to skip these validation errors ?
Regards,
Ashwani Kr Sharma
|
|
|
|
|
|
|
Re: Skipping validations of features from EMF Model [message #1010297 is a reply to message #1006990] |
Sun, 17 February 2013 04:21 |
|
Hi,
I have put following method in my RuntimeModule class. But nothing changes:
public void configureUseEObjectValidator(Binder binder) {
binder.bind(Boolean.class).annotatedWith(Names.named(CompositeEValidator.USE_EOBJECT_VALIDATOR)).toInstance(Boolean.FALSE);
}
I read the documentation of xText and following is mentioned there. So, can't we skip them ?
Quote:The IConcreteSyntaxValidator validates all constraints that are implied by a grammar.
Meeting these constraints for a model is mandatory to be serialized.
Regards,
Ashwani Kr Sharma
[Updated on: Sun, 17 February 2013 04:55] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03417 seconds