boolean () { AbstractTreeNode selectedNode = getSelectedNode(); if (ApplicationManager.getApplication().isInternal()) { String enteredPrefix = mySpeedSearch.getEnteredPrefix(); String itemText = getSpeedSearchText(selectedNode); if (StringUtil.isNotEmpty(enteredPrefix) && StringUtil.isNotEmpty(itemText)) { LOG.info("Chosen in file structure popup by prefix '" + enteredPrefix + "': '" + itemText + "'"); } } Ref<Boolean> succeeded = new Ref<>(); CommandProcessor commandProcessor = CommandProcessor.getInstance(); commandProcessor.executeCommand(myProject, () -> { if (selectedNode != null) { if (selectedNode.canNavigateToSource()) { selectedNode.navigate(true); myPopup.cancel(); succeeded.set(true); } else { succeeded.set(false); } } else { succeeded.set(false); } IdeDocumentHistory.getInstance(myProject).includeCurrentCommandAsNavigation(); }, LangBundle.message("command.name.navigate"), null); return succeeded.get(); }