Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358829 - AbstractPage-derived pages should remember current tab
Summary: AbstractPage-derived pages should remember current tab
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 8.1.0   Edit
Assignee: Andrew Gvozdev CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-25 19:52 EDT by Eugene Ostroukhov CLA
Modified: 2014-01-29 22:57 EST (History)
1 user (show)

See Also:


Attachments
Patch that implements the enhancement (2.38 KB, patch)
2011-09-25 19:52 EDT, Eugene Ostroukhov CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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