@@ -15,10 +15,14 @@ namespace PlsqlDeveloperUtPlsqlPlugin
15
15
//*FUNC: 12*/ void (*IDE_GetConnectionInfo)(char **Username, char **Password, char **Database);
16
16
internal delegate void IdeGetConnectionInfo ( out IntPtr username , out IntPtr password , out IntPtr database ) ;
17
17
18
+ //*FUNC: 20*/ void (*IDE_CreateWindow)(int WindowType, char *Text, BOOL Execute);
19
+ internal delegate void IdeCreateWindow ( int windowType , IntPtr text , bool execute ) ;
18
20
//*FUNC: 69*/ void *(*IDE_CreatePopupItem)(int ID, int Index, char *Name, char *ObjectType);
19
21
internal delegate void IdeCreatePopupItem ( int id , int index , string name , string objectType ) ;
20
22
//*FUNC: 74*/ int (*IDE_GetPopupObject)(char **ObjectType, char **ObjectOwner, char **ObjectName, char **SubObject);
21
23
internal delegate int IdeGetPopupObject ( out IntPtr objectType , out IntPtr objectOwner , out IntPtr objectName , out IntPtr subObject ) ;
24
+ //*FUNC: 79*/ char *(*IDE_GetObjectSource)(char *ObjectType, char *ObjectOwner, char *ObjectName);
25
+ internal delegate IntPtr IdeGetObjectSource ( string objectType , string objectOwner , string objectName ) ;
22
26
//*FUNC: 150*/ void (*IDE_CreateToolButton)(int ID, int Index, char *Name, char *BitmapFile, int BitmapHandle);
23
27
internal delegate void IdeCreateToolButton ( int id , int index , string name , string bitmapFile , long bitmapHandle ) ;
24
28
@@ -34,8 +38,10 @@ public class PlsqlDeveloperUtPlsqlPlugin
34
38
internal static IdeConnected connected ;
35
39
internal static IdeGetConnectionInfo getConnectionInfo ;
36
40
41
+ internal static IdeCreateWindow createWindow ;
37
42
internal static IdeCreatePopupItem createPopupItem ;
38
43
internal static IdeGetPopupObject getPopupObject ;
44
+ internal static IdeGetObjectSource getObjectSource ;
39
45
internal static IdeCreateToolButton createToolButton ;
40
46
41
47
internal static int pluginId ;
@@ -123,12 +129,18 @@ public static void RegisterCallback(int index, IntPtr function)
123
129
case 12 :
124
130
PlsqlDeveloperUtPlsqlPlugin . getConnectionInfo = ( IdeGetConnectionInfo ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetConnectionInfo ) ) ;
125
131
break ;
132
+ case 20 :
133
+ PlsqlDeveloperUtPlsqlPlugin . createWindow = ( IdeCreateWindow ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreateWindow ) ) ;
134
+ break ;
126
135
case 69 :
127
136
PlsqlDeveloperUtPlsqlPlugin . createPopupItem = ( IdeCreatePopupItem ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreatePopupItem ) ) ;
128
137
break ;
129
138
case 74 :
130
139
PlsqlDeveloperUtPlsqlPlugin . getPopupObject = ( IdeGetPopupObject ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetPopupObject ) ) ;
131
140
break ;
141
+ case 79 :
142
+ PlsqlDeveloperUtPlsqlPlugin . getObjectSource = ( IdeGetObjectSource ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetObjectSource ) ) ;
143
+ break ;
132
144
case 150 :
133
145
PlsqlDeveloperUtPlsqlPlugin . createToolButton = ( IdeCreateToolButton ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreateToolButton ) ) ;
134
146
break ;
@@ -194,6 +206,12 @@ public static string About()
194
206
}
195
207
#endregion
196
208
209
+ internal static void OpenPackage ( string owner , string name )
210
+ {
211
+ IntPtr source = getObjectSource ( "PACKAGE" , owner , name ) ;
212
+ createWindow ( 3 , source , false ) ;
213
+ }
214
+
197
215
private static void ConnectToDatabase ( )
198
216
{
199
217
try
0 commit comments