Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUmair Sair2019-06-19 15:05:01 +0000
committerJonah Graham2019-06-21 17:19:27 +0000
commit84e2470069f997e976bd879c2ec526fd8773bce5 (patch)
tree648bc8c4afcaae219c4a857c063407c83a0a2395
parent15cf76040530e7bf60204bffefa202a99b495eac (diff)
downloadorg.eclipse.cdt-84e2470069f997e976bd879c2ec526fd8773bce5.tar.gz
org.eclipse.cdt-84e2470069f997e976bd879c2ec526fd8773bce5.tar.xz
org.eclipse.cdt-84e2470069f997e976bd879c2ec526fd8773bce5.zip
Bug 545976 Clicking on error/warning in build console doesn't open file
Problem: ======== Common builder invokes the build on all the referenced projects. For the markers creation, the project on which build is invoked by user is used, that is incorrect. Once all the referenced projects are built, the actual project starts building and removes all the markers associated with it, hence the markers created previously for referenced projects are removed and now clicking on error/warning in build console of referenced projects will not open source file because of missing markers. Fix: ==== Always set the correct project being built for markers creation using setCurrentProject(..) API. Change-Id: Ief051ac664ea964816fdcbe7f2f54bcf43caa212 Signed-off-by: Umair Sair <umair_sair@hotmail.com>
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
index 37bd20e529..f453a2c979 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
@@ -15,6 +15,7 @@
* Save build output (bug 294106)
* Andrew Gvozdev (Quoin Inc) - Saving build output implemented in different way (bug 306222)
* Umair Sair (Mentor Graphics) - Project dependencies are not built in the correct order (bug 546407)
+ * Umair Sair (Mentor Graphics) - Setting current project for markers creation (bug 545976)
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.core;
@@ -753,6 +754,8 @@ public class CommonBuilder extends ACBuilder {
if (status.isBuild()) {
try {
+ // Set the current project for markers creation
+ setCurrentProject(bInfo.getProject());
boolean isClean = builder.getBuildRunner().invokeBuild(kind, bInfo.getProject(),
bInfo.getConfiguration(), builder, bInfo.getConsole(), this, this, monitor);
if (isClean) {
@@ -1121,6 +1124,8 @@ public class CommonBuilder extends ACBuilder {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
+ // Set the current project for markers creation
+ setCurrentProject(bInfo.getProject());
bInfo.fBuilder.getBuildRunner().invokeBuild(CLEAN_BUILD, bInfo.getProject(),
bInfo.getConfiguration(), bInfo.getBuilder(), bInfo.getConsole(),
CommonBuilder.this, CommonBuilder.this, monitor);
@@ -1138,6 +1143,8 @@ public class CommonBuilder extends ACBuilder {
backgroundJob.setRule(rule);
backgroundJob.schedule();
} else {
+ // Set the current project for markers creation
+ setCurrentProject(bInfo.getProject());
bInfo.fBuilder.getBuildRunner().invokeBuild(CLEAN_BUILD, bInfo.getProject(), bInfo.getConfiguration(),
bInfo.getBuilder(), bInfo.getConsole(), this, this, monitor);
}

Back to the top