Author: rob.stryker(a)jboss.com
Date: 2009-08-18 14:45:51 -0400 (Tue, 18 Aug 2009)
New Revision: 17144
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java
Log:
JBIDE-4374 - can still use a bit of cleanup though, perhaps in UI (MISSING COMMIT) API
Expansion
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java
===================================================================
---
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java 2009-08-18
17:22:21 UTC (rev 17143)
+++
trunk/jmx/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/XMLMemento.java 2009-08-18
18:45:51 UTC (rev 17144)
@@ -164,7 +164,27 @@
}
return results;
}
+
+ public String[] getChildNames() {
+ // Get the nodes.
+ NodeList nodes = element.getChildNodes();
+ int size = nodes.getLength();
+ if (size == 0)
+ return new String[0];
+ // Extract each node with given type.
+ List<String> list = new ArrayList<String>();
+ for (int nX = 0; nX < size; nX ++) {
+ Node node = nodes.item(nX);
+ if (node instanceof Element) {
+ Element element2 = (Element)node;
+ if (!list.contains(element2.getNodeName()))
+ list.add(element2.getNodeName());
+ }
+ }
+ return (String[]) list.toArray(new String[list.size()]);
+ }
+
/**
* Return the contents of this memento as a byte array.
*
Show replies by date