Skip to main content



      Home
Home » Modeling » EMF » Show EMF Validation problems in Eclipse problems view
Show EMF Validation problems in Eclipse problems view [message #1064797] Fri, 21 June 2013 03:38 Go to next message
Eclipse UserFriend
Goodmorning.

How can I show my custom EMF validation results on Eclipse Problems View?

I try with an extension on org.eclipse.emf.validation.validationListener and a class which implements IValidationListener but the method validationOccurred is never called.

NOTE that I use eOperation inside model classes for validate them.

Thnaks in advance.
Re: Show EMF Validation problems in Eclipse problems view [message #1064805 is a reply to message #1064797] Fri, 21 June 2013 03:50 Go to previous messageGo to next message
Eclipse UserFriend
Maybe someone will answer questions about the extended validation
framework, or you could have a look at how to make such constraints part
of your core model:

http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.emf.doc/references/overview/EMF.Validation.html

Note that EMF 2.9 (the Kepler version) supports live validation of
instinct model constraints

http://ed-merks.blogspot.de/2013/01/decorating-with-emf.html


On 21/06/2013 9:38 AM, Tommaso De Sica wrote:
> Goodmorning.
>
> How can I show my custom EMF validation results on Eclipse Problems View?
>
> I try with an extension on
> org.eclipse.emf.validation.validationListener and a class which
> implements IValidationListener but the method validationOccurred is
> never called.
>
> NOTE that I use eOperation inside model classes for validate them.
>
> Thnaks in advance.
Re: Show EMF Validation problems in Eclipse problems view [message #1064808 is a reply to message #1064805] Fri, 21 June 2013 04:15 Go to previous messageGo to next message
Eclipse UserFriend
So you suggest me to convert my invariants in constraints?

Isn't there a way to show invariant results on problem view?

[Updated on: Fri, 21 June 2013 04:16] by Moderator

Re: Show EMF Validation problems in Eclipse problems view [message #1064813 is a reply to message #1064808] Fri, 21 June 2013 04:21 Go to previous messageGo to next message
Eclipse UserFriend
As the documentation suggests, an invariant operation (an EOperation
with the documented signature) acts as a constraint.

On 21/06/2013 10:15 AM, Tommaso De Sica wrote:
> So you suggest me to convert my invariants in constraints?
>
>
Re: Show EMF Validation problems in Eclipse problems view [message #1064823 is a reply to message #1064813] Fri, 21 June 2013 04:44 Go to previous messageGo to next message
Eclipse UserFriend
So, why if I try to call Diagnostician.INSTANCE.validate(EObject) I receive all validation problems but they are not visible from problems view?

Maybe I have to add something in plugin for my invariants?

[Updated on: Fri, 21 June 2013 04:49] by Moderator

Re: Show EMF Validation problems in Eclipse problems view [message #1064826 is a reply to message #1064823] Fri, 21 June 2013 04:52 Go to previous message
Eclipse UserFriend
Tommaso,

The new decorator approach does rely so much on markers being created
and it's arguable that creating markers for the in-memory state of an
editor is a bad idea; such markers persist if the editor is closed
without saving. You can look at how
org.eclipse.emf.edit.ui.action.ValidateAction converts diagnostics to
markers; the live validator approach doesn't need that though and does a
much more interesting job decorating the tree so you know where the
errors are, including flyover information about the errors, and also
decorates the properties view so you know which properties contribute to
the error.


On 21/06/2013 10:44 AM, Tommaso De Sica wrote:
> So, why if I try to call Diagnostician.INSTANCE.validate(EObject) I
> receive all validation problems but they are not visible from problems
> view?
Previous Topic:EMF sometimes doesn't resolve Proxy
Next Topic:[EMF] EContentAdapter
Goto Forum:
  


Current Time: Fri Jul 04 11:11:14 EDT 2025

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

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

Back to the top