void (@NotNull String text, int offset, @NotNull String prefix, @NotNull CompletionResultSet result) { for (Map.Entry<ExternalProjectPojo, Collection<ExternalProjectPojo>> entry : settings.getAvailableProjects().entrySet()) { String rootProjectPath = entry.getKey().getPath(); String rootProjectName = uiAware.getProjectRepresentationName(rootProjectPath, null); ExternalProjectPathLookupElement rootProjectElement = new ExternalProjectPathLookupElement(rootProjectName, rootProjectPath); result.addElement(rootProjectElement); for (ExternalProjectPojo subProject : entry.getValue()) { String p = subProject.getPath(); if (rootProjectPath.equals(p)) { continue; } String subProjectName = uiAware.getProjectRepresentationName(p, rootProjectPath); ExternalProjectPathLookupElement subProjectElement = new ExternalProjectPathLookupElement(subProjectName, p); result.addElement(subProjectElement); } } result.stopHere(); }