Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kaspar2014-03-24 13:13:10 +0000
committerDoug Schaefer2014-03-24 19:02:27 +0000
commit13b45e7bff391883e13f3b675fa891004efe6340 (patch)
tree91e5a65327a684d7bfc7899e57f1261c68a04aa3
parente81422fe2b50c093c5daa0a9aac3383f938d15d7 (diff)
downloadorg.eclipse.cdt-13b45e7bff391883e13f3b675fa891004efe6340.tar.gz
org.eclipse.cdt-13b45e7bff391883e13f3b675fa891004efe6340.tar.xz
org.eclipse.cdt-13b45e7bff391883e13f3b675fa891004efe6340.zip
Bug 431012: Missing IQMakeProjectInfo.updateQMakeInfo()
Adding IQMakeProjectInfo.updateQMakeInfo():QMakeInfo method to allow explicit calculation of QMakeInfo at the time of the method call. Change-Id: I665bedd5e095d1968f0c39ff2abb19c60aac9e14 Signed-off-by: David Kaspar <dkaspar@blackberry.com> Reviewed-on: https://git.eclipse.org/r/23800 Reviewed-by: Doug Schaefer <dschaefer@qnx.com> IP-Clean: Doug Schaefer <dschaefer@qnx.com> Tested-by: Doug Schaefer <dschaefer@qnx.com>
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java11
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/index/IQMakeProjectInfo.java11
2 files changed, 18 insertions, 4 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java
index c3cfa866aca..d611febd0b8 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java
@@ -75,11 +75,13 @@ public final class QMakeProjectInfo implements IQMakeProjectInfo {
// must not be called under any QMake-related sync-lock, except for workspace lock
// we are running outside of synchronized block to prevent deadlock involving workspace lock
// this means that theoretically there might be multiple thread calculating the same results but only the last one wins
- void updateState() {
+ State updateState() {
// note that getProjectDescription might acquire workspace lock
ICProjectDescription projectDescription = CoreModel.getDefault().getProjectDescriptionManager().getProjectDescription(project);
ICConfigurationDescription configuration = projectDescription != null ? projectDescription.getActiveConfiguration() : null;
- setState(configuration != null ? new State(configuration) : STATE_INVALID);
+ State newState = configuration != null ? new State(configuration) : STATE_INVALID;
+ setState(newState);
+ return newState;
}
private void setState(State newState) {
@@ -125,6 +127,11 @@ public final class QMakeProjectInfo implements IQMakeProjectInfo {
}
}
+ @Override
+ public IQMakeInfo updateActualInfo() {
+ return updateState().getQMakeInfo();
+ }
+
// converts IFile to absolute path
private static String toFilePath(IFile file) {
if (file != null) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/index/IQMakeProjectInfo.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/index/IQMakeProjectInfo.java
index 60edc762bb8..4a06cbabade 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/index/IQMakeProjectInfo.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/qt/core/index/IQMakeProjectInfo.java
@@ -31,10 +31,17 @@ public interface IQMakeProjectInfo {
/**
* Returns an actual QMake information.
*
- * Note that this is a long-term operation and the method call is blocked until an actual QMake information is calculated.
- *
* @return non-null IQMakeInfo instance representing the actual QMake information
*/
IQMakeInfo getActualInfo();
+ /**
+ * Updates the actual QMake information and returns it.
+ *
+ * Note that this is a long-term operation and the method call is blocked until an actual QMake information is calculated.
+ *
+ * @return non-null IQMakeInfo instance representing the actual QMake information calculated at the time of this method call.
+ */
+ IQMakeInfo updateActualInfo();
+
}

Back to the top