本文整理汇总了C#中MonoDevelop.SourceEditor.SourceEditorView类的典型用法代码示例。如果您正苦于以下问题:C# SourceEditorView类的具体用法?C# SourceEditorView怎么用?C# SourceEditorView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SourceEditorView类属于MonoDevelop.SourceEditor命名空间,在下文中一共展示了SourceEditorView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
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;
}
示例2: Initialize
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;
}
示例3: MessageBubbleHighlightPopupWindow
// 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;
}
示例4: CreateContentForMimeType
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;
}
示例5: Initialize
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;
}
示例6: SetCaret
public SetCaret (SourceEditorView view, int line, int column, bool highlightCaretLine)
{
this.view = view;
this.line = line;
this.column = column;
this.highlightCaretLine = highlightCaretLine;
}
示例7: Remove
public static void Remove (SourceEditorView sourceEditorView)
{
openFiles.Remove (sourceEditorView);
UpdateEolMessages ();
}
示例8: ExtensibleTextEditor
public ExtensibleTextEditor (SourceEditorView view)
{
base.Options = new StyledSourceEditorOptions (view.Project, null);
Initialize (view);
}
示例9: SkipView
static bool SkipView (SourceEditorView view)
{
return view.Document == null || !view.IsFile || view.IsUntitled;
}
示例10: Remove
public static void Remove (SourceEditorView sourceEditorView)
{
openFiles.Remove (sourceEditorView);
}
示例11: SourceEditorWidget
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;
}
示例12: SourceEditorWidget
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 ();
}
示例13: Add
public static void Add (SourceEditorView sourceEditorView)
{
openFiles.Add (sourceEditorView);
}
示例14: ExtensibleTextEditor
public ExtensibleTextEditor (SourceEditorView view)
{
base.Options = new StyledSourceEditorOptions (DefaultSourceEditorOptions.Instance);
Initialize (view);
}
示例15: SkipView
static bool SkipView (SourceEditorView view)
{
return !view.IsFile || view.IsUntitled;
}