Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:38 Go to next message
Tommaso De Sica is currently offline Tommaso De Sica
Messages: 128
Registered: March 2012
Location: Italy
Senior Member

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 07:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
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 08:15 Go to previous messageGo to next message
Tommaso De Sica is currently offline Tommaso De Sica
Messages: 128
Registered: March 2012
Location: Italy
Senior Member

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 08:16]

Report message to a moderator

Re: Show EMF Validation problems in Eclipse problems view [message #1064813 is a reply to message #1064808] Fri, 21 June 2013 08:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
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 08:44 Go to previous messageGo to next message
Tommaso De Sica is currently offline Tommaso De Sica
Messages: 128
Registered: March 2012
Location: Italy
Senior Member

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 08:49]

Report message to a moderator

Re: Show EMF Validation problems in Eclipse problems view [message #1064826 is a reply to message #1064823] Fri, 21 June 2013 08:52 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26141
Registered: July 2009
Senior Member
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 Oct 24 18:14:23 GMT 2014

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

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