@@ -15,10 +15,14 @@ namespace PlsqlDeveloperUtPlsqlPlugin
1515 //*FUNC: 12*/ void (*IDE_GetConnectionInfo)(char **Username, char **Password, char **Database);
1616 internal delegate void IdeGetConnectionInfo ( out IntPtr username , out IntPtr password , out IntPtr database ) ;
1717
18+ //*FUNC: 20*/ void (*IDE_CreateWindow)(int WindowType, char *Text, BOOL Execute);
19+ internal delegate void IdeCreateWindow ( int windowType , IntPtr text , bool execute ) ;
1820 //*FUNC: 69*/ void *(*IDE_CreatePopupItem)(int ID, int Index, char *Name, char *ObjectType);
1921 internal delegate void IdeCreatePopupItem ( int id , int index , string name , string objectType ) ;
2022 //*FUNC: 74*/ int (*IDE_GetPopupObject)(char **ObjectType, char **ObjectOwner, char **ObjectName, char **SubObject);
2123 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 ) ;
2226 //*FUNC: 150*/ void (*IDE_CreateToolButton)(int ID, int Index, char *Name, char *BitmapFile, int BitmapHandle);
2327 internal delegate void IdeCreateToolButton ( int id , int index , string name , string bitmapFile , long bitmapHandle ) ;
2428
@@ -34,8 +38,10 @@ public class PlsqlDeveloperUtPlsqlPlugin
3438 internal static IdeConnected connected ;
3539 internal static IdeGetConnectionInfo getConnectionInfo ;
3640
41+ internal static IdeCreateWindow createWindow ;
3742 internal static IdeCreatePopupItem createPopupItem ;
3843 internal static IdeGetPopupObject getPopupObject ;
44+ internal static IdeGetObjectSource getObjectSource ;
3945 internal static IdeCreateToolButton createToolButton ;
4046
4147 internal static int pluginId ;
@@ -123,12 +129,18 @@ public static void RegisterCallback(int index, IntPtr function)
123129 case 12 :
124130 PlsqlDeveloperUtPlsqlPlugin . getConnectionInfo = ( IdeGetConnectionInfo ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetConnectionInfo ) ) ;
125131 break ;
132+ case 20 :
133+ PlsqlDeveloperUtPlsqlPlugin . createWindow = ( IdeCreateWindow ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreateWindow ) ) ;
134+ break ;
126135 case 69 :
127136 PlsqlDeveloperUtPlsqlPlugin . createPopupItem = ( IdeCreatePopupItem ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreatePopupItem ) ) ;
128137 break ;
129138 case 74 :
130139 PlsqlDeveloperUtPlsqlPlugin . getPopupObject = ( IdeGetPopupObject ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetPopupObject ) ) ;
131140 break ;
141+ case 79 :
142+ PlsqlDeveloperUtPlsqlPlugin . getObjectSource = ( IdeGetObjectSource ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeGetObjectSource ) ) ;
143+ break ;
132144 case 150 :
133145 PlsqlDeveloperUtPlsqlPlugin . createToolButton = ( IdeCreateToolButton ) Marshal . GetDelegateForFunctionPointer ( function , typeof ( IdeCreateToolButton ) ) ;
134146 break ;
@@ -194,6 +206,12 @@ public static string About()
194206 }
195207 #endregion
196208
209+ internal static void OpenPackage ( string owner , string name )
210+ {
211+ IntPtr source = getObjectSource ( "PACKAGE" , owner , name ) ;
212+ createWindow ( 3 , source , false ) ;
213+ }
214+
197215 private static void ConnectToDatabase ( )
198216 {
199217 try
0 commit comments