@Override public IExtension getDeclaringExtension() throws InvalidRegistryObjectException { XMLConfigElement root = this; while (root.getParent() instanceof XMLConfigElement) root = (XMLConfigElement) root.getParent(); return new XMLExtension(root); }