Skip to content

Commit ecb69b4

Browse files
committed
Merge branch 'release/1.1.0' into main
2 parents fba09e0 + 272c40b commit ecb69b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+638
-1792
lines changed

PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.sln

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ VisualStudioVersion = 16.0.30804.86
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlsqlDeveloperUtPlsqlPlugin", "PlsqlDeveloperUtPlsqlPlugin\PlsqlDeveloperUtPlsqlPlugin.csproj", "{0241FA41-E396-491A-B4EC-772B694EC689}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "utPLSQL.Api.Test", "utPLSQL.Api.Test\utPLSQL.Api.Test.csproj", "{8E898B26-0A4C-4DDA-9820-D5D050D2336E}"
9-
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "utPLSQL.Api", "utPLSQL.Api\utPLSQL.Api.csproj", "{DF09EACE-50EC-44EA-849A-80462A219CFC}"
11-
EndProject
128
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "utPLSQL.Ui", "utPLSQL.Ui\utPLSQL.Ui.csproj", "{7669189C-4A58-4E82-9DCB-7956624A719B}"
139
EndProject
1410
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "utPLSQL.Ui.Standalone", "utPLSQL.Ui.Standalone\utPLSQL.Ui.Standalone.csproj", "{5D3EA63E-AAFE-47DB-9D48-4BA9C205ADBE}"
@@ -35,30 +31,6 @@ Global
3531
{0241FA41-E396-491A-B4EC-772B694EC689}.Release|x64.Build.0 = Release|x64
3632
{0241FA41-E396-491A-B4EC-772B694EC689}.Release|x86.ActiveCfg = Release|x86
3733
{0241FA41-E396-491A-B4EC-772B694EC689}.Release|x86.Build.0 = Release|x86
38-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Debug|Any CPU.Build.0 = Debug|Any CPU
40-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Debug|x64.ActiveCfg = Debug|Any CPU
41-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Debug|x64.Build.0 = Debug|Any CPU
42-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Debug|x86.ActiveCfg = Debug|Any CPU
43-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Debug|x86.Build.0 = Debug|Any CPU
44-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Release|Any CPU.ActiveCfg = Release|Any CPU
45-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Release|Any CPU.Build.0 = Release|Any CPU
46-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Release|x64.ActiveCfg = Release|Any CPU
47-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Release|x64.Build.0 = Release|Any CPU
48-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Release|x86.ActiveCfg = Release|Any CPU
49-
{8E898B26-0A4C-4DDA-9820-D5D050D2336E}.Release|x86.Build.0 = Release|Any CPU
50-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
52-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Debug|x64.ActiveCfg = Debug|Any CPU
53-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Debug|x64.Build.0 = Debug|Any CPU
54-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Debug|x86.ActiveCfg = Debug|Any CPU
55-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Debug|x86.Build.0 = Debug|Any CPU
56-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
57-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Release|Any CPU.Build.0 = Release|Any CPU
58-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Release|x64.ActiveCfg = Release|Any CPU
59-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Release|x64.Build.0 = Release|Any CPU
60-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Release|x86.ActiveCfg = Release|Any CPU
61-
{DF09EACE-50EC-44EA-849A-80462A219CFC}.Release|x86.Build.0 = Release|Any CPU
6234
{7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6335
{7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|Any CPU.Build.0 = Debug|Any CPU
6436
{7669189C-4A58-4E82-9DCB-7956624A719B}.Debug|x64.ActiveCfg = Debug|Any CPU

PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/AboutDialog.Designer.cs

Lines changed: 36 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/AboutDialog.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ public partial class AboutDialog : Form
77
public AboutDialog()
88
{
99
InitializeComponent();
10+
11+
var assembly = System.Reflection.Assembly.GetExecutingAssembly();
12+
var fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
13+
lblVersion.Text = $"Version {fileVersionInfo.FileVersion}";
1014
}
1115

1216
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
</configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>

PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Linq;
66
using System.Reflection;
77
using System.Runtime.InteropServices;
8+
using System.Threading.Tasks;
89
using System.Windows.Forms;
910

1011
namespace utPLSQL
@@ -28,6 +29,9 @@ internal delegate int IdeGetPopupObject(out IntPtr objectType, out IntPtr object
2829
//*FUNC: 79*/ char *(*IDE_GetObjectSource)(char *ObjectType, char *ObjectOwner, char *ObjectName);
2930
internal delegate IntPtr IdeGetObjectSource(string objectType, string objectOwner, string objectName);
3031

32+
//*FUNC: 97*/ extern char *(*IDE_GetConnectAs)();
33+
internal delegate IntPtr IdeGetConnectAs();
34+
3135
//*FUNC: 150*/ void (*IDE_CreateToolButton)(int ID, int Index, char *Name, char *BitmapFile, int BitmapHandle);
3236
internal delegate void IdeCreateToolButton(int id, int index, string name, string bitmapFile, long bitmapHandle);
3337

@@ -40,30 +44,26 @@ public class PlsqlDeveloperUtPlsqlPlugin
4044
private const int PluginPopupIndex = 1;
4145
private const int PluginPopupIndexWithCoverage = 2;
4246

43-
internal static IdeConnected connected;
44-
internal static IdeGetConnectionInfo getConnectionInfo;
47+
private static IdeConnected connected;
48+
private static IdeGetConnectionInfo getConnectionInfo;
4549

46-
internal static IdeCreateWindow createWindow;
47-
internal static IdeCreatePopupItem createPopupItem;
48-
internal static IdeGetPopupObject getPopupObject;
49-
internal static IdeGetObjectSource getObjectSource;
50-
internal static IdeCreateToolButton createToolButton;
50+
private static IdeCreateWindow createWindow;
51+
private static IdeCreatePopupItem createPopupItem;
52+
private static IdeGetPopupObject getPopupObject;
53+
private static IdeGetObjectSource getObjectSource;
54+
private static IdeGetConnectAs getConnectAs;
55+
private static IdeCreateToolButton createToolButton;
5156

52-
internal static int pluginId;
53-
internal static string username;
54-
internal static string password;
55-
internal static string database;
57+
private static int pluginId;
58+
private static string username;
59+
private static string password;
60+
private static string database;
61+
private static string connectAs;
5662

5763
private static PlsqlDeveloperUtPlsqlPlugin _plugin;
58-
private static RealTimeTestRunner _testRunner;
5964

6065
private static readonly List<TestRunnerWindow> Windows = new List<TestRunnerWindow>();
6166

62-
private PlsqlDeveloperUtPlsqlPlugin()
63-
{
64-
_testRunner = new RealTimeTestRunner();
65-
}
66-
6767
#region DLL exported API
6868

6969
[DllExport("IdentifyPlugIn", CallingConvention = CallingConvention.Cdecl)]
@@ -169,6 +169,9 @@ public static void RegisterCallback(int index, IntPtr function)
169169
case 79:
170170
getObjectSource = (IdeGetObjectSource)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeGetObjectSource));
171171
break;
172+
case 97:
173+
getConnectAs = (IdeGetConnectAs)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeGetConnectAs));
174+
break;
172175
case 150:
173176
createToolButton = (IdeCreateToolButton)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeCreateToolButton));
174177
break;
@@ -204,41 +207,41 @@ public static void OnMenuClick(int index)
204207
{
205208
if (index == PluginMenuIndexAllTests)
206209
{
207-
if (connected())
210+
if (connected() && !Sydba())
208211
{
209-
var testResultWindow = new TestRunnerWindow(_testRunner, _plugin);
212+
var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs);
210213
Windows.Add(testResultWindow);
211214
testResultWindow.RunTestsAsync("_ALL", username, null, null, false);
212215
}
213216
}
214217
else if (index == PluginMenuIndexAllTestsWithCoverage)
215218
{
216-
if (connected())
219+
if (connected() && !Sydba())
217220
{
218-
var testResultWindow = new TestRunnerWindow(_testRunner, _plugin);
221+
var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs);
219222
Windows.Add(testResultWindow);
220223
testResultWindow.RunTestsAsync("_ALL", username, null, null, true);
221224
}
222225
}
223226
else if (index == PluginPopupIndex)
224227
{
225-
if (connected())
228+
if (connected() && !Sydba())
226229
{
227230
getPopupObject(out IntPtr type, out IntPtr owner, out IntPtr name, out IntPtr subType);
228231

229-
var testResultWindow = new TestRunnerWindow(_testRunner, _plugin);
232+
var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs);
230233
Windows.Add(testResultWindow);
231234
testResultWindow.RunTestsAsync(Marshal.PtrToStringAnsi(type), Marshal.PtrToStringAnsi(owner),
232235
Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), false);
233236
}
234237
}
235238
else if (index == PluginPopupIndexWithCoverage)
236239
{
237-
if (connected())
240+
if (connected() && !Sydba())
238241
{
239242
getPopupObject(out IntPtr type, out IntPtr owner, out IntPtr name, out IntPtr subType);
240243

241-
var testResultWindow = new TestRunnerWindow(_testRunner, _plugin);
244+
var testResultWindow = new TestRunnerWindow(_plugin, username, password, database, connectAs);
242245
Windows.Add(testResultWindow);
243246
testResultWindow.RunTestsAsync(Marshal.PtrToStringAnsi(type), Marshal.PtrToStringAnsi(owner),
244247
Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType), true);
@@ -260,13 +263,19 @@ public void OpenPackageBody(string owner, string name)
260263
var source = getObjectSource("PACKAGE BODY", owner, name);
261264
createWindow(3, Marshal.PtrToStringAnsi(source), false);
262265
}
266+
private static bool Sydba()
267+
{
268+
if (connectAs.ToLower().Equals("sysdba")) {
269+
MessageBox.Show("You shouldn't run utPLSQL as SYSDBA.\n\nTest will not run.", "Connected as SYSDBA", MessageBoxButtons.OK, MessageBoxIcon.Error);
270+
return true;
271+
}
272+
return false;
273+
}
263274

