use of com.intellij.util.xml.reflect.DomCollectionChildDescription in project intellij-community by JetBrains.
the class AddElementInCollectionAction method getDomCollectionChildDescriptions.
@Override
@NotNull
protected DomCollectionChildDescription[] getDomCollectionChildDescriptions(final AnActionEvent e) {
final DomModelTreeView view = getTreeView(e);
SimpleNode node = view.getTree().getSelectedNode();
if (node instanceof BaseDomElementNode) {
List<DomCollectionChildDescription> consolidated = ((BaseDomElementNode) node).getConsolidatedChildrenDescriptions();
if (consolidated.size() > 0) {
return consolidated.toArray(new DomCollectionChildDescription[consolidated.size()]);
}
}
final DomElementsGroupNode groupNode = getDomElementsGroupNode(view);
return groupNode == null ? DomCollectionChildDescription.EMPTY_ARRAY : new DomCollectionChildDescription[] { groupNode.getChildDescription() };
}
Aggregations