mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 06:39:38 +07:00
IDEA-CR-43042 cast to TextEditor
This commit is contained in:
@@ -15,6 +15,7 @@ import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||||
import com.intellij.openapi.fileEditor.FileEditor;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
|
||||
import com.intellij.openapi.fileEditor.TextEditor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.projectRoots.JavaSdkVersion;
|
||||
@@ -77,7 +78,8 @@ public class AttachSourcesNotificationProvider extends EditorNotifications.Provi
|
||||
@Override
|
||||
@Deprecated
|
||||
public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) {
|
||||
Project project = fileEditor instanceof Editor ? ((Editor)fileEditor).getProject() : null;
|
||||
Editor editor = fileEditor instanceof TextEditor ? ((TextEditor)fileEditor).getEditor() : null;
|
||||
Project project = editor == null ? null : editor.getProject();
|
||||
if (project != null) {
|
||||
return createNotificationPanel(file, fileEditor, project);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user