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


C# SourceEditor.ExtensibleTextEditor类代码示例

本文整理汇总了C#中MonoDevelop.SourceEditor.ExtensibleTextEditor的典型用法代码示例。如果您正苦于以下问题:C# ExtensibleTextEditor类的具体用法?C# ExtensibleTextEditor怎么用?C# ExtensibleTextEditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExtensibleTextEditor类属于MonoDevelop.SourceEditor命名空间,在下文中一共展示了ExtensibleTextEditor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowOverlay

		public void ShowOverlay (ExtensibleTextEditor textEditor)
		{
			this.textEditor = textEditor;
			this.ShowAll (); 
			textEditor.AddTopLevelWidget (this, 0, 0); 
			textEditor.SizeAllocated += HandleSizeAllocated;
			var child = (MonoTextEditor.EditorContainerChild)textEditor [this];
			child.FixedPosition = true;
		}
开发者ID:xinfushe,项目名称:monodevelop,代码行数:9,代码来源:OverlayMessageWindow.cs

示例2: UnitTestMarker

		public UnitTestMarker (ExtensibleTextEditor textEditor, UnitTestMarkerHost host, UnitTestLocation unitTest)
		{
			if (textEditor == null)
				throw new ArgumentNullException ("textEditor");
			if (host == null)
				throw new ArgumentNullException ("host");
			this.textEditor = textEditor;
			this.host = host;
			this.unitTest = unitTest;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:10,代码来源:UnitTestMarker.cs

示例3: LanguageItemWindow

		public LanguageItemWindow (ExtensibleTextEditor ed, Gdk.ModifierType modifierState, ResolveResult result, string errorInformations, IParsedFile unit)
		{
			Ambience ambience = AmbienceService.GetAmbience (ed.Document.MimeType);
			string tooltip = null;
			if (result is UnknownIdentifierResolveResult) {
				tooltip = string.Format ("error CS0103: The name `{0}' does not exist in the current context", ((UnknownIdentifierResolveResult)result).Identifier);
			} else if (result is UnknownMemberResolveResult) {
				var ur = (UnknownMemberResolveResult)result;
				if (ur.TargetType.Kind != TypeKind.Unknown)
					tooltip = string.Format ("error CS0117: `{0}' does not contain a definition for `{1}'", ur.TargetType.FullName, ur.MemberName);
			} else if (result != null && ed.TextEditorResolverProvider != null) {
				tooltip = ed.TextEditorResolverProvider.CreateTooltip (unit, result, errorInformations, ambience, modifierState);
				// TODO: Type sysetm conversion. (btw. this isn't required because the analyzer should provide semantic error messages.)	
				//				if (result.ResolveErrors.Count > 0) {
				//					StringBuilder sb = new StringBuilder ();
				//					sb.Append (tooltip);
				//					sb.AppendLine ();
				//					sb.AppendLine ();
				//					sb.AppendLine (GettextCatalog.GetPluralString ("Error:", "Errors:", result.ResolveErrors.Count));
				//					for (int i = 0; i < result.ResolveErrors.Count; i++) {
				//						sb.Append ('\t');
				//						sb.Append (result.ResolveErrors[i]);
				//						if (i + 1 < result.ResolveErrors.Count) 
				//							sb.AppendLine ();
				//					}
				//					tooltip = sb.ToString ();
				//				}
			} else {
				tooltip = errorInformations;
			}
			if (string.IsNullOrEmpty (tooltip)|| tooltip == "?") {
				IsEmpty = true;
				return;
			}

			var label = new MonoDevelop.Components.FixedWidthWrapLabel () {
				Wrap = Pango.WrapMode.WordChar,
				Indent = -20,
				BreakOnCamelCasing = true,
				BreakOnPunctuation = true,
				Markup = tooltip,
			};
			this.BorderWidth = 3;
			Add (label);
			UpdateFont (label);
			
			EnableTransparencyControl = true;
		}
开发者ID:nocache,项目名称:monodevelop,代码行数:48,代码来源:LanguageItemWindow.cs

示例4: LanguageItemWindow

		public LanguageItemWindow (ExtensibleTextEditor ed, Gdk.ModifierType modifierState, ResolveResult result, string errorInformations, ICompilationUnit unit)
		{
			ProjectDom dom = ed.ProjectDom;
			Ambience ambience = AmbienceService.GetAmbience (ed.Document.MimeType);
			
			string tooltip = null;
			if (result != null && ed.TextEditorResolverProvider != null) {
				tooltip = ed.TextEditorResolverProvider.CreateTooltip (dom, unit, result, errorInformations, ambience, modifierState);
				if (result.ResolveErrors.Count > 0) {
					StringBuilder sb = new StringBuilder ();
					sb.Append (tooltip);
					sb.AppendLine ();
					sb.AppendLine ();
					sb.AppendLine (GettextCatalog.GetPluralString ("Error:", "Errors:", result.ResolveErrors.Count));
					for (int i = 0; i < result.ResolveErrors.Count; i++) {
						sb.Append ('\t');
						sb.Append (result.ResolveErrors[i]);
						if (i + 1 < result.ResolveErrors.Count) 
							sb.AppendLine ();
					}
					tooltip = sb.ToString ();
				}
			} else {
				tooltip = errorInformations;
			}
			if (string.IsNullOrEmpty (tooltip)) {
				IsEmpty = true;
				return;
			}

			var label = new MonoDevelop.Components.FixedWidthWrapLabel () {
				Wrap = Pango.WrapMode.WordChar,
				Indent = -20,
				BreakOnCamelCasing = true,
				BreakOnPunctuation = true,
				Markup = tooltip,
			};
			this.BorderWidth = 3;
			Add (label);
			UpdateFont (label);
			
			EnableTransparencyControl = true;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:43,代码来源:LanguageItemWindow.cs

示例5: SetLastActiveEditor

		internal void SetLastActiveEditor (ExtensibleTextEditor editor)
		{
			this.lastActiveEditor = editor;
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:4,代码来源:SourceEditorWidget.cs

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

示例7: TabAction

		public TabAction (ExtensibleTextEditor editor)
		{
			this.editor = editor;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:4,代码来源:EditActions.cs

示例8: LastEditorExtension

			public LastEditorExtension (ExtensibleTextEditor ext)
			{
				if (ext == null)
					throw new ArgumentNullException ("ext");
				this.ext = ext;
			}
开发者ID:kdubau,项目名称:monodevelop,代码行数:6,代码来源:ExtensibleTextEditor.cs

示例9: IdeViMode

 public IdeViMode(ExtensibleTextEditor editor, MonoDevelop.Ide.Gui.Document doc)
     : base(doc)
 {
     this.editor = editor;
     tabAction = new TabAction (editor);
 }
开发者ID:csammis,项目名称:VimAddin,代码行数:6,代码来源:IdeViMode.cs

示例10: initDocument

		private void initDocument (Control parent, DesignerHost host)
		{
			System.Diagnostics.Trace.WriteLine ("Creating document...");

			// get the ExtensibleTextEditor instance of the Source code's view
			textEditor = IdeApp.Workbench.ActiveDocument.PrimaryView.GetContent<SourceEditorView> ().TextEditor;

			if (!(parent is WebFormPage))
				throw new NotImplementedException ("Only WebFormsPages can have a document for now");
			this.parent = parent;
			this.host = host;
			
			if (!host.Loading)
				throw new InvalidOperationException ("The document cannot be initialised or loaded unless the host is loading"); 

			directives = new Hashtable (StringComparer.InvariantCultureIgnoreCase);
			txtDocDirty = true;
			suppressSerialization = false;
			// create and set the event, to let the parser run the first time
			updateEditorContent = new ManualResetEvent (true);
			undoTracker = new UndoTracker ();
			undoHandler = IdeApp.Workbench.ActiveDocument.PrimaryView.GetContent <IUndoHandler> ();
			if (undoHandler == null)
				throw new NullReferenceException ("Could not obtain the IUndoHandler from the SourceEditorView");
		}
开发者ID:segaman,项目名称:monodevelop,代码行数:25,代码来源:Document.cs

示例11: NewIdeViMode

		public NewIdeViMode (ExtensibleTextEditor editor)
		{
			this.editor = editor;
		}
开发者ID:sehe,项目名称:monodevelop,代码行数:4,代码来源:IdeViMode.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: Split

		public void Split (bool vSplit)
		{
			double vadjustment = this.mainsw.Vadjustment.Value;
			double hadjustment = this.mainsw.Hadjustment.Value;
			
			if (splitContainer != null)
				Unsplit ();
			vbox.Remove (this.mainsw);
			
			RecreateMainSw ();

			this.splitContainer = vSplit ? (Gtk.Paned)new VPaned () : (Gtk.Paned)new HPaned ();

			splitContainer.Add1 (mainsw);

			this.splitContainer.ButtonPressEvent += delegate(object sender, ButtonPressEventArgs args) {
				if (args.Event.Type == Gdk.EventType.TwoButtonPress && args.RetVal == null) {
					Unsplit ();
				}
			};
			secondsw = new DecoratedScrolledWindow (this);
			splittedTextEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view, textEditor.Options, textEditor.Document);
			splittedTextEditor.TextArea.FocusInEvent += (o, s) => {
				lastActiveEditor = (ExtensibleTextEditor)((TextArea)o).GetTextEditorData ().Parent;
				view.FireCompletionContextChanged ();
			};
			splittedTextEditor.TextArea.FocusOutEvent += delegate {
				 if (!textEditor.TextArea.HasFocus)
					OnLostFocus ();
			};
			splittedTextEditor.Extension = textEditor.Extension;
			if (textEditor.GetTextEditorData ().HasIndentationTracker)
				splittedTextEditor.GetTextEditorData ().IndentationTracker = textEditor.GetTextEditorData ().IndentationTracker;
			splittedTextEditor.Document.BracketMatcher = textEditor.Document.BracketMatcher;

			secondsw.SetTextEditor (splittedTextEditor);
			splitContainer.Add2 (secondsw);
			
			vbox.PackStart (splitContainer, true, true, 0);
			splitContainer.Position = (vSplit ? vbox.Allocation.Height : vbox.Allocation.Width) / 2 - 1;
			
			vbox.ShowAll ();
			secondsw.Vadjustment.Value = mainsw.Vadjustment.Value = vadjustment; 
			secondsw.Hadjustment.Value = mainsw.Hadjustment.Value = hadjustment;
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:45,代码来源:SourceEditorWidget.cs

示例14: IdeViMode

		public IdeViMode (ExtensibleTextEditor editor)
		{
			this.editor = editor;
			tabAction = new TabAction (editor);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:5,代码来源:IdeViMode.cs

示例15: OnDestroyed

		protected override void OnDestroyed ()
		{
			base.OnDestroyed ();
			if (textEditor != null) {
				textEditor.SizeAllocated -= HandleSizeAllocated;
				textEditor = null;
			}
		}
开发者ID:xinfushe,项目名称:monodevelop,代码行数:8,代码来源:OverlayMessageWindow.cs


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