void () { DomElement domElement = getDomElement(); final List<DomElementProblemDescriptor> list = DomElementAnnotationsManager.getInstance(getProject()).getCachedProblemHolder(domElement).getProblems(domElement); final List<@InspectionMessage String> messages = new ArrayList<>(); for (final DomElementProblemDescriptor descriptor : list) { if (descriptor instanceof DomCollectionProblemDescriptor && myChildDescription.equals(((DomCollectionProblemDescriptor)descriptor).getChildDescription())) { messages.add(descriptor.getDescriptionTemplate()); } } myCollectionPanel.setErrorMessages(ArrayUtilRt.toStringArray(messages)); myCollectionPanel.repaint(); }