/// <summary> /// Creates an EditorPoints object from the given TextSelection. /// Normally the process modifies the TextSelection, but if /// keepSelection is set to true, the TextSelection is restored /// before returning to the caller. /// </summary> /// <param name="sel"> /// The TextSelection from which to create the EditorPoints object. /// </param> /// <param name="keepSelection"> /// (optional) Whether to prevent changes to the TextSelection. /// </param> /// <returns> /// The editor points. /// </returns> public static EditorPoints GetEditorPoints(TextSelection sel) { var ep = new EditorPoints(sel); ep.RestoreSelectedText(sel); return(ep); }
/// <summary> /// Creates an EditorPoints object from the given TextSelection. /// Normally the process modifies the TextSelection, but if /// keepSelection is set to true, the TextSelection is restored /// before returning to the caller. /// </summary> /// <param name="sel"> /// The TextSelection from which to create the EditorPoints object. /// </param> /// <param name="keepSelection"> /// (optional) Whether to prevent changes to the TextSelection. /// </param> /// <returns> /// The editor points. /// </returns> public static EditorPoints GetEditorPoints(TextSelection sel) { logger.Trace("Entered GetEditorPoints()"); var ep = new EditorPoints(sel); ep.RestoreSelectedText(sel); return(ep); }