More Information for XmlAttributeDescriptors
For better support of the XML based view language used by OpenUI5 I implemented a custom `com.intellij.xml.XmlExtension` that creates provides (also custom implemented) XmlElementDescriptors and XmlAttributeDescriptors based on some metadata knownledge.
This seems to work good and fast, but we'd like to embed more information in completion result lists based on these. For example, when you press ctrl+space in an XML Tag the list of possible attributes for this tag is displayed. Currently its just a list of names (based of XmlAttributeDescriptor::getName).
Is there a way to show an icon and type information for these entries like when completing functions/methods/fields in Java or PHP code?
请先登录再写评论。
You can try to add your own CompletionContributor for this.
Thanks for your suggestion!
A CompletionContributor can only add LookupElemets, it can not "edit" or "remove" them, correct?
So I'd have to add all suggestions in the CompletionContributor and just use the XmlAttributeDescriptor for validation/type hints. I'd have to find a way to make sure they don't show up in completion then, since I don't want to have redundant suggestions.
I've found a way to show an icon for each attribute (PsiPresentableMetaData) but that does not offer me to show a TypeText.