Search code examples
javaintellij-ideainstrumentationbytecode-manipulationjavaagents

How to add new instrumented methods to intelliJ auto-complete?


Is it possible to force intelliJ to be aware of new methods/fields (while you type) added to classes through byte-code class redefinition from a java agent?

Thanks.


Solution

  • Yes, this is possible by writing an IntelliJ plugin that would provide information about the generated methods/fields to the internal code analysis infrastructure. This can be accomplished through the PsiAugmentProvider interface.