Lines 23-28
Link Here
|
23 |
import java.util.Hashtable; |
23 |
import java.util.Hashtable; |
24 |
import java.util.Iterator; |
24 |
import java.util.Iterator; |
25 |
import java.util.Map; |
25 |
import java.util.Map; |
|
|
26 |
import java.util.Set; |
26 |
|
27 |
|
27 |
import org.eclipse.core.runtime.CoreException; |
28 |
import org.eclipse.core.runtime.CoreException; |
28 |
import org.eclipse.core.runtime.IProgressMonitor; |
29 |
import org.eclipse.core.runtime.IProgressMonitor; |
Lines 50-55
Link Here
|
50 |
import org.eclipse.update.internal.configurator.ConfigurationActivator; |
51 |
import org.eclipse.update.internal.configurator.ConfigurationActivator; |
51 |
import org.eclipse.update.internal.configurator.FeatureEntry; |
52 |
import org.eclipse.update.internal.configurator.FeatureEntry; |
52 |
import org.eclipse.update.internal.configurator.IConfigurationConstants; |
53 |
import org.eclipse.update.internal.configurator.IConfigurationConstants; |
|
|
54 |
import org.eclipse.update.internal.configurator.PlatformConfiguration; |
53 |
import org.eclipse.update.internal.configurator.SiteEntry; |
55 |
import org.eclipse.update.internal.configurator.SiteEntry; |
54 |
import org.eclipse.update.internal.model.ConfigurationActivityModel; |
56 |
import org.eclipse.update.internal.model.ConfigurationActivityModel; |
55 |
import org.eclipse.update.internal.model.ConfiguredSiteModel; |
57 |
import org.eclipse.update.internal.model.ConfiguredSiteModel; |
Lines 832-848
Link Here
|
832 |
private boolean isRestartNeeded(IPlatformConfiguration runtimeConfig) { |
834 |
private boolean isRestartNeeded(IPlatformConfiguration runtimeConfig) { |
833 |
|
835 |
|
834 |
// First, create a map for faster lookups |
836 |
// First, create a map for faster lookups |
835 |
URL[] newBundlePaths = runtimeConfig.getPluginPath(); |
837 |
Set newPluginsSet = null; |
836 |
HashSet newPluginsSet = new HashSet(newBundlePaths.length); |
838 |
if (runtimeConfig instanceof PlatformConfiguration) { |
837 |
for (int i=0; i<newBundlePaths.length; i++) { |
839 |
newPluginsSet = ((PlatformConfiguration)runtimeConfig).getPluginPaths(); |
838 |
|
|
|
839 |
String pluginLocation = newBundlePaths[i].getFile(); |
840 |
newPluginsSet.add(pluginLocation); |
841 |
// On windows, we will be doing case insensitive search as well, so lower it now |
840 |
// On windows, we will be doing case insensitive search as well, so lower it now |
842 |
if (isWindows) |
841 |
if (isWindows) { |
843 |
newPluginsSet.add(pluginLocation.toLowerCase()); |
842 |
String[] newPluginsSetArray = (String[])newPluginsSet.toArray( new String[newPluginsSet.size()]); |
|
|
843 |
for (int i = 0; i < newPluginsSetArray.length; i++) { |
844 |
newPluginsSet.add(newPluginsSetArray[i].toLowerCase()); |
845 |
} |
846 |
} |
847 |
} else { |
848 |
URL[] newBundlePaths = runtimeConfig.getPluginPath(); |
849 |
newPluginsSet = new HashSet(newBundlePaths.length); |
850 |
for (int i=0; i<newBundlePaths.length; i++) { |
851 |
|
852 |
String pluginLocation = newBundlePaths[i].getFile(); |
853 |
newPluginsSet.add(pluginLocation); |
854 |
// On windows, we will be doing case insensitive search as well, so lower it now |
855 |
if (isWindows) |
856 |
newPluginsSet.add(pluginLocation.toLowerCase()); |
857 |
} |
844 |
} |
858 |
} |
845 |
|
859 |
|
|
|
860 |
|
861 |
|
846 |
Bundle[] oldBundles = UpdateCore.getPlugin().getBundleContext().getBundles(); |
862 |
Bundle[] oldBundles = UpdateCore.getPlugin().getBundleContext().getBundles(); |
847 |
|
863 |
|
848 |
int offset = ConfigurationActivator.UPDATE_PREFIX.length(); |
864 |
int offset = ConfigurationActivator.UPDATE_PREFIX.length(); |