// 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 System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using Tango.Scripting.Editors.Document;
using Tango.Scripting.Editors.Utils;
namespace Tango.Scripting.Editors.Highlighting
{
/// <summary>
/// Represents a highlighted document line.
/// </summary>
public class HighlightedLine
{
/// <summary>
/// Creates a new HighlightedLine instance.
/// </summary>
public HighlightedLine(TextDocument document, DocumentLine documentLine)
{
if (document == null)
throw new ArgumentNullException("document");
if (!document.Lines.Contains(documentLine))
throw new ArgumentException("Line is null or not part of document");
this.Document = document;
this.DocumentLine = documentLine;
this.Sections = new NullSafeCollection<HighlightedSection>();
}
/// <summary>
/// Gets the document associated with this HighlightedLine.
/// </summary>
public TextDocument Document { get; private set; }
/// <summary>
/// Gets the document line associated with this HighlightedLine.
/// </summary>
public