The great module rename in the IntelliJ IDEA codebase

We’ve just pushed a major naming change to the IntelliJ codebase. For years, we hadn’t set or followed any naming conventions for modules in the IntelliJ IDEA source, and things had gotten into a total mess (for example, we had a variety of names such as  hg4idea, jetgroovy, ByteCodeViewer, testng_rt, and lang-impl). As usage of IntelliJ Platform grows, this has been causing more and more problems.

So now we’ve finally put all names of modules in IntelliJ IDEA and IntelliJ Platform sources in order. This means that all 357 modules in the intellij-community project have been renamed.

This doesn’t affect binary distributions of IntelliJ-based IDEs, as JAR filenames haven’t been changed.

For example, here are some of the names as seen in Find Usages before the change:

before

And here’s a similar view, after the change:

after

If you’re developing a plugin for an IntelliJ-based IDE, this change shouldn’t affect you because plugins don’t refer to modules by their names, but depend on JAR files, and we haven’t changed any file names.

However, if you’re developing a custom IDE based on IntelliJ Platform, you’ll need to adapt your code to the change. First, you’ll need to be using IntelliJ IDEA 2018.1 EAP. Then open your project and update its sources to use the latest revision of intellij-community‘s master branch.

The 2018.1 EAPs have special support to automatically update your local run configurations and additional modules to the new module names. Build scripts for your product should work properly but will show warnings if your scripts refer to platform modules by their old names; it makes sense to fix such references because eventually compatibility code will be removed from the platform build scripts.

The ModuleRenamingHistory component in the .idea/modules.xml file contain mapping from old to new names if you need it.

This entry was posted in IntelliJ Platform. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *