List<String> (String pattern) { List<String> actualArtifacts = new ArrayList<>(); for (MavenClassSearchResult eachResult : new MavenClassSearcher().search(myProject, pattern, 100)) { StringBuilder s = new StringBuilder(eachResult.getClassName() + "(" + eachResult.getPackageName() + ")"); for (MavenDependencyCompletionItem eachVersion : eachResult.getSearchResults().getItems()) { if (s.length() > 0) s.append(" "); s.append(eachVersion.getGroupId()).append(":").append(eachVersion.getArtifactId()).append(":").append(eachVersion.getVersion()); } actualArtifacts.add(s.toString()); } return actualArtifacts; }