mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug #207470
This commit is contained in:
parent
65dc16c3b3
commit
a5d95152d2
2 changed files with 33 additions and 9 deletions
|
@ -3518,7 +3518,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
// projectType converter should take care of invoking converters of
|
// projectType converter should take care of invoking converters of
|
||||||
// it's children
|
// it's children
|
||||||
|
|
||||||
if (invokeConverter(managedProject, element) == null) {
|
if (invokeConverter(buildInfo, managedProject, element) == null) {
|
||||||
buildInfo.getManagedProject().setValid(false);
|
buildInfo.getManagedProject().setValid(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3542,7 +3542,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
// If there is a converter element for toolChain, invoke it
|
// If there is a converter element for toolChain, invoke it
|
||||||
// toolChain converter should take care of invoking
|
// toolChain converter should take care of invoking
|
||||||
// converters of it's children
|
// converters of it's children
|
||||||
if (invokeConverter(toolChain, element) == null) {
|
if (invokeConverter(buildInfo, toolChain, element) == null) {
|
||||||
buildInfo.getManagedProject().setValid(false);
|
buildInfo.getManagedProject().setValid(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3560,7 +3560,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
.getPreviousMbsVersionConversionElement();
|
.getPreviousMbsVersionConversionElement();
|
||||||
}
|
}
|
||||||
if (element != null) {
|
if (element != null) {
|
||||||
if (invokeConverter(tool, element) == null) {
|
if (invokeConverter(buildInfo, tool, element) == null) {
|
||||||
buildInfo.getManagedProject().setValid(false);
|
buildInfo.getManagedProject().setValid(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3577,7 +3577,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element != null) {
|
if (element != null) {
|
||||||
if (invokeConverter(builder, element) == null) {
|
if (invokeConverter(buildInfo, builder, element) == null) {
|
||||||
buildInfo.getManagedProject().setValid(false);
|
buildInfo.getManagedProject().setValid(false);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -3604,7 +3604,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
.getPreviousMbsVersionConversionElement();
|
.getPreviousMbsVersionConversionElement();
|
||||||
}
|
}
|
||||||
if (element != null) {
|
if (element != null) {
|
||||||
if (invokeConverter(resTool, element) == null) {
|
if (invokeConverter(buildInfo, resTool, element) == null) {
|
||||||
buildInfo.getManagedProject().setValid(
|
buildInfo.getManagedProject().setValid(
|
||||||
false);
|
false);
|
||||||
return false;
|
return false;
|
||||||
|
@ -3621,7 +3621,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IBuildObject invokeConverter(IBuildObject buildObject, IConfigurationElement element) {
|
private static IBuildObject invokeConverter(ManagedBuildInfo bi, IBuildObject buildObject, IConfigurationElement element) {
|
||||||
|
|
||||||
if (element != null) {
|
if (element != null) {
|
||||||
IConvertManagedBuildObject convertBuildObject = null;
|
IConvertManagedBuildObject convertBuildObject = null;
|
||||||
|
@ -3638,7 +3638,19 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
|
|
||||||
if (convertBuildObject != null) {
|
if (convertBuildObject != null) {
|
||||||
// invoke the converter
|
// invoke the converter
|
||||||
return convertBuildObject.convert(buildObject, fromId, toId, false);
|
IProject prj = null;
|
||||||
|
IBuildObject result = null;
|
||||||
|
try {
|
||||||
|
if (bi != null) {
|
||||||
|
prj = (IProject)bi.getManagedProject().getOwner();
|
||||||
|
UpdateManagedProjectManager.addInfo(prj, bi);
|
||||||
|
}
|
||||||
|
result = convertBuildObject.convert(buildObject, fromId, toId, false);
|
||||||
|
} finally {
|
||||||
|
if (bi != null)
|
||||||
|
UpdateManagedProjectManager.delInfo(prj);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if control comes here, it means that either 'convertBuildObject' is null or
|
// if control comes here, it means that either 'convertBuildObject' is null or
|
||||||
|
@ -3675,7 +3687,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
if (element.getName().equals("converter") && (isBuildObjectApplicableForConversion(buildObj, element) == true)) { //$NON-NLS-1$
|
if (element.getName().equals("converter") && (isBuildObjectApplicableForConversion(buildObj, element) == true)) { //$NON-NLS-1$
|
||||||
tmpToId = element.getAttribute("toId"); //$NON-NLS-1$
|
tmpToId = element.getAttribute("toId"); //$NON-NLS-1$
|
||||||
if (tmpToId.equals(toId)) {
|
if (tmpToId.equals(toId)) {
|
||||||
return invokeConverter(buildObj, element);
|
return invokeConverter(null, buildObj, element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,14 @@ public class UpdateManagedProjectManager {
|
||||||
return mngr;
|
return mngr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public void addInfo(final IProject project, ManagedBuildInfo info) {
|
||||||
|
getUpdateManager(project).setBuildInfo(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
static public void delInfo(final IProject project) {
|
||||||
|
removeUpdateManager(project);
|
||||||
|
}
|
||||||
|
|
||||||
static private void removeUpdateManager(IProject project){
|
static private void removeUpdateManager(IProject project){
|
||||||
UpdateManagedProjectManager mngr = getExistingUpdateManager(project);
|
UpdateManagedProjectManager mngr = getExistingUpdateManager(project);
|
||||||
if(mngr == null)
|
if(mngr == null)
|
||||||
|
@ -271,6 +279,10 @@ public class UpdateManagedProjectManager {
|
||||||
return fConvertedInfo;
|
return fConvertedInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setBuildInfo(ManagedBuildInfo info) {
|
||||||
|
fConvertedInfo = info;
|
||||||
|
}
|
||||||
|
|
||||||
private void doProjectUpdate(ManagedBuildInfo info)
|
private void doProjectUpdate(ManagedBuildInfo info)
|
||||||
throws CoreException {
|
throws CoreException {
|
||||||
fConvertedInfo = info;
|
fConvertedInfo = info;
|
||||||
|
|
Loading…
Add table
Reference in a new issue