"quasi-headless" Scala editor?

Hi there,

I want to evaluate the possibility of integrating as much of the Scala plugin / code editor in my own (non-IDEA based) "IDE" or desktop application. Does the API offer a way to initialise itself without coming up with the main IntelliJ window, and so that I could create virtual files for my code (these are like "class" files if you like, with an implied import scope from the containing class path) and bring up a code editor (e.g. inside a JComponent or JFrame) for them, embedding as much as possible (e.g. parser, inspections (?)) from the Scala plug-in? Where to start?

Thanks,

.h.h.

0

Yes, you can start IDEA in a headless mode, using the <appStarter> extension point and the ApplicationStarter interface. You'll need to configure the classpath of your project using IntelliJ IDEA's project model API or by loading an existing .idea directory.

Check out this plugin for an implementation of a similar approach (you may be able to simply use it as is): https://github.com/Ruin0x11/intellij-lsp-server

1

请先登录再写评论。