Browse Source

Add bookmark markers (red/yellow).

pull/191/merge
Eusebiu Marcu 15 years ago
parent
commit
a1eab6c5c1
  1. 126
      Debugger/ILSpy.Debugger/AvalonEdit/ITextMarker.cs
  2. 6
      Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs
  3. 309
      Debugger/ILSpy.Debugger/AvalonEdit/TextMarkerService.cs
  4. 12
      Debugger/ILSpy.Debugger/Bookmarks/BreakpointBookmark.cs
  5. 30
      Debugger/ILSpy.Debugger/Bookmarks/CurrentLineBookmark.cs
  6. 38
      Debugger/ILSpy.Debugger/Bookmarks/MarkerBookmark.cs
  7. 3
      Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj
  8. 7
      ILSpy/TextView/DecompilerTextView.cs

126
Debugger/ILSpy.Debugger/AvalonEdit/ITextMarker.cs

@ -0,0 +1,126 @@
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Windows.Media;
namespace ILSpy.Debugger.AvalonEdit
{
/// <summary>
/// Represents a text marker.
/// </summary>
public interface ITextMarker
{
/// <summary>
/// Gets the start offset of the marked text region.
/// </summary>
int StartOffset { get; }
/// <summary>
/// Gets the end offset of the marked text region.
/// </summary>
int EndOffset { get; }
/// <summary>
/// Gets the length of the marked region.
/// </summary>
int Length { get; }
/// <summary>
/// Deletes the text marker.
/// </summary>
void Delete();
/// <summary>
/// Gets whether the text marker was deleted.
/// </summary>
bool IsDeleted { get; }
/// <summary>
/// Event that occurs when the text marker is deleted.
/// </summary>
event EventHandler Deleted;
/// <summary>
/// Gets/Sets the background color.
/// </summary>
Color? BackgroundColor { get; set; }
/// <summary>
/// Gets/Sets the foreground color.
/// </summary>
Color? ForegroundColor { get; set; }
/// <summary>
/// Gets/Sets the type of the marker. Use TextMarkerType.None for normal markers.
/// </summary>
TextMarkerType MarkerType { get; set; }
/// <summary>
/// Gets/Sets the color of the marker.
/// </summary>
Color MarkerColor { get; set; }
/// <summary>
/// Gets/Sets an object with additional data for this text marker.
/// </summary>
object Tag { get; set; }
/// <summary>
/// Gets/Sets an object that will be displayed as tooltip in the text editor.
/// </summary>
object ToolTip { get; set; }
}
public enum TextMarkerType
{
/// <summary>
/// Use no marker
/// </summary>
None,
/// <summary>
/// Use squiggly underline marker
/// </summary>
SquigglyUnderline
}
public interface ITextMarkerService
{
/// <summary>
/// Creates a new text marker. The text marker will be invisible at first,
/// you need to set one of the Color properties to make it visible.
/// </summary>
ITextMarker Create(int startOffset, int length);
/// <summary>
/// Gets the list of text markers.
/// </summary>
IEnumerable<ITextMarker> TextMarkers { get; }
/// <summary>
/// Removes the specified text marker.
/// </summary>
void Remove(ITextMarker marker);
/// <summary>
/// Removes all text markers that match the condition.
/// </summary>
void RemoveAll(Predicate<ITextMarker> predicate);
}
}

6
Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs

