if (cmDocument != null) {
result = (List) cmDocument.getProperty("http://org.eclipse.wst/cm/properties/completeNamespaceInfo"); //$NON-NLS-1$
if (result != null) {
int size = result.size();
for (int i = 0; i < size; i++) {
NamespaceInfo info = (NamespaceInfo) result.get(i);
if (i == 0) {
String locationInfo = null;
if (xmlCatalogEntry != null) {
if (xmlCatalogEntry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) {
locationInfo = xmlCatalogEntry.getAttributeValue(ICatalogEntry.ATTR_WEB_URL);
}
else {
locationInfo = xmlCatalogEntry.getKey();
}
}
if (locationInfo == null) {
locationInfo = defaultSystemId;
}
info.locationHint = locationInfo;
info.setProperty("locationHint-readOnly", "true"); //$NON-NLS-1$ //$NON-NLS-2$
info.setProperty("uri-readOnly", "true"); //$NON-NLS-1$ //$NON-NLS-2$
info.setProperty("unremovable", "true"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
info.locationHint = null;
}
}
}