|
|
|
Re: diagnostic [message #426500 is a reply to message #426496] |
Thu, 08 January 2009 15:02 |
Ed Merks 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/
|
|
|
Powered by
FUDForum. Page generated in 0.03091 seconds