Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Diagnostic vs. Diagnostic...
Diagnostic vs. Diagnostic... [message #663423] Tue, 05 April 2011 01:00 Go to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Hi,
I am moving some logic that I executed during validation to be performed
after linking. The way to report errors is quite different when getting
an IDiagnosticsConsumer instead of being able to call the error(...)
methods.

What is the correct way to report errors ("the same way as in the
validator")? I basically want to report errors against EObject features.

The "Diagnostic" accepted by the IDiagnosticConsumer is not the emf
Diagnostic that is used in the validator, and I found sublcasses for
Linking, Syntax, and Exception issues.

Should I just subclass AbstractDiagnostic ?

Regards
- henrik
Re: Diagnostic vs. Diagnostic... [message #663532 is a reply to message #663423] Tue, 05 April 2011 14:18 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Where is the logic that translates a FeatureBasedDiagnostic into a
node/location in source ?

- henrik

On 4/5/11 3:00 AM, Henrik Lindberg wrote:
> Hi,
> I am moving some logic that I executed during validation to be performed
> after linking. The way to report errors is quite different when getting
> an IDiagnosticsConsumer instead of being able to call the error(...)
> methods.
>
> What is the correct way to report errors ("the same way as in the
> validator")? I basically want to report errors against EObject features.
>
> The "Diagnostic" accepted by the IDiagnosticConsumer is not the emf
> Diagnostic that is used in the validator, and I found sublcasses for
> Linking, Syntax, and Exception issues.
>
> Should I just subclass AbstractDiagnostic ?
>
> Regards
> - henrik
Re: Diagnostic vs. Diagnostic... [message #663538 is a reply to message #663532] Tue, 05 April 2011 14:26 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
I can answer myself -
org.eclipse.xtext.validation.DiagnosticConverterImpl

*sigh*
- henrik

On 4/5/11 4:18 PM, Henrik Lindberg wrote:
> Where is the logic that translates a FeatureBasedDiagnostic into a
> node/location in source ?
>
> - henrik
>
> On 4/5/11 3:00 AM, Henrik Lindberg wrote:
>> Hi,
>> I am moving some logic that I executed during validation to be performed
>> after linking. The way to report errors is quite different when getting
>> an IDiagnosticsConsumer instead of being able to call the error(...)
>> methods.
>>
>> What is the correct way to report errors ("the same way as in the
>> validator")? I basically want to report errors against EObject features.
>>
>> The "Diagnostic" accepted by the IDiagnosticConsumer is not the emf
>> Diagnostic that is used in the validator, and I found sublcasses for
>> Linking, Syntax, and Exception issues.
>>
>> Should I just subclass AbstractDiagnostic ?
>>
>> Regards
>> - henrik
>
Re: Diagnostic vs. Diagnostic... [message #663540 is a reply to message #663538] Tue, 05 April 2011 14:38 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
hm, actually, I can't find that it makes use of the index for the
feature in that logic.
- henrik

On 4/5/11 4:26 PM, Henrik Lindberg wrote:
> I can answer myself -
> org.eclipse.xtext.validation.DiagnosticConverterImpl
>
> *sigh*
> - henrik
>
> On 4/5/11 4:18 PM, Henrik Lindberg wrote:
>> Where is the logic that translates a FeatureBasedDiagnostic into a
>> node/location in source ?
>>
>> - henrik
>>
>> On 4/5/11 3:00 AM, Henrik Lindberg wrote:
>>> Hi,
>>> I am moving some logic that I executed during validation to be performed
>>> after linking. The way to report errors is quite different when getting
>>> an IDiagnosticsConsumer instead of being able to call the error(...)
>>> methods.
>>>
>>> What is the correct way to report errors ("the same way as in the
>>> validator")? I basically want to report errors against EObject features.
>>>
>>> The "Diagnostic" accepted by the IDiagnosticConsumer is not the emf
>>> Diagnostic that is used in the validator, and I found sublcasses for
>>> Linking, Syntax, and Exception issues.
>>>
>>> Should I just subclass AbstractDiagnostic ?
>>>
>>> Regards
>>> - henrik
>>
>
Previous Topic:Configuring local and global scope providers at the same time
Next Topic:CrossLinking
Goto Forum:
  


Current Time: Fri Apr 26 20:37:00 GMT 2024

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

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

Back to the top