Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-04-23 19:40:55 +0000
committerAndrey Loskutov2017-09-19 12:16:10 +0000
commit766e1c7b9cd8a741deaef8f13095bbe45feacbdc (patch)
treeb051369cffaf16925a713a72f937953c3ea27b6c
parent7386a58f7b3c7a192186fa1145213c5515ba2a8c (diff)
downloadrt.equinox.bundles-766e1c7b9cd8a741deaef8f13095bbe45feacbdc.tar.gz
rt.equinox.bundles-766e1c7b9cd8a741deaef8f13095bbe45feacbdc.tar.xz
rt.equinox.bundles-766e1c7b9cd8a741deaef8f13095bbe45feacbdc.zip
Bug 515588 - [registry] Add meaningful toString() to
ConfigurationElementHandle Change-Id: Ic5a536db5a61ca28224f89797fb0c3cf638e1d2d Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java22
1 files changed, 22 insertions, 0 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..bc482420f 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,26 @@ public class ConfigurationElementHandle extends Handle implements IConfiguration
}
return true;
}
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("ConfigurationElementHandle ["); //$NON-NLS-1$
+ sb.append("name: "); //$NON-NLS-1$
+ sb.append(getName());
+ String id = getAttribute("id"); //$NON-NLS-1$
+ if (id != null && id.length() > 0) {
+ sb.append(", id: ").append(id); //$NON-NLS-1$
+ }
+ String value = getValue();
+ if (value != null) {
+ sb.append(", value: ").append(value); //$NON-NLS-1$
+ }
+ sb.append(", handle id: ").append(hashCode()); //$NON-NLS-1$
+ sb.append(", namespace: "); //$NON-NLS-1$
+ sb.append(getNamespaceIdentifier());
+ sb.append("]"); //$NON-NLS-1$
+ return sb.toString();
+ }
+
}

Back to the top