summaryrefslogtreecommitdiff
path: root/org.tizen.common
diff options
context:
space:
mode:
authorJihoon Song <jihoon80.song@samsung.com>2013-08-29 17:24:44 +0900
committerGerrit Code Review <gerrit2@system.s-core.co.kr>2013-08-29 17:24:44 +0900
commit5c4d27c0ba6f869a974971a1164f6061342e66c2 (patch)
tree71cb47ee9057b29e207f2ba88953391d99a91929 /org.tizen.common
parent70cdecf409578796a1fe12ab7810058543daa2a7 (diff)
parentb9dd3c430905adce75c9e812d5c5696fa020de12 (diff)
downloadcommon-eplugin-5c4d27c0ba6f869a974971a1164f6061342e66c2.tar.gz
common-eplugin-5c4d27c0ba6f869a974971a1164f6061342e66c2.tar.bz2
common-eplugin-5c4d27c0ba6f869a974971a1164f6061342e66c2.zip
Merge "[Title] common-eplugin: added a plugin related method [Desc.] [Issue]" into develop
Diffstat (limited to 'org.tizen.common')
-rw-r--r--org.tizen.common/src/org/tizen/common/util/PluginUtil.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/org.tizen.common/src/org/tizen/common/util/PluginUtil.java b/org.tizen.common/src/org/tizen/common/util/PluginUtil.java
index e542706ef..02c7584eb 100644
--- a/org.tizen.common/src/org/tizen/common/util/PluginUtil.java
+++ b/org.tizen.common/src/org/tizen/common/util/PluginUtil.java
@@ -26,10 +26,13 @@
package org.tizen.common.util;
+import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
+
+import org.eclipse.core.internal.runtime.Activator;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -37,6 +40,7 @@ import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.URIUtil;
import org.tizen.common.Surrogate;
@@ -138,4 +142,12 @@ public class PluginUtil {
sourceURI = URIUtil.toURI( sourceURL );
return (null == sourceURI) ? null : sourceURI.getPath();
}
+
+ public static URL getBuiltInURL(Plugin plugin, String entryPath) throws IOException {
+ Assert.notNull( plugin );
+ Assert.notNull( entryPath );
+
+ URL entry = plugin.getBundle().getEntry( entryPath );
+ return ( entry != null ) ? FileLocator.toFileURL( entry ) : null;
+ }
}