Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2006-04-26 20:11:18 +0000
committerOleg Besedin2006-04-26 20:11:18 +0000
commit5984a25c2b6db0c2cc1d3e0ad503bf8e903c334a (patch)
tree9ee333181bb4766eb1057ec85e573b86df38bf00
parent272be71d8876df657cbe7e020c715578002e05af (diff)
downloadrt.equinox.bundles-5984a25c2b6db0c2cc1d3e0ad503bf8e903c334a.tar.gz
rt.equinox.bundles-5984a25c2b6db0c2cc1d3e0ad503bf8e903c334a.tar.xz
rt.equinox.bundles-5984a25c2b6db0c2cc1d3e0ad503bf8e903c334a.zip
Bug 130601 - improving Javadoc for the getNamespace deprecation.v20060426
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java30
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java30
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java30
3 files changed, 87 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java
index fea40f174..d9f700ee4 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java
@@ -281,7 +281,35 @@ public interface IConfigurationElement {
* @since 3.1
* @deprecated As namespace is no longer restricted to the contributor name,
* use {@link #getNamespaceIdentifier()} to obtain namespace name or {@link #getContributor()}
- * to get the name of the contributor of this registry element
+ * to get the name of the contributor of this registry element.
+ * <p>
+ * In the past namespace was dictated by the name of the bundle. If bundle <code>org.abc</code>
+ * contributed registry element with Id of <code>MyId</code>, the namespace of
+ * the element was always set to <code>org.abc</code>, producing the qualified name of
+ * <code>org.abc.MyId</code>.
+ * </p><p>
+ * The namespace used to be the same as the bundle name. As a result, the {@link #getNamespace()}
+ * method was used both to obtain the name of the bundle and to obtain the namespace of a registry
+ * element.
+ * </p><p>
+ * Since 3.2, the extension registry allows elements to specify qualified name. The extension point
+ * of the plug-in <code>org.abc</code> could specify <code>org.zzz.MyExtPoint</code> as
+ * an Id. In this case, namespace name is <code>org.zzz</code>, but the contributor
+ * name is <code>org.abc</code>.
+ * </p><p>
+ * (The use of a simple Id is still a preferred way. Whenever possible, specify only the simple
+ * Id and let runtime take care of the rest.)
+ * </p><p>
+ * If your code used the {@link #getNamespace()} to obtain the name of the contributing bundle,
+ * use {@link #getContributor()}. The typical usage pattern here is to find a bundle name to obtain
+ * some information from the corresponding OSGi bundle. For example, deducing the file location
+ * specified as a relative path to the bundle install location would fall into this group.
+ * </p><p>
+ * If your code used the {@link #getNamespace()} to obtain the namespace of the registry element,
+ * use {@link #getNamespaceIdentifier()}. Typically, this is the case when code is trying to process
+ * registry elements belonging to some logical group. For example, processing notifications for all
+ * elements belonging to the <code>org.abc</code> namespace would fall into this category.
+ * </p>
*/
public String getNamespace() throws InvalidRegistryObjectException;
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java
index 12b7f567c..24bfc1ca7 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java
@@ -63,7 +63,35 @@ public interface IExtension {
* @since 3.0
* @deprecated As namespace is no longer restricted to the contributor name,
* use {@link #getNamespaceIdentifier()} to obtain namespace name or {@link #getContributor()}
- * to get the name of the contributor of this registry element
+ * to get the name of the contributor of this registry element.
+ * <p>
+ * In the past namespace was dictated by the name of the bundle. If bundle <code>org.abc</code>
+ * contributed registry element with Id of <code>MyId</code>, the namespace of
+ * the element was always set to <code>org.abc</code>, producing the qualified name of
+ * <code>org.abc.MyId</code>.
+ * </p><p>
+ * The namespace used to be the same as the bundle name. As a result, the {@link #getNamespace()}
+ * method was used both to obtain the name of the bundle and to obtain the namespace of a registry
+ * element.
+ * </p><p>
+ * Since 3.2, the extension registry allows elements to specify qualified name. The extension point
+ * of the plug-in <code>org.abc</code> could specify <code>org.zzz.MyExtPoint</code> as
+ * an Id. In this case, namespace name is <code>org.zzz</code>, but the contributor
+ * name is <code>org.abc</code>.
+ * </p><p>
+ * (The use of a simple Id is still a preferred way. Whenever possible, specify only the simple
+ * Id and let runtime take care of the rest.)
+ * </p><p>
+ * If your code used the {@link #getNamespace()} to obtain the name of the contributing bundle,
+ * use {@link #getContributor()}. The typical usage pattern here is to find a bundle name to obtain
+ * some information from the corresponding OSGi bundle. For example, deducing the file location
+ * specified as a relative path to the bundle install location would fall into this group.
+ * </p><p>
+ * If your code used the {@link #getNamespace()} to obtain the namespace of the registry element,
+ * use {@link #getNamespaceIdentifier()}. Typically, this is the case when code is trying to process
+ * registry elements belonging to some logical group. For example, processing notifications for all
+ * elements belonging to the <code>org.abc</code> namespace would fall into this category.
+ * </p>
*/
public String getNamespace() throws InvalidRegistryObjectException;
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
index 6138de48d..d1358006b 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
@@ -64,7 +64,35 @@ public interface IExtensionPoint {
* @since 3.0
* @deprecated As namespace is no longer restricted to the contributor name,
* use {@link #getNamespaceIdentifier()} to obtain namespace name or {@link #getContributor()}
- * to get the name of the contributor of this registry element
+ * to get the name of the contributor of this registry element.
+ * <p>
+ * In the past namespace was dictated by the name of the bundle. If bundle <code>org.abc</code>
+ * contributed registry element with Id of <code>MyId</code>, the namespace of
+ * the element was always set to <code>org.abc</code>, producing the qualified name of
+ * <code>org.abc.MyId</code>.
+ * </p><p>
+ * The namespace used to be the same as the bundle name. As a result, the {@link #getNamespace()}
+ * method was used both to obtain the name of the bundle and to obtain the namespace of a registry
+ * element.
+ * </p><p>
+ * Since 3.2, the extension registry allows elements to specify qualified name. The extension point
+ * of the plug-in <code>org.abc</code> could specify <code>org.zzz.MyExtPoint</code> as
+ * an Id. In this case, namespace name is <code>org.zzz</code>, but the contributor
+ * name is <code>org.abc</code>.
+ * </p><p>
+ * (The use of a simple Id is still a preferred way. Whenever possible, specify only the simple
+ * Id and let runtime take care of the rest.)
+ * </p><p>
+ * If your code used the {@link #getNamespace()} to obtain the name of the contributing bundle,
+ * use {@link #getContributor()}. The typical usage pattern here is to find a bundle name to obtain
+ * some information from the corresponding OSGi bundle. For example, deducing the file location
+ * specified as a relative path to the bundle install location would fall into this group.
+ * </p><p>
+ * If your code used the {@link #getNamespace()} to obtain the namespace of the registry element,
+ * use {@link #getNamespaceIdentifier()}. Typically, this is the case when code is trying to process
+ * registry elements belonging to some logical group. For example, processing notifications for all
+ * elements belonging to the <code>org.abc</code> namespace would fall into this category.
+ * </p>
*/
public String getNamespace() throws InvalidRegistryObjectException;

Back to the top