Strange selection in editor when selecting something in outline [message #668555] |
Fri, 06 May 2011 08:27 |
Mark Christiaens Messages: 63 Registered: October 2010 |
Member |
|
|
I just noticed something strange. When I open the outline, couple the outline with the text editor (with the double arrow icon) and then select an item from the outline tree, the corresponding selection in the editor is sometimes unexpected. For example when in VHDL I have the following line:
The corresponding (somewhat simplified) grammar rule is:
PortElement:
names+=PortName (',' names+=PortName)* ':' (mode=PortElementMode)?
subtype=SubtypeIndication;
I would expect that if I click on the "clk" item in the outline, the "clk" (which is the string that corresponds to that item in the editor) is selected. Instead, only the ":" keyword is selected? Often the selection is what I expect it to be but not always. Is this intentional or should I file a bug?
---
Mark Christiaens
Discover the Future of VHDL Design
Go to www.sigasi.com
[Updated on: Fri, 06 May 2011 08:28] Report message to a moderator
|
|
|
Re: Strange selection in editor when selecting something in outline [message #668567 is a reply to message #668555] |
Fri, 06 May 2011 09:08 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Mark,
this is intentional. The default implementation of the
ILocationInFileProvider tries to find the name of the element. If it has
no name (like your PortElement), the first keyword is selected that
belongs to the production rule that created the element. You'll have to
customize the location in your own ILocationInFileProvider.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 06.05.11 10:27, schrieb Mark Christiaens:
> I just noticed something strange. When I open the outline, couple the
> outline with the text editor (with the double arrow icon) and then
> select an item from the outline tree, the corresponding selection in the
> editor is sometimes unexpected. For example when in VHDL I have the
> following line:
> clk : in std_logic; The corresponding (somewhat simplified) grammar rule
> is:
> PortElement:
> names+=PortName (',' names+=PortName)* ':' (mode=PortElementMode)?
> subtype=SubtypeIndication;
> I would expect that if I click on the "clk" item in the outline, the
> "clk" (which is the string that corresponds to that item in the editor)
> is selected. Instead, only the ":" keyword is selected? Often the
> selection is what I expect it to be but not always. Is this intentional
> or should I file a bug?
> ---
> Mark Christiaens
> Discover the Future of VHDL Design
> Go to http://www.sigasi.com
>
|
|
|
Powered by
FUDForum. Page generated in 0.03170 seconds