Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 public CssSchemaManager(ICssSchemaLoader loader)
 {
     Loader = loader;
     Schema = loader.Load();
 }
Esempio n. 3
0
 public CssSchemaManager(ICssSchemaLoader loader)
 {
     Loader = loader;
     Schema = loader.Load();
 }
Esempio n. 4
0
        public IEnumerable <ICompletionValue> GetPropertyNames(ICompletionContext context, ICssSchema schema)
        {
            var prefix = ResolvePrefix(context);

            return(schema.GetProperties(prefix).Select(x => new PropertyNameCompletionValue(x.Name, x.Description)));
        }
Esempio n. 5
0
        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)));
        }
Esempio n. 6
0
        public IEnumerable<ICompletionValue> GetPropertyNames(ICompletionContext context, ICssSchema schema)
        {
            var prefix = ResolvePrefix(context);

            return schema.GetProperties(prefix).Select(x => new PropertyNameCompletionValue(x.Name, x.Description));
        }