Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » schema validation during/before resource save.
schema validation during/before resource save. [message #416789] Tue, 19 February 2008 13:17 Go to next message
Chetan Kumar is currently offline Chetan KumarFriend
Messages: 70
Registered: July 2009
Member
Hi all,

i have 2 EMF models. M1 is my tool specfic model. M2 is schema derived.
Model is accessed / manipulated using M1 instances. Serialization of M1
uses schema of M2. i.e. model is serialized in M2 format. For this i am
doing a java based model transformation from M1 instance to M2 instance
refering an existing mapping.

I want to validate the M2 instance got by transformation against the
schema. Is there a possible way to do trigger schema based validations
before / during resource save ?

cheers,
Chetan Kumar
Re: schema validation during/before resource save. [message #416794 is a reply to message #416789] Tue, 19 February 2008 14:44 Go to previous message
Marcelo Paternostro is currently offline Marcelo PaternostroFriend
Messages: 602
Registered: July 2009
Senior Member
Hi Chetan,

We validate documents in a few places:
- Against the document used as input in the "Create Model"/"Create
Project" wizards
- On the validation action on generated editors
- When we open the Genmodel editor

Perhaps you could see how we do it and invoke the same code before
saving your resources. The validation action, for example, is located
in the "org.eclipse.emf.edit.ui" plugin
(org.eclipse.emf.edit.ui.action.ValidateAction).

Cheers,
Marcelo

Chetan Kumar wrote:
> Hi all,
>
> i have 2 EMF models. M1 is my tool specfic model. M2 is schema derived.
> Model is accessed / manipulated using M1 instances. Serialization of M1
> uses schema of M2. i.e. model is serialized in M2 format. For this i am
> doing a java based model transformation from M1 instance to M2 instance
> refering an existing mapping.
>
> I want to validate the M2 instance got by transformation against the
> schema. Is there a possible way to do trigger schema based validations
> before / during resource save ?
>
> cheers,
> Chetan Kumar
>
Previous Topic:Trouble with reloading unchangeable attributes
Next Topic:Unable to get EObjects deleted with garbage collector
Goto Forum:
  


Current Time: Thu Apr 25 13:06:38 GMT 2024

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

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

Back to the top