Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext 2.3 Nature and Builder Issues(Xtext 2.3 Nature and Builder Issues and marker creation)
Xtext 2.3 Nature and Builder Issues [message #938990] Wed, 10 October 2012 10:28 Go to next message
Sam Spring is currently offline Sam SpringFriend
Messages: 6
Registered: October 2012
Junior Member
Hi,

I hope someone can help me with this. My knowledge of Xtext is not excellant so please bare with me.

I have a question regarding Xtext natures, builders and marker creation.

Eclipse Version: Indigo
Xtext Version: 2.3
Xtext Project size: 100+ files

I have migrated my software from xtext 0.7 to 2.3 and when using xtext 0.7 I did not have to add an Xtext nature to the project and the xtext FAST checks were only triggered when an xtext editor was opened and the NORMAL checks were run when the file was saved. Both checks created problems view markers. After upgrading to xtext 2.3 the checks are only visible in the editor and no problems view markers are created for the FAST and NORMAL checks.

1) For xtext 2.3 do I "now" have to apply an Xtext nature to the whole project? I assume this is the case becuase without doing so no markers are created? I applied the xtext nature to the project and now the markers are created.

2) Is it possible to apply an xtext nature to an editor only when it is opened rather than applying the nature to the whole project so it will work the same as when I was using xtext 0.7.

3) From what I have read apparently xtext has changed so that the builder now creates the markers and the builder is initialised automatically when a nature is added. The issue I have with this is that all xtext fast and normal checks are run on all xtext editors when the project is created and becuase I have 100+ editors project creation takes longer.

Thanks in advance for your help.....

Best Regards

Sam







Re: Xtext 2.3 Nature and Builder Issues [message #939067 is a reply to message #938990] Wed, 10 October 2012 11:50 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Hi Sam,

A nature can only be set on project level. It is stored in the .project file. Thus it is not possible to activate it only for an editor.

The Xtext builder checks projects for having the Xtext nature. Other projects are ignored from building.

Why do you have 100+ editors open at once? This barely makes sense to me. Or do you just mean that you have 100+ files in the project? Of course checking them takes some time, but this is only evaluated when resources change. I guess you mean you are creating a project and thus resources in the project, so naturally these resources need to be checked when the project is built.

Kind regards,
~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: Xtext 2.3 Nature and Builder Issues [message #939071 is a reply to message #938990] Wed, 10 October 2012 11:53 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2012-10-10 12:28, Sam Spring wrote:
> 2) Is it possible to apply an xtext nature to an editor only when it is
> opened rather than applying the nature to the whole project so it will
> work the same as when I was using xtext 0.7.

Nature is always for the entire project. IIRC, if the nature is not on
when an editor is opened on a file, xtext asks if the nature should be
turned on.

- henrik
Re: Xtext 2.3 Nature and Builder Issues [message #939147 is a reply to message #939067] Wed, 10 October 2012 13:22 Go to previous messageGo to next message
Sam Spring is currently offline Sam SpringFriend
Messages: 6
Registered: October 2012
Junior Member
Hi Karsten,

Thanks for your reply.

Sorry for the confusion. Yes I just mean I have 100+ files in my project so I am creating a project and resources in the project.

Usually a user will only need to open and update 1 of the files but they may wish to open up a few other files for reference. Due to the fact a user will only be viewing a few of the files I only want the xtext checks to run on those particular files and not the entire project.

Do you think this is possible?

Thanks

Sam



Re: Xtext 2.3 Nature and Builder Issues [message #939152 is a reply to message #939067] Wed, 10 October 2012 13:28 Go to previous message
Sam Spring is currently offline Sam SpringFriend
Messages: 6
Registered: October 2012
Junior Member
Thanks for the reply Henrik

Previous Topic:Extension method picked over instance method
Next Topic:Scoping vs Naming
Goto Forum:
  


Current Time: Tue Apr 16 16:44:18 GMT 2024

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

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

Back to the top