Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-04-23 19:39:57 +0000
committerAndrey Loskutov2017-09-19 14:58:43 +0000
commitdb57ba861f17c017cec20140026089d8c181f14d (patch)
tree6e5d58bd9a9a8de43565ca708843f574d2293201
parent7c99c6136de930180a097f6724e1e48b44f1334d (diff)
downloadrt.equinox.bundles-db57ba861f17c017cec20140026089d8c181f14d.tar.gz
rt.equinox.bundles-db57ba861f17c017cec20140026089d8c181f14d.tar.xz
rt.equinox.bundles-db57ba861f17c017cec20140026089d8c181f14d.zip
Bug 515587 - [registry] Add getHandleId() to IConfigurationElement
Change-Id: I1d0ee32a448c7ea45a1da17b3a68a47e5b034f0b Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java5
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java18
2 files changed, 21 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java
index 5e480add0..6eda9db7d 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java
@@ -160,4 +160,9 @@ public class ConfigurationElementHandle extends Handle implements IConfiguration
}
return true;
}
+
+ @Override
+ public int getHandleId() {
+ return getId();
+ }
}
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 f9a9d1c9e..1045fa82f 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
@@ -150,6 +150,7 @@ public interface IConfigurationElement {
* @deprecated The method is equivalent to the {@link #getAttribute(String)}. Contrary to its description,
* this method returns a translated value. Use the {@link #getAttribute(String)} method instead.
*/
+ @Deprecated
public String getAttributeAsIs(String name) throws InvalidRegistryObjectException;
/**
@@ -311,6 +312,7 @@ public interface IConfigurationElement {
* @deprecated The method is equivalent to the {@link #getValue()}. Contrary to its description,
* this method returns a translated value. Use the {@link #getValue()} method instead.
*/
+ @Deprecated
public String getValueAsIs() throws InvalidRegistryObjectException;
/**
@@ -353,6 +355,7 @@ public interface IConfigurationElement {
* elements belonging to the <code>org.abc</code> namespace would fall into this category.
* </p>
*/
+ @Deprecated
public String getNamespace() throws InvalidRegistryObjectException;
/**
@@ -373,8 +376,10 @@ public interface IConfigurationElement {
*/
public IContributor getContributor() throws InvalidRegistryObjectException;
- /* (non-javadoc)
- * @see Object#equals(java.lang.Object)
+ /**
+ * {@inheritDoc}
+ * @return true if the given element has same handle id
+ * @see #getHandleId()
*/
@Override
public boolean equals(Object o);
@@ -387,4 +392,13 @@ public interface IConfigurationElement {
* @since 3.1
*/
public boolean isValid();
+
+ /**
+ * Returns unique identifier of the registry object from which this element was created.
+ * Two configuration element instances are considered to be equal if their handle id's are same.
+ * @return The handle id of the registry object from which this configuration element was created.
+ * @see #equals(Object)
+ * @since 3.8
+ */
+ public int getHandleId();
}

Back to the top