mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
remove duplicates in project list
This commit is contained in:
parent
cd32934c10
commit
e0af51b73c
1 changed files with 5 additions and 0 deletions
|
@ -117,15 +117,20 @@ public class ProjectContainerPage extends WizardPage implements ICPathContainerP
|
|||
current = Arrays.asList(fCProject.getRawPathEntries());
|
||||
ICProject[] cProjects = CoreModel.getDefault().getCModel().getCProjects();
|
||||
for (int i = 0; i < cProjects.length; i++) {
|
||||
boolean added = false;
|
||||
if (!cProjects[i].equals(fCProject) && !current.contains(CoreModel.newProjectEntry(cProjects[i].getPath()))) {
|
||||
IPathEntry[] projEntries = cProjects[i].getRawPathEntries();
|
||||
for (int j = 0; j < projEntries.length; j++) {
|
||||
for (int k = 0; k < fFilterType.length; k++) {
|
||||
if (projEntries[j].getEntryKind() == fFilterType[k] && projEntries[j].isExported()) {
|
||||
list.add(cProjects[i]);
|
||||
added = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (added) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue