Recently I started writing a plugin for IntelliJ IDEA that should provide completion for XML attributes. The value for attributes comes from Java classes, methods and fields. The XML file in case is a BPMN file that is generated by Activiti.
<activiti:formProperty id="companyDetails" type="bean" default="com.company.CompanyDetails" readable="false"></activiti:formProperty>
My plugin should check if in the current project context there is a bean "com.company.CompanyDetails". If there isn't such a thing then highlight it as an error. Other future functionality should check for fields and methods in expressions.
So far I followed the tutorial on how to access XML tags and attributes and how the extract values from them. The functionality described above exists in the IDEA, for example when I edit plugin.xml file.
My question here is: what is the right approach to achieve my goal? What functionality does IDEA already provides and what else do I need to write to make it work? What concepts should be used in such a project?
This is my first experience in writing a plugin for IDEA but the platform looks very promising.
Thanks for your help.