コード例 #1
0
		public static void Remove()
		{
			if (instance != null) {
				SD.BookmarkManager.RemoveMark(instance);
				instance = null;
			}
		}
コード例 #2
0
        public static void SetPosition(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn)
        {
            Remove();

            startLine   = makerStartLine;
            startColumn = makerStartColumn;
            endLine     = makerEndLine;
            endColumn   = makerEndColumn;

            if (startLine < 1 || startLine > document.TotalNumberOfLines)
            {
                return;
            }
            if (endLine < 1 || endLine > document.TotalNumberOfLines)
            {
                endLine   = startLine;
                endColumn = int.MaxValue;
            }
            if (startColumn < 1)
            {
                startColumn = 1;
            }

            LineSegment line = document.GetLineSegment(startLine - 1);

            if (endColumn < 1 || endColumn > line.Length)
            {
                endColumn = line.Length;
            }
            instance = new CurrentLineBookmark(fileName, document, new TextLocation(startColumn - 1, startLine - 1));
            document.BookmarkManager.AddMark(instance);
            document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, startLine - 1, endLine - 1));
            document.CommitUpdate();
        }
コード例 #3
0
		public static void SetPosition(FileName fileName, IDocument document, int markerStartLine, int markerStartColumn, int markerEndLine, int markerEndColumn)
		{
			if (document == null)
				return;
			Remove();
			
			startLine   = markerStartLine;
			startColumn = markerStartColumn;
			endLine     = markerEndLine;
			endColumn   = markerEndColumn;
			
			if (startLine < 1 || startLine > document.TotalNumberOfLines)
				return;
			if (endLine < 1 || endLine > document.TotalNumberOfLines) {
				endLine = startLine;
				endColumn = int.MaxValue;
			}
			if (startColumn < 1)
				startColumn = 1;
			
			IDocumentLine line = document.GetLine(startLine);
			if (endColumn < 1 || endColumn > line.Length)
				endColumn = line.Length;
			instance = new CurrentLineBookmark(fileName, new Location(startColumn, startLine));
			BookmarkManager.AddMark(instance);
		}
コード例 #4
0
		public static void SetPosition(FileName fileName, IDocument document, int markerStartLine, int markerStartColumn, int markerEndLine, int markerEndColumn)
		{
			if (document == null)
				return;
			Remove();
			
			startLine   = markerStartLine;
			startColumn = markerStartColumn;
			endLine     = markerEndLine;
			endColumn   = markerEndColumn;
			
			if (startLine < 1 || startLine > document.LineCount)
				return;
			if (endLine < 1 || endLine > document.LineCount) {
				endLine = startLine;
				endColumn = int.MaxValue;
			}
			if (startColumn < 1)
				startColumn = 1;
			
			instance = new CurrentLineBookmark();
			instance.Location = new TextLocation(startLine, startColumn);
			instance.FileName = fileName;
			SD.BookmarkManager.AddMark(instance);
		}
コード例 #5
0
        public static void SetPosition(FileName fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn)
        {
            Remove();

            startLine   = makerStartLine;
            startColumn = makerStartColumn;
            endLine     = makerEndLine;
            endColumn   = makerEndColumn;

            if (startLine < 1 || startLine > document.TotalNumberOfLines)
            {
                return;
            }
            if (endLine < 1 || endLine > document.TotalNumberOfLines)
            {
                endLine   = startLine;
                endColumn = int.MaxValue;
            }
            if (startColumn < 1)
            {
                startColumn = 1;
            }

            IDocumentLine line = document.GetLine(startLine);

            if (endColumn < 1 || endColumn > line.Length)
            {
                endColumn = line.Length;
            }
            instance = new CurrentLineBookmark(fileName, new Location(startColumn, startLine));
            BookmarkManager.AddMark(instance);
        }
コード例 #6
0
        public static void SetPosition(FileName fileName, IDocument document, int markerStartLine, int markerStartColumn, int markerEndLine, int markerEndColumn)
        {
            if (document == null)
            {
                return;
            }
            Remove();

            startLine   = markerStartLine;
            startColumn = markerStartColumn;
            endLine     = markerEndLine;
            endColumn   = markerEndColumn;

            if (startLine < 1 || startLine > document.LineCount)
            {
                return;
            }
            if (endLine < 1 || endLine > document.LineCount)
            {
                endLine   = startLine;
                endColumn = int.MaxValue;
            }
            if (startColumn < 1)
            {
                startColumn = 1;
            }

            instance          = new CurrentLineBookmark();
            instance.Location = new TextLocation(startLine, startColumn);
            instance.FileName = fileName;
            SD.BookmarkManager.AddMark(instance);
        }
