/// <inheritdoc/>
 public override void Insert(InsertionContext context)
 {
     if (text != null)
     {
         context.InsertText(text);
     }
 }
예제 #2
0
 /// <inheritdoc/>
 public override void Insert(InsertionContext context)
 {
     context.InsertText(context.SelectedText);
     if (string.IsNullOrEmpty(context.SelectedText))
     {
         SnippetCaretElement.SetCaret(context);
     }
 }
		/// <inheritdoc/>
		public override void Insert(InsertionContext context)
		{
			if (targetElement != null) {
				int start = context.InsertionPosition;
				string inputText = targetElement.Text;
				if (inputText != null) {
					context.InsertText(ConvertText(inputText));
				}
				int end = context.InsertionPosition;
				AnchorSegment segment = new AnchorSegment(context.Document, start, end - start);
				context.RegisterActiveElement(this, new BoundActiveElement(context, targetElement, this, segment));
			}
		}
예제 #4
0
 /// <inheritdoc/>
 public override void Insert(InsertionContext context)
 {
     if (targetElement != null)
     {
         int    start     = context.InsertionPosition;
         string inputText = targetElement.Text;
         if (inputText != null)
         {
             context.InsertText(ConvertText(inputText));
         }
         int           end     = context.InsertionPosition;
         AnchorSegment segment = new AnchorSegment(context.Document, start, end - start);
         context.RegisterActiveElement(this, new BoundActiveElement(context, targetElement, this, segment));
     }
 }
예제 #5
0
		/// <inheritdoc/>
		public override void Insert(InsertionContext context)
		{
			if (targetElement != null) {
				TextAnchor start = context.Document.CreateAnchor(context.InsertionPosition);
				start.MovementType = AnchorMovementType.BeforeInsertion;
				start.SurviveDeletion = true;
				string inputText = targetElement.Text;
				if (inputText != null) {
					context.InsertText(ConvertText(inputText));
				}
				TextAnchor end = context.Document.CreateAnchor(context.InsertionPosition);
				end.MovementType = AnchorMovementType.BeforeInsertion;
				end.SurviveDeletion = true;
				AnchorSegment segment = new AnchorSegment(start, end);
				context.RegisterActiveElement(this, new BoundActiveElement(context, targetElement, this, segment));
			}
		}
예제 #6
0
		/// <inheritdoc/>
		public override void Insert(InsertionContext context)
		{
			if (targetElement != null) {
				TextAnchor start = context.Document.CreateAnchor(context.InsertionPosition);
				start.MovementType = AnchorMovementType.BeforeInsertion;
				start.SurviveDeletion = true;
				string inputText = targetElement.Text;
				if (inputText != null) {
					context.InsertText(ConvertText(inputText));
				}
				TextAnchor end = context.Document.CreateAnchor(context.InsertionPosition);
				end.MovementType = AnchorMovementType.BeforeInsertion;
				end.SurviveDeletion = true;
				AnchorSegment segment = new AnchorSegment(start, end);
				context.RegisterActiveElement(this, new BoundActiveElement(context, targetElement, this, segment));
			}
		}
예제 #7
0
		/// <inheritdoc/>
		public override void Insert(InsertionContext context)
		{
			context.InsertText(context.SelectedText);
			if (string.IsNullOrEmpty(context.SelectedText))
				SnippetCaretElement.SetCaret(context);
		}
예제 #8
0
		/// <inheritdoc/>
		public override void Insert(InsertionContext context)
		{
			if (text != null)
				context.InsertText(text);
		}