if (simpleId != null && registry.debug()) { String uniqueId = namespaceName + '.' + simpleId; IExtension existingExtension = registry.getExtension(uniqueId); if (existingExtension != null) { String currentSupplier = contribution.getDefaultNamespace(); String existingSupplier = existingExtension.getContributor().getName(); String msg = NLS.bind(RegistryMessages.parse_duplicateExtension, new String[] {currentSupplier, existingSupplier, uniqueId}); registry.log(new Status(IStatus.WARNING, RegistryMessages.OWNER_NAME, 0, msg, null)); } else if (processedExtensionIds != null) { for (Iterator i = processedExtensionIds.iterator(); i.hasNext();) { if (uniqueId.equals(i.next())) { String currentSupplier = contribution.getDefaultNamespace(); String existingSupplier = currentSupplier; String msg = NLS.bind(RegistryMessages.parse_duplicateExtension, new String[] {currentSupplier, existingSupplier, uniqueId}); registry.log(new Status(IStatus.WARNING, RegistryMessages.OWNER_NAME, 0, msg, null)); break; } } } if (processedExtensionIds == null) processedExtensionIds = new ArrayList(10); processedExtensionIds.add(uniqueId); }
	private void parseExtensionAttributes(Attributes attributes) {		Extension currentExtension = registry.getElementFactory().createExtension(contribution.shouldPersist());		objectStack.push(currentExtension);		// Process Attributes		int len = (attributes != null) ? attributes.getLength() : 0;		for (int i = 0; i < len; i++) {			String attrName = attributes.getLocalName(i);			String attrValue = attributes.getValue(i).trim();			if (attrName.equals(EXTENSION_NAME))				currentExtension.setLabel(translate(attrValue));			else if (attrName.equals(EXTENSION_ID)) {				String simpleId;				String namespaceName;				int simpleIdStart = attrValue.lastIndexOf('.');				if ((simpleIdStart != -1) && extractNamespaces) {					simpleId = attrValue.substring(simpleIdStart + 1);					namespaceName = attrValue.substring(0, simpleIdStart);				} else {					simpleId = attrValue;					namespaceName = contribution.getDefaultNamespace();				}				currentExtension.setSimpleIdentifier(simpleId);				currentExtension.setNamespaceIdentifier(namespaceName);			} else if (attrName.equals(EXTENSION_TARGET)) {				// check if point is specified as a simple or qualified name				String targetName;				if (attrValue.lastIndexOf('.') == -1) {					String baseId = contribution.getDefaultNamespace();					targetName = baseId + '.' + attrValue;				} else					targetName = attrValue;				currentExtension.setExtensionPointIdentifier(targetName);			} else				unknownAttribute(EXTENSION, attrName);		}		if (currentExtension.getExtensionPointIdentifier() == null) {			missingAttribute(EXTENSION_TARGET, EXTENSION);			stateStack.pop();			stateStack.push(new Integer(IGNORED_ELEMENT_STATE));			objectStack.pop();			return;		}		objectManager.add(currentExtension, true);	}