mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26: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:
parent
d0dd8c648e
commit
2f7703e142
1 changed files with 6 additions and 9 deletions
|
@ -162,26 +162,23 @@ public class CfgScannerConfigInfoFactory2 {
|
||||||
Map<CfgInfoContext, IScannerConfigBuilderInfo2> configMap = getConfigInfoMap(baseMap);
|
Map<CfgInfoContext, IScannerConfigBuilderInfo2> configMap = getConfigInfoMap(baseMap);
|
||||||
|
|
||||||
IResourceInfo[] rcInfos = cfg.getResourceInfos();
|
IResourceInfo[] rcInfos = cfg.getResourceInfos();
|
||||||
for(int i = 0; i < rcInfos.length; i++){
|
for (IResourceInfo rcInfo : rcInfos) {
|
||||||
ITool tools[];
|
ITool tools[];
|
||||||
IResourceInfo rcInfo = rcInfos[i];
|
|
||||||
if(rcInfo instanceof IFolderInfo) {
|
if(rcInfo instanceof IFolderInfo) {
|
||||||
tools = ((IFolderInfo)rcInfo).getFilteredTools();
|
tools = ((IFolderInfo)rcInfo).getFilteredTools();
|
||||||
} else {
|
} else {
|
||||||
tools = ((IFileInfo)rcInfo).getToolsToInvoke();
|
tools = ((IFileInfo)rcInfo).getToolsToInvoke();
|
||||||
}
|
}
|
||||||
for(int k = 0; k < tools.length; k++){
|
for (ITool tool : tools) {
|
||||||
Tool tool = (Tool)tools[k];
|
|
||||||
IInputType types[] = tool.getInputTypes();
|
IInputType types[] = tool.getInputTypes();
|
||||||
if(types.length != 0){
|
if(types.length != 0){
|
||||||
for(int t = 0; t < types.length; t++){
|
for (IInputType inputType : types) {
|
||||||
InputType type = (InputType)types[t];
|
CfgInfoContext context = new CfgInfoContext(rcInfo, tool, inputType);
|
||||||
CfgInfoContext context = new CfgInfoContext(rcInfo, tool, type);
|
|
||||||
context = CfgScannerConfigUtil.adjustPerRcTypeContext(context);
|
context = CfgScannerConfigUtil.adjustPerRcTypeContext(context);
|
||||||
if(context != null && context.getResourceInfo() != null){
|
if(context != null && context.getResourceInfo() != null){
|
||||||
IScannerConfigBuilderInfo2 info = configMap.get(context);
|
IScannerConfigBuilderInfo2 info = configMap.get(context);
|
||||||
if(info == null && !type.isExtensionElement() && type.getSuperClass() != null){
|
if(info == null && !inputType.isExtensionElement() && inputType.getSuperClass() != null){
|
||||||
CfgInfoContext superContext = new CfgInfoContext(rcInfo, tool, type.getSuperClass());
|
CfgInfoContext superContext = new CfgInfoContext(rcInfo, tool, inputType.getSuperClass());
|
||||||
superContext = CfgScannerConfigUtil.adjustPerRcTypeContext(superContext);
|
superContext = CfgScannerConfigUtil.adjustPerRcTypeContext(superContext);
|
||||||
if(superContext != null && superContext.getResourceInfo() != null){
|
if(superContext != null && superContext.getResourceInfo() != null){
|
||||||
info = configMap.get(superContext);
|
info = configMap.get(superContext);
|
||||||
|
|
Loading…
Add table
Reference in a new issue