Пример #1
0
		void UpdateWidth (object sender, LineEventArgs args)
		{
			int currentLineCountLog10 = (int)System.Math.Log10 (editor.Document.LineCount);
			if (oldLineCountLog10 != currentLineCountLog10) {
				CalculateWidth ();
				oldLineCountLog10 = currentLineCountLog10;
				editor.Document.CommitUpdateAll ();
			}
		}
Пример #2
0
        protected virtual void OnLineRemoved(LineEventArgs e)
        {
            EventHandler <LineEventArgs> handler = LineRemoved;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        void Document_LineChanged(object sender, Mono.TextEditor.LineEventArgs e)
        {
            var handler = LineChanged;

            if (handler != null)
            {
                handler(this, new MonoDevelop.Ide.Editor.LineEventArgs(new DocumentLineWrapper(e.Line)));
            }
        }
Пример #4
0
		void HandleLineInserted (object sender, LineEventArgs e)
		{
			if (lineStates == null) 
				return;
			try {
				lineStates.Insert(e.Line.LineNumber, new LineChangeInfo (Mono.TextEditor.TextDocument.LineState.Dirty));
			} catch (Exception ex) {
				Console.WriteLine ("error while DiffTracker.HandleLineInserted:" + ex);
			}
		}
Пример #5
0
        void UpdateWidth(object sender, LineEventArgs args)
        {
            int currentLineCountLog10 = (int)System.Math.Log10(LineCountMax);

            if (oldLineCountLog10 != currentLineCountLog10)
            {
                CalculateWidth();
                oldLineCountLog10 = currentLineCountLog10;
                editor.Document.CommitUpdateAll();
            }
        }
Пример #6
0
		void HandleLineRemoved (object sender, LineEventArgs e)
		{
			if (lineStates == null) 
				return;
			try {

				lineStates.RemoveAt (e.LineNumber);
			} catch (Exception ex) {
				Console.WriteLine ("error while DiffTracker.HandleLineRemoved:" + ex);
			}
		}
Пример #7
0
 void HandleLineRemoved(object sender, LineEventArgs e)
 {
     if (lineStates == null)
     {
         return;
     }
     try {
         lineStates.RemoveAt(e.LineNumber);
     } catch (Exception ex) {
         Console.WriteLine("error while DiffTracker.HandleLineRemoved:" + ex);
     }
 }
Пример #8
0
 void HandleLineInserted(object sender, LineEventArgs e)
 {
     if (lineStates == null)
     {
         return;
     }
     try {
         lineStates.Insert(e.Line.LineNumber, new LineChangeInfo(Mono.TextEditor.TextDocument.LineState.Dirty));
     } catch (Exception ex) {
         Console.WriteLine("error while DiffTracker.HandleLineInserted:" + ex);
     }
 }
Пример #9
0
        void HandleLineChanged(object sender, LineEventArgs e)
        {
            var lineNumber = e.Line.LineNumber;

            try {
                if (lineStates [lineNumber].state == Mono.TextEditor.TextDocument.LineState.Dirty)
                {
                    return;
                }
                lineStates [lineNumber] = new LineChangeInfo(Mono.TextEditor.TextDocument.LineState.Dirty);
                if (trackDocument != null)
                {
                    trackDocument.CommitLineUpdate(lineNumber);
                }
            } catch (Exception ex) {
                Console.WriteLine("error while DiffTracker.HandleLineChanged:" + ex);
            }
        }
Пример #10
0
		void HandleLineChanged (object sender, LineEventArgs e)
		{
			UpdateBreakpoints ();
			UpdateWidgetPositions ();
			if (messageBubbleCache != null && messageBubbleCache.RemoveLine (e.Line)) {
				MessageBubbleTextMarker marker = currentErrorMarkers.FirstOrDefault (m => m.LineSegment == e.Line);
				if (marker != null) {
					widget.TextEditor.TextViewMargin.RemoveCachedLine (e.Line);
					// ensure that the line cache is renewed
					marker.GetLineHeight (widget.TextEditor);
				}
			}
		}
Пример #11
0
		protected virtual void OnHoveredLineChanged (LineEventArgs e)
		{
			EventHandler<LineEventArgs> handler = this.HoveredLineChanged;
			if (handler != null)
				handler (this, e);
		}
Пример #12
0
 void HandleLineRemoved(object sender, LineEventArgs e)
 {
     RemoveLine(e.Line.LineNumber);
 }
Пример #13
0
		void HandleDocumentsplitterhandleLineInserted (object sender, LineEventArgs e)
		{
			heightTree.InsertLine (OffsetToLineNumber (e.Line.Offset));
		}
Пример #14
0
		void SplitterLineSegmentTreeLineChanged (object sender, LineEventArgs e)
		{
			if (LineChanged != null)
				LineChanged (this, e);
		}
Пример #15
0
 void HandleDocLineChanged(object sender, LineEventArgs e)
 {
     e.Line.WasChanged = true;
 }
		protected virtual void OnLineInserted (LineEventArgs e)
		{
			EventHandler<LineEventArgs> handler = this.LineInserted;
			if (handler != null)
				handler (this, e);
		}
Пример #17
0
		void HandleLineChanged (object sender, LineEventArgs e)
		{
			var lineNumber = e.Line.LineNumber;
			try {
				if (lineStates [lineNumber].state == Mono.TextEditor.TextDocument.LineState.Dirty)
					return;
				lineStates [lineNumber] = new LineChangeInfo (Mono.TextEditor.TextDocument.LineState.Dirty);
				if (trackDocument != null)
					trackDocument.CommitLineUpdate (lineNumber); 
			} catch (Exception ex) {
				Console.WriteLine ("error while DiffTracker.HandleLineChanged:" + ex);
			}
		}
Пример #18
0
 void HandleDocumentsplitterhandleLineInserted(object sender, LineEventArgs e)
 {
     heightTree.InsertLine(OffsetToLineNumber(e.Line.Offset));
 }
		void HandleDocLineChanged (object sender, LineEventArgs e)
		{
			if (line == e.Line)
				doc.RemoveMarker (this);
		}
Пример #20
0
 public void TextViewMargin_HoveredLineChanged(object sender, Mono.TextEditor.LineEventArgs e)
 {
     editor.GetTextEditorData().Document.CommitLineUpdate(lineSegment);
     editor.TextViewMargin.HoveredLineChanged -= TextViewMargin_HoveredLineChanged;
 }
Пример #21
0
		protected virtual void OnLineRemoved (LineEventArgs e)
		{
			EventHandler<LineEventArgs> handler = LineRemoved;
			if (handler != null)
				handler (this, e);
		}
Пример #22
0
		void HandleLineInserted (object sender, LineEventArgs e)
		{
			InsertLine (editor.OffsetToLineNumber (e.Line.Offset));
		}
Пример #23
0
		void HandleSplitterLineSegmentTreeLineRemoved (object sender, LineEventArgs e)
		{
			foreach (TextLineMarker marker in e.Line.Markers) {
				if (marker is IExtendingTextLineMarker) {
					lock (extendingTextMarkers) {
						HeightChanged = true;
						extendingTextMarkers.Remove (marker);
					}
					UnRegisterVirtualTextMarker ((IExtendingTextLineMarker)marker);
				}
			}
		}
Пример #24
0
		void HandleLineRemoved (object sender, LineEventArgs e)
		{
			RemoveLine (editor.OffsetToLineNumber (e.Line.Offset));
		}
Пример #25
0
		void HandleDocLineChanged (object sender, LineEventArgs e)
		{
			e.Line.WasChanged = true;
		}
Пример #26
0
		void HandleLineRemoved (object sender, LineEventArgs e)
		{
			Rebuild ();
			OnLineUpdateFrom (new HeightChangedEventArgs (e.Line.LineNumber - 1));
			//RemoveLine (e.Line.LineNumber);
		}
Пример #27
0
 void HandleLineInserted(object sender, LineEventArgs e)
 {
     InsertLine(e.Line.LineNumber);
 }
Пример #28
0
 void HandleLineRemoved(object sender, LineEventArgs e)
 {
     Rebuild();
     OnLineUpdateFrom(new HeightChangedEventArgs(e.Line.LineNumber - 1));
     //RemoveLine (e.Line.LineNumber);
 }
Пример #29
0
		void TextEditorDocumentLineChanged (object sender, LineEventArgs e)
		{
			RemoveCachedLine (e.Line);
		}
		/// <summary>
		/// Marks a line as locally modified
		/// </summary>
		private void EditorDocumentLineChanged (object sender, LineEventArgs e)
		{
			int  startLine = editor.Document.OffsetToLineNumber (e.Line.Offset),
			     endLine = editor.Document.OffsetToLineNumber (e.Line.EndOffset);
			
			if (startLine == endLine) {
				SetAnnotation (startLine, locallyModified);
			}
			for (int i=startLine; i<endLine; ++i) {
				SetAnnotation (i, locallyModified);
			}
		}
Пример #31
0
		void HandleLineInserted (object sender, LineEventArgs e)
		{
			InsertLine (e.Line.LineNumber);
		}
Пример #32
0
		protected virtual void OnLineInserted (LineEventArgs e)
		{
			if (inInit)
				return;
			EventHandler<LineEventArgs> handler = LineInserted;
			if (handler != null)
				handler (this, e);
		}
Пример #33
0
			/// <summary>
			/// Marks a line as locally modified
			/// </summary>
			private void EditorDocumentLineChanged (object sender, LineEventArgs e)
			{
				int startLine = widget.Editor.Document.OffsetToLineNumber (e.Line.Offset);
				SetAnnotation (startLine, locallyModified);
			}
Пример #34
0
		void HandleLineRemoved (object sender, LineEventArgs e)
		{
			RemoveLine (e.Line.LineNumber);
		}