mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
[268528] Discovery profile options panel doesn't show since 5.0.2 up
This commit is contained in:
parent
4d246d8477
commit
97bb50f277
3 changed files with 41 additions and 30 deletions
|
@ -22,6 +22,8 @@ import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
|||
|
||||
public class CfgScannerConfigUtil {
|
||||
public static CfgInfoContext adjustPerRcTypeContext(CfgInfoContext context){
|
||||
if(((Configuration)context.getConfiguration()).isPreference())
|
||||
return context;
|
||||
Tool tool = (Tool)context.getTool();
|
||||
IResourceInfo rcInfo = context.getResourceInfo();
|
||||
IInputType inType = context.getInputType();
|
||||
|
|
|
@ -208,6 +208,8 @@ public class CfgScannerConfigInfoFactory2 {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if(cfg.isPreference())
|
||||
continue;
|
||||
CfgInfoContext context = new CfgInfoContext(rcInfo, tool, null);
|
||||
context = CfgScannerConfigUtil.adjustPerRcTypeContext(context);
|
||||
if(context != null && context.getResourceInfo() != null){
|
||||
|
@ -304,7 +306,7 @@ public class CfgScannerConfigInfoFactory2 {
|
|||
if(!isPerRcTypeDiscovery())
|
||||
return true;
|
||||
|
||||
return !CfgScannerConfigProfileManager.isPerFileProfile(profileId);
|
||||
return CfgScannerConfigProfileManager.isPerFileProfile(profileId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -311,6 +311,8 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
int pos = 0;
|
||||
String savedId = buildInfo.getSelectedProfileId();
|
||||
ITool[] tools = null;
|
||||
boolean needPerRcProfile = cbi.isPerRcTypeDiscovery();
|
||||
if(!page.isForPrefs()) {
|
||||
Tool tool = (Tool)iContext.getTool();
|
||||
if(null == tool) {
|
||||
IConfiguration conf = iContext.getConfiguration();
|
||||
|
@ -322,8 +324,9 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
}
|
||||
else
|
||||
tools = new ITool[] { tool };
|
||||
|
||||
}
|
||||
for (String profileId : profilesList) {
|
||||
if(tools != null) {
|
||||
boolean ok = false;
|
||||
for(int i = 0; i < tools.length; ++i) {
|
||||
IInputType[] inputTypes = ((Tool)tools[i]).getAllInputTypes();
|
||||
|
@ -345,6 +348,10 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
}
|
||||
if (!ok)
|
||||
continue;
|
||||
}
|
||||
if (needPerRcProfile && !CfgScannerConfigProfileManager.isPerFileProfile(profileId))
|
||||
continue;
|
||||
|
||||
visibleProfilesList.add(profileId);
|
||||
labels[counter] = profiles[counter] = getProfileName(profileId);
|
||||
if (profileId.equals(savedId))
|
||||
|
|
Loading…
Add table
Reference in a new issue