@ -81,7 +81,7 @@ namespace ILSpy.Debugger.AvalonEdit
foreach (var bm in BookmarkManager.Bookmarks) { foreach (var bm in BookmarkManager.Bookmarks) {
if (CurrentType == null || bm.TypeName != CurrentType.FullName) if (CurrentType == null || bm.TypeName != CurrentType.FullName)
continue; continue;
if (bm is BreakpointBookmark && if (bm is BreakpointBookmark &&
((BreakpointBookmark)bm).Language != DebuggerService.CurrentDebugger.Language) ((BreakpointBookmark)bm).Language != DebuggerService.CurrentDebugger.Language)
continue; continue;
@ -219,7 +219,7 @@ namespace ILSpy.Debugger.AvalonEdit
b.LineNumber == GetLineFromMousePosition(e) b.LineNumber == GetLineFromMousePosition(e)
&& b is BreakpointBookmark) as BreakpointBookmark; && b is BreakpointBookmark) as BreakpointBookmark;
this.ToolTip = (bm != null) ? bm.Tooltip : null; this.ToolTip = (bm != null) ? bm.Tooltip : null;
} }
protected override void OnMouseUp(MouseButtonEventArgs e) protected override void OnMouseUp(MouseButtonEventArgs e)
@ -263,7 +263,7 @@ namespace ILSpy.Debugger.AvalonEdit
// no bookmark on the line: create a new breakpoint // no bookmark on the line: create a new breakpoint
DebuggerService.ToggleBreakpointAt( DebuggerService.ToggleBreakpointAt(
CurrentType.FullName, CurrentType.FullName,
line, line,
DebuggerService.CurrentDebugger.Language); DebuggerService.CurrentDebugger.Language);
} }

309
Debugger/ILSpy.Debugger/AvalonEdit/TextMarkerService.cs

@ -0,0 +1,309 @@
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Media;
using System.Windows.Threading;
using ICSharpCode.AvalonEdit;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Rendering;
using ILSpy.Debugger.Bookmarks;
namespace ILSpy.Debugger.AvalonEdit
{
/// <summary>
/// Handles the text markers for a code editor.
/// </summary>
public sealed class TextMarkerService : DocumentColorizingTransformer, IBackgroundRenderer, ITextMarkerService
{
readonly TextEditor codeEditor;
TextSegmentCollection<TextMarker> markers = new TextSegmentCollection<TextMarker>();
public TextMarkerService(TextEditor codeEditor)
{
if (codeEditor == null)
throw new ArgumentNullException("codeEditor");
this.codeEditor = codeEditor;
BookmarkManager.Added += new BookmarkEventHandler(BookmarkManager_Added);
BookmarkManager.Removed += new BookmarkEventHandler(BookmarkManager_Removed);
}
void BookmarkManager_Removed(object sender, BookmarkEventArgs e)
{
if (e.Bookmark is MarkerBookmark) {
var bm = (MarkerBookmark)e.Bookmark;
Remove(bm.Marker);
}
}
void BookmarkManager_Added(object sender, BookmarkEventArgs e)
{
if (e.Bookmark is MarkerBookmark) {
var bm = (MarkerBookmark)e.Bookmark;
DocumentLine line = codeEditor.Document.GetLineByNumber(bm.LineNumber);
bm.Marker = bm.CreateMarker(this, line.Offset, line.Length);
}
}
#region ITextMarkerService
public ITextMarker Create(int startOffset, int length)
{
int textLength = codeEditor.TextArea.TextView.Document.TextLength;
if (startOffset < 0 || startOffset > textLength)
throw new ArgumentOutOfRangeException("startOffset", startOffset, "Value must be between 0 and " + textLength);
if (length < 0 || startOffset + length > textLength)
throw new ArgumentOutOfRangeException("length", length, "length must not be negative and startOffset+length must not be after the end of the document");
TextMarker m = new TextMarker(this, startOffset, length);
markers.Add(m);
// no need to mark segment for redraw: the text marker is invisible until a property is set
return m;
}
public IEnumerable<ITextMarker> GetMarkersAtOffset(int offset)
{
return markers.FindSegmentsContaining(offset);
}
public IEnumerable<ITextMarker> TextMarkers {
get { return markers; }
}
public void RemoveAll(Predicate<ITextMarker> predicate)
{
if (predicate == null)
throw new ArgumentNullException("predicate");
foreach (TextMarker m in markers.ToArray()) {
if (predicate(m))
Remove(m);
}
}
public void Remove(ITextMarker marker)
{
if (marker == null)
throw new ArgumentNullException("marker");
TextMarker m = marker as TextMarker;
if (markers.Remove(m)) {
Redraw(m);
m.OnDeleted();
}
}
/// <summary>
/// Redraws the specified text segment.
/// </summary>
public void Redraw(ISegment segment)
{
codeEditor.TextArea.TextView.Redraw(segment, DispatcherPriority.Normal);
}
#endregion
#region DocumentColorizingTransformer
protected override void ColorizeLine(DocumentLine line)
{
if (markers == null)
return;
int lineStart = line.Offset;
int lineEnd = lineStart + line.Length;
foreach (TextMarker marker in markers.FindOverlappingSegments(lineStart, line.Length)) {
Brush foregroundBrush = null;
if (marker.ForegroundColor != null) {
foregroundBrush = new SolidColorBrush(marker.ForegroundColor.Value);
foregroundBrush.Freeze();
}
ChangeLinePart(
Math.Max(marker.StartOffset, lineStart),
Math.Min(marker.EndOffset, lineEnd),
element => {
if (foregroundBrush != null) {
element.TextRunProperties.SetForegroundBrush(foregroundBrush);
}
}
);
}
}
#endregion
#region IBackgroundRenderer
public KnownLayer Layer {
get {
// draw behind selection
return KnownLayer.Selection;
}
}
public void Draw(TextView textView, DrawingContext drawingContext)
{
if (textView == null)
throw new ArgumentNullException("textView");
if (drawingContext == null)
throw new ArgumentNullException("drawingContext");
if (markers == null || !textView.VisualLinesValid)
return;
var visualLines = textView.VisualLines;
if (visualLines.Count == 0)
return;
int viewStart = visualLines.First().FirstDocumentLine.Offset;
int viewEnd = visualLines.Last().LastDocumentLine.Offset + visualLines.Last().LastDocumentLine.Length;
foreach (TextMarker marker in markers.FindOverlappingSegments(viewStart, viewEnd - viewStart)) {
if (marker.BackgroundColor != null) {
BackgroundGeometryBuilder geoBuilder = new BackgroundGeometryBuilder();
geoBuilder.AlignToWholePixels = true;
geoBuilder.CornerRadius = 3;
geoBuilder.AddSegment(textView, marker);
Geometry geometry = geoBuilder.CreateGeometry();
if (geometry != null) {
Color color = marker.BackgroundColor.Value;
SolidColorBrush brush = new SolidColorBrush(color);
brush.Freeze();
drawingContext.DrawGeometry(brush, null, geometry);
}
}
if (marker.MarkerType != TextMarkerType.None) {
foreach (Rect r in BackgroundGeometryBuilder.GetRectsForSegment(textView, marker)) {
Point startPoint = r.BottomLeft;
Point endPoint = r.BottomRight;
Pen usedPen = new Pen(new SolidColorBrush(marker.MarkerColor), 1);
usedPen.Freeze();
switch (marker.MarkerType) {
case TextMarkerType.SquigglyUnderline:
double offset = 2.5;
int count = Math.Max((int)((endPoint.X - startPoint.X) / offset) + 1, 4);
StreamGeometry geometry = new StreamGeometry();
using (StreamGeometryContext ctx = geometry.Open()) {
ctx.BeginFigure(startPoint, false, false);
ctx.PolyLineTo(CreatePoints(startPoint, endPoint, offset, count).ToArray(), true, false);
}
geometry.Freeze();
drawingContext.DrawGeometry(Brushes.Transparent, usedPen, geometry);
break;
}
}
}
}
}
IEnumerable<Point> CreatePoints(Point start, Point end, double offset, int count)
{
for (int i = 0; i < count; i++)
yield return new Point(start.X + i * offset, start.Y - ((i + 1) % 2 == 0 ? offset : 0));
}
#endregion
}
sealed class TextMarker : TextSegment, ITextMarker
{
readonly TextMarkerService service;
public TextMarker(TextMarkerService service, int startOffset, int length)
{
if (service == null)
throw new ArgumentNullException("service");
this.service = service;
this.StartOffset = startOffset;
this.Length = length;
this.markerType = TextMarkerType.None;
}
public event EventHandler Deleted;
public bool IsDeleted {
get { return !this.IsConnectedToCollection; }
}
public void Delete()
{
service.Remove(this);
}
internal void OnDeleted()
{
if (Deleted != null)
Deleted(this, EventArgs.Empty);
}
void Redraw()
{
service.Redraw(this);
}
Color? backgroundColor;
public Color? BackgroundColor {
get { return backgroundColor; }
set {
if (backgroundColor != value) {
backgroundColor = value;
Redraw();
}
}
}
Color? foregroundColor;
public Color? ForegroundColor {
get { return foregroundColor; }
set {
if (foregroundColor != value) {
foregroundColor = value;
Redraw();
}
}
}
public object Tag { get; set; }
TextMarkerType markerType;
public TextMarkerType MarkerType {
get { return markerType; }
set {
if (markerType != value) {
markerType = value;
Redraw();
}
}
}
Color markerColor;
public Color MarkerColor {
get { return markerColor; }
set {
if (markerColor != value) {
markerColor = value;
Redraw();
}
}
}
public object ToolTip { get; set; }
}
}

