当前位置: 首页>>代码示例>>C#>>正文


C# SourceEditor.SourceEditorView类代码示例

本文整理汇总了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;
		}
开发者ID:txdv,项目名称:monodevelop,代码行数:28,代码来源:ExtensibleTextEditor.cs

示例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;
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:30,代码来源:ExtensibleTextEditor.cs

示例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;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:12,代码来源:MessageBubbleHighlightPopupWindow.cs

示例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;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:11,代码来源:SourceEditorDisplayBinding.cs

示例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;
		}
开发者ID:John-Colvin,项目名称:monodevelop,代码行数:18,代码来源:ExtensibleTextEditor.cs

示例6: SetCaret

			public SetCaret (SourceEditorView view, int line, int column, bool highlightCaretLine)
			{
				this.view = view;
				this.line = line;
				this.column = column;
				this.highlightCaretLine = highlightCaretLine;
 			}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:SourceEditorView.cs

示例7: Remove

		public static void Remove (SourceEditorView sourceEditorView)
		{
			openFiles.Remove (sourceEditorView);
			UpdateEolMessages ();
		}
开发者ID:hbons,项目名称:monodevelop,代码行数:5,代码来源:FileRegistry.cs

示例8: ExtensibleTextEditor

		public ExtensibleTextEditor (SourceEditorView view)
		{
			base.Options = new StyledSourceEditorOptions (view.Project, null);
			Initialize (view);
		}
开发者ID:silk,项目名称:monodevelop,代码行数:5,代码来源:ExtensibleTextEditor.cs

示例9: SkipView

		static bool SkipView (SourceEditorView view)
		{
			return view.Document == null || !view.IsFile || view.IsUntitled;
		}
开发者ID:hbons,项目名称:monodevelop,代码行数:4,代码来源:FileRegistry.cs

示例10: Remove

		public static void Remove (SourceEditorView sourceEditorView)
		{
			openFiles.Remove (sourceEditorView);
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:4,代码来源:FileRegistry.cs

示例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;
		}
开发者ID:silk,项目名称:monodevelop,代码行数:44,代码来源:SourceEditorWidget.cs

示例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 ();

		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:61,代码来源:SourceEditorWidget.cs

示例13: Add

		public static void Add (SourceEditorView sourceEditorView)
		{
			openFiles.Add (sourceEditorView);
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:4,代码来源:FileRegistry.cs

示例14: ExtensibleTextEditor

		public ExtensibleTextEditor (SourceEditorView view)
		{
			base.Options = new StyledSourceEditorOptions (DefaultSourceEditorOptions.Instance);
			Initialize (view);
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:5,代码来源:ExtensibleTextEditor.cs

示例15: SkipView

		static bool SkipView (SourceEditorView view)
		{
			return !view.IsFile || view.IsUntitled;
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:4,代码来源:FileRegistry.cs


注:本文中的MonoDevelop.SourceEditor.SourceEditorView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。