Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351680 - ContentOutline "Link with Editor" not working when switching between files
Summary: ContentOutline "Link with Editor" not working when switching between files
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: SR2   Edit
Assignee: Jan Koehnlein CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 05:11 EDT by Timo CLA
Modified: 2017-09-19 18:08 EDT (History)
5 users (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo CLA 2011-07-11 05:11:32 EDT
Build Identifier: 20110615-0604

As posted on the forums: http://www.eclipse.org/forums/index.php/t/218948/

I open FileA.txt, check "Link with Editor" in the outline. It's working.
Then I open FileB.txt, "Link with Editor" is still checked, but nothing happens when I navigate through the lines in the editor.
If I uncheck "Link with Editor", and check it again, it's working again.

Reproducible: Always

Steps to Reproduce:
1. Open a file, check "Link with Editor"
2. Open another file and do something in the editor which should trigger an outline change
3. uncheck and check "Link with editor" again, then again do something affecting the outline
Comment 1 Samantha Chan CLA 2011-08-08 16:55:59 EDT
I also experienced the same problem with our editor.
Comment 2 Samantha Chan CLA 2011-08-08 17:02:57 EDT
Looking at the code, looks like fLinkingEnabled has the wrong state.

I wonder why we need to maintain a fLinkingEnabled state for each of the OutlineWithEditorLinker?  Wouldn't it work if you just query the preference store for the latest preference setting before setting selection in the text/tree viewer?
Comment 3 Samantha Chan CLA 2011-08-10 11:40:50 EDT
Just to confirm.  This is targeted for SR2, does that mean this is targeted to the next 2.0 service release in Sept?

Thanks...
Comment 4 Sven Efftinge CLA 2011-08-15 04:51:55 EDT
It will not be a service release but a full release (2.1) including new functionality and API. It is planned to be released in mid October.
Comment 5 Jan Koehnlein CLA 2011-08-16 05:07:21 EDT
(In reply to comment #2)
> I wonder why we need to maintain a fLinkingEnabled state for each of the
> OutlineWithEditorLinker?  Wouldn't it work if you just query the preference
> store for the latest preference setting before setting selection in the
> text/tree viewer?

Selection events are quite frequent and AFAIK the preference store is much more than just a map, so caching this state might make sense

Fix pushed to MASTER.
Comment 6 Karsten Thoms CLA 2017-09-19 17:58:08 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 7 Karsten Thoms CLA 2017-09-19 18:08:54 EDT
Closing all bugs that were set to RESOLVED before Neon.0