@@ -83,44 +83,39 @@ public static void OnActivate()
83
83
{
84
84
try
85
85
{
86
- PlsqlDeveloperUtPlsqlPlugin . ConnectToDatabase ( ) ;
86
+ ConnectToDatabase ( ) ;
87
87
88
88
// Separate streams are needed!
89
89
var assembly = Assembly . GetExecutingAssembly ( ) ;
90
90
using ( var stream = assembly . GetManifestResourceStream ( "utPLSQL.utPLSQL.bmp" ) )
91
91
{
92
92
if ( stream != null )
93
93
{
94
- PlsqlDeveloperUtPlsqlPlugin . createToolButton ( pluginId , PluginMenuIndexAllTests , "utPLSQL" ,
95
- "utPLSQL.bmp" , new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
94
+ createToolButton ( pluginId , PluginMenuIndexAllTests , "utPLSQL" , "utPLSQL.bmp" , new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
96
95
}
97
96
}
98
97
99
98
using ( var stream = assembly . GetManifestResourceStream ( "utPLSQL.utPLSQL_coverage.bmp" ) )
100
99
{
101
100
if ( stream != null )
102
101
{
103
- PlsqlDeveloperUtPlsqlPlugin . createToolButton ( pluginId , PluginMenuIndexAllTestsWithCoverage ,
104
- "utPLSQL" , "utPLSQL_coverage.bmp" , new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
102
+ createToolButton ( pluginId , PluginMenuIndexAllTestsWithCoverage , "utPLSQL" , "utPLSQL_coverage.bmp" , new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
105
103
}
106
104
}
107
105
108
106
using ( var stream = assembly . GetManifestResourceStream ( "utPLSQL.utPLSQL.bmp" ) )
109
107
{
110
108
if ( stream != null )
111
109
{
112
- PlsqlDeveloperUtPlsqlPlugin . createToolButton ( pluginId , PluginPopupIndex , "utPLSQL" ,
113
- "utPLSQL.bmp" ,
114
- new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
110
+ createToolButton ( pluginId , PluginPopupIndex , "utPLSQL" , "utPLSQL.bmp" , new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
115
111
}
116
112
}
117
113
118
114
using ( var stream = assembly . GetManifestResourceStream ( "utPLSQL.utPLSQL_coverage.bmp" ) )
119
115
{
120
116
if ( stream != null )
121
117
{
122
- PlsqlDeveloperUtPlsqlPlugin . createToolButton ( pluginId , PluginPopupIndexWithCoverage , "utPLSQL" ,
123
- "utPLSQL_coverage.bmp" , new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
118
+ createToolButton ( pluginId , PluginPopupIndexWithCoverage , "utPLSQL" , "utPLSQL_coverage.bmp" , new Bitmap ( stream ) . GetHbitmap ( ) . ToInt64 ( ) ) ;
124
119
}
125
120
}
126
121
}
@@ -129,13 +124,11 @@ public static void OnActivate()
129
124
MessageBox . Show ( e . Message ) ;
130
125
}
131
126
132
- PlsqlDeveloperUtPlsqlPlugin . createPopupItem ( pluginId , PluginPopupIndex , "Run utPLSQL Test" , "USER" ) ;
133
- PlsqlDeveloperUtPlsqlPlugin . createPopupItem ( pluginId , PluginPopupIndexWithCoverage , "Run Code Coverage" ,
134
- "USER" ) ;
127
+ createPopupItem ( pluginId , PluginPopupIndex , "Run utPLSQL Test" , "USER" ) ;
128
+ createPopupItem ( pluginId , PluginPopupIndexWithCoverage , "Run Code Coverage" , "USER" ) ;
135
129
136
- PlsqlDeveloperUtPlsqlPlugin . createPopupItem ( pluginId , PluginPopupIndex , "Run utPLSQL Test" , "PACKAGE" ) ;
137
- PlsqlDeveloperUtPlsqlPlugin . createPopupItem ( pluginId , PluginPopupIndexWithCoverage , "Run Code Coverage" ,
138
- "PACKAGE" ) ;
130
+ createPopupItem ( pluginId , PluginPopupIndex , "Run utPLSQL Test" , "PACKAGE" ) ;
131
+ createPopupItem ( pluginId , PluginPopupIndexWithCoverage , "Run Code Coverage" , "PACKAGE" ) ;
139
132
}
140
133
141
134
[ DllExport ( "CanClose" , CallingConvention = CallingConvention . Cdecl ) ]
@@ -158,44 +151,34 @@ public static void RegisterCallback(int index, IntPtr function)
158
151
switch ( index )
159
152
{
160
153
case 11 :
161
- PlsqlDeveloperUtPlsqlPlugin . connected =
162
- ( IdeConnected ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeConnected ) ) ;
154
+ connected = ( IdeConnected ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeConnected ) ) ;
163
155
break ;
164
156
case 12 :
165
- PlsqlDeveloperUtPlsqlPlugin . getConnectionInfo =
166
- ( IdeGetConnectionInfo ) Marshal . GetDelegateForFunctionPointer ( function ,
157
+ getConnectionInfo = ( IdeGetConnectionInfo ) Marshal . GetDelegateForFunctionPointer ( function ,
167
158
typeof ( IdeGetConnectionInfo ) ) ;
168
159
break ;
169
160
case 20 :
170
- PlsqlDeveloperUtPlsqlPlugin . createWindow =
171
- ( IdeCreateWindow ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreateWindow ) ) ;
161
+ createWindow = ( IdeCreateWindow ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreateWindow ) ) ;
172
162
break ;
173
163
case 69 :
174
- PlsqlDeveloperUtPlsqlPlugin . createPopupItem =
175
- ( IdeCreatePopupItem ) Marshal . GetDelegateForFunctionPointer ( function ,
176
- typeof ( IdeCreatePopupItem ) ) ;
164
+ createPopupItem = ( IdeCreatePopupItem ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreatePopupItem ) ) ;
177
165
break ;
178
166
case 74 :
179
- PlsqlDeveloperUtPlsqlPlugin . getPopupObject =
180
- ( IdeGetPopupObject ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetPopupObject ) ) ;
167
+ getPopupObject = ( IdeGetPopupObject ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetPopupObject ) ) ;
181
168
break ;
182
169
case 79 :
183
- PlsqlDeveloperUtPlsqlPlugin . getObjectSource =
184
- ( IdeGetObjectSource ) Marshal . GetDelegateForFunctionPointer ( function ,
185
- typeof ( IdeGetObjectSource ) ) ;
170
+ getObjectSource = ( IdeGetObjectSource ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetObjectSource ) ) ;
186
171
break ;
187
172
case 150 :
188
- PlsqlDeveloperUtPlsqlPlugin . createToolButton =
189
- ( IdeCreateToolButton ) Marshal . GetDelegateForFunctionPointer ( function ,
190
- typeof ( IdeCreateToolButton ) ) ;
173
+ createToolButton = ( IdeCreateToolButton ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreateToolButton ) ) ;
191
174
break ;
192
175
}
193
176
}
194
177
195
178
[ DllExport ( "OnConnectionChange" , CallingConvention = CallingConvention . Cdecl ) ]
196
179
public static void OnConnectionChange ( )
197
180
{
198
- PlsqlDeveloperUtPlsqlPlugin . ConnectToDatabase ( ) ;
181
+ ConnectToDatabase ( ) ;
199
182
}
200
183
201
184
[ DllExport ( "CreateMenuItem" , CallingConvention = CallingConvention . Cdecl ) ]
@@ -221,7 +204,7 @@ public static void OnMenuClick(int index)
221
204
{
222
205
if ( index == PluginMenuIndexAllTests )
223
206
{
224
- if ( PlsqlDeveloperUtPlsqlPlugin . connected ( ) )
207
+ if ( connected ( ) )
225
208
{
226
209
var testResultWindow = new TestRunnerWindow ( _testRunner , _plugin ) ;
227
210
Windows . Add ( testResultWindow ) ;
@@ -230,7 +213,7 @@ public static void OnMenuClick(int index)
230
213
}
231
214
else if ( index == PluginMenuIndexAllTestsWithCoverage )
232
215
{
233
- if ( PlsqlDeveloperUtPlsqlPlugin . connected ( ) )
216
+ if ( connected ( ) )
234
217
{
235
218
var testResultWindow = new TestRunnerWindow ( _testRunner , _plugin ) ;
236
219
Windows . Add ( testResultWindow ) ;
@@ -239,9 +222,9 @@ public static void OnMenuClick(int index)
239
222
}
240
223
else if ( index == PluginPopupIndex )
241
224
{
242
- if ( PlsqlDeveloperUtPlsqlPlugin . connected ( ) )
225
+ if ( connected ( ) )
243
226
{
244
- PlsqlDeveloperUtPlsqlPlugin . getPopupObject ( out IntPtr type , out IntPtr owner , out IntPtr name , out IntPtr subType ) ;
227
+ getPopupObject ( out IntPtr type , out IntPtr owner , out IntPtr name , out IntPtr subType ) ;
245
228
246
229
var testResultWindow = new TestRunnerWindow ( _testRunner , _plugin ) ;
247
230
Windows . Add ( testResultWindow ) ;
@@ -251,9 +234,9 @@ public static void OnMenuClick(int index)
251
234
}
252
235
else if ( index == PluginPopupIndexWithCoverage )
253
236
{
254
- if ( PlsqlDeveloperUtPlsqlPlugin . connected ( ) )
237
+ if ( connected ( ) )
255
238
{
256
- PlsqlDeveloperUtPlsqlPlugin . getPopupObject ( out IntPtr type , out IntPtr owner , out IntPtr name , out IntPtr subType ) ;
239
+ getPopupObject ( out IntPtr type , out IntPtr owner , out IntPtr name , out IntPtr subType ) ;
257
240
258
241
var testResultWindow = new TestRunnerWindow ( _testRunner , _plugin ) ;
259
242
Windows . Add ( testResultWindow ) ;
@@ -274,8 +257,8 @@ public static string About()
274
257
275
258
public void OpenPackageBody ( string owner , string name )
276
259
{
277
- IntPtr source = getObjectSource ( "PACKAGE BODY" , owner , name ) ;
278
- PlsqlDeveloperUtPlsqlPlugin . createWindow ( 3 , Marshal . PtrToStringAnsi ( source ) , false ) ;
260
+ var source = getObjectSource ( "PACKAGE BODY" , owner , name ) ;
261
+ createWindow ( 3 , Marshal . PtrToStringAnsi ( source ) , false ) ;
279
262
}
280
263
281
264
private static void ConnectToDatabase ( )
@@ -284,9 +267,9 @@ private static void ConnectToDatabase()
284
267
{
285
268
_testRunner . Close ( ) ;
286
269
287
- if ( PlsqlDeveloperUtPlsqlPlugin . connected ( ) )
270
+ if ( connected ( ) )
288
271
{
289
- PlsqlDeveloperUtPlsqlPlugin . getConnectionInfo ( out IntPtr ptrUsername , out IntPtr ptrPassword , out IntPtr ptrDatabase ) ;
272
+ getConnectionInfo ( out IntPtr ptrUsername , out IntPtr ptrPassword , out IntPtr ptrDatabase ) ;
290
273
291
274
username = Marshal . PtrToStringAnsi ( ptrUsername ) ;
292
275
password = Marshal . PtrToStringAnsi ( ptrPassword ) ;
0 commit comments