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

Bug 358829

Summary: AbstractPage-derived pages should remember current tab
Product: [Tools] CDT Reporter: Eugene Ostroukhov <eostroukhov>
Component: cdt-buildAssignee: Andrew Gvozdev <angvoz.dev>
Status: RESOLVED FIXED QA Contact: Andrew Gvozdev <angvoz.dev>
Severity: enhancement    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: 8.1.0   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch that implements the enhancement cdtdoug: iplog+

Description Eugene Ostroukhov CLA 2011-09-25 19:52:57 EDT
Created attachment 203978 [details]
Patch that implements the enhancement

Eclipse Platform remembers current preference or property page when appropriate dialog is reopened during the same user session.

Attached patch implements similar functionality for AbstractPage - when the users comes back the page will select the same tab. I do not believe that this should be very robust so it would revert to first tab if it can't restore the tab (i.e. if the tab is n/a for selected project).

Also note that there is a bug in AbstractPage implementation when page would not receive the ICPropertyTab.VISIBLE if it is opened during page creation (TabPage will not notify selection listeners when selection is set programmatically). This patch fixes that by extracting code from listener to updateSelectedTab method.
Comment 1 Andrew Gvozdev CLA 2011-09-26 10:03:00 EDT
Thanks for the patch, pushed to master. This won't be 100% accurate if there are 2 property tabs being instance of the same class but I don't think we have any pages like that, if that is possible at all.
Comment 2 Andrew Gvozdev CLA 2011-09-26 10:03:21 EDT
Closing task.
Comment 3 CDT Genie CLA 2011-09-26 10:23:02 EDT
*** cdt git genie on behalf of Eugene Ostroukhov ***

    bug 358829: AbstractPage-derived pages should remember current tab

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=e28830a10b16122fa7825405b7fae52d50c22fad