1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

1. Fix use of getTools to getFilteredTools in property page handling

2. Don not display projects/configs with convertToId set in user selections
This commit is contained in:
Leo Treggiari 2005-11-17 14:23:39 +00:00
parent e2ab8aa66b
commit 40523aeb92
3 changed files with 27 additions and 5 deletions

View file

@ -752,7 +752,7 @@ public class ToolsSettingsBlock extends AbstractCOptionPage {
IToolChain tc = cfg.getToolChain();
saveHoldsOptions(tc);
ITool tools[] = tc.getTools();
ITool tools[] = cfg.getFilteredTools();
for(int i = 0; i < tools.length; i++){
saveHoldsOptions(tools[i]);
}

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
import org.eclipse.cdt.managedbuilder.core.IProjectType;
import org.eclipse.cdt.managedbuilder.core.IManagedProject;
import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import java.util.ArrayList;
@ -348,11 +349,19 @@ public class NewConfigurationDialog extends StatusDialog {
defaultConfigs = cfgs;
else {
ArrayList list = new ArrayList();
for (int i = 0; i < cfgs.length; i++){
if(cfgs[i].isSupported())
for (int i = 0; i < cfgs.length; i++) {
if (cfgs[i].isSupported()) {
IToolChain tc = cfgs[i].getToolChain();
// Determine if the tool-chain has 'convertToId' attribute.
// If so, do not add this configuration to the list.
if (!tc.getConvertToId().equals(""))
continue;
list.add(cfgs[i]);
}
}
defaultConfigs = (IConfiguration[])list.toArray(new IConfiguration[list.size()]);
defaultConfigs = (IConfiguration[]) list
.toArray(new IConfiguration[list.size()]);
}
if(defaultConfigs.length != 0){

View file

@ -394,9 +394,15 @@ public class CProjectPlatformPage extends WizardPage {
for (int i = 0; i < cfgs.length; i++) {
// First, filter on supported state
if (cfgs[i].isSupported()) {
IToolChain tc = cfgs[i].getToolChain();
// Determine if the tool-chain has 'convertToId' attribute, If so
// do not add this configuration to the list.
if (!tc.getConvertToId().equals(""))
continue;
// Now, apply the OS and ARCH filters to determine if the configuration should be shown
// Determine if the configuration's tool-chain supports this OS & Architecture.
IToolChain tc = cfgs[i].getToolChain();
List osList = Arrays.asList(tc.getOSList());
if (osList.contains("all") || osList.contains(os)) { //$NON-NLS-1$
List archList = Arrays.asList(tc.getArchList());
@ -439,6 +445,13 @@ public class CProjectPlatformPage extends WizardPage {
for (int index = 0; index < allProjectTypes.length; ++index) {
IProjectType type = allProjectTypes[index];
if (!type.isAbstract() && !type.isTestProjectType()) {
// As we do not want to display the unsupported project types
// that has 'convertToId' attribute, check if project type has
// 'convertToId' attribute. If so, then do not add it to the list.
if (!type.getConvertToId().equals(""))
continue;
// If the check box is selected show all the targets
if (showAllProjTypes != null && showAllProjTypes.getSelection() == true) {
projectTypes.add(type);