diff options
author | Lars Vogel | 2018-06-11 14:51:57 +0000 |
---|---|---|
committer | Lars Vogel | 2018-06-12 07:25:42 +0000 |
commit | d97fc0708312d3c543bb09922926d536737bbb5a (patch) | |
tree | 4b1cf6b1ede047814405573bfb9e3450a3ae66de | |
parent | d0b55dc7c71c92194e28e8f1e31616f288a442f4 (diff) | |
download | eclipse.platform.ui-d97fc0708312d3c543bb09922926d536737bbb5a.tar.gz eclipse.platform.ui-d97fc0708312d3c543bb09922926d536737bbb5a.tar.xz eclipse.platform.ui-d97fc0708312d3c543bb09922926d536737bbb5a.zip |
Replace deprecated Platform.find call in platform.ui
Change-Id: I869c7b93b578393dc01344c12f0130422945b3b5
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
3 files changed, 7 insertions, 9 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BrandingProperties.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BrandingProperties.java index ce6cce2cd09..bb013007ce2 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BrandingProperties.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/BrandingProperties.java @@ -14,9 +14,8 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.StringTokenizer; - +import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; import org.osgi.framework.Bundle; @@ -46,7 +45,7 @@ public abstract class BrandingProperties { } } catch (MalformedURLException e) { if (definingBundle != null) { - return Platform.find(definingBundle, new Path(value)); + return FileLocator.find(definingBundle, new Path(value)); } } diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java index 2570faa2f66..bb552c15bd0 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.ui.internal; +import com.ibm.icu.text.MessageFormat; import java.io.IOException; import java.io.InputStream; import java.net.URL; @@ -17,16 +18,13 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.MissingResourceException; import java.util.PropertyResourceBundle; - +import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IProduct; import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.branding.IProductConstants; import org.osgi.framework.Bundle; -import com.ibm.icu.text.MessageFormat; - /** * A class that converts the strings returned by * <code>org.eclipse.core.runtime.IProduct.getProperty</code> to the @@ -61,7 +59,7 @@ public class ProductProperties extends BrandingProperties implements private static HashMap mappingsMap = new HashMap(4); private static String[] loadMappings(Bundle definingBundle) { - URL location = Platform.find(definingBundle, new Path( + URL location = FileLocator.find(definingBundle, new Path( ABOUT_MAPPINGS)); PropertyResourceBundle bundle = null; InputStream is; diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java index d41a33bda59..f12023525fe 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java @@ -12,6 +12,7 @@ package org.eclipse.ui.internal.util; import java.net.URL; +import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; @@ -61,7 +62,7 @@ public class BundleUtility { if (bundle == null) { return null; } - return Platform.find(bundle, new Path(path)); + return FileLocator.find(bundle, new Path(path)); } public static URL find(String bundleId, String path) { |