diff --git a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.cs b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.cs index 97826d9..ed7c152 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.cs @@ -16,22 +16,16 @@ public class ColorProgressBar : System.Windows.Forms.Control private int _Maximum = 100; private int _Step = 10; - private Color _BarColor = Color.FromArgb(255, 128, 128); + private Color _BarColor = Color.Green; private Color _BorderColor = Color.Black; - public enum FillStyles - { - Solid, - Dashed - } - public ColorProgressBar() { - base.Size = new Size(150, 15); + base.Size = new Size(200, 20); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.DoubleBuffer, true); } - [Description("ColorProgressBar color")] + [Description("Progress bar color")] [Category("ColorProgressBar")] public Color BarColor { @@ -46,7 +40,7 @@ public Color BarColor } } - [Description("The current value for the ColorProgressBar, in the range specified by the Minimum and Maximum properties.")] + [Description("The current value for the progres bar. Must be between Minimum and Maximum.")] [Category("ColorProgressBar")] [RefreshProperties(RefreshProperties.All)] public int Value @@ -59,14 +53,12 @@ public int Value { if (value < _Minimum) { - throw new ArgumentException("'" + value + "' is not a valid value for 'Value'.\n" + - "'Value' must be between 'Minimum' and 'Maximum'."); + throw new ArgumentException($"'{value}' is not a valid 'Value'.\n'Value' must be between 'Minimum' and 'Maximum'."); } if (value > _Maximum) { - throw new ArgumentException("'" + value + "' is not a valid value for 'Value'.\n" + - "'Value' must be between 'Minimum' and 'Maximum'."); + throw new ArgumentException($"'{value}' is not a valid 'Value'.\n'Value' must be between 'Minimum' and 'Maximum'."); } _Value = value; @@ -74,7 +66,7 @@ public int Value } } - [Description("The lower bound of the range this ColorProgressbar is working with.")] + [Description("The lower bound of the range.")] [Category("ColorProgressBar")] [RefreshProperties(RefreshProperties.All)] public int Minimum @@ -96,7 +88,7 @@ public int Minimum } } - [Description("The uppper bound of the range this ColorProgressbar is working with.")] + [Description("The uppper bound of the range.")] [Category("ColorProgressBar")] [RefreshProperties(RefreshProperties.All)] public int Maximum @@ -118,7 +110,7 @@ public int Maximum } } - [Description("The amount to jump the current value of the control by when the Step() method is called.")] + [Description("The value to move the progess bar when the Step() method is called.")] [Category("ColorProgressBar")] public int Step { @@ -133,7 +125,7 @@ public int Step } } - [Description("The border color of ColorProgressBar")] + [Description("The border color")] [Category("ColorProgressBar")] public Color BorderColor { @@ -149,7 +141,7 @@ public Color BorderColor } /// - /// Call the PerformStep() method to increase the value displayed by the amount set in the Step property + /// Call the PerformStep() method to increase the value displayed by the value set in the Step property /// public void PerformStep() { @@ -162,7 +154,7 @@ public void PerformStep() } /// - /// Call the PerformStepBack() method to decrease the value displayed by the amount set in the Step property + /// Call the PerformStepBack() method to decrease the value displayed by the value set in the Step property /// public void PerformStepBack() { @@ -175,7 +167,7 @@ public void PerformStepBack() } /// - /// Call the Increment() method to increase the value displayed by an integer you specify + /// Call the Increment() method to increase the value displayed by the passed value /// public void Increment(int value) { @@ -188,7 +180,7 @@ public void Increment(int value) } // - // Call the Decrement() method to decrease the value displayed by an integer you specify + // Call the Decrement() method to decrease the value displayed by the passed value // public void Decrement(int value) { @@ -236,8 +228,7 @@ protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) protected void DrawBorder(Graphics g) { - Rectangle borderRect = new Rectangle(0, 0, - ClientRectangle.Width - 1, ClientRectangle.Height - 1); + Rectangle borderRect = new Rectangle(0, 0, ClientRectangle.Width - 1, ClientRectangle.Height - 1); g.DrawRectangle(new Pen(_BorderColor, 1), borderRect); } } diff --git a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.csproj b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.csproj index 9cc38de..e67f3fc 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.csproj +++ b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.csproj @@ -8,9 +8,10 @@ Library ColorProgressBar ColorProgressBar - v4.0 + v4.8 512 true + AnyCPU @@ -21,6 +22,7 @@ DEBUG;TRACE prompt 4 + false AnyCPU @@ -30,6 +32,7 @@ TRACE prompt 4 + false @@ -61,6 +64,7 @@ True Resources.resx + True SettingsSingleFileGenerator diff --git a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBarDesigner.cs b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBarDesigner.cs index 10a59cd..81c0085 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBarDesigner.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBarDesigner.cs @@ -3,23 +3,20 @@ namespace ColorProgressBar { internal class ColorProgressBarDesigner : System.Windows.Forms.Design.ControlDesigner - { - public ColorProgressBarDesigner() - {} - - /// Clean up some unnecessary properties - protected override void PostFilterProperties(IDictionary Properties) - { - Properties.Remove("AllowDrop"); - Properties.Remove("BackgroundImage"); - Properties.Remove("ContextMenu"); - Properties.Remove("FlatStyle"); - Properties.Remove("Image"); - Properties.Remove("ImageAlign"); - Properties.Remove("ImageIndex"); - Properties.Remove("ImageList"); - Properties.Remove("Text"); - Properties.Remove("TextAlign"); - } - } + { + /// Clean up some unnecessary properties + protected override void PostFilterProperties(IDictionary Properties) + { + Properties.Remove("AllowDrop"); + Properties.Remove("BackgroundImage"); + Properties.Remove("ContextMenu"); + Properties.Remove("FlatStyle"); + Properties.Remove("Image"); + Properties.Remove("ImageAlign"); + Properties.Remove("ImageIndex"); + Properties.Remove("ImageList"); + Properties.Remove("Text"); + Properties.Remove("TextAlign"); + } + } } \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/AssemblyInfo.cs b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/AssemblyInfo.cs index 95216e6..c0079b2 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/AssemblyInfo.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("utPLSQL.org")] [assembly: AssemblyProduct("ColorProgressBar")] -[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,6 +31,5 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("3.1.6")] +[assembly: AssemblyFileVersion("3.1.6")] diff --git a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Resources.Designer.cs b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Resources.Designer.cs index b95135c..d9db046 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Resources.Designer.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Resources.Designer.cs @@ -1,68 +1,61 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ - -namespace ColorProgressBar.Properties -{ +namespace ColorProgressBar.Properties { + using System; + + /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// - /// Returns the cached ResourceManager instance used by this class. + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ColorProgressBar.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Settings.Designer.cs b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Settings.Designer.cs index 6e05c97..04a8807 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Settings.Designer.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Settings.Designer.cs @@ -1,27 +1,24 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ - -namespace ColorProgressBar.Properties -{ +namespace ColorProgressBar.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/App.config b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/App.config index 4338a08..3e0e37c 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/App.config +++ b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/App.config @@ -1,3 +1,3 @@ - + - + diff --git a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs index 8c58d5e..2cf307f 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs @@ -43,6 +43,7 @@ public class PlsqlDeveloperUtPlsqlPlugin private const int PluginMenuIndexAllTests = 3; private const int PluginMenuIndexAllTestsWithCoverage = 4; + private const int PluginMenuIndexPath = 5; private const int PluginPopupIndex = 1; private const int PluginPopupIndexWithCoverage = 2; @@ -107,6 +108,14 @@ public static void OnActivate() } } + using (var stream = assembly.GetManifestResourceStream("utPLSQL.utPLSQL.bmp")) + { + if (stream != null) + { + createToolButton(pluginId, PluginMenuIndexPath, "utPLSQL", "utPLSQL.bmp", new Bitmap(stream).GetHbitmap().ToInt64()); + } + } + using (var stream = assembly.GetManifestResourceStream("utPLSQL.utPLSQL.bmp")) { if (stream != null) @@ -210,6 +219,8 @@ public static string CreateMenuItem(int index) return "LARGEITEM=Run all tests of current user"; case PluginMenuIndexAllTestsWithCoverage: return "LARGEITEM=Run code coverage for current user"; + case PluginMenuIndexPath: + return "LARGEITEM=Run tests for specific path"; default: return ""; } @@ -226,7 +237,7 @@ public static void OnMenuClick(int index) { var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome); Windows.Add(testResultWindow); - testResultWindow.RunTestsAsync("_ALL", username, null, null, false); + testResultWindow.RunTestsAsync("_ALL", username, null, null, false, false); } } else if (index == PluginMenuIndexAllTestsWithCoverage) @@ -235,7 +246,16 @@ public static void OnMenuClick(int index) { var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome); Windows.Add(testResultWindow); - testResultWindow.RunTestsAsync("_ALL", username, null, null, true); + testResultWindow.RunTestsAsync("_ALL", username, null, null, true, false); + } + } + else if (index == PluginMenuIndexPath) + { + if (isConnected() && !isSydba()) + { + var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome); + Windows.Add(testResultWindow); + testResultWindow.RunTestsAsync(null, null, null, null, false, true); } } else if (index == PluginPopupIndex) @@ -247,7 +267,7 @@ public static void OnMenuClick(int index) var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome); Windows.Add(testResultWindow); testResultWindow.RunTestsAsync(Marshal.PtrToStringAnsi(type), Marshal.PtrToStringAnsi(owner), - Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), false); + Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), false, false); } } else if (index == PluginPopupIndexWithCoverage) @@ -259,7 +279,7 @@ public static void OnMenuClick(int index) var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome); Windows.Add(testResultWindow); testResultWindow.RunTestsAsync(Marshal.PtrToStringAnsi(type), Marshal.PtrToStringAnsi(owner), - Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), true); + Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), true, false); } } } diff --git a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.csproj b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.csproj index e62f061..47062f2 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.csproj +++ b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.csproj @@ -10,7 +10,7 @@ Properties utPLSQL PlsqlDeveloperUtPlsqlPlugin - v4.5 + v4.8 512 true diff --git a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/AssemblyInfo.cs b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/AssemblyInfo.cs index f0724c6..f74de45 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/AssemblyInfo.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -9,7 +9,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("utPLSQL.org")] [assembly: AssemblyProduct("PlsqlDeveloperUtPlsqlPlugin")] -[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -28,8 +28,5 @@ // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.1.0")] -[assembly: AssemblyFileVersion("1.2.1.0")] +[assembly: AssemblyVersion("3.1.6")] +[assembly: AssemblyFileVersion("3.1.6")] diff --git a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/Resources.Designer.cs b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/Resources.Designer.cs index aed0e2d..c8d1576 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/Resources.Designer.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace utPLSQL.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ internal Resources() { } /// - /// Looks up a localized resource of type System.Drawing.Bitmap. + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap utPLSQL { get { @@ -71,7 +71,7 @@ internal static System.Drawing.Bitmap utPLSQL { } /// - /// Looks up a localized resource of type System.Drawing.Bitmap. + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap utPLSQL_coverage { get { diff --git a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/packages.config b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/packages.config index 90cda05..a54dbe2 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/packages.config +++ b/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/SetAssemblyVersion.ps1 b/PlsqlDeveloperUtPlsqlPlugin/SetAssemblyVersion.ps1 new file mode 100644 index 0000000..69e5f7e --- /dev/null +++ b/PlsqlDeveloperUtPlsqlPlugin/SetAssemblyVersion.ps1 @@ -0,0 +1,6 @@ +param([string]$NewVersion) + +Get-ChildItem -Include AssemblyInfo.cs -Recurse | ForEach-Object { + $_.IsReadOnly = $false + (Get-Content -Path $_) -replace '(?<=Assembly(?:File)?Version\(")[^"]*(?="\))', $NewVersion |Set-Content -Path $_ +} \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/App.config b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/App.config index 4338a08..3e0e37c 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/App.config +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/App.config @@ -1,3 +1,3 @@ - + - + diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/FodyWeavers.xml b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/FodyWeavers.xml similarity index 100% rename from PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/FodyWeavers.xml rename to PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/FodyWeavers.xml diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/FodyWeavers.xsd b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/FodyWeavers.xsd similarity index 100% rename from PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/FodyWeavers.xsd rename to PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/FodyWeavers.xsd diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/LoginForm.cs b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/LoginForm.cs index 4450d65..0b808b1 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/LoginForm.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/LoginForm.cs @@ -13,13 +13,13 @@ public LoginForm() private void BtnRunTests_Click(object sender, EventArgs e) { var testRunnerWindow = new TestRunnerWindow(null, txtUsername.Text, txtPassword.Text, txtDatabase.Text, null, null); - testRunnerWindow.RunTestsAsync("USER", null, txtUsername.Text, null, false); + testRunnerWindow.RunTestsAsync("USER", null, txtUsername.Text, null, false, false); } private void btnCodeCoverage_Click(object sender, EventArgs e) { var testRunnerWindow = new TestRunnerWindow(null, txtUsername.Text, txtPassword.Text, txtDatabase.Text, null, null); - testRunnerWindow.RunTestsAsync("USER", null, txtUsername.Text, null, true); + testRunnerWindow.RunTestsAsync("USER", null, txtUsername.Text, null, true, false); } } } diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/AssemblyInfo.cs b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/AssemblyInfo.cs index 8ce7102..747cc77 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/AssemblyInfo.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("utPLSQL.org")] [assembly: AssemblyProduct("utPLSQL.UI.Standalone")] -[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,8 +29,5 @@ // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.1.0")] -[assembly: AssemblyFileVersion("1.2.1.0")] +[assembly: AssemblyVersion("3.1.6")] +[assembly: AssemblyFileVersion("3.1.6")] diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Resources.Designer.cs b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Resources.Designer.cs index fa38f58..a1baf06 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Resources.Designer.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace utPLSQL.UI.Standalone.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -33,7 +33,7 @@ internal Resources() { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ internal Resources() { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Settings.Designer.cs b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Settings.Designer.cs index 83b35b5..82c597d 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Settings.Designer.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Settings.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -12,7 +12,7 @@ namespace utPLSQL.UI.Standalone.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/utPLSQL.UI.Standalone.csproj b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/utPLSQL.UI.Standalone.csproj index 2d8cc12..1e92865 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/utPLSQL.UI.Standalone.csproj +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/utPLSQL.UI.Standalone.csproj @@ -9,7 +9,7 @@ WinExe utPLSQL.UI.Standalone utPLSQL.UI.Standalone - v4.5 + v4.8 512 true @@ -94,11 +94,4 @@ - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/App.config b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/App.config index 292458b..7b54b1e 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/App.config +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/App.config @@ -25,4 +25,4 @@ - + diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/Properties/AssemblyInfo.cs b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/Properties/AssemblyInfo.cs index 0e54db1..3f2d36e 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/Properties/AssemblyInfo.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("utPLSQL.org")] [assembly: AssemblyProduct("utPLSQL.UI")] -[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,8 +29,5 @@ // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.1.0")] -[assembly: AssemblyFileVersion("1.2.1.0")] +[assembly: AssemblyVersion("3.1.6")] +[assembly: AssemblyFileVersion("3.1.6")] diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.Designer.cs b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.Designer.cs index d84a0fe..1b4503c 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.Designer.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.Designer.cs @@ -69,6 +69,7 @@ private void InitializeComponent() this.dataColumnExpectationTestResultId = new System.Data.DataColumn(); this.dataColumnExpectationMessage = new System.Data.DataColumn(); this.dataColumnExpectationCaller = new System.Data.DataColumn(); + this.dataColumnExpectationLine = new System.Data.DataColumn(); this.txtStatus = new System.Windows.Forms.TextBox(); this.iconPictureBox1 = new FontAwesome.Sharp.IconPictureBox(); this.iconPictureBox2 = new FontAwesome.Sharp.IconPictureBox(); @@ -94,9 +95,8 @@ private void InitializeComponent() this.txtTestOwner = new System.Windows.Forms.TextBox(); this.lblTestOwner = new System.Windows.Forms.Label(); this.tabFailures = new System.Windows.Forms.TabPage(); + this.txtFailureMessage = new System.Windows.Forms.TextBox(); this.dataGridViewExpectations = new System.Windows.Forms.DataGridView(); - this.messageDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.callerDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tabErrors = new System.Windows.Forms.TabPage(); this.txtErrorMessage = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); @@ -116,6 +116,7 @@ private void InitializeComponent() this.btnRun = new System.Windows.Forms.Button(); this.btnRunWithCoverage = new System.Windows.Forms.Button(); this.colorProgressBar = new ColorProgressBar.ColorProgressBar(); + this.Line = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewTestResults)).BeginInit(); this.contextMenuResults.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataSet)).BeginInit(); @@ -431,7 +432,8 @@ private void InitializeComponent() this.dataTableExpectations.Columns.AddRange(new System.Data.DataColumn[] { this.dataColumnExpectationTestResultId, this.dataColumnExpectationMessage, - this.dataColumnExpectationCaller}); + this.dataColumnExpectationCaller, + this.dataColumnExpectationLine}); this.dataTableExpectations.Constraints.AddRange(new System.Data.Constraint[] { new System.Data.ForeignKeyConstraint("FkTestResult", "TestResults", new string[] { "Id"}, new string[] { @@ -453,6 +455,11 @@ private void InitializeComponent() this.dataColumnExpectationCaller.Caption = "Caller"; this.dataColumnExpectationCaller.ColumnName = "Caller"; // + // dataColumnExpectationLine + // + this.dataColumnExpectationLine.Caption = "Line"; + this.dataColumnExpectationLine.ColumnName = "Line"; + // // txtStatus // this.txtStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -709,6 +716,7 @@ private void InitializeComponent() // tabFailures // this.tabFailures.BackColor = System.Drawing.SystemColors.Control; + this.tabFailures.Controls.Add(this.txtFailureMessage); this.tabFailures.Controls.Add(this.dataGridViewExpectations); this.tabFailures.Location = new System.Drawing.Point(4, 22); this.tabFailures.Name = "tabFailures"; @@ -717,16 +725,25 @@ private void InitializeComponent() this.tabFailures.TabIndex = 0; this.tabFailures.Text = "Failures"; // + // txtFailureMessage + // + this.txtFailureMessage.Location = new System.Drawing.Point(131, 6); + this.txtFailureMessage.Multiline = true; + this.txtFailureMessage.Name = "txtFailureMessage"; + this.txtFailureMessage.ReadOnly = true; + this.txtFailureMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.txtFailureMessage.Size = new System.Drawing.Size(841, 187); + this.txtFailureMessage.TabIndex = 1; + this.txtFailureMessage.TabStop = false; + // // dataGridViewExpectations // this.dataGridViewExpectations.AllowUserToAddRows = false; this.dataGridViewExpectations.AllowUserToDeleteRows = false; this.dataGridViewExpectations.AutoGenerateColumns = false; - this.dataGridViewExpectations.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridViewExpectations.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridViewExpectations.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.messageDataGridViewTextBoxColumn, - this.callerDataGridViewTextBoxColumn}); + this.Line}); this.dataGridViewExpectations.DataMember = "Expectations"; this.dataGridViewExpectations.DataSource = this.dataSet; this.dataGridViewExpectations.Location = new System.Drawing.Point(6, 6); @@ -734,26 +751,12 @@ private void InitializeComponent() this.dataGridViewExpectations.Name = "dataGridViewExpectations"; this.dataGridViewExpectations.ReadOnly = true; this.dataGridViewExpectations.RowHeadersVisible = false; + this.dataGridViewExpectations.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridViewExpectations.ShowEditingIcon = false; - this.dataGridViewExpectations.Size = new System.Drawing.Size(966, 188); + this.dataGridViewExpectations.Size = new System.Drawing.Size(119, 187); this.dataGridViewExpectations.TabIndex = 0; this.dataGridViewExpectations.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.gridTestFailures_CellDoubleClick); - // - // messageDataGridViewTextBoxColumn - // - this.messageDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.messageDataGridViewTextBoxColumn.DataPropertyName = "Message"; - this.messageDataGridViewTextBoxColumn.HeaderText = "Message"; - this.messageDataGridViewTextBoxColumn.Name = "messageDataGridViewTextBoxColumn"; - this.messageDataGridViewTextBoxColumn.ReadOnly = true; - // - // callerDataGridViewTextBoxColumn - // - this.callerDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.callerDataGridViewTextBoxColumn.DataPropertyName = "Caller"; - this.callerDataGridViewTextBoxColumn.HeaderText = "Caller"; - this.callerDataGridViewTextBoxColumn.Name = "callerDataGridViewTextBoxColumn"; - this.callerDataGridViewTextBoxColumn.ReadOnly = true; + this.dataGridViewExpectations.SelectionChanged += new System.EventHandler(this.dataGridViewExpectations_SelectionChanged); // // tabErrors // @@ -960,6 +963,14 @@ private void InitializeComponent() this.colorProgressBar.TabIndex = 43; this.colorProgressBar.Value = 0; // + // Line + // + this.Line.DataPropertyName = "Line"; + this.Line.FillWeight = 101.5228F; + this.Line.HeaderText = "Line"; + this.Line.Name = "Line"; + this.Line.ReadOnly = true; + // // TestRunnerWindow // this.AcceptButton = this.btnClose; @@ -1016,6 +1027,7 @@ private void InitializeComponent() this.tabTest.ResumeLayout(false); this.tabTest.PerformLayout(); this.tabFailures.ResumeLayout(false); + this.tabFailures.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewExpectations)).EndInit(); this.tabErrors.ResumeLayout(false); this.tabErrors.PerformLayout(); @@ -1104,12 +1116,13 @@ private void InitializeComponent() private System.Data.DataColumn dataColumnExpectationTestResultId; private System.Data.DataColumn dataColumnExpectationMessage; private System.Data.DataColumn dataColumnExpectationCaller; - private System.Windows.Forms.DataGridViewTextBoxColumn messageDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn callerDataGridViewTextBoxColumn; + private ColorProgressBar.ColorProgressBar colorProgressBar; + private System.Windows.Forms.TextBox txtFailureMessage; private System.Windows.Forms.DataGridViewImageColumn iconDataGridViewImageColumn; private System.Windows.Forms.DataGridViewTextBoxColumn packageDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn procedureDataGridViewTextBoxColumn; private System.Windows.Forms.DataGridViewTextBoxColumn timeDataGridViewTextBoxColumn; - private ColorProgressBar.ColorProgressBar colorProgressBar; + private System.Data.DataColumn dataColumnExpectationLine; + private System.Windows.Forms.DataGridViewTextBoxColumn Line; } } \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs index 5607619..5091c2b 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs @@ -5,6 +5,7 @@ using System.Drawing; using System.Globalization; using System.IO; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; @@ -12,6 +13,8 @@ namespace utPLSQL { public partial class TestRunnerWindow : Form { + Regex regexLine = new Regex("(.*line )([0-9]+)( .*)", RegexOptions.IgnoreCase); + public bool Running { get; private set; } private const int IconSize = 24; @@ -37,6 +40,7 @@ public partial class TestRunnerWindow : Form private ImageConverter imageConverter = new ImageConverter(); private DataView dataViewTestResults; + private DataView dataViewExpectations; public TestRunnerWindow(object pluginIntegration, string username, string password, string database, string connectAs, string oracleHome) { @@ -50,11 +54,17 @@ public TestRunnerWindow(object pluginIntegration, string username, string passwo InitializeComponent(); dataViewTestResults = new DataView(dataTableTestResults); + dataGridViewTestResults.DataMember = null; + dataGridViewTestResults.DataSource = dataViewTestResults; + + dataViewExpectations = new DataView(dataTableExpectations); + dataGridViewExpectations.DataMember = null; + dataGridViewExpectations.DataSource = dataViewExpectations; } - public async Task RunTestsAsync(string type, string owner, string name, string procedure, bool coverage) + public async Task RunTestsAsync(string type, string owner, string name, string procedure, bool coverage, bool showOnly) { - var path = GetPath(type, owner, name, procedure); + var path = showOnly ? null : GetPath(type, owner, name, procedure); testRunner = new RealTimeTestRunner(); @@ -64,6 +74,8 @@ public async Task RunTestsAsync(string type, string owner, string name, string p { Environment.SetEnvironmentVariable("ORACLE_HOME", oracleHome); } + Running = true; + testRunner.Connect(username, password, database); } catch (Exception e) @@ -81,7 +93,16 @@ public async Task RunTestsAsync(string type, string owner, string name, string p return; } - await RunTestsAsync(path, coverage); + if (showOnly) + { + txtPath.ReadOnly = false; + txtPath.Focus(); + Show(); + } + else + { + await RunTestsAsync(path, coverage); + } } private async Task RunTestsAsync(List path, bool coverage) @@ -92,10 +113,6 @@ private async Task RunTestsAsync(List path, bool coverage) SetWindowTitle(path); - Running = true; - - EnableFilter(); - if (coverage) { var codeCoverageReportDialog = new CodeCoverageReportDialog(path); @@ -122,8 +139,6 @@ private async Task RunTestsAsync(List path, bool coverage) txtStatus.BeginInvoke((MethodInvoker)delegate { - EnableFilter(); - txtStatus.Text = totalNumberOfTests > 0 ? "Finished" : "No tests found"; }); @@ -144,14 +159,6 @@ private async Task RunTestsAsync(List path, bool coverage) } } - private void EnableFilter() - { - cbSuccess.Enabled = true; - cbFailure.Enabled = true; - cbError.Enabled = true; - cbDisabled.Enabled = true; - } - private Action<@event> CollectResults(bool coverage) { return @event => @@ -208,8 +215,6 @@ private Action<@event> CollectResults(bool coverage) if (!coverage) { - EnableFilter(); - txtStatus.Text = totalNumberOfTests > 0 ? "Finished" : "No tests found"; Running = false; @@ -306,11 +311,6 @@ private void ResetComponents() colorProgressBar.Minimum = 0; colorProgressBar.Maximum = 100; colorProgressBar.Value = 0; - - cbSuccess.Enabled = false; - cbFailure.Enabled = false; - cbError.Enabled = false; - cbDisabled.Enabled = false; } private void UpdateTestResult(@event @event) @@ -342,11 +342,21 @@ private void UpdateTestResult(@event @event) { testResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.TimesCircle.ToBitmap(IconFont.Solid, IconSize, Color.Orange), typeof(byte[])); testResult["Status"] = StatusFailure; + + colorProgressBar.BeginInvoke((MethodInvoker)delegate + { + colorProgressBar.BarColor = Color.DarkRed; + }); } else if (counter.error > 0) { testResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.ExclamationCircle.ToBitmap(Color.Red, IconSize), typeof(byte[])); testResult["Status"] = StatusError; + + colorProgressBar.BeginInvoke((MethodInvoker)delegate + { + colorProgressBar.BarColor = Color.DarkRed; + }); } else if (counter.warning > 0) { @@ -367,6 +377,7 @@ private void UpdateTestResult(@event @event) rowExpectation["TestResultId"] = @event.test.id; rowExpectation["Message"] = expectation.message; rowExpectation["Caller"] = expectation.caller; + rowExpectation["Line"] = ExtractLine(expectation.caller); dataTableExpectations.Rows.Add(rowExpectation); @@ -396,6 +407,17 @@ private void UpdateTestResult(@event @event) } } + private string ExtractLine(string caller) + { + var m = regexLine.Match(caller); + if (m.Success) + { + var g = m.Groups[2]; + return g.Value; + } + return caller; + } + private void CreateTestResults(@event @event) { CreateTestResults(@event.items); @@ -479,8 +501,6 @@ private void FilterTestResults() dataViewTestResults.RowFilter = filter; } - - dataGridViewTestResults.DataSource = dataViewTestResults; } private void btnClose_Click(object sender, EventArgs e) @@ -534,6 +554,15 @@ private void gridResults_SelectionChanged(object sender, EventArgs e) txtErrorMessage.Text = rowTestResult.Row["Error"] == null ? "" : rowTestResult.Row["Error"].ToString().Replace("\n", "\r\n"); + txtFailureMessage.Text = ""; + + dataViewExpectations.RowFilter = $"TestResultId = '{rowTestResult.Row["Id"]}'"; + + if (dataViewExpectations.Count > 0) + { + dataGridViewExpectations.Rows[0].Selected = true; + } + if (!Running) { if (rowTestResult.Row["Status"] == null) @@ -591,7 +620,7 @@ private async void menuItemRunTests_ClickAsync(object sender, EventArgs e) var rowTestResult = dataTableTestResults.Rows[rowIndexOnRightClick]; var testResultWindow = new TestRunnerWindow(pluginIntegration, username, password, database, connectAs, oracleHome); - await testResultWindow.RunTestsAsync("PROCEDURE", rowTestResult["Owner"].ToString(), rowTestResult["Package"].ToString(), rowTestResult["Procedure"].ToString(), false); + await testResultWindow.RunTestsAsync("PROCEDURE", rowTestResult["Owner"].ToString(), rowTestResult["Package"].ToString(), rowTestResult["Procedure"].ToString(), false, false); } private async void menuItemCoverage_ClickAsync(object sender, EventArgs e) @@ -599,7 +628,7 @@ private async void menuItemCoverage_ClickAsync(object sender, EventArgs e) var rowTestResult = dataTableTestResults.Rows[rowIndexOnRightClick]; var testResultWindow = new TestRunnerWindow(pluginIntegration, username, password, database, connectAs, oracleHome); - await testResultWindow.RunTestsAsync("PROCEDURE", rowTestResult["Owner"].ToString(), rowTestResult["Package"].ToString(), rowTestResult["Procedure"].ToString(), true); + await testResultWindow.RunTestsAsync("PROCEDURE", rowTestResult["Owner"].ToString(), rowTestResult["Package"].ToString(), rowTestResult["Procedure"].ToString(), true, false); } private void cbSuccess_CheckedChanged(object sender, EventArgs e) @@ -631,5 +660,20 @@ private async void button1_Click(object sender, EventArgs e) { await RunTestsAsync(new List { txtPath.Text }, true); } + + private void dataGridViewExpectations_SelectionChanged(object sender, EventArgs e) + { + txtFailureMessage.Text = ""; + + if (dataGridViewExpectations.SelectedRows.Count > 0) + { + var row = dataGridViewExpectations.SelectedRows[0]; + + if (row.DataBoundItem is DataRowView rowExpectation) + { + txtFailureMessage.Text = $"{rowExpectation.Row["Message"].ToString().Replace("\n", "\r\n")}\r\n\r\n{rowExpectation.Row["Caller"].ToString().Replace("\n", "\r\n")}"; + } + } + } } } \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.resx b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.resx index 585acf9..af06881 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.resx +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.resx @@ -123,6 +123,9 @@ 179, 17 + + True + diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/packages.config b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/packages.config index ca2e476..e4d0a02 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/packages.config +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/packages.config @@ -1,7 +1,6 @@  - - - - + + + \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/utPLSQL.UI.csproj b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/utPLSQL.UI.csproj index 29257c7..32746a5 100644 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/utPLSQL.UI.csproj +++ b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/utPLSQL.UI.csproj @@ -9,7 +9,7 @@ Properties utPLSQL utPLSQL.UI - v4.5 + v4.8 512 true @@ -34,9 +34,6 @@ false - - ..\packages\Geomatics.IO.BindingListView.1.3.2\lib\net40\BindingListView.dll - ..\packages\FontAwesome.Sharp.5.15.3\lib\net45\FontAwesome.Sharp.dll @@ -53,8 +50,8 @@ - - ..\packages\utPLSQL.Api.1.5.2\lib\net45\utPLSQL.Api.dll + + ..\packages\utPLSQL.Api.1.5.6\lib\net45\utPLSQL.Api.dll diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/packages.config b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/packages.config deleted file mode 100644 index 01e2767..0000000 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/utPLSQL.Ui.Standalone.csproj b/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/utPLSQL.Ui.Standalone.csproj deleted file mode 100644 index 2d8cc12..0000000 --- a/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.Ui.Standalone/utPLSQL.Ui.Standalone.csproj +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - Debug - AnyCPU - {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE} - WinExe - utPLSQL.UI.Standalone - utPLSQL.UI.Standalone - v4.5 - 512 - true - - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll - - - - - - - - - - - - - - - Form - - - LoginForm.cs - - - - - LoginForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {7669189c-4a58-4e82-9dcb-7956624a719b} - utPLSQL.Ui - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/README.md b/README.md index af2d73d..2d51958 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ The utPLSQL Plugin integrates [utPLSQL](https://utplsql.org) with [Allround Automations PL/SQL Developer](https://www.allroundautomations.com/products/pl-sql-developer/). -## Running Tests and Code Coverage +## Running Tests -The plugin adds a Button to the Tools ribbon to execute all tests of the current user or run code coverage. +The plugin adds three buttons to the tools ribbon to 1) execute all tests of the current user, 2) run code coverage or 3) run tests for a specific path. If you choose 3) the run window will open and you can enter the path manually. -![Tools Ribbon](screenshots/tools_ribbon.png) +![Tools Ribbon](screenshots/tools_ribbon_full.png) In the object browser on Packages, Package Bodys, Procedures or Users there is a context menu entry to run the tests or code coverage of either the package, the procedure or the user. You can also run tests from an program window. @@ -14,7 +14,7 @@ In the object browser on Packages, Package Bodys, Procedures or Users there is a ## Viewing Results -The results are opened in a new window. If you've chosen code coverage the coverage report will be opened in the default browser. +The results are opened in a new window. Each test run will open a separate window. ### Navigating to the package body @@ -28,12 +28,24 @@ There are two buttons to run the tests again either with or without coverage. A right-click opens the context menu, and you can run the test function. -### Filtering Results +### Filtering and Sorting Results -Once the tests are run you can filter the results by clicking on checkboxes behind the status field. +You can filter the results by clicking on checkboxes behind the status field. A click on the header cell sorts the results first ascending and with a second click descending. ![Result Window](screenshots/result_window.png) +## Code Coverage + +If you select Run Code Coverage from the menu or the context menu a dialog is displayed. In this dialog you can configure the schemas to check for coverage and include or exclude specific objects. + +![Code Coverage Diaog](screenshots/code_coverage_dialog.png) + +### Report + +After running the tests the HTML code coverage report will be opened in the default browser. + +![Code Coverage Reports](screenshots/code_coverage_report.png) + ## Releases Binary releases for 64bit and 32bit are published in the [releases section](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/releases). diff --git a/screenshots/code_coverage_dialog.png b/screenshots/code_coverage_dialog.png new file mode 100644 index 0000000..332fe3c Binary files /dev/null and b/screenshots/code_coverage_dialog.png differ diff --git a/screenshots/code_coverage_report.png b/screenshots/code_coverage_report.png new file mode 100644 index 0000000..10728e3 Binary files /dev/null and b/screenshots/code_coverage_report.png differ diff --git a/screenshots/context_menu.png b/screenshots/context_menu.png index b717557..d6b3db2 100644 Binary files a/screenshots/context_menu.png and b/screenshots/context_menu.png differ diff --git a/screenshots/tools_ribbon.png b/screenshots/tools_ribbon.png deleted file mode 100644 index 9e7a745..0000000 Binary files a/screenshots/tools_ribbon.png and /dev/null differ diff --git a/screenshots/tools_ribbon_full.png b/screenshots/tools_ribbon_full.png new file mode 100644 index 0000000..85c1cfb Binary files /dev/null and b/screenshots/tools_ribbon_full.png differ