示例#1
0
 private void RegisterTag(IPythonProjectEntry entry, Dictionary<string, TagInfo> tags, string name, string documentation = null) {
     TagInfo tag;
     if (!tags.TryGetValue(name, out tag) || (String.IsNullOrWhiteSpace(tag.Documentation) && !String.IsNullOrEmpty(documentation))) {
         tags[name] = tag = new TagInfo(documentation, entry);
         if (entry != null && _hookedEntries.Add(entry)) {
             entry.OnNewParseTree += OnNewParseTree;
         }
     }
 }
示例#2
0
 public DjangoAnalyzer(IServiceProvider serviceProvider) {
     _serviceProvider = serviceProvider;
     foreach (var tagName in DjangoCompletionSource._nestedEndTags) {
         _tags[tagName] = new TagInfo("", null);
     }
 }
 public TestCompletionContext(string[] variables, string[] filters) {
     _variables = new Dictionary<string, HashSet<AnalysisValue>>();
     _filters = new Dictionary<string, TagInfo>();
     foreach (var variable in variables) {
         _variables[variable] = new HashSet<AnalysisValue>();
     }
     foreach (var filter in filters) {
         _filters[filter] = new TagInfo("", null);
     }
 }