private static String getAttributes(final IConfigurationElement element) { final StringBuilder bob = new StringBuilder(); for (final String attribute : element.getAttributeNames()) { bob.append(attribute) .append("=") .append(element.getAttribute(attribute)) .append(" "); // $NON-NLS-1$ //$NON-NLS-2$ } bob.setLength(Math.max(0, bob.length() - 1)); return bob.toString(); }
private void fillAttributes(IConfigurationElement element) { if (fAttributes == null) { fAttributes = new HashMap(); } else { fAttributes.clear(); } String[] names = element.getAttributeNames(); if (names == null) { return; } int length = names.length; for (int i = 0; i < length; i++) { String name = names[i]; fAttributes.put(name.toLowerCase(), element.getAttribute(name)); } }
/** * @return * @throws org.eclipse.core.runtime.InvalidRegistryObjectException */ public String[] getAttributeNames() throws InvalidRegistryObjectException { if (delegateElement == null) return new String[0]; return delegateElement.getAttributeNames(); }