boolean (FileEditor editor) { if (editor == null) return false; if (!Objects.equals(myVirtualFile, editor.getFile())) return false; if (myState == null) return false; FileEditorState currentState = editor.getState(FileEditorStateLevel.UNDO); return myState.getClass() == currentState.getClass(); }