public static void OnMenuClick(int index) { if (index == PLUGIN_MENU_INDEX_ALLTESTS) { if (PlsqlDeveloperUtPlsqlPlugin.connected()) { IntPtr username; IntPtr password; IntPtr database; getConnectionInfo(out username, out password, out database); testResultWindow.RunTests("_ALL", Marshal.PtrToStringAnsi(username), null, null); } } else if (index == PLUGIN_POPUP_INDEX) { if (PlsqlDeveloperUtPlsqlPlugin.connected()) { IntPtr type; IntPtr owner; IntPtr name; IntPtr subType; getPopupObject(out type, out owner, out name, out subType); testResultWindow.RunTests(Marshal.PtrToStringAnsi(type), Marshal.PtrToStringAnsi(owner), Marshal.PtrToStringAnsi(name), Marshal.PtrToStringAnsi(subType)); } } }
public static string IdentifyPlugIn(int id) { if (plugin == null) { plugin = new PlsqlDeveloperUtPlsqlPlugin(); pluginId = id; } return(PLUGIN_NAME); }
private void ExecuteSql(string sql) { var code = PlsqlDeveloperUtPlsqlPlugin.sqlExecute(sql); if (code != 0) { var message = PlsqlDeveloperUtPlsqlPlugin.sqlErrorMessage(); MessageBox.Show(Marshal.PtrToStringAnsi(message)); } }
internal JUnitTestSuites GetJUnitResult() { var sb = new StringBuilder(); while (!PlsqlDeveloperUtPlsqlPlugin.sqlEof()) { var value = PlsqlDeveloperUtPlsqlPlugin.sqlField(0); var converteredValue = Marshal.PtrToStringAnsi(value); sb.Append(converteredValue).Append("\r\n"); PlsqlDeveloperUtPlsqlPlugin.sqlNext(); } var result = sb.ToString(); var serializer = new XmlSerializer(typeof(JUnitTestSuites)); var testSuites = (JUnitTestSuites)serializer.Deserialize(new StringReader(result)); return(testSuites); }