Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342898 - Outline View does not fill backward history
Summary: Outline View does not fill backward history
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 8.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-14 17:08 EDT by Axel Mueller CLA
Modified: 2011-04-15 17:25 EDT (History)
2 users (show)

See Also:


Attachments
When an element is selected in Outline View fill Backward History (1.53 KB, patch)
2011-04-14 17:10 EDT, Axel Mueller CLA
aleherb+eclipse: iplog-
Details | Diff
Fill backward history when Quick outline is used (957 bytes, patch)
2011-04-14 17:33 EDT, Axel Mueller CLA
aleherb+eclipse: iplog-
Details | Diff
Committed fix (14.32 KB, patch)
2011-04-15 03:45 EDT, Anton Leherbauer CLA
aleherb+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Mueller CLA 2011-04-14 17:08:24 EDT
Build Identifier: Eclipse 3.7.0, CDT 8.0

When any element is selected in the Outline View and Link with editor is enabled the cursor in the editor will jump to the selected element. Unfortunately, this event is not send to the Backward History (Alt+Left arrow).

Reproducible: Always

Steps to Reproduce:
1. Open Outline View
2. Enable Link with Editor
3. Select element X in the Outline View
4. Select another element in the Outline View
5. click Backward History in main toolbar or press Alt+Left arrow
=> you would expect to get back to element X
Comment 1 Axel Mueller CLA 2011-04-14 17:10:07 EDT
Created attachment 193300 [details]
When an element is selected in Outline View fill Backward History
Comment 2 Axel Mueller CLA 2011-04-14 17:33:23 EDT
Created attachment 193305 [details]
Fill backward history when Quick outline is used
Comment 3 Anton Leherbauer CLA 2011-04-15 03:45:07 EDT
Created attachment 193328 [details]
Committed fix

Good point and thanks for the patches.
However, I have taken a different approach.  The central method for triggering selection changes is CEditor.setSelection(ISourceRange, boolean), therefore I fixed that method to mark the new selection in the navigation history.  This is also in alignment with the Java editor.
The patch fixes the same issue for the Makefile and Assembly editors as well.
Comment 4 Anton Leherbauer CLA 2011-04-15 03:46:42 EDT
Fixed in HEAD.
Comment 6 Axel Mueller CLA 2011-04-15 05:10:42 EDT
(In reply to comment #3)
> Good point and thanks for the patches.
> However, I have taken a different approach.  The central method for triggering
> selection changes is CEditor.setSelection(ISourceRange, boolean)
You're right. I started first fixing only the Outline View and then Quickline Outline. Later (after submitting the patches) I realized that it could be fixed at one place in CEditor. 
Thanks for your quick reply and fix.