Class `com.intellij.ide.util.TreeClassChooserFactory` Missing From `com.jetbrains:ideaIC:2021.3.1`

Answered

Hello,

I'm working on an IntelliJ Plugin and would like to add a class chooser. Everything that I've read, including the documentation (see https://plugins.jetbrains.com/docs/intellij/file-and-class-choosers.html#class-and-package-choosers) and forum posts (see https://intellij-support.jetbrains.com/hc/en-us/community/posts/206951275-Idea-Community-Version), states that I should use the `com.intellij.ide.util.TreeClassChooserFactory` class. However, that class doesn't seem to be present. I can find the `com.intellij.ide.util.TreeFileChooserFactory` class, but that doesn't do what I need.

I'm using the latest version of IntelliJ IDEA Ultimate, 2021.3.1 (IU-213.6461.79), for development and the latest version of IntelliJ IDEA Community Edition, 2021.3.1 (IC-213.6461.79), as the Plugin SDK.

I've confirmed that the class is not present in the `com.jetbrains:ideaIC:2021.3.1` library (inside of `platform-api.jar`).

Is that class still supported? If not, would anyone be able to point me to some documentation that explains how this can be achieved in newer versions?

EDIT: For what it's worth, the source for that class is present in the sources artifact, but the .class file is missing.

Thank you in advance!
- Andy

2 comments
Comment actions Permalink

Hi Andy,

The Java functionality was extracted from the platform to the separate Java plugin. You have to:

  1. Add <depends>com.intellij.modules.java</depends> in your plugin.xml.
  2. Add "com.intellij.java" plugin in "intellij.plugins" in your Gradle build configuration script (see: https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties).

See also:

0
Comment actions Permalink

Karol Lewandowski,

Thank you so much for your response. It makes sense that this was moved to the Java module. Adding that module solved my problem.

It would be nice if the documentation noted which modules provided which components, unless that exists somewhere and I just didn't see it.

Thank you again for your help! Have a great day!

- Andy

0

Please sign in to leave a comment.