private IDocumentedValueProvider createPropertyNameValueProvider()

in org.apache.easyant4e/src/org/apache/easyant4e/ivyde/extension/model/EasyAntModuleDescriptorExtension.java [251:279]


    private IDocumentedValueProvider createPropertyNameValueProvider() {
        IDocumentedValueProvider propertyNameValueProvider = new IDocumentedValueProvider() {
            public String[] getValuesfor(IvyTagAttribute att, IvyFile ivyFile) {
                String buildType = getBuildType(ivyFile);
                if (buildType != null) {
                    List<PropertyDescriptor> propertyDescriptors = easyantCoreService.getPropertiesForBuildType(buildType);
                    String[] names = new String[propertyDescriptors.size()];
                    int i = 0;
                    for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
                        names[i] = propertyDescriptor.getName();
                        i++;
                    }
                    return names;
                }
                return new String[] {};
            }
            public String getDocForValue(String value, IvyFile ivyFile) {
                String buildType = getBuildType(ivyFile);
                if(buildType!=null){
                    PropertyDescriptor propertyDescriptor = getPropertyDescriptor(buildType, value);
                    if(propertyDescriptor!=null){
                        return propertyDescriptor.getDescription();
                    }
                }
                return null;
            }
        };
        return propertyNameValueProvider;
    }