Beispiel #1
0
 @Override
 public IConfigurationElement[] getChildren(String name) throws InvalidRegistryObjectException {
   List<XMLConfigElement> result = new ArrayList<XMLConfigElement>();
   for (XMLConfigElement e : children) {
     if (name.equals(e.getName())) result.add(e);
   }
   return result.toArray(new XMLConfigElement[result.size()]);
 }
Beispiel #2
0
 public XMLConfigElement(Object parent, String name) {
   this.parent = parent;
   if (parent instanceof XMLConfigElement) {
     ((XMLConfigElement) parent).children.add(this);
   }
   this.name = name;
 }
Beispiel #3
0
 @Override
 public IConfigurationElement[] getConfigurationElements()
     throws InvalidRegistryObjectException {
   return root.getChildren();
 }
Beispiel #4
0
 @Override
 public IExtension getDeclaringExtension() throws InvalidRegistryObjectException {
   XMLConfigElement root = this;
   while (root.getParent() instanceof XMLConfigElement) root = (XMLConfigElement) root.getParent();
   return new XMLExtension(root);
 }