Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
... wrong thread

[Updated on: Sun, 14 April 2013 10:53] by 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
Eclipse UserFriend
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
Eclipse UserFriend
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 20:47:14 EDT 2025

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

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

Back to the top