Skip to main content



      Home
Home » Modeling » TMF (Xtext) » selection of a rule's content
selection of a rule's content [message #760178] Thu, 01 December 2011 09:43 Go to next message
Eclipse UserFriend
Hi!

When I select something in the outline, it seems that sometimes the whole construct is highlighted in the editor and sometimes only the first literal in it.

For example given
Expressions:
	items+=Expression (',' items+=Expression)*;

and
a,b,c,d

only the first comma is highlighted when selecting the expressions node, unless there is only one item and then it gets all highlighted.

Could someone please tell why is this so and how can I make it always select all the node's contents?

best regards,
Vlad


Re: selection of a rule's content [message #760372 is a reply to message #760178] Fri, 02 December 2011 03:22 Go to previous messageGo to next message
Eclipse UserFriend
Have a look at the way the IOutlineNodes are created in the
DefaultOutlineTreeProvider: Each node has stores two regions:
The significantRegion is what is selected in the editor when the node is
double-clicked, while the fullTextRegion triggers the selection of the
node in the outline node when "Link with editor" is on and the selection
is changing in the text editor.

You might also have a look at the ILocationInFileProvider.


Am 01.12.11 15:43, schrieb Vlad Dumitrescu:
> Hi!
>
> When I select something in the outline, it seems that sometimes the
> whole construct is highlighted in the editor and sometimes only the
> first literal in it.
> For example given
> Expressions:
> items+=Expression (',' items+=Expression)*;
> and
> a,b,c,d
> only the first comma is highlighted when selecting the expressions node,
> unless there is only one item and then it gets all highlighted.
>
> Could someone please tell why is this so and how can I make it always
> select all the node's contents?
> best regards,
> Vlad
>
>
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: selection of a rule's content [message #760376 is a reply to message #760372] Fri, 02 December 2011 03:32 Go to previous message
Eclipse UserFriend
Great, thanks a lot!

regards,
Vlad
Previous Topic:Floats and qualified ids...
Next Topic:antlr issue when compiling grammar
Goto Forum:
  


Current Time: Mon Jul 07 12:11:39 EDT 2025

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

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

Back to the top