protected override void OnFocused() { info.Start(); if (ComparisonWidget.originalComboBox.Text == GettextCatalog.GetString("Local")) { ComparisonWidget.UpdateLocalText(); } var textView = info.Controller.GetContent <ITextView> (); if (textView != null) { var(line, column) = textView.Caret.Position.BufferPosition.GetLineAndColumn1Based(); ComparisonWidget.OriginalEditor.SetCaretTo(line, column); } if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1) { ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated; } else { HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs()); } widget.UpdatePatchView(); }
protected override void OnSelected() { info.Start(); ComparisonWidget.UpdateLocalText(); var buffer = info.Document.GetContent <MonoDevelop.Ide.Editor.TextEditor> (); if (buffer != null) { var loc = buffer.CaretLocation; int line = loc.Line < 1 ? 1 : loc.Line; int column = loc.Column < 1 ? 1 : loc.Column; ComparisonWidget.OriginalEditor.SetCaretTo(line, column); } if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1) { ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated; } else { HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs()); } widget.UpdatePatchView(); }
public void Selected() { if (info != null && !info.Started) { widget.ShowLoading(); info.Start(); } }
public void Init() { if (info != null && !info.Started) { LogWidget.ShowLoading(); info.Start(); } }
public void Selected() { info.Start(); ComparisonWidget.UpdateLocalText(); ComparisonWidget.OriginalEditor.Document.IgnoreFoldings = true; ComparisonWidget.OriginalEditor.Caret.Location = info.Document.Editor.Caret.Location; ComparisonWidget.OriginalEditor.VAdjustment.Value = info.Document.Editor.VAdjustment.Value; ComparisonWidget.OriginalEditor.GrabFocus(); }
public void Selected() { info.Start(); var sourceEditor = info.Document.GetContent <MonoDevelop.SourceEditor.SourceEditorView> (); if (sourceEditor != null) { widget.Editor.Caret.Location = sourceEditor.TextEditor.Caret.Location; widget.Editor.VAdjustment.Value = sourceEditor.TextEditor.VAdjustment.Value; } }
protected override void OnSelected() { info.Start(); BlameWidget widget = Control.GetNativeWidget <BlameWidget> (); widget.Reset(); var sourceEditor = info.Document.GetContent <MonoDevelop.SourceEditor.SourceEditorView> (); if (sourceEditor != null) { widget.Editor.Caret.Location = sourceEditor.TextEditor.Caret.Location; widget.Editor.VAdjustment.Value = sourceEditor.TextEditor.VAdjustment.Value; } }
public void Selected() { info.Start(); ComparisonWidget.UpdateLocalText(); ComparisonWidget.OriginalEditor.Document.IgnoreFoldings = true; ComparisonWidget.OriginalEditor.Caret.Location = info.Document.Editor.Caret.Location; if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1) { ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated; } else { HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs()); } }
protected override void OnSelected() { info.Start(); BlameWidget widget = Control.GetNativeWidget <BlameWidget> (); widget.Reset(); var buffer = info.Document.GetContent <MonoDevelop.Ide.Editor.TextEditor> (); if (buffer != null) { var loc = buffer.CaretLocation; int line = loc.Line < 1 ? 1 : loc.Line; int column = loc.Column < 1 ? 1 : loc.Column; widget.Editor.SetCaretTo(line, column, highlight: false, centerCaret: false); } }
protected override void OnSelected() { info.Start(); BlameWidget blameWidget = Control.GetNativeWidget <BlameWidget> (); blameWidget.Reset(); var buffer = info.Document.GetContent <MonoDevelop.Ide.Editor.TextEditor> (); if (buffer != null) { if (!(buffer.TextView is MonoTextEditor)) { //compatibility for other not MonoTextEditor editors var loc = buffer.CaretLocation; int line = loc.Line < 1 ? 1 : loc.Line; int column = loc.Column < 1 ? 1 : loc.Column; blameWidget.Editor.SetCaretTo(line, column, highlight: false, centerCaret: false); } } }
public static void AttachViewContents(Document document, VersionControlItem item) { IWorkbenchWindow window = document.Window; if (window.SubViewContents.Any(sub => sub is ComparisonView)) { return; } VersionControlDocumentInfo info = new VersionControlDocumentInfo(document, item); ComparisonView comparisonView = new ComparisonView(info); window.AttachViewContent(comparisonView); window.AttachViewContent(new PatchView(comparisonView, info)); window.AttachViewContent(new BlameView(info)); window.AttachViewContent(new LogView(info)); info.Start(); }
protected override void OnFocused() { info.Start(); widget.Reset(); var textView = info.Controller.GetContent <ITextView> (); if (textView != null) { var(line, column) = textView.Caret.Position.BufferPosition.GetLineAndColumn1Based(); widget.Editor.SetCaretTo(line, column, highlight: false, centerCaret: false); } if (widget.Allocation.Height == 1 && widget.Allocation.Width == 1) { widget.SizeAllocated += HandleComparisonWidgetSizeAllocated; } else { HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs()); } }
public void Selected() { info.Start(); ComparisonWidget.UpdateLocalText(); var buffer = info.Document.GetContent <ITextBuffer> (); if (buffer != null) { int line, col; buffer.GetLineColumnFromPosition(buffer.CursorPosition, out line, out col); ComparisonWidget.OriginalEditor.SetCaretTo(line, col); } if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1) { ComparisonWidget.SizeAllocated += HandleComparisonWidgetSizeAllocated; } else { HandleComparisonWidgetSizeAllocated(null, new Gtk.SizeAllocatedArgs()); } }
void RefreshClicked(object src, EventArgs args) { ShowLoading(); info.Start(true); revertButton.GetNativeWidget <Gtk.Widget> ().Sensitive = revertToButton.GetNativeWidget <Gtk.Widget> ().Sensitive = false; }
void RefreshClicked (object src, EventArgs args) { ShowLoading (); info.Start (true); }
public void Selected() { info.Start(); widget.Editor.Caret.Location = info.Document.Editor.Caret.Location; widget.Editor.VAdjustment.Value = info.Document.Editor.VAdjustment.Value; }
public static void AttachViewContents (Document document, VersionControlItem item) { IWorkbenchWindow window = document.Window; if (window.SubViewContents.Any (sub => sub is ComparisonView)) return; VersionControlDocumentInfo info = new VersionControlDocumentInfo (document, item); ComparisonView comparisonView = new ComparisonView (info); window.AttachViewContent (comparisonView); window.AttachViewContent (new PatchView (comparisonView, info)); window.AttachViewContent (new BlameView (info)); window.AttachViewContent (new LogView (info)); info.Start (); }