Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » diagnostic
diagnostic [message #426493] Thu, 08 January 2009 11:45 Go to next message
miong is currently offline miongFriend
Messages: 2
Registered: July 2009
Junior Member
Hi everybody,

how to change the diagnostic state of the eobject from OK onto ERROR?

Regards
Re: diagnostic [message #426494 is a reply to message #426493] Thu, 08 January 2009 12:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Have a look at
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/references/overview/EMF.Validation.html

miong wrote:
> Hi everybody,
>
> how to change the diagnostic state of the eobject from OK onto ERROR?
>
> Regards
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: diagnostic [message #426496 is a reply to message #426494] Thu, 08 January 2009 13:08 Go to previous messageGo to next message
miong is currently offline miongFriend
Messages: 2
Registered: July 2009
Junior Member
Hi, Ed,

thanks for the replay! I guess my question was poorly worded.
i want to do somethimg like this:

if (diagnostic.getSeverity() != Diagnostic.ERROR) {

setdiagnostic(Diagnostic.ERROR)

}

is this feasible?

Regards
Re: diagnostic [message #426500 is a reply to message #426496] Thu, 08 January 2009 15:02 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Comments below.

miong wrote:
> Hi, Ed,
>
> thanks for the replay! I guess my question was poorly worded.
Sometimes when questions are really terse, I make a point of ensuring
that my answer is shorter than the question...
> i want to do somethimg like this:
> if (diagnostic.getSeverity() != Diagnostic.ERROR) {
>
> setdiagnostic(Diagnostic.ERROR)
>
> }
BasicDiagnostic has a setSeverity method on it, but in terms of the
Diagnostic API, they're generally intended to be read-only for the
client. It's the producer/creator of the diagnostics that should
determine their severity and they do that by creating a BasicDiagnostic
and populating it as they see appropriate. Note also that you
BasicDiagnostic implements DiagnosticChain which allows child
diagnostics to be added; the parent diagnostic accumulates the severity
of the children and takes on the worse severity...
>
> is this feasible?
>
> Regards
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Literals missing from code generated by and ANT script
Next Topic:Re: EMF Derived Attribute Notifier
Goto Forum:
  


Current Time: Thu Sep 26 16:10:33 GMT 2024

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

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

Back to the top