Java error: package com.intellij.openapi.actionSystem does not exist Follow
Answered
Looking at
https://github.com/JetBrains/intellij-sdk-code-samples/tree/main/action_basics
Cannot resolve symbol 'intellij'
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.editor.Editor;
Please sign in to leave a comment.
Please see guide on how to import/use the samples https://plugins.jetbrains.com/docs/intellij/code-samples.html
Downloading these and adding to the classpath helped for me.
extensions-7.0.3.jar
openapi-7.0.3.jar
See https://jar-download.com/?search_box=com.intellij
This additional step is wrong. Please follow the exact instructions given on above page.
Removed them and using the first answer in
https://stackoverflow.com/questions/64205627/package-org-jetbrains-annotations-does-not-exist
changed the product structure to the attached screenshots - rebuild project works without any errors.
Project - select SDK
SDKs - add app.jar from PhpStorm
Libraries - add intellij.openapi and jetbrains.annotations
Please do not trust answers from SO that do not come from JetBrains. It is plain wrong.