Esempio n. 1
0
        public CompletionWindowItem(CompletionItemType type, string owner, string text, string description)
        {
            Owner = owner;
            Text = text;
            Type = type;
            Priority = 0;

            switch (type)
            {
                case CompletionItemType.Object:
                    Image = Theme.Instance.ObjectIcon;
                    break;

                case CompletionItemType.Function:
                    Image = Theme.Instance.FunctionIcon;
                    break;

                case CompletionItemType.Snippet:
                    Image = Theme.Instance.SnippetIcon;
                    break;
            }

            Content = text; // use this property for fancy UI

            if (!description.IsBlank())
                Description = description;
        }
Esempio n. 2
0
 public CompletionItem(string label, string text, CompletionItemType type, int?start = null, int?length = null)
 {
     Label  = label;
     Text   = text;
     Type   = type;
     Start  = start;
     Length = length;
 }
Esempio n. 3
0
 public IdentifierMatch(CompletionItemType type, ScopeRange scope, int offset, string name, string expression, Type inferenceType)
 {
     Type = type;
     Name = name;
     Expression = expression;
     Offset = offset;
     Scope = scope;
     InferenceType = inferenceType;
 }
Esempio n. 4
0
 /// <nodoc />
 public Property(string name, object value, CompletionItemType kind = CompletionItemType.property)
 {
     Name          = name;
     m_valueAsLazy = value as Lazy <object> ?? Lazy.Create(() => value);
     Kind          = kind;
 }
Esempio n. 5
0
 /// <nodoc />
 public Property(string name, Lazy <object> lazyValue, CompletionItemType kind = CompletionItemType.property)
 {
     Name          = name;
     m_valueAsLazy = lazyValue;
     Kind          = kind;
 }
Esempio n. 6
0
 /// <nodoc />
 public Property(string name, Func <object> factory, CompletionItemType kind = CompletionItemType.property)
     : this(name, Lazy.Create(factory), kind)
 {
 }
Esempio n. 7
0
 /// <nodoc />
 public Property(string name, object value, CompletionItemType kind = CompletionItemType.property)
     : this(name, Preload(Lazy.Create(() => value)), kind)
 {
 }
Esempio n. 8
0
 public AutoCompleteItem(CompletionItemType type, string text, string description)
     : base(type, COMPLETION_OWNER_NAME, text, description)
 {
 }