private void validate() { DomElement domElement = getDomElement(); final List<DomElementProblemDescriptor> list = DomElementAnnotationsManager.getInstance(getProject()).getCachedProblemHolder(domElement).getProblems(domElement); final List<String> messages = new ArrayList<String>(); 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(); }