List<LookupElement> (MavenProjectsManager manager) { Set<String> goals = new HashSet<>(MavenConstants.PHASES); for (MavenProject mavenProject : manager.getProjects()) { for (MavenPlugin plugin : mavenProject.getPlugins()) { MavenPluginInfo pluginInfo = MavenArtifactUtil.readPluginInfo(manager.getLocalRepository(), plugin.getMavenId()); if (pluginInfo != null) { for (MavenPluginInfo.Mojo mojo : pluginInfo.getMojos()) { goals.add(mojo.getDisplayName()); } } } } List<LookupElement> res = new ArrayList<>(goals.size()); for (String goal : goals) { res.add(LookupElementBuilder.create(goal).withIcon(Task)); } return res; }