Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Outline does not work(elements with <unnamed>)
Outline does not work [message #831103] Wed, 28 March 2012 09:34 Go to next message
Eclipse UserFriend
Hi everybody,

I have implemented a DSL with xtext but when I run it as Eclipse Aplication I am not able to see the correct outline tree. Each element has the name <unnamed> until the first one, like:

myDsl
<unnamed>
<unnamed>
<unnamed>
<unnamed>
<unnamed>
<unnamed>

What's wrong or have I forgot something? I only want the default outline tree, therefore the outline API is enabled

// outline API
fragment = outline.OutlineTreeProviderFragment {}
fragment = outline.QuickOutlineFragment {}

I am using XText2.2.1

Many thanks for your help,
Joe

[Updated on: Wed, 28 March 2012 09:43] by Moderator

Re: Outline does not work [message #831203 is a reply to message #831103] Wed, 28 March 2012 11:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi does you grammar NOT have name attributes at the places of the
outline nodes. Did you implement a label provider as the docs
suggest?
Re: Outline does not work [message #831842 is a reply to message #831203] Thu, 29 March 2012 08:25 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

thanks for this information Smile . Now I have added to the MyDomainLabelProvider the following functions (as example):

String text(Class class){
   return "Class "+ele.getName();
}
String text(Function fun){
   return "Function";
}


Of course, as example now the tree looks like

Class [MyClass]
  Function
  Function


The problem is, that "Function" has no method getName() (fun.getName() does not work)

The name of the function is shown in the tree deeper. How can I put the name for the function to an upper level of the tree like:

Class [MyClass]
  Function [MyFunction1]
  Function [MyFunction2]


Many thanks,
Joe
Re: Outline does not work [message #831851 is a reply to message #831842] Thu, 29 March 2012 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Read the docs on the outline.
Re: Outline does not work [message #834981 is a reply to message #831851] Mon, 02 April 2012 12:35 Go to previous message
Eclipse UserFriend
Hi Christian,

thanks, I solved it Smile
Previous Topic:"mixed" global scoping
Next Topic:limit cross reference boundary by scoping
Goto Forum:
  


Current Time: Fri Jul 04 05:16:52 EDT 2025

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

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

Back to the top