Skip to main content
summaryrefslogtreecommitdiffstats
path: root/qt
diff options
context:
space:
mode:
authorDavid Kaspar2014-03-24 09:13:10 -0400
committerDoug Schaefer2014-03-24 15:01:26 -0400
commit698788ea71444e64f528ad609594b3dbd3df269d (patch)
treee36f4d3aaf4c8ef861115cacc8e8a5b75a596de6 /qt
parentf9e4bbf0a398ed53e83920ef36d64cb42b1fdedb (diff)
downloadorg.eclipse.cdt-698788ea71444e64f528ad609594b3dbd3df269d.tar.gz
org.eclipse.cdt-698788ea71444e64f528ad609594b3dbd3df269d.tar.xz
org.eclipse.cdt-698788ea71444e64f528ad609594b3dbd3df269d.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>
Diffstat (limited to 'qt')
-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 c3cfa866ac..d611febd0b 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 60edc762bb..4a06cbabad 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