12
Debugger/ILSpy.Debugger/Bookmarks/BreakpointBookmark.cs

@ -18,8 +18,10 @@
using System; using System;
using System.Windows.Media; using System.Windows.Media;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.Decompiler; using ICSharpCode.Decompiler;
using ICSharpCode.NRefactory.CSharp; using ICSharpCode.NRefactory.CSharp;
using ILSpy.Debugger.AvalonEdit;
using ILSpy.Debugger.Services; using ILSpy.Debugger.Services;
namespace ILSpy.Debugger.Bookmarks namespace ILSpy.Debugger.Bookmarks
@ -31,7 +33,7 @@ namespace ILSpy.Debugger.Bookmarks
Condition Condition
} }
public class BreakpointBookmark : BookmarkBase public class BreakpointBookmark : MarkerBookmark
{ {
bool isHealthy = true; bool isHealthy = true;
bool isEnabled = true; bool isEnabled = true;
@ -97,5 +99,13 @@ namespace ILSpy.Debugger.Bookmarks
return ImageService.Breakpoint; return ImageService.Breakpoint;
} }
} }
public override ITextMarker CreateMarker(ITextMarkerService markerService, int offset, int length)
{
ITextMarker marker = markerService.Create(offset, length);
marker.BackgroundColor = Color.FromRgb(180, 38, 38);
marker.ForegroundColor = Colors.White;
return marker;
}
} }
} }

30
Debugger/ILSpy.Debugger/Bookmarks/CurrentLineBookmark.cs

@ -1,15 +1,31 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) //
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System; using System;
using System.Windows.Media; using System.Windows.Media;
using ICSharpCode.NRefactory.CSharp; using ICSharpCode.NRefactory.CSharp;
using ILSpy.Debugger.AvalonEdit;
using ILSpy.Debugger.Services; using ILSpy.Debugger.Services;
using Mono.CSharp; using Mono.CSharp;
namespace ILSpy.Debugger.Bookmarks namespace ILSpy.Debugger.Bookmarks
{ {
public class CurrentLineBookmark : BookmarkBase public class CurrentLineBookmark : MarkerBookmark
{ {
static CurrentLineBookmark instance; static CurrentLineBookmark instance;
@ -73,5 +89,13 @@ namespace ILSpy.Debugger.Bookmarks
// DebuggerService.CurrentDebugger.SetInstructionPointer(this.FileName, lineNumber, 1); // DebuggerService.CurrentDebugger.SetInstructionPointer(this.FileName, lineNumber, 1);
// }); // });
} }
public override ITextMarker CreateMarker(ITextMarkerService markerService, int offset, int length)
{
ITextMarker marker = markerService.Create(offset + startColumn - 1, Math.Max(endColumn - startColumn, 1));
marker.BackgroundColor = Colors.Yellow;
marker.ForegroundColor = Colors.Blue;
return marker;
}
} }
} }

