From fddeb6c585b773c00b77f4caa5971810463074ad Mon Sep 17 00:00:00 2001 From: Marcel Wagner Date: Fri, 25 Aug 2023 20:42:44 +0200 Subject: [PATCH] Cleanup unused textviewfactory --- src/IndentRainbow.Extension/Classification/Indent.cs | 2 +- .../Classification/IndentTextViewCreationListener.cs | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/IndentRainbow.Extension/Classification/Indent.cs b/src/IndentRainbow.Extension/Classification/Indent.cs index 4fa6005..1290370 100644 --- a/src/IndentRainbow.Extension/Classification/Indent.cs +++ b/src/IndentRainbow.Extension/Classification/Indent.cs @@ -53,7 +53,7 @@ public sealed class Indent /// Text view to create the adornment for //Ignoring warning since this adornment is always on UI thread #pragma warning disable VSTHRD010 - public Indent(IWpfTextView view, ITextDocumentFactoryService textDocumentFactory) + public Indent(IWpfTextView view) { if (view == null) { diff --git a/src/IndentRainbow.Extension/Classification/IndentTextViewCreationListener.cs b/src/IndentRainbow.Extension/Classification/IndentTextViewCreationListener.cs index 3709e7f..fc35092 100644 --- a/src/IndentRainbow.Extension/Classification/IndentTextViewCreationListener.cs +++ b/src/IndentRainbow.Extension/Classification/IndentTextViewCreationListener.cs @@ -29,12 +29,6 @@ internal sealed class IndentTextViewCreationListener : IWpfTextViewCreationListe #pragma warning restore 649, 169 - /// - /// The text document factory that will be used to determine the file name of the text editor, the indent extension is currently processing - /// - [Import] - public ITextDocumentFactoryService TextDocumentFactory { get; set; } - #region IWpfTextViewCreationListener /// @@ -47,7 +41,7 @@ public void TextViewCreated(IWpfTextView textView) // The adornment will listen to any event that changes the layout (text changes, scrolling, etc) // When we created the adornment,we don't need a reference anymore, since everything necessary is done when the object is created #pragma warning disable CA1806 // Do not ignore method results - new Indent(textView, TextDocumentFactory); + new Indent(textView); #pragma warning restore CA1806 // Do not ignore method results }