Disable rescan button during SDK scanning.
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Thu Jun 10 12:15:36 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Thu Jun 10 12:17:28 2010 -0500
@@ -225,7 +225,7 @@
public void done(IJobChangeEvent event) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- rescanSDKs();
+ finishRescanning();
}
});
}
@@ -261,7 +261,7 @@
*/
public SDKPreferencePage() {
super();
- scanJobListner = new ScanJobListener();
+// scanJobListner = new ScanJobListener();
}
/*
@@ -277,7 +277,7 @@
sdkList = sdkMgr.getSDKList();
if (sdkMgr instanceof SDKManager) {
SDKManager mgr = (SDKManager) sdkMgr;
- mgr.addScanJobListner(scanJobListner);
+// mgr.addScanJobListner(scanJobListner);
}
super.createControl(parent);
@@ -558,10 +558,17 @@
private void handleRescanButton() {
// forcible rescan; dump cache
SymbianBuildContextDataCache.refreshForSDKs(null);
+ startRescanning();
sdkMgr.scanSDKs();
+ finishRescanning();
}
- private void rescanSDKs(){
+ private void startRescanning() {
+ rescanButton.setText(Messages.getString("SDKPreferencePage.Rescanning_Button_Label")); //$NON-NLS-1$
+ rescanButton.setEnabled(false);
+ }
+
+ private void finishRescanning(){
sdkListTableViewer.getTable().clearAll();
sdkListTableViewer.refresh();
sdkList.clear();
@@ -569,6 +576,8 @@
addSDKComponentTableItems();
sdkListTableViewer.refresh();
selectSDKEntry(0);
+ rescanButton.setText(Messages.getString("SDKPreferencePage.Rescan_Button_Label")); //$NON-NLS-1$
+ rescanButton.setEnabled(true);
if (scanForNewPlugins){
NewPluginChecker.checkForNewlyInstalledPlugins(SDKUIPlugin.getDefault().getWorkbench());
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/messages.properties Thu Jun 10 12:15:36 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/messages.properties Thu Jun 10 12:17:28 2010 -0500
@@ -14,6 +14,7 @@
SDKPreferencePage.ScanForNewPlugins_Button_Label=Scan SDKs for installable Eclipse plugins
SDKPreferencePage.Rescan_Button_Label=Rescan All SDKs
SDKPreferencePage.Rescan_Button_ToolTip=Rebuilds all SDK entries (same as restarting the IDE).
+SDKPreferencePage.Rescanning_Button_Label=Rescanning...
SDKPreferencePage.No_SDKs_Available_Message=No SDKs are available.
SDKPreferencePage.No_selected_SDK_detected=No selected SDK detected.
SDKPreferencePage.List_of_Available_SDKs_ToolTip=List of available SDKs.