if (event.isStartElement() && event.asStartElement().getName().getLocalPart().equals(STRING)) { if (macro == null) { macro = new Macro(); } macro.setName(eventReader.getElementText()); }
for (int i = 0; i < macroArray.length; i++) { macroArray[i] = new Macro(); }
public void actionPerformed(ActionEvent e){ Macro macro = new Macro(); listaJFP.add(macro); } // so it create a totally new Macro object everytime
Macro m = new Macro(); for (int i = 0; i < macroArray.length; i++) { macroArray[i] = m; }
public void setValueAt(Object aValue, int rowIndex, int columnIndex){ Macro macro = new Macro();
Editor editor= new MyEditor(); Macro macro = new Macro(); macro.record(editor::open); macro.record(editor::close); macro.run();
public Macro getReplacer() { if (replacer == null) return replacer = new Macro(this, getMacroDomains()); return replacer; }
public Macro getReplacer() { if (replacer == null) return replacer = new Macro(this, getMacroDomains()); return replacer; }
public Macro getReplacer() { if (replacer == null) return replacer = new Macro(this, getMacroDomains()); return replacer; }
public Macro getReplacer() { if (replacer == null) return replacer = new Macro(this, getMacroDomains()); return replacer; }
public Macro getReplacer() { if (replacer == null) return replacer = new Macro(this, getMacroDomains()); return replacer; }
public static Map<String, Map<VersionRange, Map<String, String>>> getMetadata(Map<String, String> properties, String prefix) { Map<String, Map<VersionRange, Map<String, String>>> result = new HashMap<>(); for (String key : properties.keySet()) { if (key.startsWith(prefix)) { String val = properties.get(key); key = key.substring(prefix.length()); String[] parts = key.split("#"); if (parts.length == 3) { Map<VersionRange, Map<String, String>> ranges = result.computeIfAbsent(parts[0], k -> new HashMap<>()); String version = parts[1]; if (!version.startsWith("[") && !version.startsWith("(")) { Processor processor = new Processor(); processor.setProperty("@", VersionTable.getVersion(version).toString()); Macro macro = new Macro(processor); version = macro.process("${range;[==,=+)}"); } VersionRange range = new VersionRange(version); ranges.computeIfAbsent(range, k -> new HashMap<>()).put(parts[2], val); } } } return result; }
public static Map<String, Map<VersionRange, Map<String, String>>> getMetadata(Map<String, String> properties, String prefix) { Map<String, Map<VersionRange, Map<String, String>>> result = new HashMap<>(); for (String key : properties.keySet()) { if (key.startsWith(prefix)) { String val = properties.get(key); key = key.substring(prefix.length()); String[] parts = key.split("#"); if (parts.length == 3) { Map<VersionRange, Map<String, String>> ranges = result.computeIfAbsent(parts[0], k -> new HashMap<>()); String version = parts[1]; if (!version.startsWith("[") && !version.startsWith("(")) { Processor processor = new Processor(); processor.setProperty("@", VersionTable.getVersion(version).toString()); Macro macro = new Macro(processor); version = macro.process("${range;[==,=+)}"); } VersionRange range = new VersionRange(version); ranges.computeIfAbsent(range, k -> new HashMap<>()).put(parts[2], val); } } } return result; }
final Macro macro = new Macro(); macro.setName(template.process(MACRONAME, getMacroNameProcessor(template))); return macro;
/** * Create a VersionedClause by applying a version range mask to the * resource! Masks are defined by * {@link aQute.bnd.osgi.Macro#_range(String[])}. If the resource should * represent a project in the bnd workspace, then instead the VersionClause * will refer to it as a snapshot version: e.g. <bsn>;version=snapshot */ public static VersionedClause toVersionClause(Resource resource, String mask) { Capability idCap = getIdentityCapability(resource); String identity = getIdentity(idCap); String versionString; if (resource.getCapabilities(WORKSPACE_NAMESPACE) .isEmpty()) { Macro macro = new Macro(new Processor()); Version version = getVersion(idCap); versionString = macro._range(new String[] { "range", mask, version.toString() }); } else { versionString = "snapshot"; } Attrs attribs = new Attrs(); attribs.put(Constants.VERSION_ATTRIBUTE, versionString); return new VersionedClause(identity, attribs); }
/** * Create a VersionedClause by applying a version range mask to the * resource! Masks are defined by * {@link aQute.bnd.osgi.Macro#_range(String[])}. If the resource should * represent a project in the bnd workspace, then instead the VersionClause * will refer to it as a snapshot version: e.g. <bsn>;version=snapshot */ public static VersionedClause toVersionClause(Resource resource, String mask) { Capability idCap = getIdentityCapability(resource); String identity = getIdentity(idCap); String versionString; if (resource.getCapabilities(WORKSPACE_NAMESPACE) .isEmpty()) { Macro macro = new Macro(new Processor()); Version version = getVersion(idCap); versionString = macro._range(new String[] { "range", mask, version.toString() }); } else { versionString = "snapshot"; } Attrs attribs = new Attrs(); attribs.put(Constants.VERSION_ATTRIBUTE, versionString); return new VersionedClause(identity, attribs); }