Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » No initial ValidationJob
No initial ValidationJob [message #670285] Fri, 13 May 2011 11:01 Go to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

When an Xtext editor starts, there is no invocation of the
ValidationJob, so the editor displays whatever historical problem
markers may exist. These may be very wrong. After a dummy edit the
ValidationJob runs and all is sensible.

I recall a Bugzilla response a while ago, when I understood less about
Xtext, that this was intended behaviour and matched JDT.

I don't think it does. Is it really correct for the initial editor
display to be so wrong?

(I do not have the Xtext nature and so builder active.)

Regards

Ed Willink
Re: No initial ValidationJob [message #670287 is a reply to message #670285] Fri, 13 May 2011 11:20 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Ed,

you can bind the ValidatingEditorCallback for your language. It is meant
to be used for languages that do not use the builder infrastructure. In
any other case, the markers should be in sync with the file's content as
long as you do not change your validation rules. That's why we do not
trigger an initial validation by default.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 13.05.11 13:01, schrieb Ed Willink:
> Hi
>
> When an Xtext editor starts, there is no invocation of the
> ValidationJob, so the editor displays whatever historical problem
> markers may exist. These may be very wrong. After a dummy edit the
> ValidationJob runs and all is sensible.
>
> I recall a Bugzilla response a while ago, when I understood less about
> Xtext, that this was intended behaviour and matched JDT.
>
> I don't think it does. Is it really correct for the initial editor
> display to be so wrong?
>
> (I do not have the Xtext nature and so builder active.)
>
> Regards
>
> Ed Willink
Re: No initial ValidationJob [message #670291 is a reply to message #670287] Fri, 13 May 2011 11:44 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Sebastian

Thanks; works beautifully.

[For anyone else reading: bind ValidatingEditorCallback as
IXtextEditorCallback.]

Regards

Ed

On 13/05/2011 12:20, Sebastian Zarnekow wrote:
> Hi Ed,
>
> you can bind the ValidatingEditorCallback for your language. It is
> meant to be used for languages that do not use the builder
> infrastructure. In any other case, the markers should be in sync with
> the file's content as long as you do not change your validation rules.
> That's why we do not trigger an initial validation by default.
>
> Regards,
> Sebastian
Previous Topic:Domainmodel-Example question on duplicate op-names
Next Topic:Unassigned Rule calls
Goto Forum:
  


Current Time: Fri Apr 26 04:12:32 GMT 2024

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

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

Back to the top