# HG changeset patch # User timkelly # Date 1245346091 18000 # Node ID c7ecdd0b9f52da10e7365f8edec6637027ffc813 # Parent 5ef4ece72700b01516aeaf97182ca0b3e5ab9efd Fix bug 9310. Fix save problem with Platform Filter Prefs (sbsv2) and add Restore / Apply buttons. diff -r 5ef4ece72700 -r c7ecdd0b9f52 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java Wed Jun 17 16:41:46 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java Thu Jun 18 12:28:11 2009 -0500 @@ -149,9 +149,11 @@ // remove the leading delimeter if (store.length() > 0) { store = store.substring(1); + } + if (store.length() >= 0){ + // lenght of zero means there are not configs to filter (or show them all) prefs.setValue(SBSV2_FILTERED_CONFIGS_STORE, store); SDKCorePlugin.getDefault().savePluginPreferences(); - } } } diff -r 5ef4ece72700 -r c7ecdd0b9f52 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/BuildPlatformFilterPage.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/BuildPlatformFilterPage.java Wed Jun 17 16:41:46 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/BuildPlatformFilterPage.java Thu Jun 18 12:28:11 2009 -0500 @@ -43,12 +43,9 @@ super(); } - /* (non-Javadoc) - * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { + + public Control createContents(Composite parent) { Composite content = new Composite(parent, SWT.NONE); - setControl(content); GridLayout gridLayout = new GridLayout(); content.setLayout(gridLayout); @@ -75,12 +72,10 @@ } PlatformUI.getWorkbench().getHelpSystem().setHelp(super.getControl(), SDKUIHelpIds.SDK_BUILD_FILTER_PAGE); + + return content; } - @Override - protected Control createContents(Composite parent) { - return null; - } public void init(IWorkbench workbench) { } @@ -94,4 +89,20 @@ return super.performOk(); } + + @Override + protected void performApply() { + performOk(); + super.performApply(); + } + + @Override + protected void performDefaults() { + sbsv1Tab.setDefaults(); + sbsv2Tab.setDefaults(); + super.performDefaults(); + } + + + } diff -r 5ef4ece72700 -r c7ecdd0b9f52 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv1PlatformFilterComposite.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv1PlatformFilterComposite.java Wed Jun 17 16:41:46 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv1PlatformFilterComposite.java Thu Jun 18 12:28:11 2009 -0500 @@ -191,6 +191,20 @@ getPlatFilterPrefsStore(); } + public void setDefaults(){ + enableBSFScanner.setSelection(false); + platEKA2_WINSCW.setSelection(true); + platEKA2_GCCE.setSelection(true); + platEKA2_ARMV5.setSelection(true); + platEKA2_ARMV5_ABIV2.setSelection(false); + platEKA2_ARMV5_ABIV1.setSelection(false); + + platEKA1_WINSCW.setSelection(true); + platEKA1_THUMB.setSelection(true); + platEKA1_ARMI.setSelection(true); + platEKA1_ARM4.setSelection(true); + } + private void writePlatFilterOptionSetting(String platFilterIdName, boolean value){ IPreferenceStore prefsStore = SDKUIPlugin.getDefault().getPreferenceStore(); diff -r 5ef4ece72700 -r c7ecdd0b9f52 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv2PlatformFilterComposite.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv2PlatformFilterComposite.java Wed Jun 17 16:41:46 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv2PlatformFilterComposite.java Thu Jun 18 12:28:11 2009 -0500 @@ -113,4 +113,13 @@ } } } + + public void setDefaults(){ + initTable(true); + for (TableItem item : tableViewer.getTable().getItems()) { + if (item.getText().toLowerCase().startsWith("tool") || item.getText().toLowerCase().startsWith("gccxml")) { + tableViewer.setChecked(item.getData(), false); + } + } + } }