38
Debugger/ILSpy.Debugger/Bookmarks/MarkerBookmark.cs

@ -0,0 +1,38 @@
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using ICSharpCode.NRefactory.CSharp;
using ILSpy.Debugger.AvalonEdit;
namespace ILSpy.Debugger.Bookmarks
{
/// <summary>
/// Description of MarkerBookmark.
/// </summary>
public abstract class MarkerBookmark : BookmarkBase
{
public MarkerBookmark(string typeName, AstLocation location) : base(typeName, location)
{
}
public ITextMarker Marker { get; set; }
public abstract ITextMarker CreateMarker(ITextMarkerService markerService, int offset, int length);
}
}

3
Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj

@ -52,9 +52,11 @@
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AvalonEdit\ITextMarker.cs" />
<Compile Include="AvalonEdit\TextEditorWeakEventManager.cs" /> <Compile Include="AvalonEdit\TextEditorWeakEventManager.cs" />
<Compile Include="AvalonEdit\IconBarMargin.cs" /> <Compile Include="AvalonEdit\IconBarMargin.cs" />
<Compile Include="AvalonEdit\IToolTip.cs" /> <Compile Include="AvalonEdit\IToolTip.cs" />
<Compile Include="AvalonEdit\TextMarkerService.cs" />
<Compile Include="Bookmarks\BookmarkBase.cs" /> <Compile Include="Bookmarks\BookmarkBase.cs" />
<Compile Include="Bookmarks\BookmarkEventHandler.cs" /> <Compile Include="Bookmarks\BookmarkEventHandler.cs" />
<Compile Include="Bookmarks\BookmarkManager.cs" /> <Compile Include="Bookmarks\BookmarkManager.cs" />
@ -62,6 +64,7 @@
<Compile Include="Bookmarks\BreakpointBookmarkEventArgs.cs" /> <Compile Include="Bookmarks\BreakpointBookmarkEventArgs.cs" />
<Compile Include="Bookmarks\CurrentLineBookmark.cs" /> <Compile Include="Bookmarks\CurrentLineBookmark.cs" />
<Compile Include="Bookmarks\IBookmark.cs" /> <Compile Include="Bookmarks\IBookmark.cs" />
<Compile Include="Bookmarks\MarkerBookmark.cs" />
<Compile Include="Models\TreeModel\ArrayRangeNode.cs" /> <Compile Include="Models\TreeModel\ArrayRangeNode.cs" />
<Compile Include="Models\TreeModel\ChildNodesOfObject.cs" /> <Compile Include="Models\TreeModel\ChildNodesOfObject.cs" />
<Compile Include="Models\TreeModel\ExpressionNode.cs" /> <Compile Include="Models\TreeModel\ExpressionNode.cs" />

7
ILSpy/TextView/DecompilerTextView.cs

@ -63,6 +63,7 @@ namespace ICSharpCode.ILSpy.TextView
CancellationTokenSource currentCancellationTokenSource; CancellationTokenSource currentCancellationTokenSource;
IconBarMargin iconMargin; IconBarMargin iconMargin;
TextMarkerService textMarkerService;
#region Constructor #region Constructor
public DecompilerTextView() public DecompilerTextView()
@ -86,7 +87,11 @@ namespace ICSharpCode.ILSpy.TextView
textEditor.TextArea.TextView.MouseHover += TextViewMouseHover; textEditor.TextArea.TextView.MouseHover += TextViewMouseHover;
textEditor.TextArea.TextView.MouseHoverStopped += TextViewMouseHoverStopped; textEditor.TextArea.TextView.MouseHoverStopped += TextViewMouseHoverStopped;
// add margin // add marker service & margin
textMarkerService = new TextMarkerService(textEditor);
textEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService);
textEditor.TextArea.TextView.LineTransformers.Add(textMarkerService);
iconMargin = new IconBarMargin(); iconMargin = new IconBarMargin();
textEditor.TextArea.LeftMargins.Add(iconMargin); textEditor.TextArea.LeftMargins.Add(iconMargin);

Loading…
Cancel
Save