コード例 #7
0
		public static void SetPosition(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn)
		{
			Remove();
			
			startLine   = makerStartLine;
			startColumn = makerStartColumn;
			endLine     = makerEndLine;
			endColumn   = makerEndColumn;
			
			if (startLine < 1 || startLine > document.TotalNumberOfLines)
				return;
			if (endLine < 1 || endLine > document.TotalNumberOfLines) {
				endLine = startLine;
				endColumn = int.MaxValue;
			}
			if (startColumn < 1)
				startColumn = 1;
			
			LineSegment line = document.GetLineSegment(startLine - 1);
			if (endColumn < 1 || endColumn > line.Length)
				endColumn = line.Length;
			instance = new CurrentLineBookmark(fileName, document, new TextLocation(startColumn - 1, startLine - 1));
			document.BookmarkManager.AddMark(instance);
			document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, startLine - 1, endLine - 1));
			document.CommitUpdate();
		}
コード例 #8
0
		public static void Remove()
		{
			if (instance != null) {
				instance.Document.BookmarkManager.RemoveMark(instance);
				instance.RemoveMarker();
				instance = null;
			}
		}
コード例 #9
0
 public static void Remove()
 {
     if (instance != null)
     {
         BookmarkManager.RemoveMark(instance);
         instance = null;
     }
 }
コード例 #10
0
 public static void Remove()
 {
     if (instance != null)
     {
         instance.Document.BookmarkManager.RemoveMark(instance);
         instance.RemoveMarker();
         instance = null;
     }
 }
コード例 #11
0
        public static void JumpToCurrentLine(string sourceFullFilename, int startLine, int startColumn, int endLine, int endColumn)
        {
            IViewContent viewContent = FileService.OpenFile(sourceFullFilename);

            if (viewContent is ITextEditorProvider)
            {
                ((ITextEditorProvider)viewContent).TextEditor.JumpTo(startLine, startColumn);
            }
            CurrentLineBookmark.SetPosition(viewContent, startLine, startColumn, endLine, endColumn);
        }
コード例 #12
0
 static void OnDebugStopped(object sender, EventArgs e)
 {
     CurrentLineBookmark.Remove();
     WorkbenchSingleton.Workbench.WorkbenchLayout.StoreConfiguration();
     LayoutConfiguration.CurrentLayoutName = oldLayoutConfiguration;
     if (DebugStopped != null)
     {
         DebugStopped(null, e);
     }
 }
コード例 #13
0
		public static void SetPosition(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn)
		{
			Remove();
			
			startLine   = makerStartLine;
			startColumn = makerStartColumn;
			endLine     = makerEndLine;
			endColumn   = makerEndColumn;
			
			LineSegment line = document.GetLineSegment(startLine - 1);
			instance = new CurrentLineBookmark(fileName, document, startLine - 1);
			document.BookmarkManager.AddMark(instance);
			document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, startLine - 1, endLine - 1));
			document.CommitUpdate();
		}
コード例 #14
0
        public static void SetPosition(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn)
        {
            Remove();

            startLine   = makerStartLine;
            startColumn = makerStartColumn;
            endLine     = makerEndLine;
            endColumn   = makerEndColumn;

            LineSegment line = document.GetLineSegment(startLine - 1);

            instance = new CurrentLineBookmark(fileName, document, startLine - 1);
            document.BookmarkManager.AddMark(instance);
            document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, startLine - 1, endLine - 1));
            document.CommitUpdate();
        }
コード例 #15
0
        /* TODO: reimplement this stuff
         * static void ViewContentOpened(object sender, ViewContentEventArgs e)
         * {
         *              textArea.IconBarMargin.MouseDown += IconBarMouseDown;
         *              textArea.ToolTipRequest          += TextAreaToolTipRequest;
         *              textArea.MouseLeave              += TextAreaMouseLeave;
         * }*/

        public static void RemoveCurrentLineMarker()
        {
            CurrentLineBookmark.Remove();
        }
コード例 #16
0
        public static void JumpToCurrentLine(string SourceFullFilename, int StartLine, int StartColumn, int EndLine, int EndColumn)
        {
            IViewContent viewContent = FileService.JumpToFilePosition(SourceFullFilename, StartLine - 1, StartColumn - 1);

            CurrentLineBookmark.SetPosition(viewContent, StartLine, StartColumn, EndLine, EndColumn);
        }