Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Resource validation after opening it in editor(Resource validation not getting called when resource gets opened in editor and Build Automatically is disabled)
Resource validation after opening it in editor [message #1821602] Mon, 17 February 2020 08:26 Go to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 130
Registered: June 2014
Senior Member
Hi,

I want to call resource validator when user opens resource in editor.

This works fine when "Build Automatically" is enabled. Resource validator gets called and errors pops up in editor and problems view.

But, when "Build Automatically" is disabled and user opens a resource is editor, resource validator does not get called and hence no error. User has to build or save file to see the errors in resource.

I want to call resource validator even when "Build Automatically" is disabled and I want the error markers to be displayed in editor. No error in problems view and project explorer also fine. But editor should have error markers.

Can you please guide me to achieve this?

Thanks and regards,
Virag
Re: Resource validation after opening it in editor [message #1821606 is a reply to message #1821602] Mon, 17 February 2020 10:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13641
Registered: July 2009
Senior Member
maybe you can schedule a validation job when editor is opended (thought that would happen ootb already)

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Resource validation after opening it in editor [message #1821607 is a reply to message #1821606] Mon, 17 February 2020 10:18 Go to previous messageGo to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 130
Registered: June 2014
Senior Member
I will give a try with this.

Thanks and regards,
Virag
Re: Resource validation after opening it in editor [message #1821610 is a reply to message #1821606] Mon, 17 February 2020 10:45 Go to previous message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 130
Registered: June 2014
Senior Member
Thanks Mr. Christian Dietrich,

It works for me.

Regards,
Virag
Previous Topic:Deriving model from binary class files
Next Topic:Xtext and JUnit 5
Goto Forum:
  


Current Time: Tue Oct 27 15:26:36 GMT 2020

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

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

Back to the top