PlaceInfo (@NotNull FileEditor fileEditor, FileEditorProvider fileProvider) { if (!fileEditor.isValid()) { return null; } FileEditorManagerEx editorManager = getFileEditorManager(); VirtualFile file = fileEditor.getFile(); LOG.assertTrue(file != null, fileEditor.getClass().getName() + " getFile() returned null"); FileEditorState state = fileEditor.getState(FileEditorStateLevel.NAVIGATION); EditorWindow window = editorManager == null ? null : editorManager.getCurrentWindow(); EditorComposite composite = window != null ? window.getComposite(file) : null; return new PlaceInfo(file, state, fileProvider.getEditorTypeId(), window, composite != null && composite.isPreview(), getCaretPosition(fileEditor), System.currentTimeMillis()); }