void (boolean requestFocus) { FileEditorManagerEx fileEditorManager = FileEditorManagerEx.getInstanceEx(project); boolean isEditorAreaFocused = IJSwingUtilities.hasFocus(fileEditorManager.getComponent()); navigatable.navigate(requestFocus && isEditorAreaFocused); }