Custom IDE

I've been looking for resources on how to make a custom IDE based off of the Intellij platform. I've been able to build Intellij with the java modules from the github page: https://github.com/JetBrains/intellij-community and run it without issues (after a few re-reads of the build instructions: https://github.com/JetBrains/intellij-community#intellij-build-configuration).

After opening the intellij project (from the repository above) in Intellij, I created my own module in the project. I made a resources directory (not in the src directory, but directly inside the module); marked the directory as resources root (right click resources directory -> mark directory as -> resources root); created an idea directory inside the resources directory, created a WhateverApplicationInfo.xml file inside the idea directory; created a META-INF directory inside the src directory; then finally a WhateverPlugin.xml file inside the META-INF directory.

I copied the PyCharmCoreApplicationInfo.xml into the WhateverApplicationInfo.xml file, and the python-core-plugin.xml file into the WhateverPlugin.xml

This is all from: https://youtu.be/Bd5iPZ409HU?t=1644

From there, I copied PyCharm's run configuration, changed the "Use classpath of module" to my own module, and, in the VM options, changed the -Didea.platform.prefix value from =PyCharm to =Whatever (so it could find WhateverApplicationInfo.xml). I also had to use the "shorten command line" option, apparently the command was too long. "classpath file" seemed to work no problem, though.

Next, I went into project structure (File -> Project Structure), went to Modules, then ATestIDE (the module I created), then to the Dependencies pane, and  added the intellij.platform.bootstrap, intellij.platform.ide.impl, intellij.platform.main modules.

(Because I copied PyCharm's application info file, which contains references to all of it's logos and whatnot, I also had to copy PyCharm's resources into my own resources directory).

Finally, I ran the configuration (the "compile independent modules in parallel" option really speeds up the compilation, but it used ~10-12 gigs of RAM), and this is where everything goes wrong. When I try to run the application, I get the following error:

java.lang.AssertionError: com.intellij not found; platform prefix is Whatever
    at com.intellij.ide.plugins.PluginManagerCore.fixDependencies(PluginManagerCore.java:1443)
    at com.intellij.ide.plugins.PluginManagerCore.fixDescriptors(PluginManagerCore.java:1399)
    at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1337)
    at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1492)
    at com.intellij.ide.plugins.PluginManagerCore.getPlugins(PluginManagerCore.java:123)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentConfigs(ComponentManagerImpl.java:291)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:79)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:405)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:391)

.. and so on

Modifying the WhateverPlugin.xml file, so it just contains (what I'd hope to be) an empty start:

<idea-plugin>
</idea-plugin

I get the following error, instead:

Caused by: java.lang.NullPointerException: null keys not supported
    at gnu.trove.THashMap.put(THashMap.java:161)
    at com.intellij.ide.plugins.PluginManagerCore.topoSortPlugins(PluginManagerCore.java:1152)
    at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:1143)
    at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1326)
    at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1492)
    at com.intellij.ide.plugins.PluginManagerCore.getPlugins(PluginManagerCore.java:123)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentConfigs(ComponentManagerImpl.java:291)

...

Which, looking at the source, has something to do with the plugins (though I'm not clear on what exactly is wrong). This makes some sense with the first error, which reports that the core plugin isn't loaded.

I'm sure there are multiple steps I am missing, however I can't really find any documentation anywhere, and while I've been able to get this far from bits of information here and there, over the last couple of hours I've gotten really stuck on how to proceed. Hopefully other people will be able to use this much, at least, as a start to their own projects.

I know that I'll have to write extensions, actions, components (etc) - all the same stuff from writing a plugin - but what I don't know is how to set up a blank IDE, without any Java, Python, or other language features.

Let me know if you have any suggestions,

Thanks

1 comment
Comment actions Permalink

Thanks for posting, I'm in a similar situation and found this helpful. Did you make any progress with it?

0

Please sign in to leave a comment.