Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326022 - [Outline] Synchronization in text editor only upon selection of "ID"
Summary: [Outline] Synchronization in text editor only upon selection of "ID"
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-23 02:52 EDT by Johan Wannheden CLA
Modified: 2017-09-19 17:55 EDT (History)
3 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Wannheden CLA 2010-09-23 02:52:19 EDT
Build Identifier: I20100608-0911

The behavior with the "synchronize button" has changed (regressed?). Assuming the "synchronize button" is enabled, a selection in the text will only reposition/highlight the corresponding element in the outline if an element's "ID" is selected. Before, it was possible to select anywhere inside an element. Is this a regression or is it meant to work like this?

Reproducible: Always
Comment 1 Jan Koehnlein CLA 2010-09-23 03:44:44 EDT
The 1.0.1 implementation is a trade-off between performance in big models and API backward compatibility. Instead of traversing the whole tree (and thereby instantiating all nodes eagerly) to find the matching node for an text selection, we use the text region returned by the ILocationInFileProvider. 

Note that this is the text region that should be selected when linking in the other direction, i.e. from a selected node to the text. 

In the current HEAD, the outline and the ILocationInFileProvider has been completely reworked. An IOutlineNode can now have two regions, a significant one (e.g. the ID) and a complete one (the whole text representing). To enable this, we had to break 1.x API, that's why it is not possible to transfer this solution to the 1.x branch.

So the resolution is: Fixed in HEAD.
Comment 2 Sebastian Zarnekow CLA 2010-09-23 03:46:53 EDT
Do we need to fix this one for 1.0.2 (which we do not plan to have) or is it possible to customize the 1.0.1 algorithm to restore the 1.0.0 behaviour?
Comment 3 Sebastian Zarnekow CLA 2010-11-01 08:26:58 EDT
See comment #2:
Is this an issue for 1.0.2, too?
Comment 4 Stephane Barbey CLA 2010-11-01 08:38:37 EDT
(In reply to comment #3)
> See comment #2:
> Is this an issue for 1.0.2, too?

I'd say that performance in big models is more important than the "synchronize button" functionality. Now if we can have both, and within 1.0.2 too... :-)
Comment 5 Karsten Thoms CLA 2017-09-19 17:44:23 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:55:39 EDT
Closing all bugs that were set to RESOLVED before Neon.0