本文整理汇总了C#中Mono.TextEditor.DocumentLocationEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DocumentLocationEventArgs类的具体用法?C# DocumentLocationEventArgs怎么用?C# DocumentLocationEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocumentLocationEventArgs类属于Mono.TextEditor命名空间,在下文中一共展示了DocumentLocationEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EditorCarethandlePositionChanged
void EditorCarethandlePositionChanged (object sender, DocumentLocationEventArgs e)
{
if (!editor.GetTextEditorData ().HighlightCaretLine || e.Location.Line == editor.Caret.Line)
return;
editor.RedrawMarginLine (this, e.Location.Line);
editor.RedrawMarginLine (this, editor.Caret.Line);
}
示例2: EditorCarethandlePositionChanged
void EditorCarethandlePositionChanged (object sender, DocumentLocationEventArgs e)
{
if (e.Location.Line == editor.Caret.Line)
return;
editor.RedrawMarginLine (this, e.Location.Line);
editor.RedrawMarginLine (this, editor.Caret.Line);
}
示例3: HandleTextEditorDataCaretPositionChanged
void HandleTextEditorDataCaretPositionChanged(object sender, DocumentLocationEventArgs e)
{
if (!MonoDevelop.Core.PropertyService.Get<bool>("EnableHighlightUsages"))
return;
if (!textEditorData.IsSomethingSelected && markers.Values.Any(m => m.Contains(textEditorData.Caret.Offset)))
return;
RemoveMarkers();
RemoveTimer();
if (!textEditorData.IsSomethingSelected)
popupTimer = GLib.Timeout.Add(1000, UpdateMarkers);
}
示例4: HandleEditorCaretPositionChanged
void HandleEditorCaretPositionChanged (object sender, DocumentLocationEventArgs e)
{
if (!IsInCodeFocusMode)
return;
LineSegment lineSegment = editor.Document.GetLine (editor.Caret.Line);
if (lineSegment == null) {
RemoveBackgroundRenderer ();
return;
}
IEnumerable<FoldSegment> newFoldings = editor.Document.GetFoldingContaining (lineSegment);
if (newFoldings == null) {
RemoveBackgroundRenderer ();
return;
}
bool areEqual = foldings != null;
if (areEqual && foldings.Count () != newFoldings.Count ())
areEqual = false;
if (areEqual) {
List<FoldSegment> list1 = new List<FoldSegment> (foldings);
List<FoldSegment> list2 = new List<FoldSegment> (newFoldings);
for (int i = 0; i < list1.Count; i++) {
if (list1[i] != list2[i]) {
areEqual = false;
break;
}
}
}
if (!areEqual) {
foldings = newFoldings;
DelayTimerElapsed (this, null);
}
}
示例5: CaretPositionChanged
void CaretPositionChanged (object o, DocumentLocationEventArgs args)
{
UpdateLineCol ();
LineSegment curLine = TextEditor.Document.GetLine (TextEditor.Caret.Line);
MonoDevelop.SourceEditor.MessageBubbleTextMarker marker = null;
if (curLine != null && curLine.Markers.Any (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker)) {
marker = (MonoDevelop.SourceEditor.MessageBubbleTextMarker)curLine.Markers.First (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker);
marker.CollapseExtendedErrors = false;
if (oldExpandedMarker == null)
Document.CommitLineToEndUpdate (Document.OffsetToLineNumber (curLine.Offset));
}
if (oldExpandedMarker != null && oldExpandedMarker != marker) {
oldExpandedMarker.CollapseExtendedErrors = true;
int markerOffset = marker != null && marker.LineSegment != null ? marker.LineSegment.Offset : Int32.MaxValue;
int oldMarkerOffset = oldExpandedMarker.LineSegment != null ? oldExpandedMarker.LineSegment.Offset : Int32.MaxValue;
Document.CommitLineToEndUpdate (Document.OffsetToLineNumber (Math.Min (markerOffset, oldMarkerOffset)));
}
oldExpandedMarker = marker;
}
示例6: HandlePositionChanged
void HandlePositionChanged(object sender, DocumentLocationEventArgs e)
{
QueueDraw ();
}
示例7: HandleTextEditorDataCaretPositionChanged
void HandleTextEditorDataCaretPositionChanged (object sender, DocumentLocationEventArgs e)
{
if (!textEditorData.IsSomethingSelected && markers.Values.Any (m => m.Contains (textEditorData.Caret.Offset)))
return;
RemoveMarkers (textEditorData.IsSomethingSelected);
RemoveTimer ();
if (!textEditorData.IsSomethingSelected)
popupTimer = GLib.Timeout.Add (1000, DelayedTooltipShow);
}
示例8: HandleWidgetTextEditorCaretPositionChanged
void HandleWidgetTextEditorCaretPositionChanged (object sender, DocumentLocationEventArgs e)
{
UpdateResultInformLabel ();
}
示例9: HandlePositionChanged
void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
{
OnCaretPositionSet (EventArgs.Empty);
FireCompletionContextChanged ();
OnCaretPositionChanged (EventArgs.Empty);
}
示例10: CaretPositionChanged
void CaretPositionChanged (object sender, DocumentLocationEventArgs args)
{
if (!caret.PreserveSelection)
this.ClearSelection ();
if (Options.RemoveTrailingWhitespaces && args.Location.Line != Caret.Line) {
LineSegment line = Document.GetLine (args.Location.Line);
if (line != null && line.WasChanged)
Document.RemoveTrailingWhitespaces (this, line);
}
}
示例11: CaretPositionChanged
void CaretPositionChanged (object sender, DocumentLocationEventArgs args)
{
if (!caret.PreserveSelection)
this.ClearSelection ();
}
示例12: CaretPositionChanged
internal static void CaretPositionChanged (object sender, DocumentLocationEventArgs e)
{
Caret caret = (Caret)sender;
UpdateCaretPosition (caret);
}
示例13: DataCaretPositionChanged
public void DataCaretPositionChanged (object sender, DocumentLocationEventArgs e)
{
data.ExtendSelectionTo (data.Caret.Location);
}
示例14: HandlePositionChanged
void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
{
var node = unit.GetNodeAt (editor.Caret.Line, editor.Caret.Column);
if (node == null)
return;
TreeIter iter;
if (!iterDict.TryGetValue (node, out iter))
return;
this.treeviewNodes.Selection.Changed -= SelectionChanged;
treeviewNodes.Selection.SelectIter (iter);
treeviewNodes.ScrollToCell (store.GetPath (iter), null, true, 0, 0);
this.treeviewNodes.Selection.Changed += SelectionChanged;
}
示例15: CaretPositionChanged
void CaretPositionChanged (object o, DocumentLocationEventArgs args)
{
UpdateLineCol ();
DocumentLine curLine = TextEditor.Document.GetLine (TextEditor.Caret.Line);
MonoDevelop.SourceEditor.MessageBubbleTextMarker marker = null;
if (curLine != null && curLine.Markers.Any (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker)) {
marker = (MonoDevelop.SourceEditor.MessageBubbleTextMarker)curLine.Markers.First (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker);
// marker.CollapseExtendedErrors = false;
}
if (oldExpandedMarker != null && oldExpandedMarker != marker) {
// oldExpandedMarker.CollapseExtendedErrors = true;
}
oldExpandedMarker = marker;
}