本文整理汇总了C#中ICSharpCode.AvalonEdit.Folding.FoldingManager.UpdateFoldings方法的典型用法代码示例。如果您正苦于以下问题:C# FoldingManager.UpdateFoldings方法的具体用法?C# FoldingManager.UpdateFoldings怎么用?C# FoldingManager.UpdateFoldings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.AvalonEdit.Folding.FoldingManager
的用法示例。
在下文中一共展示了FoldingManager.UpdateFoldings方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateFoldings
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);
}
示例2: UpdateFoldings
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);
}
示例3: UpdateFoldings
/// <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);
}
示例4: UpdateFoldings
/// <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);
}
示例5: UpdateFoldings
public void UpdateFoldings(FoldingManager manager, TextDocument document)
{
int firstErrorOffset;
IEnumerable<NewFolding> newFoldings = CreateNewFoldings(document, out firstErrorOffset);
manager.UpdateFoldings(newFoldings, firstErrorOffset);
}
示例6: UpdateFoldings
public void UpdateFoldings(FoldingManager manager, TextDocument document) {
manager.UpdateFoldings(CreateNewFoldings(document), 0);
}
示例7: UpdateFoldings
public void UpdateFoldings(FoldingManager manager, TextDocument document)
{
var newFoldings = CreateNewFoldings(document).OrderBy(x => x.StartOffset);
int firstErrorOffset = -1;
manager.UpdateFoldings(newFoldings, firstErrorOffset);
}
示例8: UpdateFoldings
public void UpdateFoldings(FoldingManager manager, ICSharpCode.AvalonEdit.Document.TextDocument document)
{
int firstErrorOffset;
IEnumerable<NewFolding> newFoldings = CreateNewFoldings(document, out firstErrorOffset);
manager.UpdateFoldings(newFoldings, firstErrorOffset);
}