├── .gitignore
├── LICENSE
├── PlsqlDeveloperUtPlsqlPlugin
├── ColorProgressBar
│ ├── ColorProgressBar.cs
│ ├── ColorProgressBar.csproj
│ ├── ColorProgressBarDesigner.cs
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
├── PlsqlDeveloperUtPlsqlPlugin.sln
├── PlsqlDeveloperUtPlsqlPlugin
│ ├── AboutDialog.Designer.cs
│ ├── AboutDialog.cs
│ ├── AboutDialog.resx
│ ├── App.config
│ ├── FodyWeavers.xml
│ ├── FodyWeavers.xsd
│ ├── PlsqlDeveloperUtPlsqlPlugin.cs
│ ├── PlsqlDeveloperUtPlsqlPlugin.csproj
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── packages.config
│ ├── utPLSQL.bmp
│ ├── utPLSQL.ico
│ ├── utPLSQL_coverage.bmp
│ └── utPLSQL_coverage.psd
├── SetAssemblyVersion.ps1
├── build.cmd
├── utPLSQL.UI.Standalone
│ ├── App.config
│ ├── FodyWeavers.xml
│ ├── FodyWeavers.xsd
│ ├── LoginForm.Designer.cs
│ ├── LoginForm.cs
│ ├── LoginForm.resx
│ ├── Program.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── utPLSQL.UI.Standalone.csproj
│ └── utPLSQL.UI.Standalone.csproj.user
└── utPLSQL.UI
│ ├── App.config
│ ├── CodeCoverageReportDialog.Designer.cs
│ ├── CodeCoverageReportDialog.cs
│ ├── CodeCoverageReportDialog.resx
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── TestRunnerWindow.Designer.cs
│ ├── TestRunnerWindow.cs
│ ├── TestRunnerWindow.resx
│ ├── packages.config
│ ├── utPLSQL.UI.csproj
│ └── utPLSQL.ico
├── README.md
└── screenshots
├── code_coverage_dialog.png
├── code_coverage_report.png
├── context_menu.png
├── result_window.png
└── tools_ribbon_full.png
/.gitignore:
--------------------------------------------------------------------------------
1 | **/.vs
2 | **/build
3 | **/packages
4 | **/**/bin
5 | **/**/obj
6 | /.idea/
7 | /PlsqlDeveloperUtPlsqlPlugin/.idea/.idea.PlsqlDeveloperUtPlsqlPlugin/.idea
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Windows.Forms;
4 | using System.Drawing;
5 |
6 | namespace ColorProgressBar
7 | {
8 | [Description("Color Progress Bar")]
9 | [ToolboxBitmap(typeof(ProgressBar))]
10 | [Designer(typeof(ColorProgressBarDesigner))]
11 | public class ColorProgressBar : System.Windows.Forms.Control
12 | {
13 |
14 | private int _Value = 0;
15 | private int _Minimum = 0;
16 | private int _Maximum = 100;
17 | private int _Step = 10;
18 |
19 | private Color _BarColor = Color.Green;
20 | private Color _BorderColor = Color.Black;
21 |
22 | public ColorProgressBar()
23 | {
24 | base.Size = new Size(200, 20);
25 | SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.DoubleBuffer, true);
26 | }
27 |
28 | [Description("Progress bar color")]
29 | [Category("ColorProgressBar")]
30 | public Color BarColor
31 | {
32 | get
33 | {
34 | return _BarColor;
35 | }
36 | set
37 | {
38 | _BarColor = value;
39 | this.Invalidate();
40 | }
41 | }
42 |
43 | [Description("The current value for the progres bar. Must be between Minimum and Maximum.")]
44 | [Category("ColorProgressBar")]
45 | [RefreshProperties(RefreshProperties.All)]
46 | public int Value
47 | {
48 | get
49 | {
50 | return _Value;
51 | }
52 | set
53 | {
54 | if (value < _Minimum)
55 | {
56 | throw new ArgumentException($"'{value}' is not a valid 'Value'.\n'Value' must be between 'Minimum' and 'Maximum'.");
57 | }
58 |
59 | if (value > _Maximum)
60 | {
61 | throw new ArgumentException($"'{value}' is not a valid 'Value'.\n'Value' must be between 'Minimum' and 'Maximum'.");
62 | }
63 |
64 | _Value = value;
65 | this.Invalidate();
66 | }
67 | }
68 |
69 | [Description("The lower bound of the range.")]
70 | [Category("ColorProgressBar")]
71 | [RefreshProperties(RefreshProperties.All)]
72 | public int Minimum
73 | {
74 | get
75 | {
76 | return _Minimum;
77 | }
78 | set
79 | {
80 | _Minimum = value;
81 |
82 | if (_Minimum > _Maximum)
83 | _Maximum = _Minimum;
84 | if (_Minimum > _Value)
85 | _Value = _Minimum;
86 |
87 | this.Invalidate();
88 | }
89 | }
90 |
91 | [Description("The uppper bound of the range.")]
92 | [Category("ColorProgressBar")]
93 | [RefreshProperties(RefreshProperties.All)]
94 | public int Maximum
95 | {
96 | get
97 | {
98 | return _Maximum;
99 | }
100 | set
101 | {
102 | _Maximum = value;
103 |
104 | if (_Maximum < _Value)
105 | _Value = _Maximum;
106 | if (_Maximum < _Minimum)
107 | _Minimum = _Maximum;
108 |
109 | this.Invalidate();
110 | }
111 | }
112 |
113 | [Description("The value to move the progess bar when the Step() method is called.")]
114 | [Category("ColorProgressBar")]
115 | public int Step
116 | {
117 | get
118 | {
119 | return _Step;
120 | }
121 | set
122 | {
123 | _Step = value;
124 | this.Invalidate();
125 | }
126 | }
127 |
128 | [Description("The border color")]
129 | [Category("ColorProgressBar")]
130 | public Color BorderColor
131 | {
132 | get
133 | {
134 | return _BorderColor;
135 | }
136 | set
137 | {
138 | _BorderColor = value;
139 | this.Invalidate();
140 | }
141 | }
142 |
143 | ///
144 | /// Call the PerformStep() method to increase the value displayed by the value set in the Step property
145 | ///
146 | public void PerformStep()
147 | {
148 | if (_Value < _Maximum)
149 | _Value += _Step;
150 | else
151 | _Value = _Maximum;
152 |
153 | this.Invalidate();
154 | }
155 |
156 | ///
157 | /// Call the PerformStepBack() method to decrease the value displayed by the value set in the Step property
158 | ///
159 | public void PerformStepBack()
160 | {
161 | if (_Value > _Minimum)
162 | _Value -= _Step;
163 | else
164 | _Value = _Minimum;
165 |
166 | this.Invalidate();
167 | }
168 |
169 | ///
170 | /// Call the Increment() method to increase the value displayed by the passed value
171 | ///
172 | public void Increment(int value)
173 | {
174 | if (_Value < _Maximum)
175 | _Value += value;
176 | else
177 | _Value = _Maximum;
178 |
179 | this.Invalidate();
180 | }
181 |
182 | //
183 | // Call the Decrement() method to decrease the value displayed by the passed value
184 | //
185 | public void Decrement(int value)
186 | {
187 | if (_Value > _Minimum)
188 | _Value -= value;
189 | else
190 | _Value = _Minimum;
191 |
192 | this.Invalidate();
193 | }
194 |
195 | protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
196 | {
197 | //
198 | // Check for value
199 | //
200 | if (_Maximum == _Minimum || _Value == 0)
201 | {
202 | // Draw border only and exit;
203 | DrawBorder(e.Graphics);
204 | return;
205 | }
206 |
207 | //
208 | // The following is the width of the bar. This will vary with each value.
209 | //
210 | int fillWidth = (this.Width * _Value) / (_Maximum - _Minimum);
211 |
212 | //
213 | // Rectangles for upper and lower half of bar
214 | //
215 | Rectangle rect = new Rectangle(0, 0, fillWidth, this.Height);
216 |
217 | //
218 | // The brush
219 | //
220 | SolidBrush brush = new SolidBrush(_BarColor);
221 | e.Graphics.FillRectangle(brush, rect);
222 | brush.Dispose();
223 |
224 | //
225 | // Draw border and exit
226 | DrawBorder(e.Graphics);
227 | }
228 |
229 | protected void DrawBorder(Graphics g)
230 | {
231 | Rectangle borderRect = new Rectangle(0, 0, ClientRectangle.Width - 1, ClientRectangle.Height - 1);
232 | g.DrawRectangle(new Pen(_BorderColor, 1), borderRect);
233 | }
234 | }
235 | }
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBar.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}
8 | Library
9 | ColorProgressBar
10 | ColorProgressBar
11 | v4.8
12 | 512
13 | true
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | false
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 | false
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | Component
56 |
57 |
58 |
59 |
60 | ResXFileCodeGenerator
61 | Resources.Designer.cs
62 | Designer
63 |
64 |
65 | True
66 | Resources.resx
67 | True
68 |
69 |
70 | SettingsSingleFileGenerator
71 | Settings.Designer.cs
72 |
73 |
74 | True
75 | Settings.settings
76 | True
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/ColorProgressBarDesigner.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 |
3 | namespace ColorProgressBar
4 | {
5 | internal class ColorProgressBarDesigner : System.Windows.Forms.Design.ControlDesigner
6 | {
7 | /// Clean up some unnecessary properties
8 | protected override void PostFilterProperties(IDictionary Properties)
9 | {
10 | Properties.Remove("AllowDrop");
11 | Properties.Remove("BackgroundImage");
12 | Properties.Remove("ContextMenu");
13 | Properties.Remove("FlatStyle");
14 | Properties.Remove("Image");
15 | Properties.Remove("ImageAlign");
16 | Properties.Remove("ImageIndex");
17 | Properties.Remove("ImageList");
18 | Properties.Remove("Text");
19 | Properties.Remove("TextAlign");
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/AssemblyInfo.cs
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ColorProgressBar.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ColorProgressBar.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ColorProgressBar.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/ColorProgressBar/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30804.86
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlsqlDeveloperUtPlsqlPlugin", "PlsqlDeveloperUtPlsqlPlugin\PlsqlDeveloperUtPlsqlPlugin.csproj", "{0241FA41-E396-491A-B4EC-772B694EC689}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "utPLSQL.Ui", "utPLSQL.Ui\utPLSQL.Ui.csproj", "{7669189C-4A58-4E82-9DCB-7956624A719B}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "utPLSQL.Ui.Standalone", "utPLSQL.Ui.Standalone\utPLSQL.Ui.Standalone.csproj", "{5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorProgressBar", "ColorProgressBar\ColorProgressBar.csproj", "{739E6F07-E688-4D16-8FDF-7472E7F0FEA0}"
13 | EndProject
14 | Global
15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 | Debug|Any CPU = Debug|Any CPU
17 | Debug|x64 = Debug|x64
18 | Debug|x86 = Debug|x86
19 | Release|Any CPU = Release|Any CPU
20 | Release|x64 = Release|x64
21 | Release|x86 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {0241FA41-E396-491A-B4EC-772B694EC689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {0241FA41-E396-491A-B4EC-772B694EC689}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {0241FA41-E396-491A-B4EC-772B694EC689}.Debug|x64.ActiveCfg = Debug|x64
27 | {0241FA41-E396-491A-B4EC-772B694EC689}.Debug|x64.Build.0 = Debug|x64
28 | {0241FA41-E396-491A-B4EC-772B694EC689}.Debug|x86.ActiveCfg = Debug|x86
29 | {0241FA41-E396-491A-B4EC-772B694EC689}.Debug|x86.Build.0 = Debug|x86
30 | {0241FA41-E396-491A-B4EC-772B694EC689}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {0241FA41-E396-491A-B4EC-772B694EC689}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {0241FA41-E396-491A-B4EC-772B694EC689}.Release|x64.ActiveCfg = Release|x64
33 | {0241FA41-E396-491A-B4EC-772B694EC689}.Release|x64.Build.0 = Release|x64
34 | {0241FA41-E396-491A-B4EC-772B694EC689}.Release|x86.ActiveCfg = Release|x86
35 | {0241FA41-E396-491A-B4EC-772B694EC689}.Release|x86.Build.0 = Release|x86
36 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|Any CPU.Build.0 = Debug|Any CPU
38 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|x64.ActiveCfg = Debug|Any CPU
39 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|x64.Build.0 = Debug|Any CPU
40 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|x86.ActiveCfg = Debug|Any CPU
41 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|x86.Build.0 = Debug|Any CPU
42 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Release|Any CPU.Build.0 = Release|Any CPU
44 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Release|x64.ActiveCfg = Release|Any CPU
45 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Release|x64.Build.0 = Release|Any CPU
46 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Release|x86.ActiveCfg = Release|Any CPU
47 | {7669189C-4A58-4E82-9DCB-7956624A719B}.Release|x86.Build.0 = Release|Any CPU
48 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
49 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
50 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Debug|x64.ActiveCfg = Debug|Any CPU
51 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Debug|x64.Build.0 = Debug|Any CPU
52 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Debug|x86.ActiveCfg = Debug|Any CPU
53 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Debug|x86.Build.0 = Debug|Any CPU
54 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
55 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Release|Any CPU.Build.0 = Release|Any CPU
56 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Release|x64.ActiveCfg = Release|Any CPU
57 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Release|x64.Build.0 = Release|Any CPU
58 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Release|x86.ActiveCfg = Release|Any CPU
59 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}.Release|x86.Build.0 = Release|Any CPU
60 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
61 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
62 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Debug|x64.ActiveCfg = Debug|Any CPU
63 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Debug|x64.Build.0 = Debug|Any CPU
64 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Debug|x86.ActiveCfg = Debug|Any CPU
65 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Debug|x86.Build.0 = Debug|Any CPU
66 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
67 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Release|Any CPU.Build.0 = Release|Any CPU
68 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Release|x64.ActiveCfg = Release|Any CPU
69 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Release|x64.Build.0 = Release|Any CPU
70 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Release|x86.ActiveCfg = Release|Any CPU
71 | {739E6F07-E688-4D16-8FDF-7472E7F0FEA0}.Release|x86.Build.0 = Release|Any CPU
72 | EndGlobalSection
73 | GlobalSection(SolutionProperties) = preSolution
74 | HideSolutionNode = FALSE
75 | EndGlobalSection
76 | GlobalSection(ExtensibilityGlobals) = postSolution
77 | SolutionGuid = {AAEE5B87-8FAA-45A7-A122-60FBF4DA5170}
78 | EndGlobalSection
79 | EndGlobal
80 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/AboutDialog.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace utPLSQL
3 | {
4 | partial class AboutDialog
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDialog));
33 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
34 | this.lblTitle = new System.Windows.Forms.Label();
35 | this.lblLink = new System.Windows.Forms.LinkLabel();
36 | this.button1 = new System.Windows.Forms.Button();
37 | this.lblVersion = new System.Windows.Forms.Label();
38 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
39 | this.SuspendLayout();
40 | //
41 | // pictureBox1
42 | //
43 | this.pictureBox1.Image = global::utPLSQL.Properties.Resources.utPLSQL;
44 | this.pictureBox1.InitialImage = global::utPLSQL.Properties.Resources.utPLSQL;
45 | this.pictureBox1.Location = new System.Drawing.Point(12, 12);
46 | this.pictureBox1.Name = "pictureBox1";
47 | this.pictureBox1.Size = new System.Drawing.Size(43, 41);
48 | this.pictureBox1.TabIndex = 0;
49 | this.pictureBox1.TabStop = false;
50 | //
51 | // lblTitle
52 | //
53 | this.lblTitle.AutoSize = true;
54 | this.lblTitle.Location = new System.Drawing.Point(78, 12);
55 | this.lblTitle.Name = "lblTitle";
56 | this.lblTitle.Size = new System.Drawing.Size(191, 13);
57 | this.lblTitle.TabIndex = 1;
58 | this.lblTitle.Text = "utPLSQL Plugin for PL/SQL Developer";
59 | //
60 | // lblLink
61 | //
62 | this.lblLink.AutoSize = true;
63 | this.lblLink.Location = new System.Drawing.Point(78, 68);
64 | this.lblLink.Name = "lblLink";
65 | this.lblLink.Size = new System.Drawing.Size(91, 13);
66 | this.lblLink.TabIndex = 2;
67 | this.lblLink.TabStop = true;
68 | this.lblLink.Text = "Visit us on GitHub";
69 | this.lblLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel1_LinkClicked);
70 | //
71 | // button1
72 | //
73 | this.button1.Location = new System.Drawing.Point(198, 94);
74 | this.button1.Name = "button1";
75 | this.button1.Size = new System.Drawing.Size(75, 23);
76 | this.button1.TabIndex = 3;
77 | this.button1.Text = "OK";
78 | this.button1.UseVisualStyleBackColor = true;
79 | this.button1.Click += new System.EventHandler(this.Button1_Click);
80 | //
81 | // lblVersion
82 | //
83 | this.lblVersion.AutoSize = true;
84 | this.lblVersion.Location = new System.Drawing.Point(78, 40);
85 | this.lblVersion.Name = "lblVersion";
86 | this.lblVersion.Size = new System.Drawing.Size(35, 13);
87 | this.lblVersion.TabIndex = 4;
88 | this.lblVersion.Text = "label1";
89 | //
90 | // AboutDialog
91 | //
92 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
93 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
94 | this.ClientSize = new System.Drawing.Size(285, 129);
95 | this.Controls.Add(this.lblVersion);
96 | this.Controls.Add(this.button1);
97 | this.Controls.Add(this.lblLink);
98 | this.Controls.Add(this.lblTitle);
99 | this.Controls.Add(this.pictureBox1);
100 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
101 | this.MaximizeBox = false;
102 | this.MinimizeBox = false;
103 | this.Name = "AboutDialog";
104 | this.ShowInTaskbar = false;
105 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
106 | this.Text = "About utPLSQL Plugin";
107 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
108 | this.ResumeLayout(false);
109 | this.PerformLayout();
110 |
111 | }
112 |
113 | #endregion
114 |
115 | private System.Windows.Forms.PictureBox pictureBox1;
116 | private System.Windows.Forms.Label lblTitle;
117 | private System.Windows.Forms.LinkLabel lblLink;
118 | private System.Windows.Forms.Button button1;
119 | private System.Windows.Forms.Label lblVersion;
120 | }
121 | }
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/AboutDialog.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Forms;
2 |
3 | namespace utPLSQL
4 | {
5 | public partial class AboutDialog : Form
6 | {
7 | public AboutDialog()
8 | {
9 | InitializeComponent();
10 |
11 | var assembly = System.Reflection.Assembly.GetExecutingAssembly();
12 | var fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
13 | lblVersion.Text = $"Version {fileVersionInfo.FileVersion}";
14 | }
15 |
16 | private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
17 | {
18 | System.Diagnostics.Process.Start("https://github.com/utPLSQL/utPLSQL-PLSQL-Developer");
19 | }
20 |
21 | private void Button1_Click(object sender, System.EventArgs e)
22 | {
23 | Close();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/FodyWeavers.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
13 |
14 |
15 |
16 |
17 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
18 |
19 |
20 |
21 |
22 | A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
23 |
24 |
25 |
26 |
27 | A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
28 |
29 |
30 |
31 |
32 | The order of preloaded assemblies, delimited with line breaks.
33 |
34 |
35 |
36 |
37 |
38 | This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
39 |
40 |
41 |
42 |
43 | Controls if .pdbs for reference assemblies are also embedded.
44 |
45 |
46 |
47 |
48 | Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
49 |
50 |
51 |
52 |
53 | As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
54 |
55 |
56 |
57 |
58 | Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
59 |
60 |
61 |
62 |
63 | Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
64 |
65 |
66 |
67 |
68 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
69 |
70 |
71 |
72 |
73 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
74 |
75 |
76 |
77 |
78 | A list of unmanaged 32 bit assembly names to include, delimited with |.
79 |
80 |
81 |
82 |
83 | A list of unmanaged 64 bit assembly names to include, delimited with |.
84 |
85 |
86 |
87 |
88 | The order of preloaded assemblies, delimited with |.
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
97 |
98 |
99 |
100 |
101 | A comma-separated list of error codes that can be safely ignored in assembly verification.
102 |
103 |
104 |
105 |
106 | 'false' to turn off automatic generation of the XML Schema file.
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs:
--------------------------------------------------------------------------------
1 | using RGiesecke.DllExport;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Drawing;
5 | using System.Linq;
6 | using System.Reflection;
7 | using System.Runtime.InteropServices;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace utPLSQL
12 | {
13 | //*FUNC: 4*/ extern char *(*SYS_OracleHome)();
14 | internal delegate IntPtr SysOracleHome();
15 |
16 | //*FUNC: 11*/ BOOL (*IDE_Connected)();
17 | internal delegate bool IdeConnected();
18 |
19 | //*FUNC: 12*/ void (*IDE_GetConnectionInfo)(char **Username, char **Password, char **Database);
20 | internal delegate void IdeGetConnectionInfo(out IntPtr username, out IntPtr password, out IntPtr database);
21 |
22 | //*FUNC: 20*/ void (*IDE_CreateWindow)(int WindowType, char *Text, BOOL Execute);
23 | internal delegate void IdeCreateWindow(int windowType, string text, bool execute);
24 |
25 | //*FUNC: 69*/ void *(*IDE_CreatePopupItem)(int ID, int Index, char *Name, char *ObjectType);
26 | internal delegate void IdeCreatePopupItem(int id, int index, string name, string objectType);
27 |
28 | //*FUNC: 74*/ int (*IDE_GetPopupObject)(char **ObjectType, char **ObjectOwner, char **ObjectName, char **SubObject);
29 | internal delegate int IdeGetPopupObject(out IntPtr objectType, out IntPtr objectOwner, out IntPtr objectName, out IntPtr subObject);
30 |
31 | //*FUNC: 79*/ char *(*IDE_GetObjectSource)(char *ObjectType, char *ObjectOwner, char *ObjectName);
32 | internal delegate IntPtr IdeGetObjectSource(string objectType, string objectOwner, string objectName);
33 |
34 | //*FUNC: 97*/ extern char *(*IDE_GetConnectAs)();
35 | internal delegate IntPtr IdeGetConnectAs();
36 |
37 | //*FUNC: 150*/ void (*IDE_CreateToolButton)(int ID, int Index, char *Name, char *BitmapFile, int BitmapHandle);
38 | internal delegate void IdeCreateToolButton(int id, int index, string name, string bitmapFile, long bitmapHandle);
39 |
40 | public class PlsqlDeveloperUtPlsqlPlugin
41 | {
42 | private const string PluginName = "utPLSQL Plugin";
43 |
44 | private const int PluginMenuIndexAllTests = 3;
45 | private const int PluginMenuIndexAllTestsWithCoverage = 4;
46 | private const int PluginMenuIndexPath = 5;
47 | private const int PluginPopupIndex = 1;
48 | private const int PluginPopupIndexWithCoverage = 2;
49 |
50 | private static SysOracleHome sysOracleHome;
51 |
52 | private static IdeConnected connected;
53 | private static IdeGetConnectionInfo getConnectionInfo;
54 |
55 | private static IdeCreateWindow createWindow;
56 | private static IdeCreatePopupItem createPopupItem;
57 | private static IdeGetPopupObject getPopupObject;
58 | private static IdeGetObjectSource getObjectSource;
59 | private static IdeGetConnectAs getConnectAs;
60 | private static IdeCreateToolButton createToolButton;
61 |
62 | private static int pluginId;
63 | private static string username;
64 | private static string password;
65 | private static string database;
66 | private static string connectAs;
67 | private static string oracleHome;
68 |
69 | private static PlsqlDeveloperUtPlsqlPlugin _plugin;
70 | private static readonly List Windows = new List();
71 |
72 | #region DLL exported API
73 |
74 | [DllExport("IdentifyPlugIn", CallingConvention = CallingConvention.Cdecl)]
75 | public static string IdentifyPlugIn(int id)
76 | {
77 | if (_plugin == null)
78 | {
79 | _plugin = new PlsqlDeveloperUtPlsqlPlugin();
80 | pluginId = id;
81 | }
82 |
83 | return PluginName;
84 | }
85 |
86 | [DllExport("OnActivate", CallingConvention = CallingConvention.Cdecl)]
87 | public static void OnActivate()
88 | {
89 | try
90 | {
91 | getDatabaseInformation();
92 |
93 | // Separate streams are needed!
94 | var assembly = Assembly.GetExecutingAssembly();
95 | using (var stream = assembly.GetManifestResourceStream("utPLSQL.utPLSQL.bmp"))
96 | {
97 | if (stream != null)
98 | {
99 | createToolButton(pluginId, PluginMenuIndexAllTests, "utPLSQL", "utPLSQL.bmp", new Bitmap(stream).GetHbitmap().ToInt64());
100 | }
101 | }
102 |
103 | using (var stream = assembly.GetManifestResourceStream("utPLSQL.utPLSQL_coverage.bmp"))
104 | {
105 | if (stream != null)
106 | {
107 | createToolButton(pluginId, PluginMenuIndexAllTestsWithCoverage, "utPLSQL", "utPLSQL_coverage.bmp", new Bitmap(stream).GetHbitmap().ToInt64());
108 | }
109 | }
110 |
111 | using (var stream = assembly.GetManifestResourceStream("utPLSQL.utPLSQL.bmp"))
112 | {
113 | if (stream != null)
114 | {
115 | createToolButton(pluginId, PluginMenuIndexPath, "utPLSQL", "utPLSQL.bmp", new Bitmap(stream).GetHbitmap().ToInt64());
116 | }
117 | }
118 |
119 | using (var stream = assembly.GetManifestResourceStream("utPLSQL.utPLSQL.bmp"))
120 | {
121 | if (stream != null)
122 | {
123 | createToolButton(pluginId, PluginPopupIndex, "utPLSQL", "utPLSQL.bmp", new Bitmap(stream).GetHbitmap().ToInt64());
124 | }
125 | }
126 |
127 | using (var stream = assembly.GetManifestResourceStream("utPLSQL.utPLSQL_coverage.bmp"))
128 | {
129 | if (stream != null)
130 | {
131 | createToolButton(pluginId, PluginPopupIndexWithCoverage, "utPLSQL", "utPLSQL_coverage.bmp", new Bitmap(stream).GetHbitmap().ToInt64());
132 | }
133 | }
134 | }
135 | catch (Exception e)
136 | {
137 | MessageBox.Show(e.Message);
138 | }
139 |
140 | createPopupItem(pluginId, PluginPopupIndex, "Run utPLSQL Test", "USER");
141 | createPopupItem(pluginId, PluginPopupIndexWithCoverage, "Run Code Coverage", "USER");
142 |
143 | createPopupItem(pluginId, PluginPopupIndex, "Run utPLSQL Test", "PACKAGE");
144 | createPopupItem(pluginId, PluginPopupIndexWithCoverage, "Run Code Coverage", "PACKAGE");
145 |
146 | createPopupItem(pluginId, PluginPopupIndex, "Run utPLSQL Test", "PACKAGE BODY");
147 | createPopupItem(pluginId, PluginPopupIndexWithCoverage, "Run Code Coverage", "PACKAGE BODY");
148 |
149 | createPopupItem(pluginId, PluginPopupIndex, "Run utPLSQL Test", "PROCEDURE");
150 | createPopupItem(pluginId, PluginPopupIndexWithCoverage, "Run Code Coverage", "PROCEDURE");
151 | }
152 |
153 | [DllExport("CanClose", CallingConvention = CallingConvention.Cdecl)]
154 | public static bool CanClose()
155 | {
156 | if (Windows.Any(window => window.Running))
157 | {
158 | var confirmResult = MessageBox.Show(
159 | "utPLSQL Tests are still running.\r\n\r\nDo you really want to close PL/SQL Developer?",
160 | "Running utPLSQL Tests", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
161 | return confirmResult == DialogResult.Yes;
162 | }
163 |
164 | return true;
165 | }
166 |
167 | [DllExport("RegisterCallback", CallingConvention = CallingConvention.Cdecl)]
168 | public static void RegisterCallback(int index, IntPtr function)
169 | {
170 | switch (index)
171 | {
172 | case 4:
173 | sysOracleHome = (SysOracleHome)Marshal.GetDelegateForFunctionPointer(function, typeof(SysOracleHome));
174 | break;
175 | case 11:
176 | connected = (IdeConnected)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeConnected));
177 | break;
178 | case 12:
179 | getConnectionInfo = (IdeGetConnectionInfo)Marshal.GetDelegateForFunctionPointer(function,
180 | typeof(IdeGetConnectionInfo));
181 | break;
182 | case 20:
183 | createWindow = (IdeCreateWindow)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeCreateWindow));
184 | break;
185 | case 69:
186 | createPopupItem = (IdeCreatePopupItem)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeCreatePopupItem));
187 | break;
188 | case 74:
189 | getPopupObject = (IdeGetPopupObject)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeGetPopupObject));
190 | break;
191 | case 79:
192 | getObjectSource = (IdeGetObjectSource)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeGetObjectSource));
193 | break;
194 | case 97:
195 | getConnectAs = (IdeGetConnectAs)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeGetConnectAs));
196 | break;
197 | case 150:
198 | createToolButton = (IdeCreateToolButton)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeCreateToolButton));
199 | break;
200 | }
201 | }
202 |
203 | [DllExport("OnConnectionChange", CallingConvention = CallingConvention.Cdecl)]
204 | public static void OnConnectionChange()
205 | {
206 | getDatabaseInformation();
207 | }
208 |
209 | [DllExport("CreateMenuItem", CallingConvention = CallingConvention.Cdecl)]
210 | public static string CreateMenuItem(int index)
211 | {
212 | switch (index)
213 | {
214 | case 1:
215 | return "TAB=Tools";
216 | case 2:
217 | return "GROUP=utPLSQL";
218 | case PluginMenuIndexAllTests:
219 | return "LARGEITEM=Run all tests of current user";
220 | case PluginMenuIndexAllTestsWithCoverage:
221 | return "LARGEITEM=Run code coverage for current user";
222 | case PluginMenuIndexPath:
223 | return "LARGEITEM=Run tests for specific path";
224 | default:
225 | return "";
226 | }
227 | }
228 |
229 | [DllExport("OnMenuClick", CallingConvention = CallingConvention.Cdecl)]
230 | public static void OnMenuClick(int index)
231 | {
232 | try
233 | {
234 | if (index == PluginMenuIndexAllTests)
235 | {
236 | if (isConnected() && !isSydba())
237 | {
238 | var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome);
239 | Windows.Add(testResultWindow);
240 | testResultWindow.RunTestsAsync("_ALL", username, null, null, false, false);
241 | }
242 | }
243 | else if (index == PluginMenuIndexAllTestsWithCoverage)
244 | {
245 | if (isConnected() && !isSydba())
246 | {
247 | var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome);
248 | Windows.Add(testResultWindow);
249 | testResultWindow.RunTestsAsync("_ALL", username, null, null, true, false);
250 | }
251 | }
252 | else if (index == PluginMenuIndexPath)
253 | {
254 | if (isConnected() && !isSydba())
255 | {
256 | var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome);
257 | Windows.Add(testResultWindow);
258 | testResultWindow.RunTestsAsync(null, null, null, null, false, true);
259 | }
260 | }
261 | else if (index == PluginPopupIndex)
262 | {
263 | if (isConnected() && !isSydba())
264 | {
265 | getPopupObject(out IntPtr type, out IntPtr owner, out IntPtr name, out IntPtr subType);
266 |
267 | var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome);
268 | Windows.Add(testResultWindow);
269 | testResultWindow.RunTestsAsync(Marshal.PtrToStringAnsi(type), Marshal.PtrToStringAnsi(owner),
270 | Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), false, false);
271 | }
272 | }
273 | else if (index == PluginPopupIndexWithCoverage)
274 | {
275 | if (isConnected() && !isSydba())
276 | {
277 | getPopupObject(out IntPtr type, out IntPtr owner, out IntPtr name, out IntPtr subType);
278 |
279 | var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs, oracleHome);
280 | Windows.Add(testResultWindow);
281 | testResultWindow.RunTestsAsync(Marshal.PtrToStringAnsi(type), Marshal.PtrToStringAnsi(owner),
282 | Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), true, false);
283 | }
284 | }
285 | }
286 | catch (Exception e)
287 | {
288 | MessageBox.Show($"{e.Message}\n\n{e.StackTrace}", "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
289 | }
290 | }
291 |
292 | [DllExport("About", CallingConvention = CallingConvention.Cdecl)]
293 | public static string About()
294 | {
295 | new AboutDialog().Show();
296 | return "";
297 | }
298 |
299 | #endregion
300 |
301 | public void OpenPackageBody(string owner, string name)
302 | {
303 | var source = getObjectSource("PACKAGE BODY", owner, name);
304 | createWindow(3, Marshal.PtrToStringAnsi(source), false);
305 | }
306 | private static bool isSydba()
307 | {
308 | if (connectAs.ToLower().Equals("sysdba"))
309 | {
310 | MessageBox.Show("You shouldn't run utPLSQL as SYSDBA.\n\nTest will not run.", "Connected as SYSDBA", MessageBoxButtons.OK, MessageBoxIcon.Error);
311 | return true;
312 | }
313 | return false;
314 | }
315 |
316 | private static bool isConnected()
317 | {
318 | if (!connected())
319 | {
320 | MessageBox.Show("Please connect before running tests!", "No connection", MessageBoxButtons.OK, MessageBoxIcon.Error);
321 | return false;
322 | }
323 | return true;
324 | }
325 |
326 | private static void getDatabaseInformation()
327 | {
328 | try
329 | {
330 | if (connected())
331 | {
332 | getConnectionInfo(out IntPtr ptrUsername, out IntPtr ptrPassword, out IntPtr ptrDatabase);
333 |
334 | username = Marshal.PtrToStringAnsi(ptrUsername);
335 | password = Marshal.PtrToStringAnsi(ptrPassword);
336 | database = Marshal.PtrToStringAnsi(ptrDatabase);
337 |
338 | IntPtr ptrConnectAs = getConnectAs();
339 |
340 | connectAs = Marshal.PtrToStringAnsi(ptrConnectAs);
341 |
342 | IntPtr ptrOracleHome = sysOracleHome();
343 |
344 | oracleHome = Marshal.PtrToStringAnsi(ptrOracleHome);
345 | }
346 | }
347 | catch (Exception e)
348 | {
349 | MessageBox.Show(e.Message);
350 | }
351 | }
352 | }
353 | }
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | {0241FA41-E396-491A-B4EC-772B694EC689}
9 | Library
10 | Properties
11 | utPLSQL
12 | PlsqlDeveloperUtPlsqlPlugin
13 | v4.8
14 | 512
15 | true
16 |
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 | true
29 | false
30 |
31 |
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 | true
39 | false
40 |
41 |
42 | true
43 | bin\x64\Debug\
44 | DEBUG;TRACE
45 | full
46 | x64
47 | 7.3
48 | prompt
49 | true
50 | false
51 |
52 |
53 | bin\x64\Release\
54 | TRACE
55 | true
56 | pdbonly
57 | x64
58 | 7.3
59 | prompt
60 | true
61 | false
62 |
63 |
64 | true
65 | bin\x86\Debug\
66 | DEBUG;TRACE
67 | true
68 | full
69 | x86
70 | 7.3
71 | prompt
72 | false
73 |
74 |
75 | bin\x86\Release\
76 | TRACE
77 | true
78 | true
79 | pdbonly
80 | x86
81 | 7.3
82 | prompt
83 | false
84 |
85 |
86 | utPLSQL.ico
87 |
88 |
89 |
90 | ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll
91 |
92 |
93 | ..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll
94 | False
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | Form
108 |
109 |
110 | AboutDialog.cs
111 |
112 |
113 | True
114 | True
115 | Resources.resx
116 |
117 |
118 |
119 |
120 |
121 |
122 | AboutDialog.cs
123 |
124 |
125 | ResXFileCodeGenerator
126 | Resources.Designer.cs
127 |
128 |
129 |
130 |
131 | Always
132 |
133 |
134 |
135 |
136 | Always
137 |
138 |
139 | Always
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 | {7669189c-4a58-4e82-9dcb-7956624a719b}
152 | utPLSQL.Ui
153 |
154 |
155 |
156 |
157 |
158 |
159 | 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}.
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/AssemblyInfo.cs
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace utPLSQL.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("utPLSQL.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap utPLSQL {
67 | get {
68 | object obj = ResourceManager.GetObject("utPLSQL", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap utPLSQL_coverage {
77 | get {
78 | object obj = ResourceManager.GetObject("utPLSQL_coverage", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\utPLSQL.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\utplsql_coverage.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.bmp
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.ico
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL_coverage.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL_coverage.bmp
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL_coverage.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/utPLSQL_coverage.psd
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/SetAssemblyVersion.ps1:
--------------------------------------------------------------------------------
1 | param([string]$NewVersion)
2 |
3 | Get-ChildItem -Include AssemblyInfo.cs -Recurse | ForEach-Object {
4 | $_.IsReadOnly = $false
5 | (Get-Content -Path $_) -replace '(?<=Assembly(?:File)?Version\(")[^"]*(?="\))', $NewVersion |Set-Content -Path $_
6 | }
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/build.cmd:
--------------------------------------------------------------------------------
1 | msbuild PlsqlDeveloperUtPlsqlPlugin.sln /p:Configuration=Release;Platform=x64
2 |
3 | copy PlsqlDeveloperUtPlsqlPlugin\bin\x64\Release\PlsqlDeveloperUtPlsqlPlugin.dll build\PlsqlDeveloperUtPlsqlPlugin.dll
4 |
5 | msbuild PlsqlDeveloperUtPlsqlPlugin.sln /p:Configuration=Release;Platform=x86
6 |
7 | copy PlsqlDeveloperUtPlsqlPlugin\bin\x86\Release\PlsqlDeveloperUtPlsqlPlugin.dll build\PlsqlDeveloperUtPlsqlPlugin_x86.dll
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/FodyWeavers.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
13 |
14 |
15 |
16 |
17 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
18 |
19 |
20 |
21 |
22 | A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
23 |
24 |
25 |
26 |
27 | A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
28 |
29 |
30 |
31 |
32 | The order of preloaded assemblies, delimited with line breaks.
33 |
34 |
35 |
36 |
37 |
38 | This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
39 |
40 |
41 |
42 |
43 | Controls if .pdbs for reference assemblies are also embedded.
44 |
45 |
46 |
47 |
48 | Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
49 |
50 |
51 |
52 |
53 | As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
54 |
55 |
56 |
57 |
58 | Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
59 |
60 |
61 |
62 |
63 | Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
64 |
65 |
66 |
67 |
68 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
69 |
70 |
71 |
72 |
73 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
74 |
75 |
76 |
77 |
78 | A list of unmanaged 32 bit assembly names to include, delimited with |.
79 |
80 |
81 |
82 |
83 | A list of unmanaged 64 bit assembly names to include, delimited with |.
84 |
85 |
86 |
87 |
88 | The order of preloaded assemblies, delimited with |.
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
97 |
98 |
99 |
100 |
101 | A comma-separated list of error codes that can be safely ignored in assembly verification.
102 |
103 |
104 |
105 |
106 | 'false' to turn off automatic generation of the XML Schema file.
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/LoginForm.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace utPLSQL.UI.Standalone
3 | {
4 | partial class LoginForm
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginForm));
33 | this.btnRunTests = new System.Windows.Forms.Button();
34 | this.txtUsername = new System.Windows.Forms.TextBox();
35 | this.txtPassword = new System.Windows.Forms.TextBox();
36 | this.txtDatabase = new System.Windows.Forms.TextBox();
37 | this.lblUsername = new System.Windows.Forms.Label();
38 | this.lblPassword = new System.Windows.Forms.Label();
39 | this.lblDatabase = new System.Windows.Forms.Label();
40 | this.btnCodeCoverage = new System.Windows.Forms.Button();
41 | this.SuspendLayout();
42 | //
43 | // btnRunTests
44 | //
45 | this.btnRunTests.Location = new System.Drawing.Point(73, 89);
46 | this.btnRunTests.Name = "btnRunTests";
47 | this.btnRunTests.Size = new System.Drawing.Size(80, 23);
48 | this.btnRunTests.TabIndex = 4;
49 | this.btnRunTests.Text = "Run Tests";
50 | this.btnRunTests.UseVisualStyleBackColor = true;
51 | this.btnRunTests.Click += new System.EventHandler(this.BtnRunTests_Click);
52 | //
53 | // txtUsername
54 | //
55 | this.txtUsername.Location = new System.Drawing.Point(73, 12);
56 | this.txtUsername.Name = "txtUsername";
57 | this.txtUsername.Size = new System.Drawing.Size(186, 20);
58 | this.txtUsername.TabIndex = 1;
59 | //
60 | // txtPassword
61 | //
62 | this.txtPassword.Location = new System.Drawing.Point(73, 38);
63 | this.txtPassword.Name = "txtPassword";
64 | this.txtPassword.PasswordChar = '*';
65 | this.txtPassword.Size = new System.Drawing.Size(186, 20);
66 | this.txtPassword.TabIndex = 2;
67 | //
68 | // txtDatabase
69 | //
70 | this.txtDatabase.Location = new System.Drawing.Point(73, 64);
71 | this.txtDatabase.Name = "txtDatabase";
72 | this.txtDatabase.Size = new System.Drawing.Size(186, 20);
73 | this.txtDatabase.TabIndex = 3;
74 | //
75 | // lblUsername
76 | //
77 | this.lblUsername.AutoSize = true;
78 | this.lblUsername.Location = new System.Drawing.Point(12, 15);
79 | this.lblUsername.Name = "lblUsername";
80 | this.lblUsername.Size = new System.Drawing.Size(55, 13);
81 | this.lblUsername.TabIndex = 4;
82 | this.lblUsername.Text = "Username";
83 | //
84 | // lblPassword
85 | //
86 | this.lblPassword.AutoSize = true;
87 | this.lblPassword.Location = new System.Drawing.Point(12, 41);
88 | this.lblPassword.Name = "lblPassword";
89 | this.lblPassword.Size = new System.Drawing.Size(53, 13);
90 | this.lblPassword.TabIndex = 5;
91 | this.lblPassword.Text = "Password";
92 | //
93 | // lblDatabase
94 | //
95 | this.lblDatabase.AutoSize = true;
96 | this.lblDatabase.Location = new System.Drawing.Point(12, 67);
97 | this.lblDatabase.Name = "lblDatabase";
98 | this.lblDatabase.Size = new System.Drawing.Size(53, 13);
99 | this.lblDatabase.TabIndex = 6;
100 | this.lblDatabase.Text = "Database";
101 | //
102 | // btnCodeCoverage
103 | //
104 | this.btnCodeCoverage.Location = new System.Drawing.Point(159, 89);
105 | this.btnCodeCoverage.Name = "btnCodeCoverage";
106 | this.btnCodeCoverage.Size = new System.Drawing.Size(100, 23);
107 | this.btnCodeCoverage.TabIndex = 5;
108 | this.btnCodeCoverage.Text = "Code Coverage";
109 | this.btnCodeCoverage.UseVisualStyleBackColor = true;
110 | this.btnCodeCoverage.Click += new System.EventHandler(this.btnCodeCoverage_Click);
111 | //
112 | // LoginForm
113 | //
114 | this.AcceptButton = this.btnRunTests;
115 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
116 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
117 | this.ClientSize = new System.Drawing.Size(271, 124);
118 | this.Controls.Add(this.btnCodeCoverage);
119 | this.Controls.Add(this.lblDatabase);
120 | this.Controls.Add(this.lblPassword);
121 | this.Controls.Add(this.lblUsername);
122 | this.Controls.Add(this.txtDatabase);
123 | this.Controls.Add(this.txtPassword);
124 | this.Controls.Add(this.txtUsername);
125 | this.Controls.Add(this.btnRunTests);
126 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
127 | this.MaximizeBox = false;
128 | this.MinimizeBox = false;
129 | this.Name = "LoginForm";
130 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
131 | this.Text = "utPLSQL";
132 | this.ResumeLayout(false);
133 | this.PerformLayout();
134 |
135 | }
136 |
137 | #endregion
138 |
139 | private System.Windows.Forms.Button btnRunTests;
140 | private System.Windows.Forms.TextBox txtUsername;
141 | private System.Windows.Forms.TextBox txtPassword;
142 | private System.Windows.Forms.TextBox txtDatabase;
143 | private System.Windows.Forms.Label lblUsername;
144 | private System.Windows.Forms.Label lblPassword;
145 | private System.Windows.Forms.Label lblDatabase;
146 | private System.Windows.Forms.Button btnCodeCoverage;
147 | }
148 | }
149 |
150 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/LoginForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace utPLSQL.UI.Standalone
5 | {
6 | public partial class LoginForm : Form
7 | {
8 | public LoginForm()
9 | {
10 | InitializeComponent();
11 | }
12 |
13 | private void BtnRunTests_Click(object sender, EventArgs e)
14 | {
15 | var testRunnerWindow = new TestRunnerWindow(null, txtUsername.Text, txtPassword.Text, txtDatabase.Text, null, null);
16 | testRunnerWindow.RunTestsAsync("USER", null, txtUsername.Text, null, false, false);
17 | }
18 |
19 | private void btnCodeCoverage_Click(object sender, EventArgs e)
20 | {
21 | var testRunnerWindow = new TestRunnerWindow(null, txtUsername.Text, txtPassword.Text, txtDatabase.Text, null, null);
22 | testRunnerWindow.RunTestsAsync("USER", null, txtUsername.Text, null, true, false);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace utPLSQL.UI.Standalone
5 | {
6 | static class Program
7 | {
8 | ///
9 | /// The main entry point for the application.
10 | ///
11 | [STAThread]
12 | static void Main()
13 | {
14 | Application.EnableVisualStyles();
15 | Application.SetCompatibleTextRenderingDefault(false);
16 | Application.Run(new LoginForm());
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/AssemblyInfo.cs
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace utPLSQL.UI.Standalone.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("utPLSQL.UI.Standalone.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace utPLSQL.UI.Standalone.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/utPLSQL.UI.Standalone.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | {5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}
9 | WinExe
10 | utPLSQL.UI.Standalone
11 | utPLSQL.UI.Standalone
12 | v4.8
13 | 512
14 | true
15 |
16 |
17 |
18 |
19 |
20 | AnyCPU
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 | false
29 |
30 |
31 | AnyCPU
32 | pdbonly
33 | true
34 | bin\Release\
35 | TRACE
36 | prompt
37 | 4
38 | false
39 |
40 |
41 |
42 | ..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | Form
58 |
59 |
60 | LoginForm.cs
61 |
62 |
63 |
64 |
65 | LoginForm.cs
66 |
67 |
68 | ResXFileCodeGenerator
69 | Resources.Designer.cs
70 | Designer
71 |
72 |
73 | True
74 | Resources.resx
75 | True
76 |
77 |
78 |
79 |
80 | SettingsSingleFileGenerator
81 | Settings.Designer.cs
82 |
83 |
84 | True
85 | Settings.settings
86 | True
87 |
88 |
89 |
90 |
91 | {7669189c-4a58-4e82-9dcb-7956624a719b}
92 | utPLSQL.Ui
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI.Standalone/utPLSQL.UI.Standalone.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/CodeCoverageReportDialog.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace utPLSQL
3 | {
4 | partial class CodeCoverageReportDialog
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CodeCoverageReportDialog));
33 | this.txtPaths = new System.Windows.Forms.TextBox();
34 | this.txtSchemas = new System.Windows.Forms.TextBox();
35 | this.txtIncludes = new System.Windows.Forms.TextBox();
36 | this.txtExluces = new System.Windows.Forms.TextBox();
37 | this.label1 = new System.Windows.Forms.Label();
38 | this.btnCancel = new System.Windows.Forms.Button();
39 | this.btnRun = new System.Windows.Forms.Button();
40 | this.lblPaths = new System.Windows.Forms.Label();
41 | this.lblIncludes = new System.Windows.Forms.Label();
42 | this.lblExcludes = new System.Windows.Forms.Label();
43 | this.SuspendLayout();
44 | //
45 | // txtPaths
46 | //
47 | this.txtPaths.Location = new System.Drawing.Point(119, 12);
48 | this.txtPaths.Multiline = true;
49 | this.txtPaths.Name = "txtPaths";
50 | this.txtPaths.ReadOnly = true;
51 | this.txtPaths.Size = new System.Drawing.Size(453, 80);
52 | this.txtPaths.TabIndex = 0;
53 | this.txtPaths.TabStop = false;
54 | //
55 | // txtSchemas
56 | //
57 | this.txtSchemas.Location = new System.Drawing.Point(119, 98);
58 | this.txtSchemas.Name = "txtSchemas";
59 | this.txtSchemas.Size = new System.Drawing.Size(453, 20);
60 | this.txtSchemas.TabIndex = 1;
61 | this.txtSchemas.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterPressed);
62 | //
63 | // txtIncludes
64 | //
65 | this.txtIncludes.Location = new System.Drawing.Point(119, 124);
66 | this.txtIncludes.Multiline = true;
67 | this.txtIncludes.Name = "txtIncludes";
68 | this.txtIncludes.Size = new System.Drawing.Size(453, 80);
69 | this.txtIncludes.TabIndex = 2;
70 | this.txtIncludes.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterPressed);
71 | //
72 | // txtExluces
73 | //
74 | this.txtExluces.Location = new System.Drawing.Point(119, 210);
75 | this.txtExluces.Multiline = true;
76 | this.txtExluces.Name = "txtExluces";
77 | this.txtExluces.Size = new System.Drawing.Size(453, 80);
78 | this.txtExluces.TabIndex = 3;
79 | this.txtExluces.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EnterPressed);
80 | //
81 | // label1
82 | //
83 | this.label1.AutoSize = true;
84 | this.label1.Location = new System.Drawing.Point(12, 101);
85 | this.label1.Name = "label1";
86 | this.label1.Size = new System.Drawing.Size(101, 13);
87 | this.label1.TabIndex = 4;
88 | this.label1.Text = "Schemas under test";
89 | //
90 | // btnCancel
91 | //
92 | this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
93 | this.btnCancel.Location = new System.Drawing.Point(497, 296);
94 | this.btnCancel.Name = "btnCancel";
95 | this.btnCancel.Size = new System.Drawing.Size(75, 23);
96 | this.btnCancel.TabIndex = 5;
97 | this.btnCancel.Text = "Cancel";
98 | this.btnCancel.UseVisualStyleBackColor = true;
99 | //
100 | // btnRun
101 | //
102 | this.btnRun.DialogResult = System.Windows.Forms.DialogResult.OK;
103 | this.btnRun.Location = new System.Drawing.Point(416, 296);
104 | this.btnRun.Name = "btnRun";
105 | this.btnRun.Size = new System.Drawing.Size(75, 23);
106 | this.btnRun.TabIndex = 4;
107 | this.btnRun.Text = "Run";
108 | this.btnRun.UseVisualStyleBackColor = true;
109 | //
110 | // lblPaths
111 | //
112 | this.lblPaths.AutoSize = true;
113 | this.lblPaths.Location = new System.Drawing.Point(12, 15);
114 | this.lblPaths.Name = "lblPaths";
115 | this.lblPaths.Size = new System.Drawing.Size(79, 13);
116 | this.lblPaths.TabIndex = 7;
117 | this.lblPaths.Text = "utPLSQL paths";
118 | //
119 | // lblIncludes
120 | //
121 | this.lblIncludes.AutoSize = true;
122 | this.lblIncludes.Location = new System.Drawing.Point(12, 127);
123 | this.lblIncludes.Name = "lblIncludes";
124 | this.lblIncludes.Size = new System.Drawing.Size(79, 13);
125 | this.lblIncludes.TabIndex = 8;
126 | this.lblIncludes.Text = "Include objects";
127 | //
128 | // lblExcludes
129 | //
130 | this.lblExcludes.AutoSize = true;
131 | this.lblExcludes.Location = new System.Drawing.Point(12, 213);
132 | this.lblExcludes.Name = "lblExcludes";
133 | this.lblExcludes.Size = new System.Drawing.Size(82, 13);
134 | this.lblExcludes.TabIndex = 9;
135 | this.lblExcludes.Text = "Exclude objects";
136 | //
137 | // CodeCoverageReportDialog
138 | //
139 | this.AcceptButton = this.btnRun;
140 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
141 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
142 | this.CancelButton = this.btnCancel;
143 | this.ClientSize = new System.Drawing.Size(584, 331);
144 | this.Controls.Add(this.lblExcludes);
145 | this.Controls.Add(this.lblIncludes);
146 | this.Controls.Add(this.lblPaths);
147 | this.Controls.Add(this.btnRun);
148 | this.Controls.Add(this.btnCancel);
149 | this.Controls.Add(this.label1);
150 | this.Controls.Add(this.txtExluces);
151 | this.Controls.Add(this.txtIncludes);
152 | this.Controls.Add(this.txtSchemas);
153 | this.Controls.Add(this.txtPaths);
154 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
155 | this.Name = "CodeCoverageReportDialog";
156 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
157 | this.Text = "Code Coverate Report";
158 | this.ResumeLayout(false);
159 | this.PerformLayout();
160 |
161 | }
162 |
163 | #endregion
164 |
165 | private System.Windows.Forms.TextBox txtPaths;
166 | private System.Windows.Forms.TextBox txtSchemas;
167 | private System.Windows.Forms.TextBox txtIncludes;
168 | private System.Windows.Forms.TextBox txtExluces;
169 | private System.Windows.Forms.Label label1;
170 | private System.Windows.Forms.Button btnCancel;
171 | private System.Windows.Forms.Button btnRun;
172 | private System.Windows.Forms.Label lblPaths;
173 | private System.Windows.Forms.Label lblIncludes;
174 | private System.Windows.Forms.Label lblExcludes;
175 | }
176 | }
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/CodeCoverageReportDialog.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Windows.Forms;
3 |
4 | namespace utPLSQL
5 | {
6 | public partial class CodeCoverageReportDialog : Form
7 | {
8 | public CodeCoverageReportDialog(IReadOnlyList paths)
9 | {
10 | InitializeComponent();
11 |
12 | txtPaths.Text = paths[0];
13 | }
14 |
15 | public string GetSchemas()
16 | {
17 | return txtSchemas.Text;
18 | }
19 |
20 | public string GetIncludes()
21 | {
22 | return txtIncludes.Text;
23 | }
24 |
25 | public string GetExcludes()
26 | {
27 | return txtExluces.Text;
28 | }
29 |
30 | private void EnterPressed(object sender, KeyEventArgs e)
31 | {
32 | if (e.KeyCode == Keys.Enter)
33 | {
34 | btnRun.PerformClick();
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/Properties/AssemblyInfo.cs
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs:
--------------------------------------------------------------------------------
1 | using FontAwesome.Sharp;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Globalization;
7 | using System.IO;
8 | using System.Text.RegularExpressions;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace utPLSQL
13 | {
14 | public partial class TestRunnerWindow : Form
15 | {
16 | Regex regexLine = new Regex("(.*line )([0-9]+)( .*)", RegexOptions.IgnoreCase);
17 |
18 | public bool Running { get; private set; }
19 |
20 | private const int IconSize = 24;
21 | private const string StatusSuccess = "Success";
22 | private const string StatusFailure = "Failure";
23 | private const string StatusError = "Error";
24 | private const string StatusDisabled = "Disabled";
25 | private const string StatusWarning = "Warning";
26 |
27 | private readonly object pluginIntegration;
28 | private readonly string username;
29 | private readonly string password;
30 | private readonly string database;
31 | private readonly string connectAs;
32 | private readonly string oracleHome;
33 |
34 | private RealTimeTestRunner testRunner;
35 |
36 | private int totalNumberOfTests;
37 | private int rowIndexOnRightClick;
38 | private int completedTests;
39 |
40 | private ImageConverter imageConverter = new ImageConverter();
41 |
42 | private DataView dataViewTestResults;
43 | private DataView dataViewExpectations;
44 |
45 | public TestRunnerWindow(object pluginIntegration, string username, string password, string database, string connectAs, string oracleHome)
46 | {
47 | this.pluginIntegration = pluginIntegration;
48 | this.username = username;
49 | this.password = password;
50 | this.database = database;
51 | this.connectAs = connectAs;
52 | this.oracleHome = oracleHome;
53 |
54 | InitializeComponent();
55 |
56 | dataViewTestResults = new DataView(dataTableTestResults);
57 | dataGridViewTestResults.DataMember = null;
58 | dataGridViewTestResults.DataSource = dataViewTestResults;
59 |
60 | dataViewExpectations = new DataView(dataTableExpectations);
61 | dataGridViewExpectations.DataMember = null;
62 | dataGridViewExpectations.DataSource = dataViewExpectations;
63 | }
64 |
65 | public async Task RunTestsAsync(string type, string owner, string name, string procedure, bool coverage, bool showOnly)
66 | {
67 | var path = showOnly ? null : GetPath(type, owner, name, procedure);
68 |
69 | testRunner = new RealTimeTestRunner();
70 |
71 | try
72 | {
73 | if (oracleHome != null && Environment.GetEnvironmentVariable("ORACLE_HOME") == null)
74 | {
75 | Environment.SetEnvironmentVariable("ORACLE_HOME", oracleHome);
76 | }
77 | Running = true;
78 |
79 | testRunner.Connect(username, password, database);
80 | }
81 | catch (Exception e)
82 | {
83 | MessageBox.Show(e.Message, "Connect failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
84 | return;
85 | }
86 | try
87 | {
88 | testRunner.GetVersion();
89 | }
90 | catch
91 | {
92 | MessageBox.Show("utPLSQL is not installed", "utPLSQL not installed", MessageBoxButtons.OK, MessageBoxIcon.Error);
93 | return;
94 | }
95 |
96 | if (showOnly)
97 | {
98 | txtPath.ReadOnly = false;
99 | txtPath.Focus();
100 | Show();
101 | }
102 | else
103 | {
104 | await RunTestsAsync(path, coverage);
105 | }
106 | }
107 |
108 | private async Task RunTestsAsync(List path, bool coverage)
109 | {
110 | ResetComponents();
111 |
112 | dataSet.Clear();
113 |
114 | SetWindowTitle(path);
115 |
116 | if (coverage)
117 | {
118 | var codeCoverageReportDialog = new CodeCoverageReportDialog(path);
119 | var dialogResult = codeCoverageReportDialog.ShowDialog();
120 | if (dialogResult == DialogResult.OK)
121 | {
122 | Show();
123 |
124 | var schemas = ConvertToList(codeCoverageReportDialog.GetSchemas());
125 | var includes = ConvertToList(codeCoverageReportDialog.GetIncludes());
126 | var excludes = ConvertToList(codeCoverageReportDialog.GetExcludes());
127 |
128 | completedTests = 0;
129 |
130 | txtStatus.Text = "Running tests with coverage...";
131 |
132 | var htmlReport = await testRunner.RunTestsWithCoverageAsync(path, CollectResults(coverage), schemas, includes, excludes);
133 |
134 | var filePath = $"{Path.GetTempPath()}\\utPLSQL_Coverage_Report_{Guid.NewGuid()}.html";
135 | using (var sw = new StreamWriter(filePath))
136 | {
137 | sw.WriteLine(htmlReport);
138 | }
139 |
140 | txtStatus.BeginInvoke((MethodInvoker)delegate
141 | {
142 | txtStatus.Text = totalNumberOfTests > 0 ? "Finished" : "No tests found";
143 | });
144 |
145 | Running = false;
146 |
147 | System.Diagnostics.Process.Start(filePath);
148 | }
149 | }
150 | else
151 | {
152 | Show();
153 |
154 | completedTests = 0;
155 |
156 | txtStatus.Text = "Running tests...";
157 |
158 | await testRunner.RunTestsAsync(path, CollectResults(coverage));
159 | }
160 | }
161 |
162 | private Action<@event> CollectResults(bool coverage)
163 | {
164 | return @event =>
165 | {
166 | if (@event.type.Equals("pre-run"))
167 | {
168 | dataGridViewTestResults.BeginInvoke((MethodInvoker)delegate
169 | {
170 | txtStatus.Text = "Running tests...";
171 |
172 | totalNumberOfTests = @event.totalNumberOfTests;
173 |
174 | colorProgressBar.Minimum = 0;
175 | colorProgressBar.Maximum = totalNumberOfTests;
176 | colorProgressBar.Step = 1;
177 |
178 | CreateTestResults(@event);
179 |
180 |
181 | dataTableTestResults.AcceptChanges();
182 | });
183 | }
184 | else if (@event.type.Equals("post-test"))
185 | {
186 | dataGridViewTestResults.BeginInvoke((MethodInvoker)delegate
187 | {
188 | completedTests++;
189 |
190 | txtTests.Text = (completedTests > totalNumberOfTests ? totalNumberOfTests : completedTests) + "/" + totalNumberOfTests;
191 |
192 | colorProgressBar.PerformStep();
193 |
194 | UpdateTestResult(@event);
195 | });
196 | }
197 | else if (@event.type.Equals("post-run"))
198 | {
199 | dataGridViewTestResults.BeginInvoke((MethodInvoker)delegate
200 | {
201 | txtStart.Text = @event.run.startTime.ToString(CultureInfo.CurrentCulture);
202 | txtEnd.Text = @event.run.endTime.ToString(CultureInfo.CurrentCulture);
203 | txtTime.Text = @event.run.executionTime + " s";
204 |
205 | txtTests.Text = (completedTests > totalNumberOfTests ? totalNumberOfTests : completedTests) + "/" + totalNumberOfTests;
206 | txtSuccess.Text = @event.run.counter.success + "";
207 | txtFailures.Text = @event.run.counter.failure + "";
208 | txtErrors.Text = @event.run.counter.error + "";
209 | txtDisabled.Text = @event.run.counter.disabled + "";
210 |
211 | if (@event.run.counter.failure > 0 || @event.run.counter.error > 0)
212 | {
213 | colorProgressBar.BarColor = Color.DarkRed;
214 | }
215 |
216 | if (!coverage)
217 | {
218 | txtStatus.Text = totalNumberOfTests > 0 ? "Finished" : "No tests found";
219 |
220 | Running = false;
221 | }
222 | });
223 | }
224 | };
225 | }
226 |
227 |
228 | private List ConvertToList(string listValue)
229 | {
230 | if (string.IsNullOrWhiteSpace(listValue))
231 | {
232 | return null;
233 | }
234 | else
235 | {
236 | if (listValue.Contains(" "))
237 | {
238 | var parts = listValue.Split(' ');
239 | return new List(parts);
240 | }
241 | else if (listValue.Contains(","))
242 | {
243 | var parts = listValue.Split(',');
244 | return new List(parts);
245 | }
246 | else if (listValue.Contains("\n"))
247 | {
248 | var parts = listValue.Split('\n');
249 | return new List(parts);
250 | }
251 | else
252 | {
253 | return new List { listValue };
254 | }
255 | }
256 | }
257 |
258 | private void SetWindowTitle(IReadOnlyList path)
259 | {
260 | var startTime = DateTime.Now.ToString(CultureInfo.CurrentCulture);
261 | txtStart.Text = startTime;
262 | txtPath.Text = path[0];
263 | Text = $"{path[0]} {startTime}";
264 | }
265 |
266 | private static List GetPath(string type, string owner, string name, string procedure)
267 | {
268 | switch (type)
269 | {
270 | case "USER":
271 | return new List { name };
272 | case "PACKAGE":
273 | return new List { $"{owner}.{name}" };
274 | case "PACKAGE BODY":
275 | return new List { $"{owner}.{name}" };
276 | case "PROCEDURE":
277 | return new List { $"{owner}.{name}.{procedure}" };
278 | default:
279 | return new List { owner };
280 | }
281 | }
282 |
283 | private void ResetComponents()
284 | {
285 | txtPath.Text = "";
286 | txtStart.Text = "";
287 | txtTime.Text = "";
288 |
289 | txtEnd.Text = "";
290 | txtTests.Text = "";
291 | txtFailures.Text = "";
292 | txtErrors.Text = "";
293 | txtDisabled.Text = "";
294 | txtStatus.Text = "";
295 | txtStatus.Text = "";
296 |
297 | txtTestOwner.Text = "";
298 | txtTestPackage.Text = "";
299 | txtTestProcuedure.Text = "";
300 | txtTestName.Text = "";
301 | txtTestDescription.Text = "";
302 | txtTestSuitePath.Text = "";
303 |
304 | txtTestStart.Text = "";
305 | txtTestEnd.Text = "";
306 | txtTestTime.Text = "";
307 |
308 | txtErrorMessage.Text = "";
309 |
310 | colorProgressBar.BarColor = Color.Green;
311 | colorProgressBar.Minimum = 0;
312 | colorProgressBar.Maximum = 100;
313 | colorProgressBar.Value = 0;
314 | }
315 |
316 | private void UpdateTestResult(@event @event)
317 | {
318 | if (@event.test != null)
319 | {
320 | var rows = dataTableTestResults.Select($"Id = '{ @event.test.id}'");
321 | var testResult = rows[0];
322 |
323 | testResult.BeginEdit();
324 |
325 | testResult["Start"] = @event.test.startTime;
326 | testResult["End"] = @event.test.endTime;
327 |
328 | testResult["Time"] = @event.test.executionTime;
329 |
330 | var counter = @event.test.counter;
331 | if (counter.disabled > 0)
332 | {
333 | testResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.Ban.ToBitmap(Color.Gray, IconSize), typeof(byte[]));
334 | testResult["Status"] = StatusDisabled;
335 | }
336 | else if (counter.success > 0)
337 | {
338 | testResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.Check.ToBitmap(Color.Green, IconSize), typeof(byte[]));
339 | testResult["Status"] = StatusSuccess;
340 | }
341 | else if (counter.failure > 0)
342 | {
343 | testResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.TimesCircle.ToBitmap(IconFont.Solid, IconSize, Color.Orange), typeof(byte[]));
344 | testResult["Status"] = StatusFailure;
345 |
346 | colorProgressBar.BeginInvoke((MethodInvoker)delegate
347 | {
348 | colorProgressBar.BarColor = Color.DarkRed;
349 | });
350 | }
351 | else if (counter.error > 0)
352 | {
353 | testResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.ExclamationCircle.ToBitmap(Color.Red, IconSize), typeof(byte[]));
354 | testResult["Status"] = StatusError;
355 |
356 | colorProgressBar.BeginInvoke((MethodInvoker)delegate
357 | {
358 | colorProgressBar.BarColor = Color.DarkRed;
359 | });
360 | }
361 | else if (counter.warning > 0)
362 | {
363 | testResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.ExclamationTriangle.ToBitmap(Color.Orange, IconSize), typeof(byte[]));
364 | testResult["Status"] = StatusWarning;
365 | }
366 |
367 | if (@event.test.errorStack != null)
368 | {
369 | testResult["Error"] = @event.test.errorStack;
370 | }
371 |
372 | if (@event.test.failedExpectations != null)
373 | {
374 | foreach (var expectation in @event.test.failedExpectations)
375 | {
376 | var rowExpectation = dataTableExpectations.NewRow();
377 | rowExpectation["TestResultId"] = @event.test.id;
378 | rowExpectation["Message"] = expectation.message;
379 | rowExpectation["Caller"] = expectation.caller;
380 | rowExpectation["Line"] = ExtractLine(expectation.caller);
381 |
382 | dataTableExpectations.Rows.Add(rowExpectation);
383 |
384 | dataTableExpectations.AcceptChanges();
385 | }
386 | }
387 |
388 | testResult.EndEdit();
389 |
390 | dataTableTestResults.AcceptChanges();
391 |
392 | var rowIndex = 0;
393 | foreach (DataGridViewRow gridRow in dataGridViewTestResults.Rows)
394 | {
395 | if (gridRow.DataBoundItem is DataRowView rowTestResult)
396 | {
397 | if (rowTestResult["Id"].ToString().Equals(@event.test.id))
398 | {
399 | dataGridViewTestResults.FirstDisplayedScrollingRowIndex = rowIndex;
400 | dataGridViewTestResults.Rows[rowIndex].Selected = true;
401 |
402 | break;
403 | }
404 | rowIndex++;
405 | }
406 | }
407 | }
408 | }
409 |
410 | private string ExtractLine(string caller)
411 | {
412 | var m = regexLine.Match(caller);
413 | if (m.Success)
414 | {
415 | var g = m.Groups[2];
416 | return g.Value;
417 | }
418 | return caller;
419 | }
420 |
421 | private void CreateTestResults(@event @event)
422 | {
423 | CreateTestResults(@event.items);
424 | CreateTestResults(@event.suite);
425 | CreateTestResults(@event.test);
426 | }
427 |
428 | private void CreateTestResults(items items)
429 | {
430 | if (items != null)
431 | {
432 | if (items.suite != null)
433 | {
434 | foreach (var itemSuite in items.suite)
435 | {
436 | CreateTestResults(itemSuite);
437 | }
438 | }
439 |
440 | if (items.test != null)
441 | {
442 | foreach (var test in items.test)
443 | {
444 | CreateTestResults(test);
445 | }
446 | }
447 | }
448 | }
449 |
450 | private void CreateTestResults(suite suite)
451 | {
452 | if (suite?.items != null)
453 | {
454 | CreateTestResults(suite.items);
455 | }
456 | }
457 |
458 | private void CreateTestResults(test test)
459 | {
460 | if (test != null)
461 | {
462 | var rowTestResult = dataTableTestResults.NewRow();
463 | rowTestResult["Id"] = test.id;
464 | rowTestResult["Owner"] = test.ownerName;
465 | rowTestResult["Package"] = test.objectName;
466 | rowTestResult["Procedure"] = test.procedureName;
467 | rowTestResult["Name"] = test.name;
468 | rowTestResult["Description"] = test.description;
469 | rowTestResult["Icon"] = (byte[])imageConverter.ConvertTo(IconChar.None.ToBitmap(Color.Black, IconSize), typeof(byte[]));
470 |
471 | dataTableTestResults.Rows.Add(rowTestResult);
472 | }
473 | }
474 |
475 | private void FilterTestResults()
476 | {
477 | if (cbSuccess.Checked && cbFailure.Checked && cbError.Checked && cbDisabled.Checked)
478 | {
479 | dataViewTestResults.RowFilter = null;
480 | }
481 | else
482 | {
483 | var filter = "Status is null";
484 |
485 | if (cbSuccess.Checked)
486 | {
487 | filter += $" or Status = '{StatusSuccess}'";
488 | }
489 | if (cbFailure.Checked)
490 | {
491 | filter += $" or Status = '{StatusFailure}'";
492 | }
493 | if (cbError.Checked)
494 | {
495 | filter += $" or Status = '{StatusError}'";
496 | }
497 | if (cbDisabled.Checked)
498 | {
499 | filter += $" or Status = '{StatusDisabled}'";
500 | }
501 |
502 | dataViewTestResults.RowFilter = filter;
503 | }
504 | }
505 |
506 | private void btnClose_Click(object sender, EventArgs e)
507 | {
508 | Close();
509 | }
510 |
511 | private void TestResultWindow_FormClosing(object sender, FormClosingEventArgs e)
512 | {
513 | if (e.CloseReason == CloseReason.UserClosing)
514 | {
515 | if (Running)
516 | {
517 | var confirmResult =
518 | MessageBox.Show("utPLSQL Tests are still running.\r\n\r\nDo you really want to close?",
519 | "Running utPLSQL Tests", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
520 | if (confirmResult == DialogResult.No)
521 | {
522 | e.Cancel = true;
523 | }
524 | else
525 | {
526 | txtStatus.Text = "Aborting...";
527 |
528 | testRunner.Close();
529 |
530 | Running = false;
531 | }
532 | }
533 | }
534 | }
535 |
536 | private void gridResults_SelectionChanged(object sender, EventArgs e)
537 | {
538 | if (dataGridViewTestResults.SelectedRows.Count > 0)
539 | {
540 | var row = dataGridViewTestResults.SelectedRows[0];
541 |
542 | if (row.DataBoundItem is DataRowView rowTestResult)
543 | {
544 | txtTestOwner.Text = "" + rowTestResult.Row["Owner"];
545 | txtTestPackage.Text = "" + rowTestResult.Row["Package"];
546 | txtTestProcuedure.Text = "" + rowTestResult.Row["Procedure"];
547 | txtTestName.Text = "" + rowTestResult.Row["Name"];
548 | txtTestDescription.Text = "" + rowTestResult.Row["Description"];
549 | txtTestSuitePath.Text = "" + rowTestResult.Row["Id"];
550 |
551 | txtTestStart.Text = rowTestResult.Row["Start"].ToString().ToString(CultureInfo.CurrentCulture);
552 | txtTestEnd.Text = rowTestResult.Row["End"].ToString().ToString(CultureInfo.CurrentCulture);
553 | txtTestTime.Text = $"{rowTestResult.Row["Time"]} s";
554 |
555 | txtErrorMessage.Text = rowTestResult.Row["Error"] == null ? "" : rowTestResult.Row["Error"].ToString().Replace("\n", "\r\n");
556 |
557 | txtFailureMessage.Text = "";
558 |
559 | dataViewExpectations.RowFilter = $"TestResultId = '{rowTestResult.Row["Id"]}'";
560 |
561 | if (dataViewExpectations.Count > 0)
562 | {
563 | dataGridViewExpectations.Rows[0].Selected = true;
564 | }
565 |
566 | if (!Running)
567 | {
568 | if (rowTestResult.Row["Status"] == null)
569 | {
570 | tabs.SelectedTab = tabTest;
571 | }
572 | else if (rowTestResult.Row["Status"].ToString().Equals(StatusFailure))
573 | {
574 | tabs.SelectedTab = tabFailures;
575 | }
576 | else if (rowTestResult.Row["Status"].ToString().Equals(StatusError))
577 | {
578 | tabs.SelectedTab = tabErrors;
579 | }
580 | else
581 | {
582 | tabs.SelectedTab = tabTest;
583 | }
584 | }
585 | }
586 | }
587 | }
588 |
589 | private void gridResults_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
590 | {
591 | if (pluginIntegration != null)
592 | {
593 | invokeOpenPackageBody(e);
594 | }
595 | }
596 |
597 | private void gridTestFailures_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
598 | {
599 | if (pluginIntegration != null)
600 | {
601 | invokeOpenPackageBody(e);
602 | }
603 | }
604 |
605 | private void invokeOpenPackageBody(DataGridViewCellEventArgs e)
606 | {
607 | var rowTestResult = dataTableTestResults.Rows[e.RowIndex];
608 |
609 | var methodInfo = pluginIntegration.GetType().GetMethod("OpenPackageBody");
610 | methodInfo.Invoke(pluginIntegration, new[] { rowTestResult["Owner"], rowTestResult["Package"] });
611 | }
612 |
613 | private void gridResults_CellContextMenuStripNeeded(object sender, DataGridViewCellContextMenuStripNeededEventArgs e)
614 | {
615 | rowIndexOnRightClick = e.RowIndex;
616 | }
617 |
618 | private async void menuItemRunTests_ClickAsync(object sender, EventArgs e)
619 | {
620 | var rowTestResult = dataTableTestResults.Rows[rowIndexOnRightClick];
621 |
622 | var testResultWindow = new TestRunnerWindow(pluginIntegration, username, password, database, connectAs, oracleHome);
623 | await testResultWindow.RunTestsAsync("PROCEDURE", rowTestResult["Owner"].ToString(), rowTestResult["Package"].ToString(), rowTestResult["Procedure"].ToString(), false, false);
624 | }
625 |
626 | private async void menuItemCoverage_ClickAsync(object sender, EventArgs e)
627 | {
628 | var rowTestResult = dataTableTestResults.Rows[rowIndexOnRightClick];
629 |
630 | var testResultWindow = new TestRunnerWindow(pluginIntegration, username, password, database, connectAs, oracleHome);
631 | await testResultWindow.RunTestsAsync("PROCEDURE", rowTestResult["Owner"].ToString(), rowTestResult["Package"].ToString(), rowTestResult["Procedure"].ToString(), true, false);
632 | }
633 |
634 | private void cbSuccess_CheckedChanged(object sender, EventArgs e)
635 | {
636 | FilterTestResults();
637 | }
638 |
639 | private void cbFailures_CheckedChanged(object sender, EventArgs e)
640 | {
641 | FilterTestResults();
642 | }
643 |
644 | private void cbErrors_CheckedChanged(object sender, EventArgs e)
645 | {
646 | FilterTestResults();
647 | }
648 |
649 | private void cbDisabled_CheckedChanged(object sender, EventArgs e)
650 | {
651 | FilterTestResults();
652 | }
653 |
654 | private async void btnRun_Click(object sender, EventArgs e)
655 | {
656 | await RunTestsAsync(new List { txtPath.Text }, false);
657 | }
658 |
659 | private async void button1_Click(object sender, EventArgs e)
660 | {
661 | await RunTestsAsync(new List { txtPath.Text }, true);
662 | }
663 |
664 | private void dataGridViewExpectations_SelectionChanged(object sender, EventArgs e)
665 | {
666 | txtFailureMessage.Text = "";
667 |
668 | if (dataGridViewExpectations.SelectedRows.Count > 0)
669 | {
670 | var row = dataGridViewExpectations.SelectedRows[0];
671 |
672 | if (row.DataBoundItem is DataRowView rowExpectation)
673 | {
674 | txtFailureMessage.Text = $"{rowExpectation.Row["Message"].ToString().Replace("\n", "\r\n")}\r\n\r\n{rowExpectation.Row["Caller"].ToString().Replace("\n", "\r\n")}";
675 | }
676 | }
677 | }
678 | }
679 | }
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/utPLSQL.UI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {7669189C-4A58-4E82-9DCB-7956624A719B}
8 | Library
9 | Properties
10 | utPLSQL
11 | utPLSQL.UI
12 | v4.8
13 | 512
14 | true
15 |
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | false
26 |
27 |
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 | false
35 |
36 |
37 |
38 | ..\packages\FontAwesome.Sharp.5.15.3\lib\net45\FontAwesome.Sharp.dll
39 |
40 |
41 | ..\packages\Oracle.ManagedDataAccess.19.10.0\lib\net40\Oracle.ManagedDataAccess.dll
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | ..\packages\utPLSQL.Api.1.5.6\lib\net45\utPLSQL.Api.dll
55 |
56 |
57 |
58 |
59 | Form
60 |
61 |
62 | CodeCoverageReportDialog.cs
63 |
64 |
65 |
66 | Form
67 |
68 |
69 | TestRunnerWindow.cs
70 |
71 |
72 |
73 |
74 | CodeCoverageReportDialog.cs
75 |
76 |
77 | TestRunnerWindow.cs
78 |
79 |
80 |
81 |
82 | Always
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | {739e6f07-e688-4d16-8fdf-7472e7f0fea0}
92 | ColorProgressBar
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/utPLSQL.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/utPLSQL.ico
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # utPLSQL Plugin for PLSQL Developer
2 |
3 | The utPLSQL Plugin integrates [utPLSQL](https://utplsql.org) with [Allround Automations PL/SQL Developer](https://www.allroundautomations.com/products/pl-sql-developer/).
4 |
5 | ## Running Tests
6 |
7 | 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.
8 |
9 | 
10 |
11 | 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.
12 |
13 | 
14 |
15 | ## Viewing Results
16 |
17 | The results are opened in a new window. Each test run will open a separate window.
18 |
19 | ### Navigating to the package body
20 |
21 | Double-click on a test result entry will open the package body.
22 |
23 | ### Running tests
24 |
25 | There are two buttons to run the tests again either with or without coverage.
26 |
27 | ### Running single tests
28 |
29 | A right-click opens the context menu, and you can run the test function.
30 |
31 | ### Filtering and Sorting Results
32 |
33 | 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.
34 |
35 | 
36 |
37 | ## Code Coverage
38 |
39 | 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.
40 |
41 | 
42 |
43 | ### Report
44 |
45 | After running the tests the HTML code coverage report will be opened in the default browser.
46 |
47 | 
48 |
49 | ## Releases
50 |
51 | Binary releases for 64bit and 32bit are published in the [releases section](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/releases).
52 |
53 | ## Installation
54 |
55 | Copy the DLL to the PlugIns directory of your PL/SQL Developer installation.
56 | - 64bit: PlsqlDeveloperUtPlsqlPlugin.dll
57 | - 32bit: PlsqlDeveloperUtPlsqlPlugin_x86.dll
58 |
59 | ## Issues
60 |
61 | Please file your bug reports, enhancement requests, questions and other support requests within [Github's issue tracker](https://help.github.com/articles/about-issues/).
62 |
63 | * [Questions](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/issues?q=is%3Aissue+label%3Aquestion)
64 | * [Open enhancements](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement)
65 | * [Open bugs](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
66 | * [Submit new issue](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/issues/new)
67 |
68 | ## How to Contribute
69 |
70 | 1. Describe your idea by [submitting an issue](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/issues/new)
71 | 2. [Fork the utPLSQL-PLSQL-Developer respository](https://github.com/utPLSQL/utPLSQL-PLSQL-Developer/fork)
72 | 3. [Create a branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/), commit and publish your changes and enhancements
73 | 4. [Create a pull request](https://help.github.com/articles/creating-a-pull-request/)
74 |
75 | ## How to Build
76 |
77 | 1. Open the PlsqlDeveloperUtPlsqlPlugin.sln solution in Visual Studio
78 | 2. Make sure to choose x64 as Platform target
79 | 3. Build the solution
80 |
81 | ## License
82 |
83 | utPLSQL for PL/SQL Developer is licensed under the Apache License, Version 2.0.
84 | You may obtain a copy of the License at .
85 |
86 |
--------------------------------------------------------------------------------
/screenshots/code_coverage_dialog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/screenshots/code_coverage_dialog.png
--------------------------------------------------------------------------------
/screenshots/code_coverage_report.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/screenshots/code_coverage_report.png
--------------------------------------------------------------------------------
/screenshots/context_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/screenshots/context_menu.png
--------------------------------------------------------------------------------
/screenshots/result_window.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/screenshots/result_window.png
--------------------------------------------------------------------------------
/screenshots/tools_ribbon_full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/utPLSQL/utPLSQL-PLSQL-Developer/6477a003992a366249fff1da728d5169ab492f08/screenshots/tools_ribbon_full.png
--------------------------------------------------------------------------------