diff options
author | Pascal Rapicault | 2006-01-12 16:00:47 +0000 |
---|---|---|
committer | Pascal Rapicault | 2006-01-12 16:00:47 +0000 |
commit | 227ba024e2ac043be212c22a719fae92a7b2b445 (patch) | |
tree | bf075f0585634cb39da3648fa3e911ef33a8a314 /bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Contribution.java | |
parent | 8f0f287844300183e77e21fad9018d0506407d27 (diff) | |
download | rt.equinox.bundles-227ba024e2ac043be212c22a719fae92a7b2b445.tar.gz rt.equinox.bundles-227ba024e2ac043be212c22a719fae92a7b2b445.tar.xz rt.equinox.bundles-227ba024e2ac043be212c22a719fae92a7b2b445.zip |
Bug 118482 - change long contributor IDs to String
Diffstat (limited to 'bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Contribution.java')
-rw-r--r-- | bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Contribution.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Contribution.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Contribution.java index cd74ceb1e..cc375ea16 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Contribution.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Contribution.java @@ -22,11 +22,11 @@ public class Contribution implements KeyedElement { protected ExtensionRegistry registry; // The actual contributor of the contribution. - final protected long contributorId; + final protected String contributorId; // cached Id of the namespace owner (might be same or different from the contributorId) - // -1 if it is not cached yet or no namespace was found during previous cache attempt. - private long namespaceOwnerId = -1; + // null if it is not cached yet or no namespace was found during previous cache attempt. + private String namespaceOwnerId = null; // indicates if this contribution needs to be saved in the registry cache protected boolean isDynamic; @@ -40,16 +40,16 @@ public class Contribution implements KeyedElement { static final public byte EXTENSION_POINT = 0; static final public byte EXTENSION = 1; - protected Contribution(long contributorId, ExtensionRegistry registry, boolean dynamic) { + protected Contribution(String contributorId, ExtensionRegistry registry, boolean dynamic) { this.contributorId = contributorId; this.registry = registry; this.isDynamic = dynamic; } void mergeContribution(Contribution addContribution) { - Assert.isTrue(contributorId == addContribution.contributorId); + Assert.isTrue(contributorId.equals(addContribution.contributorId)); Assert.isTrue(registry == addContribution.registry); - + // isDynamic? // Old New Result // F F F @@ -80,7 +80,7 @@ public class Contribution implements KeyedElement { this.children = children; } - protected long getContributorId() { + protected String getContributorId() { return contributorId; } @@ -108,11 +108,11 @@ public class Contribution implements KeyedElement { return "Contribution: " + contributorId + " in namespace" + getNamespace(); //$NON-NLS-1$ //$NON-NLS-2$ } - protected long getNamespaceOwnerId() { + protected String getNamespaceOwnerId() { // Performance: this function is not called during warm Eclipse startup using cached // extension registry, but is called about 45 times per contribution during // the "clean" Eclipse start. Cache the result. - if (namespaceOwnerId == -1) + if (namespaceOwnerId == null) namespaceOwnerId = registry.getNamespaceOwnerId(contributorId); return namespaceOwnerId; } @@ -123,11 +123,11 @@ public class Contribution implements KeyedElement { } public Object getKey() { - return new Long(contributorId); + return contributorId; } public boolean compare(KeyedElement other) { - return contributorId == ((Contribution) other).contributorId; + return contributorId.equals(((Contribution) other).contributorId); } public boolean isDynamic() { |