So, this is a very broad question but I am something of a beginner at this but I have done as much research as I can both on the plugin documentation and google. I think what I am attempting has not been tried many times.
I have a JVM application class (App going forward) that when run renders using a Swing renderer. I am writing a plugin that will be able to preview App inside a tool window. I have successfully rewritten this renderer in my plugin such that if I create an instance of App inside an AnAction implementation that opens a tool window, I can render App in the tool window.
That's all well and good, but I don't want to be running this instance of App I created inside the Action, I instead want access it as written in the project. I understand that at some point I want to be building and running the code in the context and classpath of the project. I have read the documentiation on how to do this normally, but do not know how I can pass the instance of App created by the process to my tool window, so I can show it. Is this possible/feasible?