Ejemplo n.º 1
0
		public static void Remove()
		{
			if (instance != null) {
				SD.BookmarkManager.RemoveMark(instance);
				instance = null;
			}
		}
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
		}
Ejemplo n.º 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);
		}
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
		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();
		}
Ejemplo n.º 8
0
		public static void Remove()
		{
			if (instance != null) {
				instance.Document.BookmarkManager.RemoveMark(instance);
				instance.RemoveMarker();
				instance = null;
			}
		}
Ejemplo n.º 9
0
 public static void Remove()
 {
     if (instance != null)
     {
         BookmarkManager.RemoveMark(instance);
         instance = null;
     }
 }
Ejemplo n.º 10
0
 public static void Remove()
 {
     if (instance != null)
     {
         instance.Document.BookmarkManager.RemoveMark(instance);
         instance.RemoveMarker();
         instance = null;
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 12
0
 static void OnDebugStopped(object sender, EventArgs e)
 {
     CurrentLineBookmark.Remove();
     WorkbenchSingleton.Workbench.WorkbenchLayout.StoreConfiguration();
     LayoutConfiguration.CurrentLayoutName = oldLayoutConfiguration;
     if (DebugStopped != null)
     {
         DebugStopped(null, e);
     }
 }
Ejemplo n.º 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();
		}
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }