| diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java |
| index 1ea8373..a904e2d 100644 |
| --- plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java |
| +++ plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java |
| @@ -1,5 +1,5 @@ |
| /******************************************************************************* |
| - * Copyright (c) 2004, 2010 IBM Corporation and others. |
| + * Copyright (c) 2004, 2012 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| @@ -7,23 +7,19 @@ |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| + * Red Hat, Inc. - Bug 367924 |
| *******************************************************************************/ |
| package org.eclipse.pde.internal.build.site; |
| |
| import java.io.*; |
| -import java.net.MalformedURLException; |
| import java.net.URL; |
| import java.util.*; |
| import org.eclipse.core.runtime.IPath; |
| import org.eclipse.core.runtime.Path; |
| import org.eclipse.pde.internal.build.IPDEBuildConstants; |
| import org.eclipse.pde.internal.build.Utils; |
| -import org.eclipse.update.configurator.ConfiguratorUtils; |
| -import org.eclipse.update.configurator.IPlatformConfiguration; |
| |
| public class PluginPathFinder { |
| - private static final String URL_PROPERTY = "org.eclipse.update.resolution_url"; //$NON-NLS-1$ |
| - private static final String EMPTY_STRING = ""; //$NON-NLS-1$ |
| private static final String DROPINS = "dropins"; //$NON-NLS-1$ |
| private static final String LINK = ".link"; //$NON-NLS-1$ |
| private static final String ECLIPSE = "eclipse"; //$NON-NLS-1$ |
| @@ -158,67 +154,11 @@ public class PluginPathFinder { |
| } |
| } |
| |
| - File file = new File(platformHome, "configuration/org.eclipse.update/platform.xml"); //$NON-NLS-1$ |
| - if (file.exists()) { |
| - try { |
| - String value = new Path(platformHome).toFile().toURL().toExternalForm(); |
| - System.setProperty(URL_PROPERTY, value); |
| - try { |
| - IPlatformConfiguration config = ConfiguratorUtils.getPlatformConfiguration(file.toURL()); |
| - return getConfiguredSitesPaths(platformHome, config, features); |
| - } finally { |
| - System.setProperty(URL_PROPERTY, EMPTY_STRING); |
| - } |
| - } catch (MalformedURLException e) { |
| - //ignore |
| - } catch (IOException e) { |
| - //ignore |
| - } |
| - } |
| - |
| List list = scanLocations(getSites(platformHome, features)); |
| list.addAll(getDropins(platformHome, features)); |
| return Utils.asFile(list); |
| } |
| |
| - private static File[] getConfiguredSitesPaths(String platformHome, IPlatformConfiguration configuration, boolean features) { |
| - List installPlugins = scanLocations(new File[] {new File(platformHome, features ? IPDEBuildConstants.DEFAULT_FEATURE_LOCATION : IPDEBuildConstants.DEFAULT_PLUGIN_LOCATION)}); |
| - List extensionPlugins = getExtensionPlugins(configuration, features); |
| - List dropinsPlugins = getDropins(platformHome, features); |
| - |
| - Set all = new LinkedHashSet(); |
| - all.addAll(installPlugins); |
| - all.addAll(extensionPlugins); |
| - all.addAll(dropinsPlugins); |
| - |
| - return (File[]) all.toArray(new File[all.size()]); |
| - } |
| - |
| - /** |
| - * |
| - * @param config |
| - * @param features true for features false for plugins |
| - * @return List of Files for features or plugins on the site |
| - */ |
| - private static List getExtensionPlugins(IPlatformConfiguration config, boolean features) { |
| - ArrayList extensionPlugins = new ArrayList(); |
| - IPlatformConfiguration.ISiteEntry[] sites = config.getConfiguredSites(); |
| - for (int i = 0; i < sites.length; i++) { |
| - URL url = sites[i].getURL(); |
| - if ("file".equalsIgnoreCase(url.getProtocol())) { //$NON-NLS-1$ |
| - String[] entries; |
| - if (features) |
| - entries = sites[i].getFeatures(); |
| - else |
| - entries = sites[i].getPlugins(); |
| - for (int j = 0; j < entries.length; j++) { |
| - extensionPlugins.add(new File(url.getFile(), entries[j])); |
| - } |
| - } |
| - } |
| - return extensionPlugins; |
| - } |
| - |
| /** |
| * Scan given plugin/feature directories or jars for existence |
| * @param sites |
| -- |
| 1.7.7.5 |
| |