# HG changeset patch # User wpaul # Date 1265157793 21600 # Node ID 260ef22f2f0db489c8c068029dba9117f409245d # Parent 7b2f792564dcb8756dea825f920549c3d3fcad92 better fix for bug #10641. diff -r 7b2f792564dc -r 260ef22f2f0d core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/DynamicFeatureInstaller.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/DynamicFeatureInstaller.java Tue Feb 02 10:44:20 2010 -0600 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/DynamicFeatureInstaller.java Tue Feb 02 18:43:13 2010 -0600 @@ -93,13 +93,13 @@ // Having a manifest does not require that you actually install anything. So errors should not be thrown. // You simply should not run the dynamic installer if the SDK has nothing to install. if (!featureDirectory.isDirectory()) { - //throw new FileNotFoundException(featureDirectory + " is not a directory."); + throw new FileNotFoundException(featureDirectory + " is not a directory."); } if (!(new File(featureDirectory, "features").isDirectory())) { - //throw new FileNotFoundException(featureDirectory + " does not contain \"features\" directory."); + throw new FileNotFoundException(featureDirectory + " does not contain \"features\" directory."); } if (!(new File(featureDirectory, "plugins").isDirectory())) { - //throw new FileNotFoundException(featureDirectory + " does not contain \"plugins\" directory."); + throw new FileNotFoundException(featureDirectory + " does not contain \"plugins\" directory."); } } @@ -113,7 +113,7 @@ * the installation progress as a Progress Bar to the user. * Can be null. */ - public DynamicFeatureInstaller(URL featureDirectoryURL, IProgressMonitor progressMonitor) { + private DynamicFeatureInstaller(URL featureDirectoryURL, IProgressMonitor progressMonitor) { this.featureURL = featureDirectoryURL; this.progressMonitor = progressMonitor; } diff -r 7b2f792564dc -r 260ef22f2f0d core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/NewPluginChecker.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/NewPluginChecker.java Tue Feb 02 10:44:20 2010 -0600 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/NewPluginChecker.java Tue Feb 02 18:43:13 2010 -0600 @@ -17,7 +17,6 @@ package com.nokia.carbide.cpp.internal.sdk.ui; import com.nokia.carbide.cpp.internal.sdk.core.model.DynamicFeatureInstaller; -import com.nokia.carbide.cpp.internal.sdk.core.model.InstallationFailureException; import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; import com.nokia.carbide.cpp.sdk.ui.SDKUIPlugin; @@ -31,14 +30,12 @@ import org.eclipse.ui.IWorkbenchWindow; import java.io.File; -import java.io.FileNotFoundException; -import java.net.MalformedURLException; import java.util.List; @SuppressWarnings("restriction") public class NewPluginChecker { - private static final String SDK_FEATURE_SUBDIR = "epoc32/kit/feature"; //$NON-NLS-1$ + private static final String SDK_FEATURE_SUBDIR = "epoc32/kit"; //$NON-NLS-1$ public static void checkForNewlyInstalledPlugins(final IWorkbench workbench){ @@ -59,22 +56,16 @@ // XML was parsed, now try to run the feature installer sdk.setPreviouslyScanned(true); File featureDir = new File(sdk.getEPOCROOT() + SDK_FEATURE_SUBDIR); - if (featureDir.exists()) { - try { - DynamicFeatureInstaller installer = new DynamicFeatureInstaller(featureDir, null); - if (installer.install()) { - installed = true; - } - // Boog 8383: We should fail silently, since this will not break anything and may SDKs will not have any documentation - // Otherwise, these errors will be logged every time this check is done (workspace is opened) - // Originally, this was used to install MBS build support, but now is only used for SDK documentation - } catch (MalformedURLException e) { - // ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); - } catch (FileNotFoundException e) { - // ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); - } catch (InstallationFailureException e) { - // ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); + try { + DynamicFeatureInstaller installer = new DynamicFeatureInstaller(featureDir, null); + if (installer.install()) { + installed = true; } + } catch (Exception e) { + // Boog 8383: We should fail silently, since this will not break anything and may SDKs will not have any documentation + // Otherwise, these errors will be logged every time this check is done (workspace is opened) + // Originally, this was used to install MBS build support, but now is only used for SDK documentation + // ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); } }