1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Consider resource configuration tools during conversion

This commit is contained in:
Leo Treggiari 2005-09-21 19:03:27 +00:00
parent 7c22c0d5f1
commit dcec32b0ef
2 changed files with 30 additions and 4 deletions

View file

@ -2677,7 +2677,32 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
}
}
}
// walk through each resource configuration and look if there are any converters
// available. If so, invoke them.
IResourceConfiguration [] resourceConfigs = configuration.getResourceConfigurations();
if ( ( resourceConfigs != null) && ( resourceConfigs.length > 0)) {
for (int j = 0; j < resourceConfigs.length; j++) {
IResourceConfiguration resConfig = resourceConfigs[j];
ITool [] resTools = resConfig.getTools();
for (int k = 0; k < resTools.length; k++) {
ITool resTool = resTools[k];
if (forCurrentMbsVersion) {
element = ((Tool)resTool).getCurrentMbsVersionConversionElement();
} else {
element = ((Tool)resTool).getPreviousMbsVersionConversionElement();
}
if (element != null) {
if ( invokeConverter(resTool, element) == null ) {
buildInfo.getManagedProject().setValid(false);
return false;
}
}
}
}
} // end of if
}
// If control comes here, it means either there is no converter element
// or converters are invoked successfully
return true;

View file

@ -570,11 +570,12 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory {
IResourceConfiguration resConfig = (IResourceConfiguration) getParent();
setSuperClass( resConfig.getParent().getTool(superClassId) );
} else {
setSuperClass( ManagedBuildManager.getExtensionTool(superClassId) );
// Check for migration support
checkForMigrationSupport();
setSuperClass( ManagedBuildManager.getExtensionTool(superClassId) );
}
// Check for migration support
checkForMigrationSupport();
}
// Get the unused children, if any