/// <summary>
        /// Create <see cref="NewFolding"/>s for the specified document and updates the folding manager with them.
        /// </summary>
        public void UpdateFoldings(FoldingManager manager, TextDocument document)
        {
            int first_error_offset;
            var foldings = CreateNewFoldings(document, out first_error_offset);

            manager.UpdateFoldings(foldings, first_error_offset);
        }
Esempio n. 2
0
        /// <summary>
        /// Create <see cref="NewFolding"/>s for the specified document and updates the folding manager with them.
        /// </summary>
        public void UpdateFoldings(FoldingManager manager, TextDocument document)
        {
            int firstErrorOffset;
            IEnumerable <NewFolding> foldings = CreateNewFoldings(document, out firstErrorOffset);

            manager.UpdateFoldings(foldings, firstErrorOffset);
        }
Esempio n. 3
0
        public void UpdateFoldings(FoldingManager manager, TextDocument document, AbstractFoldingStrategy chained)
        {
            int firstErrorOffset;
            IEnumerable <NewFolding> foldings = CreateNewFoldings(document, out firstErrorOffset,
                                                                  chained.CreateNewFoldings(document, out firstErrorOffset));

            manager.UpdateFoldings(foldings, firstErrorOffset);
        }
Esempio n. 4
0
        public void UpdateFoldings(FoldingManager manager, ITextSource document)
        {
            if (manager == null)
                throw new ArgumentNullException("manager");

            int firstErrorOffset;
            IEnumerable<NewFolding> newFoldings = CreateNewFoldings(document, out firstErrorOffset);
            manager.UpdateFoldings(newFoldings, firstErrorOffset);
        }
        public void UpdateFoldings(FoldingManager foldingManager, TextDocument textDocument)
        {
            // Clear foldings if the list isn't empty.
            if (this.foldings.Foldings.Count > 0)
            {
                this.foldings.Foldings.Clear();
            }

            CreateNewFoldings(textDocument);
            foldingManager.UpdateFoldings(this.foldings.Foldings, this.foldings.FirstErrorOffset);
        }
 /// <summary>
 /// Create <see cref="NewFolding"/>s for the specified document and updates the folding manager with them.
 /// </summary>
 public void UpdateFoldings(FoldingManager manager, TextDocument document)
 {
   int firstErrorOffset;
   IEnumerable<NewFolding> foldings = _strategy.CreateNewFoldings(document, out firstErrorOffset);
   var errors = foldings.Where(f => f.StartOffset < 0 || f.EndOffset > document.TextLength).ToArray();
   manager.UpdateFoldings(foldings, firstErrorOffset);
 }
Esempio n. 7
0
 /// <summary>
 /// Create <see cref="NewFolding"/>s for the specified document and updates the folding manager with them.
 /// </summary>
 public void UpdateFoldings(FoldingManager manager, TextDocument document)
 {
     int firstErrorOffset;
     var foldings = CreateNewFoldings(document, out firstErrorOffset);
     manager.UpdateFoldings(foldings, firstErrorOffset);
 }
		public void UpdateFoldings(FoldingManager manager, TextDocument document)
		{
			int firstErrorOffset;
			IEnumerable<NewFolding> newFoldings = CreateNewFoldings(document, out firstErrorOffset);
			manager.UpdateFoldings(newFoldings, firstErrorOffset);
		}
Esempio n. 9
0
 public void UpdateFoldings(FoldingManager manager, TextDocument document) {
     manager.UpdateFoldings(CreateNewFoldings(document), 0);
 }
 public void UpdateFoldings(FoldingManager manager, TextDocument document)
 {
     var newFoldings = CreateNewFoldings(document).OrderBy(x => x.StartOffset);
     int firstErrorOffset = -1;
     manager.UpdateFoldings(newFoldings, firstErrorOffset);
 }
Esempio n. 11
0
 public void UpdateFoldings(FoldingManager manager, ICSharpCode.AvalonEdit.Document.TextDocument document)
 {
     int firstErrorOffset;
     IEnumerable<NewFolding> newFoldings = CreateNewFoldings(document, out firstErrorOffset);
     manager.UpdateFoldings(newFoldings, firstErrorOffset);
 }