Skip to content

Commit

Permalink
Add support for multi class patches
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed Jul 10, 2013
1 parent b203a78 commit 1541cd3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/common/nallar/tickthreading/patcher/PatchManager.java
Expand Up @@ -299,6 +299,20 @@ public void save(File file) throws TransformerException {
transformer.transform(input, output);
}

private void splitMultiClassPatches() {
for (Element classElement : DomUtil.getElementsByTag(configDocument.getDocumentElement(), "class")) {
String classNames = classElement.getAttribute("id");
if (classNames.contains(",")) {
for (String className : CollectionsUtil.split(classNames.trim())) {
Element newClassElement = (Element) classElement.cloneNode(true);
newClassElement.setAttribute("id", className);
classElement.getParentNode().insertBefore(newClassElement, classElement);
}
classElement.getParentNode().removeChild(classElement);
}
}
}

public class PatchMethodDescriptor {
public final String name;
public final List<String> requiredAttributes;
Expand Down

0 comments on commit 1541cd3

Please sign in to comment.