mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
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>
This commit is contained in:
parent
15cf760405
commit
84e2470069
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue