Browse Source

V2 Cleanup Batch 1 (Per #3253) (#3255)

* Replace all 342 `== null` with `is null`

* Replace 354 `!= null` with `is { }`

* Wrap these in conditionals since they break tests against Release configuration

The members they depend on do not exist in Release configuration

* Split these up and dispose properly

This test needs to be revisited for several reasons at some point.

* Fix release configuration tests

* Declare interface these already support

* Annotate constructor properly and use throw helper

* Move class to its own file

* Rename these files so they nest in the solution explorer

* Make this a record type and remove now-redundant/illegal members

* Reference passing to avoid some struct copies

* Simplify this

* Carry reference passing through as appropriate

* Turn this into a record struct

* Remove unused internal constructor and its test

It was only used by that test.

* Simplify this constructor

* This should be a property

* Simplify constructor

* Simplify GetHashCode

* Mark this ignored just in case

* Missed a couple of opportunities for reference passing

* record struct already does this by value

* Remove unused class

* Simplify the type initializer and Reset method

* Implement INotifyCollectionChanged and IDictionary by delegating to ColorSchemes

* Fix for reflection-based configuration

* Make CI  build happy by disambiguiating this attribute

* Add PERF, NOTE, QUESTION, and CONCURRENCY tags for the todo explorer

* Make this string comparison faster.

* Add a tag for unclear intent

* This is a constant

* Turn this into a constant via use of a unicode literal

* Remove this method and its test

It is unused
There's no guarantee at all that the parent process is the terminal.
There are good reasons, including that one, why there's no simple way to do it in .net.
It's also of course a windows-only thing, if using WMI.

* With the WMI method gone, we no longer need this

* Make this more efficient

* Add detail to this property's XmlDoc

* Move the general properties up top because order matters

* Make sure any constants defined at higher levels are not clobbered and define a couple more

* Put InternalsVisibleTo in its own group

* Sort dependencies alphabetically and update

* Global usings

* Split to one type per file

* Collection expression

* Fix naming

* Inline to avoid copies

* This is already a value copy (struct)

* Combine to one non-destructive mutation

* Avoid some potential boxing

* Turn on null analysis here

* Remove unnecessary cast and use real type name

* Seal this

* Fix name

* Move nested class to a nested file (no type layout change made)

* Undo naming change that isn't changed globally until next batch
dodexahedron 1 year ago
parent
commit
55cb3e76b4

+ 1 - 1
Terminal.Gui/Application.cs

@@ -253,7 +253,7 @@ public static partial class Application
             else
             {
                 List<Type> drivers = GetDriverTypes ();
-                Type driverType = drivers.FirstOrDefault (t => t.Name.ToLower () == ForceDriver.ToLower ());
+                Type driverType = drivers.FirstOrDefault (t => t.Name.Equals (ForceDriver, StringComparison.InvariantCultureIgnoreCase));
 
                 if (driverType is { })
                 {

+ 2 - 42
Terminal.Gui/ConsoleDrivers/EscSeqUtils/EscSeqUtils.cs

@@ -1,7 +1,3 @@
-using System.Diagnostics;
-using System.Management;
-using System.Runtime.InteropServices;
-
 namespace Terminal.Gui;
 
 /// <summary>
@@ -44,12 +40,12 @@ public static class EscSeqUtils
     /// <summary>
     ///     Escape key code (ASCII 27/0x1B).
     /// </summary>
-    public static readonly char KeyEsc = (char)KeyCode.Esc;
+    public const char KeyEsc = (char)KeyCode.Esc;
 
     /// <summary>
     ///     ESC [ - The CSI (Control Sequence Introducer).
     /// </summary>
-    public static readonly string CSI = $"{KeyEsc}[";
+    public const string CSI = "\u001B[";
 
     /// <summary>
     ///     ESC [ ? 1047 h - Activate xterm alternative buffer (no backscroll)
@@ -1019,42 +1015,6 @@ public static class EscSeqUtils
         //}
     }
 
-    // TODO: Move this out of here and into ConsoleDriver or somewhere else.
-    /// <summary>
-    ///     Get the terminal that holds the console driver.
-    /// </summary>
-    /// <param name="process">The process.</param>
-    /// <returns>If supported the executable console process, null otherwise.</returns>
-    public static Process GetParentProcess (Process process)
-    {
-        if (!RuntimeInformation.IsOSPlatform (OSPlatform.Windows))
-        {
-            return null;
-        }
-
-        string query = "SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = " + process.Id;
-
-        using (var mos = new ManagementObjectSearcher (query))
-        {
-            foreach (ManagementObject mo in mos.Get ())
-            {
-                if (mo ["ParentProcessId"] is { })
-                {
-                    try
-                    {
-                        var id = Convert.ToInt32 (mo ["ParentProcessId"]);
-
-                        return Process.GetProcessById (id);
-                    }
-                    catch
-                    { }
-                }
-            }
-        }
-
-        return null;
-    }
-
     /// <summary>
     ///     Ensures a console key is mapped to one that works correctly with ANSI escape sequences.
     /// </summary>

+ 20 - 0
Terminal.Gui/Drawing/IntersectionDefinition.cs

@@ -0,0 +1,20 @@
+namespace Terminal.Gui;
+
+internal class IntersectionDefinition
+{
+    internal IntersectionDefinition (Point point, IntersectionType type, StraightLine line)
+    {
+        Point = point;
+        Type = type;
+        Line = line;
+    }
+
+    /// <summary>The line that intersects <see cref="Point"/></summary>
+    internal StraightLine Line { get; }
+
+    /// <summary>The point at which the intersection happens</summary>
+    internal Point Point { get; }
+
+    /// <summary>Defines how <see cref="Line"/> position relates to <see cref="Point"/>.</summary>
+    internal IntersectionType Type { get; }
+}

+ 19 - 0
Terminal.Gui/Drawing/IntersectionRuneType.cs

@@ -0,0 +1,19 @@
+namespace Terminal.Gui;
+
+/// <summary>The type of Rune that we will use before considering double width, curved borders etc</summary>
+internal enum IntersectionRuneType
+{
+    None,
+    Dot,
+    ULCorner,
+    URCorner,
+    LLCorner,
+    LRCorner,
+    TopTee,
+    BottomTee,
+    RightTee,
+    LeftTee,
+    Cross,
+    HLine,
+    VLine
+}

+ 28 - 0
Terminal.Gui/Drawing/IntersectionType.cs

@@ -0,0 +1,28 @@
+namespace Terminal.Gui;
+
+internal enum IntersectionType
+{
+    /// <summary>There is no intersection</summary>
+    None,
+
+    /// <summary>A line passes directly over this point traveling along the horizontal axis</summary>
+    PassOverHorizontal,
+
+    /// <summary>A line passes directly over this point traveling along the vertical axis</summary>
+    PassOverVertical,
+
+    /// <summary>A line starts at this point and is traveling up</summary>
+    StartUp,
+
+    /// <summary>A line starts at this point and is traveling right</summary>
+    StartRight,
+
+    /// <summary>A line starts at this point and is traveling down</summary>
+    StartDown,
+
+    /// <summary>A line starts at this point and is traveling left</summary>
+    StartLeft,
+
+    /// <summary>A line exists at this point who has 0 length</summary>
+    Dot
+}

+ 14 - 127
Terminal.Gui/Drawing/LineCanvas.cs

@@ -1,58 +1,12 @@
-#nullable enable
+#nullable enable
 namespace Terminal.Gui;
 
-/// <summary>Defines the style of lines for a <see cref="LineCanvas"/>.</summary>
-public enum LineStyle
-{
-    /// <summary>No border is drawn.</summary>
-    None,
-
-    /// <summary>The border is drawn using thin line CM.Glyphs.</summary>
-    Single,
-
-    /// <summary>The border is drawn using thin line glyphs with dashed (double and triple) straight lines.</summary>
-    Dashed,
-
-    /// <summary>The border is drawn using thin line glyphs with short dashed (triple and quadruple) straight lines.</summary>
-    Dotted,
-
-    /// <summary>The border is drawn using thin double line CM.Glyphs.</summary>
-    Double,
-
-    /// <summary>The border is drawn using heavy line CM.Glyphs.</summary>
-    Heavy,
-
-    /// <summary>The border is drawn using heavy line glyphs with dashed (double and triple) straight lines.</summary>
-    HeavyDashed,
-
-    /// <summary>The border is drawn using heavy line glyphs with short dashed (triple and quadruple) straight lines.</summary>
-    HeavyDotted,
-
-    /// <summary>The border is drawn using thin line glyphs with rounded corners.</summary>
-    Rounded,
-
-    /// <summary>The border is drawn using thin line glyphs with rounded corners and dashed (double and triple) straight lines.</summary>
-    RoundedDashed,
-
-    /// <summary>
-    ///     The border is drawn using thin line glyphs with rounded corners and short dashed (triple and quadruple)
-    ///     straight lines.
-    /// </summary>
-    RoundedDotted
-
-    // TODO: Support Ruler
-    ///// <summary> 
-    ///// The border is drawn as a diagnostic ruler ("|123456789...").
-    ///// </summary>
-    //Ruler
-}
-
 /// <summary>Facilitates box drawing and line intersection detection and rendering.  Does not support diagonal lines.</summary>
 public class LineCanvas : IDisposable
 {
-    private readonly List<StraightLine> _lines = new ();
+    private readonly List<StraightLine> _lines = [];
 
-    private readonly Dictionary<IntersectionRuneType, IntersectionRuneResolver> runeResolvers = new ()
+    private readonly Dictionary<IntersectionRuneType, IntersectionRuneResolver> _runeResolvers = new ()
     {
         {
             IntersectionRuneType.ULCorner,
@@ -128,22 +82,19 @@ public class LineCanvas : IDisposable
 
                 for (var i = 1; i < _lines.Count; i++)
                 {
-                    StraightLine line = _lines [i];
-                    Rect lineBounds = line.Bounds;
-                    bounds = Rect.Union (bounds, lineBounds);
-                }
-
-                if (bounds.Width == 0)
-                {
-                    bounds.Width = 1;
+                    bounds = Rect.Union (bounds, _lines [i].Bounds);
                 }
 
-                if (bounds.Height == 0)
+                if (bounds is {Width: 0} or {Height: 0})
                 {
-                    bounds.Height = 1;
+                    bounds = bounds with
+                    {
+                        Width = Math.Clamp (bounds.Width, 1, short.MaxValue),
+                        Height = Math.Clamp (bounds.Height, 1, short.MaxValue)
+                    };
                 }
 
-                _cachedBounds = new Rect (bounds.X, bounds.Y, bounds.Width, bounds.Height);
+                _cachedBounds = bounds;
             }
 
             return _cachedBounds;
@@ -358,7 +309,7 @@ public class LineCanvas : IDisposable
 
     private void ConfigurationManager_Applied (object? sender, ConfigurationManagerEventArgs e)
     {
-        foreach (KeyValuePair<IntersectionRuneType, IntersectionRuneResolver> irr in runeResolvers)
+        foreach (KeyValuePair<IntersectionRuneType, IntersectionRuneResolver> irr in _runeResolvers)
         {
             irr.Value.SetGlyphs ();
         }
@@ -404,7 +355,7 @@ public class LineCanvas : IDisposable
 
         IntersectionRuneType runeType = GetRuneTypeForIntersects (intersects);
 
-        if (runeResolvers.TryGetValue (runeType, out IntersectionRuneResolver? resolver))
+        if (_runeResolvers.TryGetValue (runeType, out IntersectionRuneResolver? resolver))
         {
             return resolver.GetRuneForIntersects (driver, intersects);
         }
@@ -892,68 +843,4 @@ public class LineCanvas : IDisposable
             _normal = Glyphs.URCorner;
         }
     }
-}
-
-internal class IntersectionDefinition
-{
-    internal IntersectionDefinition (Point point, IntersectionType type, StraightLine line)
-    {
-        Point = point;
-        Type = type;
-        Line = line;
-    }
-
-    /// <summary>The line that intersects <see cref="Point"/></summary>
-    internal StraightLine Line { get; }
-
-    /// <summary>The point at which the intersection happens</summary>
-    internal Point Point { get; }
-
-    /// <summary>Defines how <see cref="Line"/> position relates to <see cref="Point"/>.</summary>
-    internal IntersectionType Type { get; }
-}
-
-/// <summary>The type of Rune that we will use before considering double width, curved borders etc</summary>
-internal enum IntersectionRuneType
-{
-    None,
-    Dot,
-    ULCorner,
-    URCorner,
-    LLCorner,
-    LRCorner,
-    TopTee,
-    BottomTee,
-    RightTee,
-    LeftTee,
-    Cross,
-    HLine,
-    VLine
-}
-
-internal enum IntersectionType
-{
-    /// <summary>There is no intersection</summary>
-    None,
-
-    /// <summary>A line passes directly over this point traveling along the horizontal axis</summary>
-    PassOverHorizontal,
-
-    /// <summary>A line passes directly over this point traveling along the vertical axis</summary>
-    PassOverVertical,
-
-    /// <summary>A line starts at this point and is traveling up</summary>
-    StartUp,
-
-    /// <summary>A line starts at this point and is traveling right</summary>
-    StartRight,
-
-    /// <summary>A line starts at this point and is traveling down</summary>
-    StartDown,
-
-    /// <summary>A line starts at this point and is traveling left</summary>
-    StartLeft,
-
-    /// <summary>A line exists at this point who has 0 length</summary>
-    Dot
-}
+}

+ 48 - 0
Terminal.Gui/Drawing/LineStyle.cs

@@ -0,0 +1,48 @@
+#nullable enable
+namespace Terminal.Gui;
+
+/// <summary>Defines the style of lines for a <see cref="LineCanvas"/>.</summary>
+public enum LineStyle
+{
+    /// <summary>No border is drawn.</summary>
+    None,
+
+    /// <summary>The border is drawn using thin line CM.Glyphs.</summary>
+    Single,
+
+    /// <summary>The border is drawn using thin line glyphs with dashed (double and triple) straight lines.</summary>
+    Dashed,
+
+    /// <summary>The border is drawn using thin line glyphs with short dashed (triple and quadruple) straight lines.</summary>
+    Dotted,
+
+    /// <summary>The border is drawn using thin double line CM.Glyphs.</summary>
+    Double,
+
+    /// <summary>The border is drawn using heavy line CM.Glyphs.</summary>
+    Heavy,
+
+    /// <summary>The border is drawn using heavy line glyphs with dashed (double and triple) straight lines.</summary>
+    HeavyDashed,
+
+    /// <summary>The border is drawn using heavy line glyphs with short dashed (triple and quadruple) straight lines.</summary>
+    HeavyDotted,
+
+    /// <summary>The border is drawn using thin line glyphs with rounded corners.</summary>
+    Rounded,
+
+    /// <summary>The border is drawn using thin line glyphs with rounded corners and dashed (double and triple) straight lines.</summary>
+    RoundedDashed,
+
+    /// <summary>
+    ///     The border is drawn using thin line glyphs with rounded corners and short dashed (triple and quadruple)
+    ///     straight lines.
+    /// </summary>
+    RoundedDotted
+
+    // TODO: Support Ruler
+    ///// <summary> 
+    ///// The border is drawn as a diagnostic ruler ("|123456789...").
+    ///// </summary>
+    //Ruler
+}

+ 1 - 1
Terminal.Gui/Drawing/Thickness.cs

@@ -273,7 +273,7 @@ public class Thickness : IEquatable<Thickness>
         int width = Math.Max (0, rect.Size.Width - Horizontal);
         int height = Math.Max (0, rect.Size.Height - Vertical);
 
-        return new Rect (new Point (x, y), new Size (width, height));
+        return new (x, y, width, height);
     }
 
     /// <inheritdoc/>

+ 18 - 11
Terminal.Gui/Terminal.Gui.csproj

@@ -10,6 +10,14 @@
   <!-- =================================================================== -->
   <!-- .NET Build Settings -->
   <!-- =================================================================== -->
+  <PropertyGroup>
+    <TargetFrameworks>net8.0</TargetFrameworks>
+    <LangVersion>12</LangVersion>
+    <RootNamespace>Terminal.Gui</RootNamespace>
+    <AssemblyName>Terminal.Gui</AssemblyName>
+    <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
+    <DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS;CONTRACTS_FULL</DefineConstants>
+  </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>portable</DebugType>
     <VersionSuffix></VersionSuffix>
@@ -18,13 +26,6 @@
     <DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
-  <PropertyGroup>
-    <TargetFrameworks>net8.0</TargetFrameworks>
-    <LangVersion>12</LangVersion>
-    <RootNamespace>Terminal.Gui</RootNamespace>
-    <AssemblyName>Terminal.Gui</AssemblyName>
-    <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
-  </PropertyGroup>
   <!-- =================================================================== -->
   <!-- Configuration Manager -->
   <!-- =================================================================== -->
@@ -40,12 +41,16 @@
   <ItemGroup>
     <PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
     <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
-    <PackageReference Include="System.IO.Abstractions" Version="20.0.4" />
-    <PackageReference Include="System.Text.Json" Version="8.0.1" />
-    <PackageReference Include="System.Management" Version="8.0.0" />
-    <PackageReference Include="Wcwidth" Version="2.0.0" />
     <!-- Enable Nuget Source Link for github -->
     <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
