Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » selection of a rule's content
selection of a rule's content [message #760178] Thu, 01 December 2011 14:43 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
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 08:22 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
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


---
Get professional support from the Xtext committers at www.typefox.io
Re: selection of a rule's content [message #760376 is a reply to message #760372] Fri, 02 December 2011 08:32 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 431
Registered: July 2009
Location: Gothenburg
Senior Member
Great, thanks a lot!

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


Current Time: Thu Apr 25 10:19:33 GMT 2024

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

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

Back to the top