Search in sources :

Example 1 with ValueProviderStrategy

use of org.springframework.ide.vscode.boot.metadata.ValueProviderRegistry.ValueProviderStrategy in project sts4 by spring-projects.

the class TypeUtil method getHintValues.

public Collection<StsValueHint> getHintValues(Type type, String query, EnumCaseMode enumCaseMode) {
    if (type != null) {
        Collection<StsValueHint> allowed = getAllowedValues(type, enumCaseMode);
        if (allowed != null) {
            return allowed;
        }
        ValueProviderStrategy valueHinter = VALUE_HINTERS.get(type.getErasure());
        if (valueHinter != null) {
            return valueHinter.getValuesNow(javaProject, query);
        }
    }
    return null;
}
Also used : ValueProviderStrategy(org.springframework.ide.vscode.boot.metadata.ValueProviderRegistry.ValueProviderStrategy) StsValueHint(org.springframework.ide.vscode.boot.metadata.hints.StsValueHint)

Aggregations

ValueProviderStrategy (org.springframework.ide.vscode.boot.metadata.ValueProviderRegistry.ValueProviderStrategy)1 StsValueHint (org.springframework.ide.vscode.boot.metadata.hints.StsValueHint)1