From 080f1697e97e13461ec6df4d31c8924d01257a1b Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 9 Apr 2019 01:47:48 +0300 Subject: MERGE --- .../Highlighting/IHighlighter.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/IHighlighter.cs (limited to 'Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/IHighlighter.cs') diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/IHighlighter.cs b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/IHighlighter.cs new file mode 100644 index 000000000..1b5cab138 --- /dev/null +++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/IHighlighter.cs @@ -0,0 +1,35 @@ +// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) +// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) + +using System; +using Tango.Scripting.Editors.Document; +using Tango.Scripting.Editors.Utils; + +namespace Tango.Scripting.Editors.Highlighting +{ + /// + /// Represents a highlighted document. + /// + /// This interface is used by the to register the highlighter as a TextView service. + public interface IHighlighter + { + /// + /// Gets the underlying text document. + /// + TextDocument Document { get; } + + /// + /// Gets the span stack at the end of the specified line. + /// -> GetSpanStack(1) returns the spans at the start of the second line. + /// + /// GetSpanStack(0) is valid and will always return the empty stack. + ImmutableStack GetSpanStack(int lineNumber); + + /// + /// Highlights the specified document line. + /// + /// The line to highlight. + /// A line object that represents the highlighted sections. + HighlightedLine HighlightLine(int lineNumber); + } +} -- cgit v1.3.1