1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-01 21:35:40 +02:00

Additional tool-chain modification functionality fixes

This commit is contained in:
Mikhail Sennikovsky 2007-03-29 12:58:02 +00:00
parent 262ae4ab03
commit 67c67be19e

View file

@ -527,7 +527,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
return map; return map;
} }
private void checkPropertiesModificationCompatibility(IBuildPropertiesRestriction r, Map unspecifiedRequiredProps, Map unspecifiedProps, Set undefinedSet){ private boolean checkPropertiesModificationCompatibility(IBuildPropertiesRestriction r, Map unspecifiedRequiredProps, Map unspecifiedProps, Set undefinedSet){
IBuildObjectProperties props = null; IBuildObjectProperties props = null;
IConfiguration cfg = getParent(); IConfiguration cfg = getParent();
if(cfg != null){ if(cfg != null){
@ -537,7 +537,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
unspecifiedProps.clear(); unspecifiedProps.clear();
unspecifiedRequiredProps.clear(); unspecifiedRequiredProps.clear();
if(props != null){ if(props != null && props.getSupportedTypeIds().length != 0){
String[] requiredIds = props.getRequiredTypeIds(); String[] requiredIds = props.getRequiredTypeIds();
IBuildPropertyType[] supportedTypes = props.getSupportedTypes(); IBuildPropertyType[] supportedTypes = props.getSupportedTypes();
@ -550,7 +550,9 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
Map propsMap = propsToMap(ps); Map propsMap = propsToMap(ps);
getUnsupportedProperties(propsMap, r, unspecifiedProps, undefinedSet); getUnsupportedProperties(propsMap, r, unspecifiedProps, undefinedSet);
} }
return unspecifiedRequiredProps.size() == 0;
} }
return false;
} }
private void getUnsupportedProperties(Map props, IBuildPropertiesRestriction restriction, Map unsupported, Set inexistent){ private void getUnsupportedProperties(Map props, IBuildPropertiesRestriction restriction, Map unsupported, Set inexistent){
@ -650,16 +652,15 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
checkPropertiesModificationCompatibility(r, unspecifiedRequiredProps, unspecifiedProps, undefinedSet); checkPropertiesModificationCompatibility(r, unspecifiedRequiredProps, unspecifiedProps, undefinedSet);
} }
public void checkPropertiesModificationCompatibility(IToolChain tc, Map unspecifiedRequiredProps, Map unspecifiedProps, Set undefinedSet){ public boolean checkPropertiesModificationCompatibility(IToolChain tc, Map unspecifiedRequiredProps, Map unspecifiedProps, Set undefinedSet){
checkPropertiesModificationCompatibility((IBuildPropertiesRestriction)tc, unspecifiedRequiredProps, unspecifiedProps, undefinedSet); return checkPropertiesModificationCompatibility((IBuildPropertiesRestriction)tc, unspecifiedRequiredProps, unspecifiedProps, undefinedSet);
} }
public boolean isPropertiesModificationCompatible(IToolChain tc){ public boolean isPropertiesModificationCompatible(IToolChain tc){
Map requiredMap = new HashMap(); Map requiredMap = new HashMap();
Map unsupportedMap = new HashMap(); Map unsupportedMap = new HashMap();
Set undefinedSet = new HashSet(); Set undefinedSet = new HashSet();
checkPropertiesModificationCompatibility(tc, requiredMap, unsupportedMap, undefinedSet); if(!checkPropertiesModificationCompatibility(tc, requiredMap, unsupportedMap, undefinedSet))
if(requiredMap.size() != 0)
return false; return false;
return true; return true;