Navigatable (@NotNull final List<MavenDomProfile> profiles) { if (profiles.size() > 1) { return new NavigatableAdapter() { @Override public void navigate(final boolean requestFocus) { JBPopupFactory.getInstance() .createPopupChooserBuilder(profiles) .setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component result = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); MavenDomProfile mavenDomProfile = (MavenDomProfile)value; XmlElement xmlElement = mavenDomProfile.getXmlElement(); if (xmlElement != null) { String url = getPresentableUrl(xmlElement); setText(url); } return result; } }) .setTitle(message("maven.notification.choose.file.to.open")) .setItemChosenCallback((value) -> { final Navigatable navigatable = getNavigatable(value); if (navigatable != null) navigatable.navigate(requestFocus); }).createPopup().showInFocusCenter(); } }; } else { return getNavigatable(ContainerUtil.getFirstItem(profiles)); } }