currentExtension.setNamespace(namespace.getNamespace());
currentExtension.setNamespaceName(namespace.getNamespace());
	public void endElement(String uri, String elementName, String qName) {		switch (((Integer) stateStack.peek()).intValue()) {			case IGNORED_ELEMENT_STATE :				stateStack.pop();				break;			case INITIAL_STATE :				// shouldn't get here				internalError(NLS.bind(RegistryMessages.parse_internalStack, elementName));				break;			case BUNDLE_STATE :				stateStack.pop();				ArrayList extensionPoints = scratchVectors[EXTENSION_POINT_INDEX];				ArrayList extensions = scratchVectors[EXTENSION_INDEX];				int[] namespaceChildren = new int[2 + extensionPoints.size() + extensions.size()];				int position = 2;				// Put the extension points into this namespace				if (extensionPoints.size() > 0) {					namespaceChildren[Contribution.EXTENSION_POINT] = extensionPoints.size();					for (Iterator iter = extensionPoints.iterator(); iter.hasNext();) {						namespaceChildren[position++] = ((RegistryObject) iter.next()).getObjectId();					}					extensionPoints.clear();				}				// Put the extensions into this namespace too				if (extensions.size() > 0) {					Extension[] renamedExtensions = fixRenamedExtensionPoints((Extension[]) extensions.toArray(new Extension[extensions.size()]));					namespaceChildren[Contribution.EXTENSION] = renamedExtensions.length;					for (int i = 0; i < renamedExtensions.length; i++) {						namespaceChildren[position++] = renamedExtensions[i].getObjectId();					}					extensions.clear();				}				namespace.setRawChildren(namespaceChildren);				break;			case BUNDLE_EXTENSION_POINT_STATE :				if (elementName.equals(EXTENSION_POINT)) {					stateStack.pop();				}				break;			case BUNDLE_EXTENSION_STATE :				if (elementName.equals(EXTENSION)) {					stateStack.pop();					// Finish up extension object					Extension currentExtension = (Extension) objectStack.pop();					currentExtension.setNamespace(namespace.getNamespace());					scratchVectors[EXTENSION_INDEX].add(currentExtension);				}				break;			case CONFIGURATION_ELEMENT_STATE :				// We don't care what the element name was				stateStack.pop();				// Now finish up the configuration element object				configurationElementValue = null;				ConfigurationElement currentConfigElement = (ConfigurationElement) objectStack.pop();				String value = currentConfigElement.getValueAsIs();				if (value != null) {					currentConfigElement.setValue(value.trim());				}				RegistryObject parent = (RegistryObject) objectStack.peek();				// Want to add this configuration element to the subelements of an extension				int[] oldValues = parent.getRawChildren();				int size = oldValues.length;				int[] newValues = new int[size + 1];				for (int i = 0; i < size; i++) {					newValues[i] = oldValues[i];				}				newValues[size] = currentConfigElement.getObjectId();				parent.setRawChildren(newValues);				currentConfigElement.setParentId(parent.getObjectId());				currentConfigElement.setParentType(parent instanceof ConfigurationElement ? RegistryObjectManager.CONFIGURATION_ELEMENT : RegistryObjectManager.EXTENSION);				break;		}	}