Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/BundleFinder.java')
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/BundleFinder.java31
1 files changed, 18 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/BundleFinder.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/BundleFinder.java
index e0652d00e..5adf9c7fe 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/BundleFinder.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/BundleFinder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2006 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
@@ -14,7 +14,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Map;
-import org.eclipse.core.internal.runtime.FindSupport;
import org.osgi.framework.Bundle;
/**
@@ -23,9 +22,8 @@ import org.osgi.framework.Bundle;
*
* The class is not intended to be subclassed or instantiated by clients.
*
- * @since org.eclipse.equinox.common 1.0
- * XXX bundle finder renamed and it aggregates URLCOnverter.
- * This is not a service! just statics.
+ * @since 3.2
+ * @deprecated clients should use {@link FileLocator} instead
*/
public final class BundleFinder {
@@ -38,9 +36,10 @@ public final class BundleFinder {
* @return a URL for the given path or <code>null</code>. The actual form
* of the returned URL is not specified.
* @see #find(Bundle, IPath, Map)
+ * @deprecated use {@link FileLocator#find(Bundle, IPath)}
*/
public static URL find(Bundle bundle, IPath path) {
- return FindSupport.find(bundle, path, null);
+ return FileLocator.find(bundle, path, null);
}
/**
@@ -77,7 +76,8 @@ public final class BundleFinder {
* </pre>
* </p><p>
* The current environment variable values can be overridden using
- * the override map argument.
+ * the override map argument or <code>null</code> can be specified
+ * if this is not desired.
* </p>
*
* @param bundle the bundle in which to search
@@ -90,9 +90,10 @@ public final class BundleFinder {
* is used.
* @return a URL for the given path or <code>null</code>. The actual form
* of the returned URL is not specified.
+ * @deprecated use {@link FileLocator#find(Bundle, IPath, Map)}
*/
public static URL find(Bundle bundle, IPath path, Map override) {
- return FindSupport.find(bundle, path, override);
+ return FileLocator.find(bundle, path, override);
}
/**
@@ -113,9 +114,10 @@ public final class BundleFinder {
* as specified
* @return an input stream
* @exception IOException if the given path cannot be found in this plug-in
+ * @deprecated use {@link FileLocator#openStream(Bundle, IPath, boolean)}
*/
- public static final InputStream openStream(Bundle bundle, IPath file, boolean localized) throws IOException {
- return FindSupport.openStream(bundle, file, localized);
+ public static InputStream openStream(Bundle bundle, IPath file, boolean localized) throws IOException {
+ return FileLocator.openStream(bundle, file, localized);
}
/**
@@ -128,9 +130,10 @@ public final class BundleFinder {
* @exception IOException if the given path cannot be found in this plug-in
*
* @see #openStream(Bundle,IPath,boolean)
+ * @deprecated use {@link FileLocator#openStream(Bundle, IPath)}
*/
public static final InputStream openStream(Bundle bundle, IPath file) throws IOException {
- return FindSupport.openStream(bundle, file, false);
+ return FileLocator.openStream(bundle, file, false);
}
/**
@@ -145,9 +148,10 @@ public final class BundleFinder {
* @return the converted file URL or the original URL passed in if it is
* not recognized by this converter
* @throws IOException if an error occurs during the conversion
+ * @deprecated use {@link FileLocator#toFileURL(URL)}
*/
public static URL toFileURL(URL url) throws IOException {
- return null; //TODO get the code from internalplatform
+ return FileLocator.toFileURL(url);
}
/**
@@ -166,8 +170,9 @@ public final class BundleFinder {
* @return the resolved URL or the original if the protocol is unknown to this converter
* @exception IOException if unable to resolve URL
* @throws IOException if an error occurs during the resolution
+ * @deprecated use {@link FileLocator#resolve(URL)}
*/
public static URL resolve(URL url) throws IOException {
- return null; //TODO get the code from internalplatform
+ return FileLocator.resolve(url);
}
}

Back to the top