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:
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 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();
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -311,40 +311,47 @@ 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;
|
||||||
Tool tool = (Tool)iContext.getTool();
|
boolean needPerRcProfile = cbi.isPerRcTypeDiscovery();
|
||||||
if(null == tool) {
|
if(!page.isForPrefs()) {
|
||||||
IConfiguration conf = iContext.getConfiguration();
|
Tool tool = (Tool)iContext.getTool();
|
||||||
if(null != conf) {
|
if(null == tool) {
|
||||||
tools = conf.getToolChain().getTools();
|
IConfiguration conf = iContext.getConfiguration();
|
||||||
|
if(null != conf) {
|
||||||
|
tools = conf.getToolChain().getTools();
|
||||||
|
}
|
||||||
|
if(null == tools)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if(null == tools)
|
else
|
||||||
return;
|
tools = new ITool[] { tool };
|
||||||
}
|
}
|
||||||
else
|
|
||||||
tools = new ITool[] { tool };
|
|
||||||
|
|
||||||
for (String profileId : profilesList) {
|
for (String profileId : profilesList) {
|
||||||
boolean ok = false;
|
if(tools != null) {
|
||||||
for(int i = 0; i < tools.length; ++i) {
|
boolean ok = false;
|
||||||
IInputType[] inputTypes = ((Tool)tools[i]).getAllInputTypes();
|
for(int i = 0; i < tools.length; ++i) {
|
||||||
if(null != inputTypes) {
|
IInputType[] inputTypes = ((Tool)tools[i]).getAllInputTypes();
|
||||||
for(IInputType it : inputTypes) {
|
if(null != inputTypes) {
|
||||||
String[] requiedProfiles = getDiscoveryProfileIds(tools[i], it);
|
for(IInputType it : inputTypes) {
|
||||||
if(null != requiedProfiles) {
|
String[] requiedProfiles = getDiscoveryProfileIds(tools[i], it);
|
||||||
for(String requiredProfile : requiedProfiles) {
|
if(null != requiedProfiles) {
|
||||||
if(profileId.equals(requiredProfile)) {
|
for(String requiredProfile : requiedProfiles) {
|
||||||
ok = true;
|
if(profileId.equals(requiredProfile)) {
|
||||||
break;
|
ok = true;
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if(ok)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(ok)
|
if (!ok)
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
if(!ok)
|
if (needPerRcProfile && !CfgScannerConfigProfileManager.isPerFileProfile(profileId))
|
||||||
continue;
|
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))
|
||||||
|
|
Loading…
Add table
Reference in a new issue