private IEnumerable<ICompletionValue> GetPropertyValues(ICompletionContext context, ICssSchema schema) { var property = context.Current as PropertyDeclaration; if (property == null || property.Name == null || !IsPlainPropertyName(property.Name)) return NO_RESULTS; // right now we just grab full text since we only support plain ol' properties. // in the future may support evaluating #{$name}-left style properties var propertyName = context.DocumentTextProvider.GetText(property.Name.Start, property.Name.Length); return schema.GetPropertyValues(propertyName).Select(x => new PropertyValueCompletionValue(x.Name, x.Description)); }
public CssSchemaManager(ICssSchemaLoader loader) { Loader = loader; Schema = loader.Load(); }
public IEnumerable <ICompletionValue> GetPropertyNames(ICompletionContext context, ICssSchema schema) { var prefix = ResolvePrefix(context); return(schema.GetProperties(prefix).Select(x => new PropertyNameCompletionValue(x.Name, x.Description))); }
private IEnumerable <ICompletionValue> GetPropertyValues(ICompletionContext context, ICssSchema schema) { var property = context.Current as PropertyDeclaration; if (property == null || property.Name == null || !IsPlainPropertyName(property.Name)) { return(NO_RESULTS); } // right now we just grab full text since we only support plain ol' properties. // in the future may support evaluating #{$name}-left style properties var propertyName = context.DocumentTextProvider.GetText(property.Name.Start, property.Name.Length); return(schema.GetPropertyValues(propertyName).Select(x => new PropertyValueCompletionValue(x.Name, x.Description))); }
public IEnumerable<ICompletionValue> GetPropertyNames(ICompletionContext context, ICssSchema schema) { var prefix = ResolvePrefix(context); return schema.GetProperties(prefix).Select(x => new PropertyNameCompletionValue(x.Name, x.Description)); }