Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319305

Summary: Editor and outline view not linked, even if link editor action is checked
Product: [Modeling] TMF Reporter: Samantha Chan <chanskw>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clay, sebastian.zarnekow
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: SR1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 323065    
Attachments:
Description Flags
proposed patch none

Description Samantha Chan CLA 2010-07-08 14:49:54 EDT
1) Open a file using the XText editor.
2) In this outline view, toggle the link editor action to checked
3) Open another file using the Xtext editor
4) You will notice that the "Link editor" action is checked, which is as expected
6) Uncheck the "Link Editor" action in the second editor -> editor is not linked -> good
7) Go back to the first editor 

->  Notice that the "Link Editor" action is checked -> which is not expected as the preference is stored in a static value in LinkingHelper

->  Keep the action as checked, and select something in the editor -> Nothing in the outline view is selected.  This is because the editor check state and the LinkingHelper static value have gone into inconsistent state.  

I think there needs to be some "listener" implementation in the LinkingHelper and ask the actions to react to changes to the linking property.  Otherwise, we will easily get into inconsistent state.
Comment 1 Samantha Chan CLA 2010-07-08 14:54:15 EDT
After looking deeper, I think the action needs to listen for preference changes from the preference store, for it to be in sync with the preference.
Comment 2 Michael Clay CLA 2010-08-05 17:03:10 EDT
Fixed in HEAD
Comment 3 Michael Clay CLA 2010-08-05 17:03:46 EDT
Created attachment 175982 [details]
proposed patch
Comment 4 Karsten Thoms CLA 2017-09-19 15:54:20 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.