+    <PackageReference Include="System.IO.Abstractions" Version="20.0.15" />
+    <PackageReference Include="System.Text.Json" Version="8.0.2" />
+    <PackageReference Include="Wcwidth" Version="2.0.0" />
+  </ItemGroup>
+  <!-- =================================================================== -->
+  <!-- Namespaces for which internal items are visible -->
+  <!-- =================================================================== -->
+  <ItemGroup>
     <InternalsVisibleTo Include="UnitTests" />
   </ItemGroup>
   <PropertyGroup>
@@ -83,6 +88,8 @@
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
+    <Using Include="JetBrains.Annotations" />
+    <Using Include="System.Diagnostics.Contracts.PureAttribute" Alias="PureAttribute" />
     <Using Include="System.Text" />
     <Using Include="JetBrains.Annotations" />
     <Using Include="System.Diagnostics.Contracts.PureAttribute" Alias="PureAttribute" />

+ 29 - 0
Terminal.Gui/Text/Autocomplete/PopupAutocomplete.PopUp.cs

@@ -0,0 +1,29 @@
+#nullable enable
+namespace Terminal.Gui;
+
+public abstract partial class PopupAutocomplete
+{
+    private sealed class Popup : View
+    {
+        private readonly PopupAutocomplete _autoComplete;
+
+        public Popup (PopupAutocomplete autoComplete)
+        {
+            this._autoComplete = autoComplete;
+            CanFocus = true;
+            WantMousePositionReports = true;
+        }
+
+        public override bool MouseEvent (MouseEvent mouseEvent) { return _autoComplete.MouseEvent (mouseEvent); }
+
+        public override void OnDrawContent (Rect contentArea)
+        {
+            if (!_autoComplete.LastPopupPos.HasValue)
+            {
+                return;
+            }
+
+            _autoComplete.RenderOverlay (_autoComplete.LastPopupPos.Value);
+        }
+    }
+}

