JetBrains / intellij-platform-plugin-template

Template repository for creating plugins for IntelliJ Platform
Apache License 2.0
3.05k stars 618 forks source link

IntelliJ IDEA cannot resolve references to com.intellij.* classes #320

Closed Hixon10 closed 1 year ago

Hixon10 commented 1 year ago

Describe the bug:

  1. I pressed use this template button and got my initial repo.
  2. I opened it in IntelliJ IDEA 2022.2.3 (Community Edition)
  3. I added an example changelog, fixed TODO(..) in generated classes.
  4. I ran gradle build and got BUILD SUCCESSFUL in 19s.
  5. Now I want to develop something, so I opened class MyProjectManagerListener, but IDEA cannot resolve any plugin-related classes.

image

Expected behavior:

  1. I can navigate across plugin related classes after building the project.
Konafets commented 1 year ago

I have the same issue and it occurs each time I change something in the Gradle config. My workflow is to use File > Repair IDE and go through every step.

YannCebron commented 1 year ago

please clarify Gradle IntelliJ Plugin version, is it 1.10.0? does it reproduce also with 1.9.0? re-importing Gradle project can also help

Konafets commented 1 year ago

For me it is 1.10.0. After switching back to 1.9.0 it works again.

Hixon10 commented 1 year ago

@YannCebron yes, I used 1.10.0. Right now I've changed the version to 1.9.0, and the problem is not reproduced anymore.

hsz commented 1 year ago

The issue comes from the Gradle IntelliJ Plugin: https://github.com/JetBrains/gradle-intellij-plugin/issues/1209 Fixed in the 1.11.0-SNAPSHOT snasphot release – will be released soonish.

hsz commented 1 year ago

Fixed with the Gradle IntelliJ Plugin 1.12.0