Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd2deeba

Browse files
committed
#7 Don't allow test to run as SYSDBA
1 parent9c3c310 commitd2deeba

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

‎PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs

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

1011
namespaceutPLSQL
@@ -206,7 +207,7 @@ public static void OnMenuClick(int index)
206207
{
207208
if(index==PluginMenuIndexAllTests)
208209
{
209-
if(connected())
210+
if(connected()&&!Sydba())
210211
{
211212
vartestResultWindow=newTestRunnerWindow(_plugin,username,password,database,connectAs);
212213
Windows.Add(testResultWindow);
@@ -215,7 +216,7 @@ public static void OnMenuClick(int index)
215216
}
216217
elseif(index==PluginMenuIndexAllTestsWithCoverage)
217218
{
218-
if(connected())
219+
if(connected()&&!Sydba())
219220
{
220221
vartestResultWindow=newTestRunnerWindow(_plugin,username,password,database,connectAs);
221222
Windows.Add(testResultWindow);
@@ -224,7 +225,7 @@ public static void OnMenuClick(int index)
224225
}
225226
elseif(index==PluginPopupIndex)
226227
{
227-
if(connected())
228+
if(connected()&&!Sydba())
228229
{
229230
getPopupObject(outIntPtrtype,outIntPtrowner,outIntPtrname,outIntPtrsubType);
230231

@@ -236,7 +237,7 @@ public static void OnMenuClick(int index)
236237
}
237238
elseif(index==PluginPopupIndexWithCoverage)
238239
{
239-
if(connected())
240+
if(connected()&&!Sydba())
240241
{
241242
getPopupObject(outIntPtrtype,outIntPtrowner,outIntPtrname,outIntPtrsubType);
242243

@@ -262,6 +263,14 @@ public void OpenPackageBody(string owner, string name)
262263
varsource=getObjectSource("PACKAGE BODY",owner,name);
263264
createWindow(3,Marshal.PtrToStringAnsi(source),false);
264265
}
266+
privatestaticboolSydba()
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+
returntrue;
271+
}
272+
returntrue;
273+
}
265274

266275
privatestaticvoidConnectToDatabase()
267276
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp