Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kaspar2014-04-30 12:20:20 -0400
committerElena Laskavaia2014-07-02 21:02:18 -0400
commitdb2f21e5f20040dc0b076d52b0dfaf470f5e9b36 (patch)
tree9bc1b833e55c3c599c61a3aeac8414e5d9d5ace5
parent62369d66e93997ad036e05296446d48f63bff857 (diff)
downloadorg.eclipse.cdt-db2f21e5f20040dc0b076d52b0dfaf470f5e9b36.tar.gz
org.eclipse.cdt-db2f21e5f20040dc0b076d52b0dfaf470f5e9b36.tar.xz
org.eclipse.cdt-db2f21e5f20040dc0b076d52b0dfaf470f5e9b36.zip
Bug 433869: IQMakeProjectInfo is not updating on active conf. changed
Fixing incorrect eventTypes used for registering CProjectDescriptionListener in QMakeProjectInfo.start() method. Change-Id: Ieb602a38999868e3da8487a1757c69bd50cb5837 Signed-off-by: David Kaspar <dkaspar@blackberry.com> Reviewed-on: https://git.eclipse.org/r/26264 Tested-by: Hudson CI Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
index 4553bcbfcd2..46e51b42e14 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
@@ -46,7 +46,7 @@ public class QMakeProjectInfoManager {
synchronized (CACHE_SYNC) {
CACHE = new HashMap<IProject,QMakeProjectInfo>();
}
- CoreModel.getDefault().addCProjectDescriptionListener(PD_LISTENER, ICDescriptionDelta.ACTIVE_CFG);
+ CoreModel.getDefault().addCProjectDescriptionListener(PD_LISTENER, CProjectDescriptionEvent.LOADED | CProjectDescriptionEvent.APPLIED);
ResourcesPlugin.getWorkspace().addResourceChangeListener(RC_LISTENER, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
}
@@ -110,9 +110,14 @@ public class QMakeProjectInfoManager {
// called on active project configuration change
@Override
public void handleEvent(CProjectDescriptionEvent event) {
- QMakeProjectInfo info = getQMakeProjectInfoFor(event.getProject(), false);
- if (info != null) {
- info.updateState();
+ ICDescriptionDelta projectDelta = event.getProjectDelta();
+ if (projectDelta != null) {
+ if ((projectDelta.getChangeFlags() & ICDescriptionDelta.ACTIVE_CFG) != 0) {
+ QMakeProjectInfo info = getQMakeProjectInfoFor(event.getProject(), false);
+ if (info != null) {
+ info.updateState();
+ }
+ }
}
}

Back to the top