Code highlighting failing after cloning plugin github template
Answered
I'm trying to develop a plugin. I cloned the github template repo: https://github.com/JetBrains/intellij-platform-plugin-template
The run configurations seem to work, but the highlighting and autocomplete seem broken. For example, in every .kt[s] file I get a variant of the error "Cannot access class 'java.lang.String'. Check your module classpath for missing or conflicting dependencies".
I don't have much experience with building in the java ecosystem so I'm not sure how to go about fixing this, but regardless, I would think the github template should work out of the box.
What additional information should I provide to help debug this?
Please sign in to leave a comment.
Hi Simon,
Please make sure you have SDK set up. Go to File | Project Structure... and choose SDK in the Project section.
Hi Karol,
I do have that set up. Here are a few screenshots that might help with diagnosing this:
Hi Simon,
What is in the Problems tab in the project structure?
Also, I assume you imported Gradle project.
It was something like "Kotlin runtime hasn't been added as a dependency to modules", but I clicked "fix" and it didn't fix the highlighting :/
Not sure what you mean by "imported Gradle project" (sorry, like I said I don't have any experience working in the java ecosystem😞), but if I open the gradle plugin window and click "select project data to import", then select all the given options (the snippets module with the main & test submodules), nothing changes.
Hi Simon,
Please try to change your SDK to another (e.g. corretto-11) and see what happens.
Hm yeah changing it seemed to work, thank you! Do you know what could be the cause of this?
Hi Simon,
In the "Project Structure | SDKs" check what 11 points to. Maybe it's not an actual JDK, but just JRE installed in your system.