+ 4 - 26
Terminal.Gui/Text/Autocomplete/PopupAutocomplete.cs

@@ -1,10 +1,10 @@
-namespace Terminal.Gui;
+namespace Terminal.Gui;
 
 /// <summary>
 ///     Renders an overlay on another view at a given point that allows selecting from a range of 'autocomplete'
 ///     options.
 /// </summary>
-public abstract class PopupAutocomplete : AutocompleteBase
+public abstract partial class PopupAutocomplete : AutocompleteBase
 {
     private bool closed;
     private ColorScheme colorScheme;
@@ -57,7 +57,9 @@ public abstract class PopupAutocomplete : AutocompleteBase
     /// </summary>
     public virtual int ScrollOffset { get; set; }
 
+    #nullable enable
     private Point? LastPopupPos { get; set; }
+    #nullable restore
 
     /// <inheritdoc/>
     public override void EnsureSelectedIdxIsValid ()
@@ -552,28 +554,4 @@ public abstract class PopupAutocomplete : AutocompleteBase
         Visible = false;
         ManipulatePopup ();
     }
-
-    private class Popup : View
-    {
-        private readonly PopupAutocomplete autocomplete;
-
-        public Popup (PopupAutocomplete autocomplete)
-        {
-            this.autocomplete = autocomplete;
-            CanFocus = true;
-            WantMousePositionReports = true;
-        }
-
-        public override bool MouseEvent (MouseEvent mouseEvent) { return autocomplete.MouseEvent (mouseEvent); }
-
-        public override void OnDrawContent (Rect contentArea)
-        {
-            if (autocomplete.LastPopupPos is null)
-            {
-                return;
-            }
-
-            autocomplete.RenderOverlay ((Point)autocomplete.LastPopupPos);
-        }
-    }
 }

