Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Objects' types in outline(instead of objects' ID features)
Objects' types in outline [message #880892] Sun, 03 June 2012 09:20 Go to next message
Oleg Bolshakov is currently offline Oleg BolshakovFriend
Messages: 36
Registered: August 2010
Member
Is there a way to watch tree items' types in outline instead of their ID features? The outline is very usefull to watch immediatly, how AST is composed according to the input, but almost all of the tree items are "<unnamed>" (I guess the names in outline are items' ID feature).

[Updated on: Sun, 03 June 2012 09:23]

Report message to a moderator

Re: Objects' types in outline [message #880917 is a reply to message #880892] Sun, 03 June 2012 11:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13667
Registered: July 2009
Senior Member
Hi,

what about providing a label provider that overcomes the lack of "name"s in your grammar.

~Christian


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: Objects' types in outline [message #880925 is a reply to message #880917] Sun, 03 June 2012 11:39 Go to previous message
Oleg Bolshakov is currently offline Oleg BolshakovFriend
Messages: 36
Registered: August 2010
Member
Very good idea ) It does work with just several lines of code added to default Label provider:
String text(EObject obj)
{		
	return obj.getClass().getSimpleName();
}


It's also very good that double clicking an element in outline I san see the corresponding text selection in editor

[Updated on: Sun, 03 June 2012 11:43]

Report message to a moderator

Previous Topic:Why this grammar is not LL(*)?
Next Topic:How to add annotations to generated class
Goto Forum:
  


Current Time: Thu Dec 03 20:48:52 GMT 2020

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

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

Back to the top