1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

[268528] Discovery profile options panel doesn't show since 5.0.2 up

This commit is contained in:
Alena Laskavaia 2009-03-16 14:50:32 +00:00
parent 4d246d8477
commit 97bb50f277
3 changed files with 41 additions and 30 deletions

View file

@ -22,6 +22,8 @@ import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
public class CfgScannerConfigUtil { public class CfgScannerConfigUtil {
public static CfgInfoContext adjustPerRcTypeContext(CfgInfoContext context){ public static CfgInfoContext adjustPerRcTypeContext(CfgInfoContext context){
if(((Configuration)context.getConfiguration()).isPreference())
return context;
Tool tool = (Tool)context.getTool(); Tool tool = (Tool)context.getTool();
IResourceInfo rcInfo = context.getResourceInfo(); IResourceInfo rcInfo = context.getResourceInfo();
IInputType inType = context.getInputType(); IInputType inType = context.getInputType();

View file

@ -208,6 +208,8 @@ public class CfgScannerConfigInfoFactory2 {
} }
} }
} else { } else {
if(cfg.isPreference())
continue;
CfgInfoContext context = new CfgInfoContext(rcInfo, tool, null); CfgInfoContext context = new CfgInfoContext(rcInfo, tool, null);
context = CfgScannerConfigUtil.adjustPerRcTypeContext(context); context = CfgScannerConfigUtil.adjustPerRcTypeContext(context);
if(context != null && context.getResourceInfo() != null){ if(context != null && context.getResourceInfo() != null){
@ -304,7 +306,7 @@ public class CfgScannerConfigInfoFactory2 {
if(!isPerRcTypeDiscovery()) if(!isPerRcTypeDiscovery())
return true; return true;
return !CfgScannerConfigProfileManager.isPerFileProfile(profileId); return CfgScannerConfigProfileManager.isPerFileProfile(profileId);
} }
} }

View file

@ -311,6 +311,8 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
int pos = 0; int pos = 0;
String savedId = buildInfo.getSelectedProfileId(); String savedId = buildInfo.getSelectedProfileId();
ITool[] tools = null; ITool[] tools = null;
boolean needPerRcProfile = cbi.isPerRcTypeDiscovery();
if(!page.isForPrefs()) {
Tool tool = (Tool)iContext.getTool(); Tool tool = (Tool)iContext.getTool();
if(null == tool) { if(null == tool) {
IConfiguration conf = iContext.getConfiguration(); IConfiguration conf = iContext.getConfiguration();
@ -322,8 +324,9 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
} }
else else
tools = new ITool[] { tool }; tools = new ITool[] { tool };
}
for (String profileId : profilesList) { for (String profileId : profilesList) {
if(tools != null) {
boolean ok = false; boolean ok = false;
for(int i = 0; i < tools.length; ++i) { for(int i = 0; i < tools.length; ++i) {
IInputType[] inputTypes = ((Tool)tools[i]).getAllInputTypes(); IInputType[] inputTypes = ((Tool)tools[i]).getAllInputTypes();
@ -345,6 +348,10 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
} }
if (!ok) if (!ok)
continue; continue;
}
if (needPerRcProfile && !CfgScannerConfigProfileManager.isPerFileProfile(profileId))
continue;
visibleProfilesList.add(profileId); visibleProfilesList.add(profileId);
labels[counter] = profiles[counter] = getProfileName(profileId); labels[counter] = profiles[counter] = getProfileName(profileId);
if (profileId.equals(savedId)) if (profileId.equals(savedId))