Rider 2021.1 EAP: NoClassDefFoundError: com/jetbrains/rider/projectView/ProjectModelViewHost
Hi everyone,
I have a plugin that needs to work with Project View (get selected files, get a project file and so on).
But since Rider 2021.1 EAP I get the following:
Plugin 'com.myplugin' failed to initialize and will be disabled. Please restart JetBrains Rider.
java.lang.NoClassDefFoundError: com/jetbrains/rider/projectView/ProjectModelViewHost
At com.myplugin.intellij.PluginImpl.<init>(PluginImpl.java:273)
At java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
At com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
At com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:771)
At com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:35)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:110)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:64)
The API was removed in the end:
- com.jetbrains.rider.projectView.ProjectModelViewHost
- import com.jetbrains.rider.projectView.nodes.ProjectModelNode
- maybe that's not all
It turns out that incompatible changes were made in Rider 2021.1 EAP ?
Please can you tell me how I can make a plugin to work with Project View to be able to work with Rider < 2021 and 2021.1+ ?
Thank you very much in advance for your help!
Please sign in to leave a comment.
Hi Maxim.
Project Model in Rider 2021.1 was completely rewritten to use IDEA workspace model. For you it means:
If you still have any questions just ask here =)
Do I understand correctly that there is no way to write a single mechanism that will work in 2019+, 2020+ and 2021+ at the same time?
There is no way, sorry... This is a fee for https://youtrack.jetbrains.com/issue/RIDER-5094
Thank you very much for the clarification)