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

Commit150ae40

Browse files
committed
Check if user is connected before trying to run the tests
1 parentf825b4e commit150ae40

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

‎PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public static void OnMenuClick(int index)
207207
{
208208
if(index==PluginMenuIndexAllTests)
209209
{
210-
if(connected()&&!Sydba())
210+
if(isConnected()&&!isSydba())
211211
{
212212
vartestResultWindow=newTestRunnerWindow(_plugin,username,password,database,connectAs);
213213
Windows.Add(testResultWindow);
@@ -216,7 +216,7 @@ public static void OnMenuClick(int index)
216216
}
217217
elseif(index==PluginMenuIndexAllTestsWithCoverage)
218218
{
219-
if(connected()&&!Sydba())
219+
if(isConnected()&&!isSydba())
220220
{
221221
vartestResultWindow=newTestRunnerWindow(_plugin,username,password,database,connectAs);
222222
Windows.Add(testResultWindow);
@@ -225,7 +225,7 @@ public static void OnMenuClick(int index)
225225
}
226226
elseif(index==PluginPopupIndex)
227227
{
228-
if(connected()&&!Sydba())
228+
if(isConnected()&&!isSydba())
229229
{
230230
getPopupObject(outIntPtrtype,outIntPtrowner,outIntPtrname,outIntPtrsubType);
231231

@@ -237,7 +237,7 @@ public static void OnMenuClick(int index)
237237
}
238238
elseif(index==PluginPopupIndexWithCoverage)
239239
{
240-
if(connected()&&!Sydba())
240+
if(isConnected()&&!isSydba())
241241
{
242242
getPopupObject(outIntPtrtype,outIntPtrowner,outIntPtrname,outIntPtrsubType);
243243

@@ -263,7 +263,7 @@ public void OpenPackageBody(string owner, string name)
263263
varsource=getObjectSource("PACKAGE BODY",owner,name);
264264
createWindow(3,Marshal.PtrToStringAnsi(source),false);
265265
}
266-
privatestaticboolSydba()
266+
privatestaticboolisSydba()
267267
{
268268
if(connectAs.ToLower().Equals("sysdba")){
269269
MessageBox.Show("You shouldn't run utPLSQL as SYSDBA.\n\nTest will not run.","Connected as SYSDBA",MessageBoxButtons.OK,MessageBoxIcon.Error);
@@ -272,7 +272,17 @@ private static bool Sydba()
272272
returnfalse;
273273
}
274274

275-
privatestaticvoidConnectToDatabase()
275+
privatestaticboolisConnected()
276+
{
277+
if(!connected())
278+
{
279+
MessageBox.Show("Please connect before running tests!","No connection",MessageBoxButtons.OK,MessageBoxIcon.Error);
280+
returnfalse;
281+
}
282+
returntrue;
283+
}
284+
285+
privatestaticvoidConnectToDatabase()
276286
{
277287
try
278288
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp