From 0e84a0353a1b803569ddba24af9f27786ebcd035 Mon Sep 17 00:00:00 2001 From: jkuehner Date: Tue, 3 Sep 2019 18:59:39 +0200 Subject: [PATCH] support folding for xaml, fixes #1658 --- ILSpy/TextView/DecompilerTextView.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ILSpy/TextView/DecompilerTextView.cs b/ILSpy/TextView/DecompilerTextView.cs index 17a53d9dc..5751aedfc 100644 --- a/ILSpy/TextView/DecompilerTextView.cs +++ b/ILSpy/TextView/DecompilerTextView.cs @@ -428,6 +428,11 @@ namespace ICSharpCode.ILSpy.TextView foldingManager = FoldingManager.Install(textEditor.TextArea); foldingManager.UpdateFoldings(textOutput.Foldings.OrderBy(f => f.StartOffset), -1); Debug.WriteLine(" Updating folding: {0}", w.Elapsed); w.Restart(); + } else if (highlighting?.Name == "XML") { + foldingManager = FoldingManager.Install(textEditor.TextArea); + var foldingStrategy = new XmlFoldingStrategy(); + foldingStrategy.UpdateFoldings(foldingManager, textEditor.Document); + Debug.WriteLine(" Updating folding: {0}", w.Elapsed); w.Restart(); } } #endregion