Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Nature vs. Custom Nature
Xtext Nature vs. Custom Nature [message #1041052] Sun, 14 April 2013 10:47 Go to next message
Steve Kallestad is currently offline Steve Kallestad
Messages: 62
Registered: March 2013
Member
I'm confused about the whole nature thing.

When I generate a new project, if I don't add the xtext nature, as soon as I open a file it will ask me to add the xtext nature to the project.

Can I define my own nature so that the message is customized?

If so, is it just a matter of finding the class that represents the XText nature and subclassing it?

But I'm also curious about these non-xtext specific questions:

What comprises a nature?

Are there out of the box natures that I might want to add that provide some sort of general functionality?
Re: Xtext Nature vs. Custom Nature [message #1041056 is a reply to message #1041052] Sun, 14 April 2013 10:52 Go to previous messageGo to next message
Steve Kallestad is currently offline Steve Kallestad
Messages: 62
Registered: March 2013
Member
... wrong thread

[Updated on: Sun, 14 April 2013 10:53]

Report message to a moderator

Re: Xtext Nature vs. Custom Nature [message #1041074 is a reply to message #1041052] Sun, 14 April 2013 11:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6125
Registered: July 2009
Senior Member
Have a look at (I think it is called) NatureAddingCallback

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Xtext Nature vs. Custom Nature [message #1041519 is a reply to message #1041074] Mon, 15 April 2013 03:44 Go to previous message
Claudio Heeg is currently offline Claudio Heeg
Messages: 75
Registered: April 2013
Member
NatureAddingEditorCallback is what you look for to customise. [1]
As for what a nature is, well, it's just the characteristics describing the language, from my understanding. That popup is basically Xtext asking you whether you want to apply the grammar to that file, so highlighting etc can be utilised.
So you're basically creating a nature for a language every time you create an Xtext grammar.

--
[1] http://www.eclipse.org/forums/index.php/m/718205/
Previous Topic:[Xtext 2.3] Split *.xtext file up into multiple files?
Next Topic:[Xtend] performance and memory usage
Goto Forum:
  


Current Time: Tue Jul 22 13:43:45 EDT 2014

Powered by FUDForum. Page generated in 0.01965 seconds