void Initialize (SourceEditorView view) { this.view = view; Caret.PositionChanged += delegate { if (Extension != null) { try { Extension.CursorPositionChanged (); } catch (Exception ex) { ReportExtensionError (ex); } } }; Document.TextReplaced += HandleSkipCharsOnReplace; Document.TextReplaced += delegate(object sender, ReplaceEventArgs args) { if (Extension != null) { try { Extension.TextChanged (args.Offset, args.Offset + Math.Max (args.Count, args.Value != null ? args.Value.Length : 0)); } catch (Exception ex) { ReportExtensionError (ex); } } }; UpdateEditMode (); this.GetTextEditorData ().Paste += HandleTextPaste; this.ButtonPressEvent += OnPopupMenu; }
protected override void Update(CommandArrayInfo ainfo) { MonoDevelop.Ide.Gui.Document doc = IdeApp.Workbench.ActiveDocument; if (doc != null) { SourceEditorView view = IdeApp.Workbench.ActiveDocument.GetContent <SourceEditorView>(); if (view != null) { DocumentLocation location = view.TextEditor.Caret.Location; if (location.IsEmpty) { return; } DocumentLine line = view.Document.GetLine(location.Line); if (line == null || line.Markers == null) { return; } foreach (TextLineMarker marker in line.Markers) { UrlMarker urlMarker = marker as UrlMarker; if (urlMarker != null) { if (urlMarker.StartColumn <= location.Column && location.Column < urlMarker.EndColumn) { ainfo.Add(urlMarker.UrlType == UrlType.Email ? GettextCatalog.GetString("_Write an e-mail to...") : GettextCatalog.GetString("_Open URL..."), urlMarker); ainfo.AddSeparator(); } } } } } }
public void ReportTimings(SourceEditorView sourceEditorView) { if (count == 0) { // No timings recorded. return; } string extension = sourceEditorView.Document.FileName.Extension; var metadata = new Dictionary <string, string> (); if (!string.IsNullOrEmpty(extension)) { metadata ["Extension"] = extension; } var average = totalTime.TotalMilliseconds / count; metadata ["Average"] = average.ToString(); metadata ["First"] = firstTime.Value.TotalMilliseconds.ToString(); metadata ["Maximum"] = maxTime.TotalMilliseconds.ToString(); Counters.Typing.Inc(metadata); }
protected override void OnDestroyed() { ExtensionContext = null; view = null; base.OnDestroyed(); }
void Initialize(SourceEditorView view) { this.view = view; Caret.PositionChanged += delegate { if (Extension != null) { try { Extension.CursorPositionChanged(); } catch (Exception ex) { ReportExtensionError(ex); } } }; Document.TextReplaced += HandleSkipCharsOnReplace; Document.TextReplaced += delegate(object sender, ReplaceEventArgs args) { if (Extension != null) { try { Extension.TextChanged(args.Offset, args.Offset + Math.Max(args.Count, args.Value != null ? args.Value.Length : 0)); } catch (Exception ex) { ReportExtensionError(ex); } } }; UpdateEditMode(); this.GetTextEditorData().Paste += HandleTextPaste; this.ButtonPressEvent += OnPopupMenu; AddinManager.AddExtensionNodeHandler("MonoDevelop/SourceEditor2/TooltipProviders", OnTooltipProviderChanged); }
protected override void OnDestroyed() { view = null; this.ButtonPressEvent -= OnPopupMenu; AddinManager.RemoveExtensionNodeHandler("MonoDevelop/SourceEditor2/TooltipProviders", OnTooltipProviderChanged); base.OnDestroyed(); }
void Initialize(SourceEditorView view) { this.view = view; Caret.PositionChanged += delegate { if (Extension != null) { try { Extension.CursorPositionChanged(); } catch (Exception ex) { ReportExtensionError(ex); } } }; Document.TextReplaced += HandleSkipCharsOnReplace; Document.TextReplaced += delegate(object sender, DocumentChangeEventArgs args) { if (Extension != null) { try { Extension.TextChanged(args.Offset, args.Offset + Math.Max(args.RemovalLength, args.InsertionLength)); } catch (Exception ex) { ReportExtensionError(ex); } } }; UpdateEditMode(); this.DoPopupMenu = ShowPopup; }
void Initialize(SourceEditorView view) { this.view = view; Caret.PositionChanged += delegate { if (Extension != null) { try { Extension.CursorPositionChanged(); } catch (Exception ex) { ReportExtensionError(ex); } } }; Document.TextReplaced += HandleSkipCharsOnReplace; Document.TextReplaced += delegate(object sender, ReplaceEventArgs args) { if (Extension != null) { try { Extension.TextChanged(args.Offset, args.Offset + Math.Max(args.Count, args.Value != null ? args.Value.Length : 0)); } catch (Exception ex) { ReportExtensionError(ex); } } }; UpdateEditMode(); this.GetTextEditorData().Paste += HandleTextPaste; this.DoPopupMenu = ShowPopup; }
void Initialize (SourceEditorView view) { this.view = view; Caret.PositionChanged += delegate { if (Extension != null) { try { Extension.CursorPositionChanged (); } catch (Exception ex) { ReportExtensionError (ex); } } }; Document.TextReplaced += HandleSkipCharsOnReplace; Document.TextReplaced += delegate(object sender, DocumentChangeEventArgs args) { if (Extension != null) { try { Extension.TextChanged (args.Offset, args.Offset + Math.Max (args.RemovalLength, args.InsertionLength)); } catch (Exception ex) { ReportExtensionError (ex); } } }; UpdateEditMode (); this.DoPopupMenu = ShowPopup; }
public static void Add(SourceEditorView sourceEditorView) { if (sourceEditorView.TextEditorType == TextEditorType.Projection) { return; } openFiles.Add(sourceEditorView); }
protected override void OnDestroyed() { ExtensionContext = null; view = null; this.ButtonPressEvent -= OnPopupMenu; base.OnDestroyed(); }
public void TestBug4764() { var data = Create("foo = $"); var ctx = new CodeCompletionContext(); ctx.TriggerOffset = data.Caret.Offset; SourceEditorView.SetCompletionText(data, ctx, "", "(o,s) |;", 0); Check(data, "foo = (o,s) $;"); }
public static void Remove(SourceEditorView sourceEditorView) { if (sourceEditorView.TextEditorType == TextEditorType.Projection) { return; } openFiles.Remove(sourceEditorView); UpdateEolMessages(); }
// new Gdk.Rectangle bounds; public MessageBubbleHighlightPopupWindow (SourceEditorView view, MessageBubbleTextMarker marker) : base (view.TextEditor) { this.marker = marker; ExpandWidth = 36; ExpandHeight = 2; BounceEasing = Easing.Sine; Duration = 150; }
public MessageBubbleHighlightPopupWindow(SourceEditorView view, MessageBubbleTextMarker marker) : base(view.TextEditor) { this.marker = marker; ExpandWidth = 36; ExpandHeight = 2; BounceEasing = Easing.Sine; Duration = 600; }
protected override void OnDestroyed() { ExtensionContext = null; view = null; base.OnDestroyed(); if (Options != null) { Options.Dispose(); base.Options = null; } }
public override MonoDevelop.Ide.Gui.IViewContent CreateContentForMimeType (string mimeType, System.IO.Stream content) { SourceEditorView result = new SourceEditorView (); result.Document.MimeType = mimeType; if (content != null) { using (StreamReader reader = new StreamReader (content)) { result.Document.Text = reader.ReadToEnd (); } } return result; }
void Initialize(SourceEditorView view) { this.view = view; Document.SyntaxModeChanged += delegate { UpdateSemanticHighlighting(); }; UpdateEditMode(); this.DoPopupMenu = ShowPopup; }
public override MonoDevelop.Ide.Gui.IViewContent CreateContentForMimeType(string mimeType, System.IO.Stream content) { SourceEditorView result = new SourceEditorView(); result.Document.MimeType = mimeType; if (content != null) { using (StreamReader reader = new StreamReader(content)) { result.Document.Text = reader.ReadToEnd(); } } return(result); }
protected override void OnDestroyed() { UnregisterAdjustments(); ExtensionContext = null; view = null; base.OnDestroyed(); if (Options != null) { Options.Dispose(); base.Options = null; } }
protected override void OnDestroyed() { IsDestroyed = true; UnregisterAdjustments(); view = null; Document.SyntaxMode = null; base.OnDestroyed(); if (Options != null) { Options.Dispose(); base.Options = null; } }
protected override void OnDestroyed() { TypeSystemService.ParseOperationFinished -= HandleParseOperationFinished; UnregisterAdjustments(); resolveResult = null; Extension = null; ExtensionContext = null; view = null; base.OnDestroyed(); if (Options != null) { Options.Dispose(); base.Options = null; } }
void Initialize (SourceEditorView view) { this.view = view; Caret.PositionChanged += delegate { if (Extension != null) { try { Extension.CursorPositionChanged (); } catch (Exception ex) { ReportExtensionError (ex); } } }; Document.TextReplaced += HandleSkipCharsOnReplace; UpdateEditMode (); this.DoPopupMenu = ShowPopup; }
void Initialize(SourceEditorView view) { this.view = view; Caret.PositionChanged += delegate { if (Extension != null) { try { Extension.CursorPositionChanged(); } catch (Exception ex) { ReportExtensionError(ex); } } }; Document.TextReplaced += HandleSkipCharsOnReplace; UpdateEditMode(); this.DoPopupMenu = ShowPopup; }
protected override void OnDestroyed() { IsDestroyed = true; UnregisterAdjustments(); view = null; var disposableSyntaxMode = Document.SyntaxMode as IDisposable; if (disposableSyntaxMode != null) { disposableSyntaxMode.Dispose(); Document.SyntaxMode = null; } base.OnDestroyed(); if (Options != null) { Options.Dispose(); base.Options = null; } }
protected override void OnDestroyed() { IsDestroyed = true; UnregisterAdjustments(); if (keyPressTimings != null) { keyPressTimings.ReportTimings(view); keyPressTimings = null; } view = null; Document.SyntaxMode = null; base.OnDestroyed(); if (Options != null) { Options.Dispose(); base.Options = null; } }
protected override void OnDestroyed () { ExtensionContext = null; view = null; base.OnDestroyed (); if (Options != null) { Options.Dispose (); base.Options = null; } }
protected override void OnDestroyed () { UnregisterAdjustments (); ExtensionContext = null; view = null; base.OnDestroyed (); if (Options != null) { Options.Dispose (); base.Options = null; } }
protected override void OnDestroyed () { view = null; this.ButtonPressEvent -= OnPopupMenu; AddinManager.RemoveExtensionNodeHandler ("MonoDevelop/SourceEditor2/TooltipProviders", OnTooltipProviderChanged); base.OnDestroyed (); }
public ExtensibleTextEditor(SourceEditorView view) { base.Options = new StyledSourceEditorOptions(view.Project, null); Initialize(view); }
public static void Remove (SourceEditorView sourceEditorView) { openFiles.Remove (sourceEditorView); }
public static void Remove (SourceEditorView sourceEditorView) { openFiles.Remove (sourceEditorView); UpdateEolMessages (); }
public static void Remove(SourceEditorView sourceEditorView) { openFiles.Remove(sourceEditorView); }
static bool SkipView (SourceEditorView view) { return view.Document == null || !view.IsFile || view.IsUntitled; }
protected override void OnDestroyed () { IsDestroyed = true; UnregisterAdjustments (); view = null; var disposableSyntaxMode = Document.SyntaxMode as IDisposable; if (disposableSyntaxMode != null) { disposableSyntaxMode.Dispose (); Document.SyntaxMode = null; } base.OnDestroyed (); if (Options != null) { Options.Dispose (); base.Options = null; } }
public SetCaret (SourceEditorView view, int line, int column, bool highlightCaretLine) { this.view = view; this.line = line; this.column = column; this.highlightCaretLine = highlightCaretLine; }
void Initialize (SourceEditorView view) { this.view = view; Document.SyntaxModeChanged += delegate { UpdateSemanticHighlighting (); }; UpdateEditMode (); this.DoPopupMenu = ShowPopup; }
public ExtensibleTextEditor (SourceEditorView view) { base.Options = new StyledSourceEditorOptions (DefaultSourceEditorOptions.Instance); Initialize (view); }
protected override void OnDestroyed () { ExtensionContext = null; view = null; base.OnDestroyed (); }
static bool SkipView(SourceEditorView view) { return(view.Document == null || !view.IsFile || view.IsUntitled); }
protected override void Run(object data) { MonoDevelop.Ide.Gui.Document doc = IdeApp.Workbench.ActiveDocument; if (doc == null) { return; } SourceEditorView view = IdeApp.Workbench.ActiveDocument.GetContent <SourceEditorView> (); if (view == null) { return; } string abbrevWord; int offset; int startOffset; if (lastView == view && view.TextEditor.Caret.Offset == lastTriggerOffset) { abbrevWord = lastAbbrev; offset = lastStartOffset; } else { abbrevWord = GetWordBeforeCaret(view.TextEditor); lastAbbrev = abbrevWord; offset = view.TextEditor.Caret.Offset - abbrevWord.Length - 1; lastInsertPos = lastTriggerOffset = offset + 1; foundWords.Clear(); foundWords.Add(abbrevWord); curState = AbbrevState.SearchBackward; } lastView = view; switch (curState) { case AbbrevState.SearchBackward: while (offset > 0) { if (IsMatchAt(view, offset, abbrevWord)) { int endOffset = SearchEndPos(offset, view); string curWord = view.TextEditor.Document.GetTextBetween(offset, endOffset); if (foundWords.Contains(curWord)) { offset--; continue; } foundWords.Add(curWord); ReplaceWord(view, curWord); lastStartOffset = offset - 1; return; } offset--; } offset = view.TextEditor.Caret.Offset; curState = AbbrevState.SearchForward; goto case AbbrevState.SearchForward; case AbbrevState.SearchForward: while (offset < view.TextEditor.Document.Length) { if (IsMatchAt(view, offset, abbrevWord)) { int endOffset = SearchEndPos(offset, view); string curWord = view.TextEditor.Document.GetTextBetween(offset, endOffset); if (foundWords.Contains(curWord)) { offset++; continue; } foundWords.Add(curWord); ReplaceWord(view, curWord); lastStartOffset = offset + 1; return; } offset++; } curState = AbbrevState.SearchOtherBuffers; goto case AbbrevState.SearchOtherBuffers; case AbbrevState.SearchOtherBuffers: foreach (Document curDoc in IdeApp.Workbench.Documents) { SourceEditorView otherView = curDoc.GetContent <SourceEditorView> (); if (curDoc == doc && otherView == null) { continue; } for (int i = 0; i < otherView.Document.Length; i++) { if (IsMatchAt(otherView, i, abbrevWord)) { int endOffset = SearchEndPos(i, otherView); string curWord = otherView.TextEditor.Document.GetTextBetween(i, endOffset); if (foundWords.Contains(curWord)) { continue; } foundWords.Add(curWord); } } } curState = AbbrevState.CycleThroughFoundWords; goto case AbbrevState.CycleThroughFoundWords; case AbbrevState.CycleThroughFoundWords: int index = foundWords.IndexOf(view.TextEditor.Document.GetTextAt(lastInsertPos, view.TextEditor.Caret.Offset - lastInsertPos)); if (index < 0) { break; } startOffset = offset; offset = startOffset + foundWords[index].Length; index = (index + foundWords.Count + 1) % foundWords.Count; ReplaceWord(view, foundWords[index]); break; } }
public SourceEditorWidget (SourceEditorView view) { this.view = view; vbox.SetSizeRequest (32, 32); this.lastActiveEditor = this.textEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view); mainsw = new DecoratedScrolledWindow (this); this.textEditorContainer = new TextEditorContainer (textEditor); mainsw.SetTextEditor (textEditorContainer); vbox.PackStart (mainsw, true, true, 0); this.textEditor.Errors = errors; options = this.textEditor.Options; textEditorData = textEditor.GetTextEditorData (); ResetFocusChain (); UpdateLineCol (); // this.IsClassBrowserVisible = this.widget.TextEditor.Options.EnableQuickFinder; vbox.BorderWidth = 0; vbox.Spacing = 0; vbox.Focused += delegate { UpdateLineCol (); }; vbox.Destroyed += delegate { isDisposed = true; StopParseInfoThread (); KillWidgets (); this.textEditor = null; this.lastActiveEditor = null; this.splittedTextEditor = null; view = null; IdeApp.Workbench.StatusBar.ClearCaretState (); if (parseInformationUpdaterWorkerThread != null) { parseInformationUpdaterWorkerThread.Dispose (); parseInformationUpdaterWorkerThread = null; } }; vbox.ShowAll (); parseInformationUpdaterWorkerThread = new BackgroundWorker (); parseInformationUpdaterWorkerThread.WorkerSupportsCancellation = true; parseInformationUpdaterWorkerThread.DoWork += HandleParseInformationUpdaterWorkerThreadDoWork; }
public ExtensibleTextEditor(SourceEditorView view) { base.Options = new StyledSourceEditorOptions(DefaultSourceEditorOptions.Instance); Initialize(view); }
public static void Add (SourceEditorView sourceEditorView) { openFiles.Add (sourceEditorView); }
protected override void OnDestroyed () { TypeSystemService.ParseOperationFinished -= HandleParseOperationFinished; UnregisterAdjustments (); resolveResult = null; Extension = null; ExtensionContext = null; view = null; base.OnDestroyed (); if (Options != null) { Options.Dispose (); base.Options = null; } }
static bool SkipView (SourceEditorView view) { return !view.IsFile || view.IsUntitled; }
public SourceEditorWidget (SourceEditorView view) { this.view = view; vbox.SetSizeRequest (32, 32); this.lastActiveEditor = this.textEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view); this.textEditor.TextArea.FocusInEvent += (o, s) => { lastActiveEditor = (ExtensibleTextEditor)((TextArea)o).GetTextEditorData ().Parent; view.FireCompletionContextChanged (); }; this.textEditor.TextArea.FocusOutEvent += delegate { if (this.splittedTextEditor == null || !splittedTextEditor.TextArea.HasFocus) OnLostFocus (); }; if (IdeApp.CommandService != null) IdeApp.FocusOut += IdeApp_FocusOut; mainsw = new DecoratedScrolledWindow (this); mainsw.SetTextEditor (textEditor); vbox.PackStart (mainsw, true, true, 0); textEditorData = textEditor.GetTextEditorData (); textEditorData.EditModeChanged += TextEditorData_EditModeChanged; ResetFocusChain (); UpdateLineCol (); // this.IsClassBrowserVisible = this.widget.TextEditor.Options.EnableQuickFinder; vbox.BorderWidth = 0; vbox.Spacing = 0; vbox.Focused += delegate { UpdateLineCol (); }; vbox.Destroyed += delegate { if (isDisposed) return; isDisposed = true; StopParseInfoThread (); KillWidgets (); ClearQuickTaskProvider (); ClearUsageTaskProvider (); if (textEditor != null && !textEditor.IsDestroyed) textEditor.Destroy (); if (splittedTextEditor != null && !splittedTextEditor.IsDestroyed) splittedTextEditor.Destroy (); this.lastActiveEditor = null; this.splittedTextEditor = null; this.textEditor = null; textEditorData.EditModeChanged -= TextEditorData_EditModeChanged; textEditorData = null; view = null; parsedDocument = null; // IdeApp.Workbench.StatusBar.ClearCaretState (); }; vbox.ShowAll (); }
public SourceEditorWidget (SourceEditorView view) { this.view = view; vbox.SetSizeRequest (32, 32); this.lastActiveEditor = this.textEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view); this.textEditor.TextArea.FocusInEvent += (o, s) => { lastActiveEditor = (ExtensibleTextEditor)((TextArea)o).GetTextEditorData ().Parent; view.FireCompletionContextChanged (); }; this.textEditor.TextArea.FocusOutEvent += delegate { if (this.splittedTextEditor == null || !splittedTextEditor.TextArea.HasFocus) OnLostFocus (); }; mainsw = new DecoratedScrolledWindow (this); mainsw.SetTextEditor (textEditor); vbox.PackStart (mainsw, true, true, 0); textEditorData = textEditor.GetTextEditorData (); ResetFocusChain (); UpdateLineCol (); // this.IsClassBrowserVisible = this.widget.TextEditor.Options.EnableQuickFinder; vbox.BorderWidth = 0; vbox.Spacing = 0; vbox.Focused += delegate { UpdateLineCol (); }; vbox.Destroyed += delegate { isDisposed = true; RemoveErrorUndelinesResetTimerId (); StopParseInfoThread (); KillWidgets (); foreach (var provider in quickTaskProvider.ToArray ()) { RemoveQuickTaskProvider (provider); } this.lastActiveEditor = null; this.splittedTextEditor = null; view = null; parsedDocument = null; // IdeApp.Workbench.StatusBar.ClearCaretState (); if (parseInformationUpdaterWorkerThread != null) { parseInformationUpdaterWorkerThread.Dispose (); parseInformationUpdaterWorkerThread = null; } }; vbox.ShowAll (); parseInformationUpdaterWorkerThread = new BackgroundWorker (); parseInformationUpdaterWorkerThread.WorkerSupportsCancellation = true; parseInformationUpdaterWorkerThread.DoWork += HandleParseInformationUpdaterWorkerThreadDoWork; }
protected override void OnDestroyed () { ExtensionContext = null; view = null; this.ButtonPressEvent -= OnPopupMenu; base.OnDestroyed (); }
public ExtensibleTextEditor (SourceEditorView view, ISourceEditorOptions options, Mono.TextEditor.Document doc) : base(doc, options) { Initialize (view); }
public ExtensibleTextEditor (SourceEditorView view) { base.Options = new StyledSourceEditorOptions (view.Project, null); Initialize (view); }
protected override void Run (object data) { MonoDevelop.Ide.Gui.Document doc = IdeApp.Workbench.ActiveDocument; if (doc == null) return; SourceEditorView view = IdeApp.Workbench.ActiveDocument.GetContent<SourceEditorView> (); if (view == null) return; string abbrevWord; int offset; int startOffset; if (lastView == view && view.TextEditor.Caret.Offset == lastTriggerOffset) { abbrevWord = lastAbbrev; offset = lastStartOffset; } else { abbrevWord = GetWordBeforeCaret (view.TextEditor); lastAbbrev = abbrevWord; offset = view.TextEditor.Caret.Offset - abbrevWord.Length - 1; lastInsertPos = lastTriggerOffset = offset + 1; foundWords.Clear (); foundWords.Add (abbrevWord); curState = AbbrevState.SearchBackward; } lastView = view; switch (curState) { case AbbrevState.SearchBackward: while (offset > 0) { if (IsMatchAt (view, offset, abbrevWord)) { int endOffset = SearchEndPos (offset, view); string curWord = view.TextEditor.Document.GetTextBetween (offset, endOffset); if (foundWords.Contains (curWord)) { offset--; continue; } foundWords.Add (curWord); ReplaceWord (view, curWord); lastStartOffset = offset - 1; return; } offset--; } offset = view.TextEditor.Caret.Offset; curState = AbbrevState.SearchForward; goto case AbbrevState.SearchForward; case AbbrevState.SearchForward: while (offset < view.TextEditor.Document.TextLength) { if (IsMatchAt (view, offset, abbrevWord)) { int endOffset = SearchEndPos (offset, view); string curWord = view.TextEditor.Document.GetTextBetween (offset, endOffset); if (foundWords.Contains (curWord)) { offset++; continue; } foundWords.Add (curWord); ReplaceWord (view, curWord); lastStartOffset = offset + 1; return; } offset++; } curState = AbbrevState.SearchOtherBuffers; goto case AbbrevState.SearchOtherBuffers; case AbbrevState.SearchOtherBuffers: foreach (Document curDoc in IdeApp.Workbench.Documents) { SourceEditorView otherView = curDoc.GetContent<SourceEditorView> (); if (curDoc == doc || otherView == null || otherView.Document == null) continue; for (int i = 0; i < otherView.Document.TextLength; i++) { if (IsMatchAt (otherView, i, abbrevWord)) { int endOffset = SearchEndPos (i, otherView); string curWord = otherView.TextEditor.Document.GetTextBetween (i, endOffset); if (foundWords.Contains (curWord)) continue; foundWords.Add (curWord); } } } curState = AbbrevState.CycleThroughFoundWords; goto case AbbrevState.CycleThroughFoundWords; case AbbrevState.CycleThroughFoundWords: int index = foundWords.IndexOf (view.TextEditor.Document.GetTextAt (lastInsertPos, view.TextEditor.Caret.Offset - lastInsertPos)); if (index < 0) break; startOffset = offset; offset = startOffset + foundWords[index].Length; index = (index + foundWords.Count + 1) % foundWords.Count; ReplaceWord (view, foundWords[index]); break; } }
public static void Add(SourceEditorView sourceEditorView) { openFiles.Add(sourceEditorView); }
public ExtensibleTextEditor(SourceEditorView view, ISourceEditorOptions options, Mono.TextEditor.TextDocument doc) : base(doc, options) { Initialize(view); }
public static void Remove(SourceEditorView sourceEditorView) { openFiles.Remove(sourceEditorView); UpdateEolMessages(); }
static bool SkipView(SourceEditorView view) { return(!view.IsFile || view.IsUntitled); }
public SourceEditorWidget (SourceEditorView view) { this.view = view; vbox.SetSizeRequest (32, 32); this.lastActiveEditor = this.textEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view); mainsw = new DecoratedScrolledWindow (this); this.textEditorContainer = new TextEditorContainer (textEditor); mainsw.SetTextEditor (textEditorContainer); vbox.PackStart (mainsw, true, true, 0); this.textEditor.Errors = errors; options = this.textEditor.Options; textEditorData = textEditor.GetTextEditorData (); ResetFocusChain (); UpdateLineCol (); ProjectDomService.ParsedDocumentUpdated += OnParseInformationChanged; // this.IsClassBrowserVisible = this.widget.TextEditor.Options.EnableQuickFinder; vbox.BorderWidth = 0; vbox.Spacing = 0; vbox.Focused += delegate { UpdateLineCol (); }; vbox.Destroyed += delegate { isDisposed = true; StopParseInfoThread (); KillWidgets (); this.textEditor = null; this.lastActiveEditor = null; this.splittedTextEditor = null; view = null; ProjectDomService.ParsedDocumentUpdated -= OnParseInformationChanged; IdeApp.Workbench.StatusBar.ClearCaretState (); }; vbox.ShowAll (); }