Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1814 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
1 changed files with 0 additions and 60 deletions
@ -1,60 +0,0 @@ |
|||||||
// <file>
|
|
||||||
// <copyright see="prj:///doc/copyright.txt"/>
|
|
||||||
// <license see="prj:///doc/license.txt"/>
|
|
||||||
// <owner name="David Alpert" email="david@spinthemoose.com"/>
|
|
||||||
// <version>$Revision$</version>
|
|
||||||
// </file>
|
|
||||||
|
|
||||||
using System; |
|
||||||
using System.Drawing; |
|
||||||
|
|
||||||
using ICSharpCode.Core; |
|
||||||
|
|
||||||
namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor |
|
||||||
{ |
|
||||||
/// <summary>
|
|
||||||
/// Description of TextEditorNavigationPoint.
|
|
||||||
/// </summary>
|
|
||||||
public class TextEditorNavigationPoint : DefaultNavigationPoint |
|
||||||
{ |
|
||||||
public TextEditorNavigationPoint(string fileName, int line, int col) : |
|
||||||
base(fileName, new Point(col, line)) {} |
|
||||||
|
|
||||||
public int Line { |
|
||||||
get { |
|
||||||
return ((Point)base.NavigationData).Y; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
public override string Description { |
|
||||||
get { |
|
||||||
return String.Format("{0}: {1}", this.FileName, this.Line); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public override int Index { |
|
||||||
get { |
|
||||||
return this.Line; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
public override bool Equals(object obj) |
|
||||||
{ |
|
||||||
TextEditorNavigationPoint b = obj as TextEditorNavigationPoint; |
|
||||||
if (b == null) return false; |
|
||||||
return b.FileName == this.FileName && b.Line == this.Line; |
|
||||||
} |
|
||||||
|
|
||||||
public override int GetHashCode() |
|
||||||
{ |
|
||||||
return base.GetHashCode() ^ this.Line; |
|
||||||
} |
|
||||||
|
|
||||||
public override void JumpTo() |
|
||||||
{ |
|
||||||
Point p = (Point)this.NavigationData; |
|
||||||
FileService.JumpToFilePosition(this.FileName, p.Y, p.X); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
Loading…
Reference in new issue