Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Swap out GMF validation (EMF Constraints)
Swap out GMF validation (EMF Constraints) [message #738712] Sun, 16 October 2011 16:45 Go to next message
Simon Schwichtenberg is currently offline Simon SchwichtenbergFriend
Messages: 126
Registered: September 2011
Senior Member
Hi,

How can I swap out the GMF validation to another project?


Here is my approach so far:

I created audit rules in my gmfmap file, activated validation and validation decorators in the gmfgen file and generated the code.

now, I don't want to implement the validation in the generated project, because I swaped out all my customizations to another plugin-project (which has the original project in its required plugin-ins)

I copied the diagram.part.ValidationAction, the diagram.part.XXXDiagramActionBarContributor and the diagram.providers.XXXValidationProvider to the other project and implemented the validation in the inner adapter classes and replaced all occurences of "XXXValidationProvider" in the new ValidationAction. and replaced the occurence of the validationaction in the XXXDiagramActionBarContributor.

Then I moved the extensions for org.eclipse.emf.validation.constraintBindings, org.eclipse.emf.validation.constraintProviders (now pointing to the new XXXValidationProvider), org.eclipse.core.resources.markers, org.eclipse.gmf.runtime.diagram.ui.decoratorProviders, org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders, org.eclipse.ui.editors (now pointing to the new XXXDiagramActionBarContributor) to the plugin.xml file of the custom-project.

when I run validation from the menu bar, the batchvalidator does not find the constraints I defined.

[Updated on: Sun, 16 October 2011 16:47]

Report message to a moderator

Re: Swap out GMF validation (EMF Constraints) [message #740200 is a reply to message #738712] Tue, 18 October 2011 08:53 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Hi,

did you take a look at EVL from the Epsilon framework. I use this for validation and it works realy nice. The only thing about this is that it does not store its information in the gmfmap model. Using this approach you can move your validation into any plugin you like.

Ralph
Previous Topic:Problems with layout
Next Topic:Renaming of GMF Project
Goto Forum:
  


Current Time: Fri Dec 19 03:21:59 GMT 2014

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

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