264275
private static void ConnectToDatabase()
265276
{
266277
try
267278
{
268-
_testRunner.Close();
269-
270279
if (connected())
271280
{
272281
getConnectionInfo(out IntPtr ptrUsername, out IntPtr ptrPassword, out IntPtr ptrDatabase);
@@ -275,7 +284,9 @@ private static void ConnectToDatabase()
275284
password = Marshal.PtrToStringAnsi(ptrPassword);
276285
database = Marshal.PtrToStringAnsi(ptrDatabase);
277286

278-
_testRunner.Connect(username, password, database);
287+
IntPtr ptrConnectAs = getConnectAs();
288+
289+
connectAs = Marshal.PtrToStringAnsi(ptrConnectAs);
279290
}
280291
}
281292
catch (Exception e)

PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.csproj

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>utPLSQL</RootNamespace>
1212
<AssemblyName>PlsqlDeveloperUtPlsqlPlugin</AssemblyName>
13-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<Deterministic>true</Deterministic>
1616
<TargetFrameworkProfile />
@@ -69,6 +69,7 @@
6969
<PlatformTarget>x86</PlatformTarget>
7070
<LangVersion>7.3</LangVersion>
7171
<ErrorReport>prompt</ErrorReport>
72+
<Prefer32Bit>false</Prefer32Bit>
7273
</PropertyGroup>
7374
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
7475
<OutputPath>bin\x86\Release\</OutputPath>
@@ -79,6 +80,7 @@
7980
<PlatformTarget>x86</PlatformTarget>
8081
<LangVersion>7.3</LangVersion>
8182
<ErrorReport>prompt</ErrorReport>
83+
<Prefer32Bit>false</Prefer32Bit>
8284
</PropertyGroup>
8385
<PropertyGroup>
8486
<ApplicationIcon>utPLSQL.ico</ApplicationIcon>
@@ -87,9 +89,6 @@
8789
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
8890
<HintPath>..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
8991
</Reference>
90-
<Reference Include="FontAwesome.Sharp, Version=5.15.3.0, Culture=neutral, processorArchitecture=MSIL">
91-
<HintPath>..\packages\FontAwesome.Sharp.5.15.3\lib\net40\FontAwesome.Sharp.dll</HintPath>
92-
</Reference>
9392
<Reference Include="RGiesecke.DllExport.Metadata, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8f52d83c1a22df51, processorArchitecture=MSIL">
9493
<HintPath>..\packages\UnmanagedExports.1.2.7\lib\net\RGiesecke.DllExport.Metadata.dll</HintPath>
9594
<Private>False</Private>
@@ -148,10 +147,6 @@
148147
<WCFMetadata Include="Connected Services\" />
149148
</ItemGroup>
150149
<ItemGroup>
151-
<ProjectReference Include="..\utPLSQL.Api\utPLSQL.Api.csproj">
152-
<Project>{df09eace-50ec-44ea-849a-80462a219cfc}</Project>
153-
<Name>utPLSQL.Api</Name>
154-
</ProjectReference>
155150
<ProjectReference Include="..\utPLSQL.Ui\utPLSQL.Ui.csproj">
156151
<Project>{7669189c-4a58-4e82-9dcb-7956624a719b}</Project>
157152
<Name>utPLSQL.Ui</Name>
@@ -164,9 +159,9 @@
164159
<ErrorText>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}.</ErrorText>
165160
</PropertyGroup>
166161
<Error Condition="!Exists('..\packages\UnmanagedExports.Repack.1.0.4\build\UnmanagedExports.Repack.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\UnmanagedExports.Repack.1.0.4\build\UnmanagedExports.Repack.targets'))" />
167-
<Error Condition="!Exists('..\packages\Fody.6.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.0.0\build\Fody.targets'))" />
168162
<Error Condition="!Exists('..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
163+
<Error Condition="!Exists('..\packages\Fody.6.3.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.3.0\build\Fody.targets'))" />
169164
</Target>
170165
<Import Project="../packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.targets" Condition="Exists('../packages/UnmanagedExports.1.2.7/tools/RGiesecke.DllExport.targets')" />
171-
<Import Project="..\packages\Fody.6.0.0\build\Fody.targets" Condition="Exists('..\packages\Fody.6.0.0\build\Fody.targets')" />
166+
<Import Project="..\packages\Fody.6.3.0\build\Fody.targets" Condition="Exists('..\packages\Fody.6.3.0\build\Fody.targets')" />
172167
</Project>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy