mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Refactoring to track what code is throwing NPE
This commit is contained in:
+4
-2
@@ -116,12 +116,14 @@ public class DetectedIndentOptionsNotificationProvider extends EditorNotificatio
|
||||
if (!ApplicationManager.getApplication().isHeadlessEnvironment()
|
||||
|| ApplicationManager.getApplication().isUnitTestMode() && myShowNotificationInTest)
|
||||
{
|
||||
FileEditor fileEditor = FileEditorManager.getInstance(file.getProject()).getSelectedEditor(vFile);
|
||||
Project project = file.getProject();
|
||||
FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);
|
||||
FileEditor fileEditor = fileEditorManager.getSelectedEditor(vFile);
|
||||
if (fileEditor != null) {
|
||||
Boolean notifiedFlag = fileEditor.getUserData(NOTIFIED_FLAG);
|
||||
if (notifiedFlag == null || enforce) {
|
||||
fileEditor.putUserData(NOTIFIED_FLAG, Boolean.TRUE);
|
||||
EditorNotifications.getInstance(file.getProject()).updateNotifications(vFile);
|
||||
EditorNotifications.getInstance(project).updateNotifications(vFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user