use of com.intellij.openapi.externalSystem.model.project.ExternalProjectPojo in project intellij-community by JetBrains.
the class AbstractExternalSystemLocalSettings method forgetExternalProjects.
/**
* Asks current settings to drop all information related to external projects which root configs are located at the given paths.
*
* @param linkedProjectPathsToForget target root external project paths
*/
public void forgetExternalProjects(@NotNull Set<String> linkedProjectPathsToForget) {
Map<ExternalProjectPojo, Collection<ExternalProjectPojo>> projects = myAvailableProjects.get();
for (Iterator<Map.Entry<ExternalProjectPojo, Collection<ExternalProjectPojo>>> it = projects.entrySet().iterator(); it.hasNext(); ) {
Map.Entry<ExternalProjectPojo, Collection<ExternalProjectPojo>> entry = it.next();
if (linkedProjectPathsToForget.contains(entry.getKey().getPath())) {
it.remove();
}
}
for (Iterator<Map.Entry<String, Collection<ExternalTaskPojo>>> it = myAvailableTasks.get().entrySet().iterator(); it.hasNext(); ) {
Map.Entry<String, Collection<ExternalTaskPojo>> entry = it.next();
if (linkedProjectPathsToForget.contains(entry.getKey()) || linkedProjectPathsToForget.contains(ExternalSystemApiUtil.getRootProjectPath(entry.getKey(), myExternalSystemId, myProject))) {
it.remove();
}
}
for (Iterator<ExternalTaskExecutionInfo> it = myRecentTasks.get().iterator(); it.hasNext(); ) {
ExternalTaskExecutionInfo taskInfo = it.next();
String path = taskInfo.getSettings().getExternalProjectPath();
if (linkedProjectPathsToForget.contains(path) || linkedProjectPathsToForget.contains(ExternalSystemApiUtil.getRootProjectPath(path, myExternalSystemId, myProject))) {
it.remove();
}
}
for (Iterator<Map.Entry<String, ExternalProjectBuildClasspathPojo>> it = myProjectBuildClasspath.get().entrySet().iterator(); it.hasNext(); ) {
Map.Entry<String, ExternalProjectBuildClasspathPojo> entry = it.next();
if (linkedProjectPathsToForget.contains(entry.getKey()) || linkedProjectPathsToForget.contains(ExternalSystemApiUtil.getRootProjectPath(entry.getKey(), myExternalSystemId, myProject))) {
it.remove();
}
}
Map<String, Long> modificationStamps = myExternalConfigModificationStamps.get();
for (String path : linkedProjectPathsToForget) {
modificationStamps.remove(path);
}
}
use of com.intellij.openapi.externalSystem.model.project.ExternalProjectPojo in project azure-tools-for-java by Microsoft.
the class GradleUtils method listGradleProjects.
public static List<ExternalProjectPojo> listGradleProjects(Project project) {
GradleManager manager = (GradleManager) ExternalSystemApiUtil.getManager(GradleConstants.SYSTEM_ID);
Map<ExternalProjectPojo, Collection<ExternalProjectPojo>> projects = manager.getLocalSettingsProvider().fun(project).getAvailableProjects();
return new ArrayList(projects.keySet());
}
Aggregations