1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

bug 319512: Missing type arguments on managedbuilder.core

This commit is contained in:
Andrew Gvozdev 2010-09-17 22:10:57 +00:00
parent 2b31fd592f
commit bc1f29a4fd

View file

@ -33,7 +33,7 @@ import org.eclipse.cdt.managedbuilder.internal.enablement.OptionEnablementExpres
public class BooleanExpressionApplicabilityCalculator implements IOptionApplicability { public class BooleanExpressionApplicabilityCalculator implements IOptionApplicability {
private OptionEnablementExpression fExpressions[]; private OptionEnablementExpression fExpressions[];
private Map fRefPropsMap; private Map<String, Set<String>> fRefPropsMap;
public BooleanExpressionApplicabilityCalculator(IManagedConfigElement optionElement){ public BooleanExpressionApplicabilityCalculator(IManagedConfigElement optionElement){
this(optionElement.getChildren(OptionEnablementExpression.NAME)); this(optionElement.getChildren(OptionEnablementExpression.NAME));
@ -195,9 +195,9 @@ public class BooleanExpressionApplicabilityCalculator implements IOptionApplicab
return adjusted; return adjusted;
} }
private Map getReferencedProperties(){ private Map<String, Set<String>> getReferencedProperties(){
if(fRefPropsMap == null){ if(fRefPropsMap == null){
fRefPropsMap = new HashMap(); fRefPropsMap = new HashMap<String, Set<String>>();
for(int i = 0; i < fExpressions.length; i++){ for(int i = 0; i < fExpressions.length; i++){
fExpressions[i].getReferencedProperties(fRefPropsMap); fExpressions[i].getReferencedProperties(fRefPropsMap);
@ -207,28 +207,28 @@ public class BooleanExpressionApplicabilityCalculator implements IOptionApplicab
} }
public boolean referesProperty(String id){ public boolean referesProperty(String id){
Map map = getReferencedProperties(); Map<String, Set<String>> map = getReferencedProperties();
return map.containsKey(id); return map.containsKey(id);
} }
public boolean referesPropertyValue(String propertyId, String valueId){ public boolean referesPropertyValue(String propertyId, String valueId){
Map map = getReferencedProperties(); Map<String, Set<String>> map = getReferencedProperties();
Set set = (Set)map.get(propertyId); Set<String> set = map.get(propertyId);
if(set != null) if(set != null)
return set.contains(valueId); return set.contains(valueId);
return false; return false;
} }
public String[] getReferencedPropertyIds(){ public String[] getReferencedPropertyIds(){
Map map = getReferencedProperties(); Map<String, Set<String>> map = getReferencedProperties();
return (String[])map.keySet().toArray(new String[map.size()]); return map.keySet().toArray(new String[map.size()]);
} }
public String[] getReferencedValueIds(String propertyId){ public String[] getReferencedValueIds(String propertyId){
Map map = getReferencedProperties(); Map<String, Set<String>> map = getReferencedProperties();
Set set = (Set)map.get(propertyId); Set<String> set = map.get(propertyId);
return (String[])set.toArray(new String[set.size()]); return set.toArray(new String[set.size()]);
} }
} }