It says cannot resolve symbol.
Document currentDoc = FileEditorManager.getInstance(project).getSelectedTextEditor().getDocument();
Example 2:
StatusBar statusBar = WindowManager.getInstance().getStatusBar(project);
if (statusBar != null) statusBar.addWidget(widget, [Anchor], [disposable]);
This is the method i use and recommend:
AnActionEvent.getData(LangDataKeys.PROJECT);
You can include it like that:
AnActionEvent.getProject()
The answer is in the comments:
Refer to these: