XmlAttributeDescriptor[] (PsiElement context) { String entitiesString = getEntitiesString(context, XmlEntitiesInspection.ATTRIBUTE_SHORT_NAME); if (entitiesString == null) return XmlAttributeDescriptor.EMPTY; StringTokenizer tokenizer = new StringTokenizer(entitiesString, ","); XmlAttributeDescriptor[] descriptors = new XmlAttributeDescriptor[tokenizer.countTokens()]; int index = 0; while (tokenizer.hasMoreElements()) { final String customName = tokenizer.nextToken(); if (customName.isEmpty()) continue; descriptors[index++] = new XmlAttributeDescriptorImpl() { @Override public String getName(PsiElement context) { return customName; } @Override public String getName() { return customName; } }; } return descriptors; }