use of com.intellij.util.xml.highlighting.DomCollectionProblemDescriptor in project intellij-community by JetBrains.
the class DomCollectionControl method validate.
private void validate() {
DomElement domElement = getDomElement();
final List<DomElementProblemDescriptor> list = DomElementAnnotationsManager.getInstance(getProject()).getCachedProblemHolder(domElement).getProblems(domElement);
final List<String> messages = new ArrayList<>();
for (final DomElementProblemDescriptor descriptor : list) {
if (descriptor instanceof DomCollectionProblemDescriptor && myChildDescription.equals(((DomCollectionProblemDescriptor) descriptor).getChildDescription())) {
messages.add(descriptor.getDescriptionTemplate());
}
}
myCollectionPanel.setErrorMessages(ArrayUtil.toStringArray(messages));
myCollectionPanel.repaint();
}
Aggregations