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

Commit814501d

Browse files
committed
Clean up
1 parente7f327e commit814501d

File tree

2 files changed

+30
-44
lines changed

2 files changed

+30
-44
lines changed

‎PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin/PlsqlDeveloperUtPlsqlPlugin.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ public class PlsqlDeveloperUtPlsqlPlugin
4343
privateconstintPluginPopupIndex=1;
4444
privateconstintPluginPopupIndexWithCoverage=2;
4545

46-
internalstaticIdeConnectedconnected;
47-
internalstaticIdeGetConnectionInfogetConnectionInfo;
48-
49-
internalstaticIdeCreateWindowcreateWindow;
50-
internalstaticIdeCreatePopupItemcreatePopupItem;
51-
internalstaticIdeGetPopupObjectgetPopupObject;
52-
internalstaticIdeGetObjectSourcegetObjectSource;
53-
internalstaticIdeGetConnectAsgetConnectAs;
54-
internalstaticIdeCreateToolButtoncreateToolButton;
55-
56-
internalstaticintpluginId;
57-
internalstaticstringusername;
58-
internalstaticstringpassword;
59-
internalstaticstringdatabase;
60-
internalstaticstringconnectAs;
46+
privatestaticIdeConnectedconnected;
47+
privatestaticIdeGetConnectionInfogetConnectionInfo;
48+
49+
privatestaticIdeCreateWindowcreateWindow;
50+
privatestaticIdeCreatePopupItemcreatePopupItem;
51+
privatestaticIdeGetPopupObjectgetPopupObject;
52+
privatestaticIdeGetObjectSourcegetObjectSource;
53+
privatestaticIdeGetConnectAsgetConnectAs;
54+
privatestaticIdeCreateToolButtoncreateToolButton;
55+
56+
privatestaticintpluginId;
57+
privatestaticstringusername;
58+
privatestaticstringpassword;
59+
privatestaticstringdatabase;
60+
privatestaticstringconnectAs;
6161

6262
privatestaticPlsqlDeveloperUtPlsqlPlugin_plugin;
6363

‎PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public async Task RunTestsAsync(string type, string owner, string name, string p
8585

8686
completedTests=0;
8787

88-
stringhtmlReport=awaittestRunner.RunTestsWithCoverageAsync(GetPath(type,owner,name,procedure),CollectResults(coverage),schemas,includes,excludes);
88+
varhtmlReport=awaittestRunner.RunTestsWithCoverageAsync(GetPath(type,owner,name,procedure),CollectResults(coverage),schemas,includes,excludes);
8989

9090
varfilePath=$"{Path.GetTempPath()}\\utPLSQL_Coverage_Report_{Guid.NewGuid()}.html";
9191
using(varsw=newStreamWriter(filePath))
@@ -95,14 +95,7 @@ public async Task RunTestsAsync(string type, string owner, string name, string p
9595

9696
txtStatus.BeginInvoke((MethodInvoker)delegate
9797
{
98-
if(totalNumberOfTests>0)
99-
{
100-
txtStatus.Text="Finished";
101-
}
102-
else
103-
{
104-
txtStatus.Text="No tests found";
105-
}
98+
txtStatus.Text=totalNumberOfTests>0?"Finished":"No tests found";
10699
});
107100

108101
Running=false;
@@ -159,7 +152,7 @@ private Action<@event> CollectResults(bool coverage)
159152

160153
txtTests.Text=(completedTests>totalNumberOfTests?totalNumberOfTests:completedTests)+"/"+totalNumberOfTests;
161154

162-
UpdateProgressBar(completedTests);
155+
UpdateProgressBar();
163156

164157
UpdateTestResult(@event);
165158
});
@@ -185,14 +178,7 @@ private Action<@event> CollectResults(bool coverage)
185178

186179
if(!coverage)
187180
{
188-
if(totalNumberOfTests>0)
189-
{
190-
txtStatus.Text="Finished";
191-
}
192-
else
193-
{
194-
txtStatus.Text="No tests found";
195-
}
181+
txtStatus.Text=totalNumberOfTests>0?"Finished":"No tests found";
196182
Running=false;
197183
}
198184
});
@@ -226,7 +212,7 @@ private List<string> ConvertToList(string listValue)
226212
}
227213
else
228214
{
229-
returnnewList<string>(){listValue};
215+
returnnewList<string>{listValue};
230216
}
231217
}
232218
}
@@ -235,9 +221,9 @@ private List<string> ConvertToList(string listValue)
235221
* Workaround for the progressbar animation that produces lagging
236222
* https://stackoverflow.com/questions/5332616/disabling-net-progressbar-animation-when-changing-value
237223
*/
238-
privatevoidUpdateProgressBar(intcompletedTests)
224+
privatevoidUpdateProgressBar()
239225
{
240-
intnewValue=completedTests*Steps+1;
226+
varnewValue=completedTests*Steps+1;
241227
if(newValue>progressBar.Maximum)
242228
{
243229
progressBar.Value=progressBar.Maximum;
@@ -257,21 +243,21 @@ private void SetWindowTitle(string type, string owner, string name, string proce
257243
txtStart.Text=startTime;
258244
varpath=GetPath(type,owner,name,procedure);
259245
txtPath.Text=path[0];
260-
this.Text=$"{path[0]}{startTime}";
246+
Text=$"{path[0]}{startTime}";
261247
}
262248

263249
privateList<string>GetPath(stringtype,stringowner,stringname,stringprocedure)
264250
{
265251
switch(type)
266252
{
267253
case"USER":
268-
returnnewList<string>(){name};
254+
returnnewList<string>{name};
269255
case"PACKAGE":
270-
returnnewList<string>(){$"{owner}.{name}"};
256+
returnnewList<string>{$"{owner}.{name}"};
271257
case"PROCEDURE":
272-
returnnewList<string>(){$"{owner}.{name}.{procedure}"};
258+
returnnewList<string>{$"{owner}.{name}.{procedure}"};
273259
default:
274-
returnnewList<string>(){owner};
260+
returnnewList<string>{owner};
275261
}
276262
}
277263

@@ -374,7 +360,7 @@ private void UpdateTestResult(@event @event)
374360
}
375361
catch
376362
{
377-
//ingore exception that could raise if results are filtered
363+
//ignore exception that could raise if results are filtered
378364
}
379365
}
380366
}
@@ -469,7 +455,7 @@ private void FilterTestResults()
469455
}
470456
}
471457

472-
privatevoidbtnClose_Click(objectsender,System.EventArgse)
458+
privatevoidbtnClose_Click(objectsender,EventArgse)
473459
{
474460
Close();
475461
}
@@ -502,7 +488,7 @@ private void gridResults_SelectionChanged(object sender, EventArgs e)
502488
if(gridResults.SelectedRows.Count>0)
503489
{
504490
varrow=gridResults.SelectedRows[0];
505-
ObjectView<TestResult>dataBoundItem=(ObjectView<TestResult>)row.DataBoundItem;
491+
vardataBoundItem=(ObjectView<TestResult>)row.DataBoundItem;
506492
vartestResult=dataBoundItem.Object;
507493

508494
txtTestOwner.Text=testResult.Owner;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp