20

Disclaimer: This is the naive question of the day for Java and IntelliJ's Gurus out there!

First of all, my point is not to start a yet but revisited IDEs or editors' war. As a programmer, sometimes I would just like to have some fun and I'm curious on this one, period. Ready?

Here we are, I use GNU/Emacs everyday for everything and I'm perfectly happy with that. As a Java developer, I'm well aware of IDEs' code completion features. Some projects had made some attempts to spread this kind of completion to Vim or Emacs: see the eclim project, the derived emacs-eclim project or, with the exact opposite approach: the recent (ATTOW) ideavim plugin. That being said, I'm now wondering if the eclim approach could be applied to the IntelliJ / Emacs couple leveraging or not something like yasnippet and/or auto-complete. The first issue is that, at first glance, it doesn't seem possible to run IntelliJ as a headless process as we can with Eclipse.

As a consequence, I think that the first step is to get the code completion component of IntelliJ running headless. I've browsed the completion code but I'm not proficient enough in Java to figure out if this is possible.

Let me know your thoughts.

Update from comments:

From the Tom's comment, I agree that the main issue is not to run a headless IntelliJ but rather to isolate the code completion component and develop a code completion server plugin. Nevertheless, it would be nice to not have a full IntelliJ's UI running. I'll try to see what can be done to link Emacs and a IntelliJ plugin.

Interesting (... or not) references:

Community
  • 1
  • 1
Renaud
  • 8,783
  • 4
  • 32
  • 40
  • 2
    Why do you insists on headless? Eclim can use Eclipse in both headed and headless mode. It would be also as useful if intellij could be used in headed mode. I agree IntelliJ would be better than Eclipse as a backend, especially because it's faster. You need to add a similar server component to Intellij as Eclim does for VIM, so editors can connect to the running intellij instance. It does not necessarily need to be headless, so it is not the first step. The first step is being able to connect to a running intellij and retrieve completion info from that. – Tom Dec 21 '13 at 08:36
  • 1
    Have a look at the intellij webinar that introduces upsource from some months back - it explains well how intellij core was refactored out, and this might fit your needs. – vikingsteve Dec 21 '13 at 16:36
  • Maybe you should raise this issue on the eclim mailing list: https://groups.google.com/forum/#!forum/eclim-dev Of course, the author of Eclim invested a lot into the Eclipse completion stuff, but maybe he's also not fully satisfied with Eclipse and sees that some companies started to move to intellij. For example, most notably Google, which started to create an alternative intellij based development environment for Android. – Tom Dec 21 '13 at 19:02
  • Digging into the code, there is a [Main.isHeadless()](https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/idea/IdeaApplication.java#L80). Set by the `java.awt.headless` property. – zjk Jun 15 '18 at 09:43
  • 1
    For anyone looking for the webinar @vikingsteve mentioned, I think it's this one, five minutes in: https://blog.jetbrains.com/blog/2013/08/02/webinar-recording-how-to-build-developer-tools-on-top-of-intellij-platform/ – Marcos Scriven Dec 30 '19 at 11:55

0 Answers0