private static Map<String, String> getDirectives(ManifestElement element) { Map<String, String> directives = new HashMap<String, String>(); Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return directives; while (keys.hasMoreElements()) { String key = keys.nextElement(); directives.put(key, element.getDirective(key)); } return directives; }
private static Map<String, String> getDirectives(ManifestElement element) { Map<String, String> directives = new HashMap<String, String>(); Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return directives; while (keys.hasMoreElements()) { String key = keys.nextElement(); directives.put(key, element.getDirective(key)); } return directives; }
private static Map<String, String> getDirectives(ManifestElement element) { Map<String, String> directives = new HashMap<>(); Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return directives; while (keys.hasMoreElements()) { String key = keys.nextElement(); directives.put(key, element.getDirective(key)); } return directives; }
private static Map<String, String> getDirectives(ManifestElement element) { Map<String, String> directives = new HashMap<String, String>(); Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return directives; while (keys.hasMoreElements()) { String key = keys.nextElement(); directives.put(key, element.getDirective(key)); } return directives; }
private static Map<String, String> getDirectives(ManifestElement element) { Map<String, String> directives = new HashMap<>(); Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return directives; while (keys.hasMoreElements()) { String key = keys.nextElement(); directives.put(key, element.getDirective(key)); } return directives; }
private static Map<String, String> getDirectives(ManifestElement element) { Map<String, String> directives = new HashMap<String, String>(); Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return directives; while (keys.hasMoreElements()) { String key = keys.nextElement(); directives.put(key, element.getDirective(key)); } return directives; }
static Map<String, String> getDirectives(ManifestElement element, String[] definedDirectives) { Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return null; Map<String, String> arbitraryDirectives = null; keyloop: while (keys.hasMoreElements()) { String key = keys.nextElement(); for (String definedDirective : definedDirectives) { if (definedDirective.equals(key)) continue keyloop; } if (arbitraryDirectives == null) arbitraryDirectives = new HashMap<String, String>(); arbitraryDirectives.put(key, element.getDirective(key)); } return arbitraryDirectives; }
static Map<String, String> getDirectives(ManifestElement element, String[] definedDirectives) { Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return null; Map<String, String> arbitraryDirectives = null; keyloop: while (keys.hasMoreElements()) { String key = keys.nextElement(); for (String definedDirective : definedDirectives) { if (definedDirective.equals(key)) continue keyloop; } if (arbitraryDirectives == null) arbitraryDirectives = new HashMap<String, String>(); arbitraryDirectives.put(key, element.getDirective(key)); } return arbitraryDirectives; }
static Map<String, String> getDirectives(ManifestElement element, String[] definedDirectives) { Enumeration<String> keys = element.getDirectiveKeys(); if (keys == null) return null; Map<String, String> arbitraryDirectives = null; keyloop: while (keys.hasMoreElements()) { String key = keys.nextElement(); for (String definedDirective : definedDirectives) { if (definedDirective.equals(key)) continue keyloop; } if (arbitraryDirectives == null) arbitraryDirectives = new HashMap<>(); arbitraryDirectives.put(key, element.getDirective(key)); } return arbitraryDirectives; }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
public String toString() { Enumeration<String> attrKeys = getKeys(); Enumeration<String> directiveKeys = getDirectiveKeys(); if (attrKeys == null && directiveKeys == null) return mainValue; StringBuffer result = new StringBuffer(mainValue); if (attrKeys != null) { while (attrKeys.hasMoreElements()) { String key = attrKeys.nextElement(); addValues(false, key, getAttributes(key), result); } } if (directiveKeys != null) { while (directiveKeys.hasMoreElements()) { String key = directiveKeys.nextElement(); addValues(true, key, getDirectives(key), result); } } return result.toString(); }
private void init(ManifestElement manifestElement) { setValueComponents(manifestElement.getValueComponents()); Enumeration attKeys = manifestElement.getKeys(); if (attKeys != null) { while (attKeys.hasMoreElements()) { String attKey = (String)attKeys.nextElement(); String[] values = ManifestElement.getArrayFromList(manifestElement.getAttribute(attKey)); for (int i = 0; i < values.length; i++) addAttribute(attKey, values[i]); } } Enumeration dirKeys = manifestElement.getDirectiveKeys(); if (dirKeys != null) { while (dirKeys.hasMoreElements()) { String dirKey = (String)dirKeys.nextElement(); String[] values = ManifestElement.getArrayFromList(manifestElement.getDirective(dirKey)); for (int i = 0; i < values.length; i++) addDirective(dirKey, values[i]); } } }
protected int getPackageLine(IHeader header, ManifestElement element) { String packageName = element.getValue(); if (element.getDirectiveKeys() != null || element.getKeys() != null) return getLine(header, packageName + ";"); //$NON-NLS-1$ // check for this exact package on the last line try { IRegion lineRegion = fTextDocument.getLineInformation(header.getLineNumber() + header.getLinesSpan() - 1); String lineStr = fTextDocument.get(lineRegion.getOffset(), lineRegion.getLength()); if (lineStr.endsWith(packageName)) { return header.getLineNumber() + header.getLinesSpan(); } } catch (BadLocationException ble) { PDECore.logException(ble); } // search all except last line return getLine(header, packageName + ","); //$NON-NLS-1$ }
protected int getPackageLine(IHeader header, ManifestElement element) { String packageName = element.getValue(); if (element.getDirectiveKeys() != null || element.getKeys() != null) return getLine(header, packageName + ";"); //$NON-NLS-1$ // check for this exact package on the last line try { IRegion lineRegion = fTextDocument.getLineInformation(header .getLineNumber() + header.getLinesSpan() - 1); String lineStr = fTextDocument.get(lineRegion.getOffset(), lineRegion.getLength()); if (lineStr.endsWith(packageName)) { return header.getLineNumber() + header.getLinesSpan(); } } catch (BadLocationException ble) { PDECore.logException(ble); } // search all except last line return getLine(header, packageName + ","); //$NON-NLS-1$ }