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.
请先登录再写评论。
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.