protected String computeDefaultSystemId(ICatalogEntry mappingInfo) { String result = mappingInfo.getAttributeValue(ICatalogEntry.ATTR_WEB_URL); if ((result == null) && (mappingInfo.getURI() != null)) { int index = mappingInfo.getURI().lastIndexOf("/"); //$NON-NLS-1$ String lastSegment = index != -1 ? mappingInfo.getURI().substring(index + 1) : mappingInfo.getURI(); result = lastSegment; } return result; }
if (attrName != null && !attrName.equals("")) //$NON-NLS-1$ String attrValue = entry.getAttributeValue(attrName); if (childElement != null && attrValue != null)
checkboxButton.setSelection(getEntry().getAttributeValue(ICatalogEntry.ATTR_WEB_URL) != null); SelectionListener buttonListener = new SelectionListener() { public void widgetDefaultSelected(SelectionEvent event) { webAddressField.setText(getDisplayValue(getEntry().getAttributeValue(ICatalogEntry.ATTR_WEB_URL))); webAddressField.setEnabled(false); webAddressField.addModifyListener(webAddressFieldListener);
public void update() { String thePublicId = null; String theSystemId = null; ICatalogEntry xmlCatalogEntry = generator.getXMLCatalogEntry(); if (xmlCatalogEntry != null) { if (xmlCatalogEntry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) { thePublicId = xmlCatalogEntry.getKey(); theSystemId = xmlCatalogEntry.getAttributeValue(ICatalogEntry.ATTR_WEB_URL); if (theSystemId == null) { theSystemId = generator.getGrammarURI().startsWith("http:") ? generator.getGrammarURI() : URIHelper.getLastSegment(generator.getGrammarURI()); //$NON-NLS-1$ } } else { theSystemId = xmlCatalogEntry.getKey(); } } else { theSystemId = getDefaultSystemId(); } publicIdField.setText(thePublicId != null ? thePublicId : ""); //$NON-NLS-1$ systemIdField.setText(theSystemId != null ? theSystemId : ""); //$NON-NLS-1$ }
if (xmlCatalogEntry != null) { if (xmlCatalogEntry.getEntryType() == ICatalogEntry.ENTRY_TYPE_PUBLIC) { locationInfo = xmlCatalogEntry.getAttributeValue(ICatalogEntry.ATTR_WEB_URL);