Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Validation
Validation [message #562125] Mon, 09 August 2010 16:51 Go to next message
Jos Warmer is currently offline Jos Warmer
Messages: 66
Registered: July 2009
Member
Inside model editors it is necessary to evaluate validation rules against the model being edited. Editors built with e.g Xtext or GMF have a validation framework that allows us to easily add constraints to the editor and have them evaluated and displayed in the "problems" view.

Does Graphiti have such a validation framework? If not, are there any pointers on how to achieve this yourself?

-- Jos
Re: Validation [message #562171 is a reply to message #562125] Tue, 10 August 2010 03:11 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1574
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Graphiti itself does not offer such a validation framework. Instead we rely
on what Eclipse itself, EMF or other projects on top of EMF (I think Sphinx
will come with something like this) offer for marker support.

So in general you would use EMF OCL Validation for checking your model,
store the found issues as markers (define your own type if you want) and
have them visualized in the problems view.

What we offer in Graphiti, is a means to easily mark objects on the diagram
as having a bug. See the section about rendering decorators in the tutorial
for details on that

- Michael

"Jos Warmer" <jos.warmer@ordina.nl> wrote in message
news:i3ppp3$gke$1@build.eclipse.org...
> Inside model editors it is necessary to evaluate validation rules against
> the model being edited. Editors built with e.g Xtext or GMF have a
> validation framework that allows us to easily add constraints to the
> editor and have them evaluated and displayed in the "problems" view.
>
> Does Graphiti have such a validation framework? If not, are there any
> pointers on how to achieve this yourself?
>
> -- Jos
Re: Validation [message #562196 is a reply to message #562125] Thu, 12 August 2010 05:48 Go to previous message
Jos Warmer is currently offline Jos Warmer
Messages: 66
Registered: July 2009
Member
Michael,

I was planning on using EMF OCL or Check or Java for defining constraints. For my current DSL's I have both Check and Java constraints, so I'd like to reuse these. I am looking for an easy way to connect these with the editor. I understand there is no default hookup mechanism, do I will do this myself.

-- Jos
Previous Topic:Validation
Next Topic:Drag and Drop
Goto Forum:
  


Current Time: Wed Jul 30 05:13:46 EDT 2014

Powered by FUDForum. Page generated in 0.02063 seconds