public SassCompletionSource(ISassEditor editor, IIntellisenseManager intellisenseManager, ICompletionCompiler compiler, ITextStructureNavigatorSelectorService textNavigator)
 {
     Editor = editor;
     Cache = intellisenseManager.Get(editor.Document);
     IntellisenseManager = intellisenseManager;
     Compiler = compiler;
     TextNavigator = textNavigator;
 }
Example #2
0
 public SassCompletionSource(ISassEditor editor, IIntellisenseManager intellisenseManager, ICompletionCompiler compiler, ITextStructureNavigatorSelectorService textNavigator)
 {
     Editor = editor;
     Cache  = intellisenseManager.Get(editor.Document);
     IntellisenseManager = intellisenseManager;
     Compiler            = compiler;
     TextNavigator       = textNavigator;
 }
Example #3
0
        public SassEditor(ITextBuffer buffer, ISassDocument document, IIntellisenseCache cache, IForegroundParsingTask parsingTask)
        {
            Buffer = buffer;
            Cache = cache;
            _Document = document;
            ParsingTask = parsingTask;

            Buffer.ChangedLowPriority += OnBufferChanged;

            if (document.Stylesheet == null)
                document.StylesheetChanged += OnInitialStylesheetChange;
        }
Example #4
0
 private void UpdateCache(IIntellisenseCache cache, ISassDocument document)
 {
     try
     {
         var manager = new FileTextManager(document.Source);
         using (var scope = manager.Open())
             cache.Update(document.Stylesheet, scope.Text);
     }
     catch (Exception ex)
     {
         Logger.Log(ex, "Failed to update intellisense cache.");
     }
 }
        public DotnetIntellisenseProvider(IFallbackService fallback)
        {
            this.fallback = fallback ?? throw new ArgumentNullException(nameof(fallback));
            cache         = new IntellisenseCache();

            commandsToCache = new HashSet <string>(
                new string[] {
                "dotnet ", "dotnet clean ", "dotnet restore ", "dotnet build ",
                "dotnet msbuild ", "dotnet build-server ", "dotnet run ",
                "dotnet test ", "dotnet vstest ",
                "dotnet pack ", "dotnet publish "
            },
                StringComparer.OrdinalIgnoreCase);
        }
Example #6
0
        public SassEditor(ITextBuffer buffer, ISassDocument document, IIntellisenseCache cache, IForegroundParsingTask parsingTask)
        {
            Buffer      = buffer;
            Cache       = cache;
            _Document   = document;
            ParsingTask = parsingTask;

            Buffer.ChangedLowPriority += OnBufferChanged;

            if (document.Stylesheet == null)
            {
                document.StylesheetChanged += OnInitialStylesheetChange;
            }
        }
Example #7
0
 public ImportContainer(ParseItem source, IIntellisenseCache cache)
 {
     Cache = cache;
     Start = source.Start;
     End   = source.End;
 }
Example #8
0
 public ImportContainer(ParseItem source, IIntellisenseCache cache)
 {
     Cache = cache;
     Start = source.Start;
     End = source.End;
 }
 private void UpdateCache(IIntellisenseCache cache, ISassDocument document)
 {
     try
     {
         var manager = new FileTextManager(document.Source);
         using (var scope = manager.Open())
             cache.Update(document.Stylesheet, scope.Text);
     }
     catch (Exception ex)
     {
         Logger.Log(ex, "Failed to update intellisense cache.");
     }
 }