mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Re-read the makefile targets when a project becomes eligible
Without this change when the project is not a "hasTargetBuilder" then the projectMap will contain an entry mapping the project to an empty set of makefile targets. So when we get a project added, make sure to re-read the target settings by clearing the cached versions. Fixes #244
This commit is contained in:
parent
fe7a9d7856
commit
34f1736317
2 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.make.core; singleton:=true
|
||||
Bundle-Version: 7.6.0.qualifier
|
||||
Bundle-Version: 7.6.100.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.make.core.MakeCorePlugin
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
|
|
|
@ -259,6 +259,8 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
|
|||
if (deltaKind == IResourceDelta.ADDED) {
|
||||
if (hasTargetBuilder(project) && !fProjects.contains(project)) {
|
||||
fProjects.add(project);
|
||||
// Need to re-read the target settings, clear the cached version
|
||||
projectMap.remove(project);
|
||||
notifyListeners(
|
||||
new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED, project));
|
||||
}
|
||||
|
@ -278,6 +280,8 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
|
|||
project));
|
||||
} else if (!fProjects.contains(project) && hasTargetBuilder(project)) {
|
||||
fProjects.add(project);
|
||||
// Need to re-read the target settings, clear the cached version
|
||||
projectMap.remove(project);
|
||||
notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED,
|
||||
project));
|
||||
}
|
||||
|
@ -290,6 +294,8 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
|
|||
project));
|
||||
} else if (project.isOpen() && hasTargetBuilder(project) && !fProjects.contains(project)) {
|
||||
fProjects.add(project);
|
||||
// Need to re-read the target settings, clear the cached version
|
||||
projectMap.remove(project);
|
||||
notifyListeners(new MakeTargetEvent(MakeTargetManager.this, MakeTargetEvent.PROJECT_ADDED,
|
||||
project));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue