Set<INamespaceDefinition> checkedElements = new HashSet<INamespaceDefinition>();
Object[] availableNamespaces = ((IStructuredContentProvider) getViewer().getContentProvider())
.getElements(getConfigEditor().getDomDocument());
for (Object currAvailableNamespace : availableNamespaces) {
INamespaceDefinition currNamespaceDefinition = (INamespaceDefinition) currAvailableNamespace;
if (existsInConfiguration(currNamespaceDefinition)) {
checkedElements.add(currNamespaceDefinition);
selectedNamespaces.add(currNamespaceDefinition);
String existingVersion = ConfigCoreUtils.getSelectedSchemaLocation(getConfigEditor().getDomDocument(),
currNamespaceDefinition.getNamespaceURI());
if (!"".equals(existingVersion)) { //$NON-NLS-1$
selectedVersions.put(currNamespaceDefinition, existingVersion);
}
}
}