Browse Source

Remove unused code from ReferenceElementGenerator

pull/2030/head
Siegfried Pammer 5 years ago
parent
commit
e18dc00ceb
  1. 2
      ILSpy/TextView/DecompilerTextView.cs
  2. 11
      ILSpy/TextView/ReferenceElementGenerator.cs

2
ILSpy/TextView/DecompilerTextView.cs

@ -116,7 +116,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -116,7 +116,7 @@ namespace ICSharpCode.ILSpy.TextView
InitializeComponent();
this.referenceElementGenerator = new ReferenceElementGenerator(this.JumpToReference, this.IsLink);
this.referenceElementGenerator = new ReferenceElementGenerator(this.IsLink);
textEditor.TextArea.TextView.ElementGenerators.Add(referenceElementGenerator);
this.uiElementGenerator = new UIElementGenerator();
this.bracketHighlightRenderer = new BracketHighlightRenderer(textEditor.TextArea.TextView);

11
ILSpy/TextView/ReferenceElementGenerator.cs

@ -28,7 +28,6 @@ namespace ICSharpCode.ILSpy.TextView @@ -28,7 +28,6 @@ namespace ICSharpCode.ILSpy.TextView
/// </summary>
sealed class ReferenceElementGenerator : VisualLineElementGenerator
{
readonly Action<ReferenceSegment> referenceClicked;
readonly Predicate<ReferenceSegment> isLink;
/// <summary>
@ -36,13 +35,10 @@ namespace ICSharpCode.ILSpy.TextView @@ -36,13 +35,10 @@ namespace ICSharpCode.ILSpy.TextView
/// </summary>
public TextSegmentCollection<ReferenceSegment> References { get; set; }
public ReferenceElementGenerator(Action<ReferenceSegment> referenceClicked, Predicate<ReferenceSegment> isLink)
public ReferenceElementGenerator(Predicate<ReferenceSegment> isLink)
{
if (referenceClicked == null)
throw new ArgumentNullException(nameof(referenceClicked));
if (isLink == null)
throw new ArgumentNullException(nameof(isLink));
this.referenceClicked = referenceClicked;
this.isLink = isLink;
}
@ -72,11 +68,6 @@ namespace ICSharpCode.ILSpy.TextView @@ -72,11 +68,6 @@ namespace ICSharpCode.ILSpy.TextView
}
return null;
}
internal void JumpToReference(ReferenceSegment referenceSegment)
{
referenceClicked(referenceSegment);
}
}
/// <summary>

Loading…
Cancel
Save