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

bug 289608: [Scanner Discovery] Discovery options does not offer profiles defined in supertypes in project properties

cleanup only: more loops to enhanced
This commit is contained in:
Andrew Gvozdev 2009-09-16 15:34:49 +00:00
parent d0dd8c648e
commit 2f7703e142

View file

@ -162,26 +162,23 @@ public class CfgScannerConfigInfoFactory2 {
Map<CfgInfoContext, IScannerConfigBuilderInfo2> configMap = getConfigInfoMap(baseMap);
IResourceInfo[] rcInfos = cfg.getResourceInfos();
for(int i = 0; i < rcInfos.length; i++){
for (IResourceInfo rcInfo : rcInfos) {
ITool tools[];
IResourceInfo rcInfo = rcInfos[i];
if(rcInfo instanceof IFolderInfo) {
tools = ((IFolderInfo)rcInfo).getFilteredTools();
} else {
tools = ((IFileInfo)rcInfo).getToolsToInvoke();
}
for(int k = 0; k < tools.length; k++){
Tool tool = (Tool)tools[k];
for (ITool tool : tools) {
IInputType types[] = tool.getInputTypes();
if(types.length != 0){
for(int t = 0; t < types.length; t++){
InputType type = (InputType)types[t];
CfgInfoContext context = new CfgInfoContext(rcInfo, tool, type);
for (IInputType inputType : types) {
CfgInfoContext context = new CfgInfoContext(rcInfo, tool, inputType);
context = CfgScannerConfigUtil.adjustPerRcTypeContext(context);
if(context != null && context.getResourceInfo() != null){
IScannerConfigBuilderInfo2 info = configMap.get(context);
if(info == null && !type.isExtensionElement() && type.getSuperClass() != null){
CfgInfoContext superContext = new CfgInfoContext(rcInfo, tool, type.getSuperClass());
if(info == null && !inputType.isExtensionElement() && inputType.getSuperClass() != null){
CfgInfoContext superContext = new CfgInfoContext(rcInfo, tool, inputType.getSuperClass());
superContext = CfgScannerConfigUtil.adjustPerRcTypeContext(superContext);
if(superContext != null && superContext.getResourceInfo() != null){
info = configMap.get(superContext);