+ 10 - 2
Terminal.Gui/View/ViewSubViews.cs

@@ -1,4 +1,4 @@
-namespace Terminal.Gui;
+namespace Terminal.Gui;
 
 public partial class View
 {
@@ -358,7 +358,15 @@ public partial class View
 
     private bool _oldCanFocus;
 
-    /// <inheritdoc/>
+    /// <summary>Gets or sets a value indicating whether this <see cref="View"/> can focus.</summary>
+    /// <remarks>
+    ///     Override of <see cref="Responder"/>.<see cref="Responder.CanFocus"/>.
+    ///     <para/>
+    ///     Get accessor directly returns <see cref="Responder"/>.<see cref="Responder.CanFocus"/>.
+    ///     <para/>
+    ///     Set accessor validates <see langword="value"/> before setting <see cref="Responder"/>.
+    ///     <see cref="Responder.CanFocus"/>.
+    /// </remarks>
     public override bool CanFocus
     {
         get => base.CanFocus;

+ 31 - 0
Terminal.sln.DotSettings

@@ -394,4 +394,35 @@
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
 	<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/@KeyIndexDefined">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/Color/@EntryValue">#FFCF9D32</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/MatchComments/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/Name/@EntryValue">Performance</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;PERF)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=49F9F595ACF81E45B2F33CA1F1532FCD/TodoIconStyle/@EntryValue">Warning</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/@KeyIndexDefined">True</s:Boolean>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/CaseSensitive/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/Color/@EntryValue">#FFCF9D32</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/MatchComments/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/Name/@EntryValue">Note</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;NOTE:)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=712534BA80FF50429CC407A77A052F63/TodoIconStyle/@EntryValue">Normal</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/@KeyIndexDefined">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/Color/@EntryValue">#FFCF9D32</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/MatchComments/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/Name/@EntryValue">Question</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;QUESTION:)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=90214AE24C7BA34FA45434C0B221453E/TodoIconStyle/@EntryValue">Question</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/@KeyIndexDefined">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/Color/@EntryValue">#FFCF9D32</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/MatchComments/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/Name/@EntryValue">Unclear Intent</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;UNCLEAR|INTENT)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=AAF58D8E48F4F648BB088E649A89FF54/TodoIconStyle/@EntryValue">Warning</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/@KeyIndexDefined">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Color/@EntryValue">#FFCF9D32</s:String>
+	<s:Boolean x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/MatchComments/@EntryValue">True</s:Boolean>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Name/@EntryValue">Concurrency Issue</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/Pattern/@EntryValue">(?&lt;=\W|^)(?&lt;TAG&gt;CONCURRENCY)(\W|$)(.*)</s:String>
+	<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B0C2F2A1AF61DA42BBF270980E3DCEF7/TodoIconStyle/@EntryValue">Warning</s:String>
 </wpf:ResourceDictionary>

+ 0 - 13
UnitTests/Input/EscSeqUtilsTests.cs

@@ -1142,19 +1142,6 @@ public class EscSeqUtilsTests
         Assert.Equal (new Point (1, 2), pos);
     }
 
-    [Fact]
-    public void GetParentProcess_Tests ()
-    {
-        if (RuntimeInformation.IsOSPlatform (OSPlatform.Windows))
-        {
-            Assert.NotNull (EscSeqUtils.GetParentProcess (Process.GetCurrentProcess ()));
-        }
-        else
-        {
-            Assert.Null (EscSeqUtils.GetParentProcess (Process.GetCurrentProcess ()));
-        }
-    }
-
     [Fact]
     public void ResizeArray_ConsoleKeyInfo ()
     {