Is it possible to implement code completion for text in xml tag?
In iBATIS SQL Map xml file, there are a lot of tags for SQL sentences wrapper:
insert into person (id, name, password) values(#id#, #name#, #password#)
]]>
These symbols, such as #id#, #name# and #password#, are the fields in com.foobar.Person. When Ctrl+Space pressed, code completion will be display for #<caret. Any idea to implement such feature? Thanks.
Please sign in to leave a comment.
Implement PsiReferenceProvider, register it with
ReferenceProvidersRegistry, return your own PsiReference for this tag
with correct range and return your completion elements from its
getVariants() method.