예제 #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));
        }
예제 #2
0
 public CssSchemaManager(ICssSchemaLoader loader)
 {
     Loader = loader;
     Schema = loader.Load();
 }
예제 #3
0
 public CssSchemaManager(ICssSchemaLoader loader)
 {
     Loader = loader;
     Schema = loader.Load();
 }
예제 #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)));
        }
예제 #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)));
        }
예제 #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));
        }