From 9001cd5d7f820d9e39545295e636d26d8a0d3ee9 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Sat, 14 Mar 2020 11:53:08 +0100 Subject: [PATCH 1/5] fix includes() tests to not fail on utPLSQL 3.1.10 UT3_LATEST_RELEASE.UT_DATA_VALUE is not a dependency anymore --- .../src/test/java/org/utplsql/sqldev/test/dal/DalTest.xtend | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sqldev/src/test/java/org/utplsql/sqldev/test/dal/DalTest.xtend b/sqldev/src/test/java/org/utplsql/sqldev/test/dal/DalTest.xtend index f27a116d..63e84b60 100644 --- a/sqldev/src/test/java/org/utplsql/sqldev/test/dal/DalTest.xtend +++ b/sqldev/src/test/java/org/utplsql/sqldev/test/dal/DalTest.xtend @@ -489,7 +489,9 @@ class DalTest extends AbstractJdbcTest { val actualEmpty = dao.includes('SCOTT', 'TEST_F1') Assert.assertEquals(#[], actualEmpty) val actual = dao.includes('SCOTT', 'junit_utplsql_test_pkg') - Assert.assertEquals(#['SCOTT.JUNIT_UTPLSQL_TEST_PKG','SCOTT.JUNIT_F','UT3_LATEST_RELEASE.UT_DATA_VALUE','UT3_LATEST_RELEASE.UT_EXPECTATION'].sort, actual.sort) + Assert.assertTrue(actual.findFirst[it == "SCOTT.JUNIT_UTPLSQL_TEST_PKG"] !== null) + Assert.assertTrue(actual.findFirst[it == "SCOTT.JUNIT_F"] !== null) + Assert.assertTrue(actual.findFirst[it == "UT3_LATEST_RELEASE.UT_EXPECTATION"] !== null) } @Test From 725001c5303723bb8c5bdd27fc5d8289a1eebb77 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Sat, 14 Mar 2020 11:53:33 +0100 Subject: [PATCH 2/5] update dependencies --- sqldev/pom.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sqldev/pom.xml b/sqldev/pom.xml index 75b634b5..756e0268 100644 --- a/sqldev/pom.xml +++ b/sqldev/pom.xml @@ -11,9 +11,9 @@ UTF-8 1.8 1.8 - 2.18.0 + 2.20.0 - /Applications/SQLDeveloper19.1.0.app/Contents/Resources/sqldeveloper + /Applications/SQLDeveloper19.4.0.app/Contents/Resources/sqldeveloper utplsql_for_SQLDev_${project.version} @@ -170,12 +170,12 @@ org.springframework spring-jdbc - 5.1.8.RELEASE + 5.2.4.RELEASE org.springframework spring-web - 5.1.8.RELEASE + 5.2.4.RELEASE org.oddgen @@ -234,7 +234,7 @@ org.apache.maven.plugins - 3.8.0 + 3.8.1 maven-compiler-plugin ${jdk.version} @@ -337,7 +337,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.1.0 parse-version @@ -400,7 +400,7 @@ org.apache.felix maven-bundle-plugin - 4.2.0 + 4.2.1 true ${project.name} @@ -450,7 +450,7 @@ maven-assembly-plugin - 3.1.1 + 3.2.0 ${final.name} false From be5e15078a759d85658ec003870b1200fcd1bee4 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Sat, 14 Mar 2020 11:57:20 +0100 Subject: [PATCH 3/5] update dependencies --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 35071774..07f9d626 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,8 @@ Please file your bug reports, enhancement requests, questions and other support ## How to Build -1. [Download](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) and install SQL Developer 19.1.0 -2. [Download](https://maven.apache.org/download.cgi) and install Apache Maven 3.5.4 +1. [Download](http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html) and install SQL Developer 19.4.0 +2. [Download](https://maven.apache.org/download.cgi) and install Apache Maven 3.6.3 3. [Download](https://git-scm.com/downloads) and install a git command line client 4. Clone the utPLSQL-SQLDeveloper repository 5. Open a terminal window in the utPLSQL-SQLDeveloper root folder and type @@ -141,7 +141,7 @@ Please file your bug reports, enhancement requests, questions and other support 6. Run maven build by the following command - mvn -Dsqldev.basedir=/Applications/SQLDeveloper19.1.0.app/Contents/Resources/sqldeveloper -DskipTests=true clean package + mvn -Dsqldev.basedir=/Applications/SQLDeveloper19.4.0.app/Contents/Resources/sqldeveloper -DskipTests=true clean package Amend the parameter sqldev.basedir to match the path of your SQL Developer installation. This folder is used to reference Oracle jar files which are not available in public Maven repositories 7. The resulting file ```utplsql_for_SQLDev_x.x.x-SNAPSHOT.zip``` in the ```target``` directory can be installed within SQL Developer From 3fd2a62500498c95fe3d10d962e1fded8ca69324 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Sat, 14 Mar 2020 12:51:13 +0100 Subject: [PATCH 4/5] fixes #86 - add missing checkmarks on Windows Look & Feel --- .../main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.xtend | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.xtend b/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.xtend index e1ce9192..37a4f699 100644 --- a/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.xtend +++ b/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.xtend @@ -377,7 +377,9 @@ class RunnerPanel implements ActionListener, MouseListener, HyperlinkListener { showInfoIndicatorCheckBoxMenuItem.selected = preferences.showInfoIndicator applyShowInfoIndicator(showInfoIndicatorCheckBoxMenuItem.selected) showSuccessfulTestsCheckBoxMenuItem.selected = preferences.showSuccessfulTests + fixCheckBoxMenuItem(showSuccessfulTestsCheckBoxMenuItem) showDisabledTestsCheckBoxMenuItem.selected = preferences.showDisabledTests + fixCheckBoxMenuItem(showDisabledTestsCheckBoxMenuItem) applyFilter(showSuccessfulTestsCheckBoxMenuItem.selected, showDisabledTestsCheckBoxMenuItem.selected) fixCheckBoxMenuItem(showInfoIndicatorCheckBoxMenuItem) syncDetailTabCheckBoxMenuItem.selected = preferences.syncDetailTab From ec0b73efd6577b4eccf4915aa34cdae6c3bfa9cf Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Sat, 14 Mar 2020 14:05:11 +0100 Subject: [PATCH 5/5] fixes #93 - use temporary table instead of dbms_output --- .../org/utplsql/sqldev/dal/UtplsqlDao.xtend | 75 ++++++++++--------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/sqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.xtend b/sqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.xtend index c5509b31..e03c5851 100644 --- a/sqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.xtend +++ b/sqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.xtend @@ -859,44 +859,47 @@ class UtplsqlDao { * @throws DataAccessException if there is a problem */ def String htmlCodeCoverage(List pathList, List schemaList, List includeObjectList, List excludeObjectList) { - enableDbmsOutput val sql = ''' - BEGIN - ut.run( - a_paths => ut_varchar2_list( - «FOR path : pathList SEPARATOR ", "» - '«path»' - «ENDFOR» - ), - «IF schemaList.size > 0» - a_coverage_schemes => ut_varchar2_list( - «FOR schema : schemaList SEPARATOR ", "» - '«schema»' - «ENDFOR» - ), - «ENDIF» - «IF includeObjectList.size > 0» - a_include_objects => ut_varchar2_list( - «FOR includeObject : includeObjectList SEPARATOR ", "» - '«includeObject»' - «ENDFOR» - ), - «ENDIF» - «IF excludeObjectList.size > 0» - a_exclude_objects => ut_varchar2_list( - «FOR excludeObject : excludeObjectList SEPARATOR ", "» - '«excludeObject»' - «ENDFOR» - ), - «ENDIF» - a_reporter => ut_coverage_html_reporter() - ); - END; + SELECT column_value + FROM table( + ut.run( + a_paths => ut_varchar2_list( + «FOR path : pathList SEPARATOR ", "» + '«path»' + «ENDFOR» + ), + «IF schemaList.size > 0» + a_coverage_schemes => ut_varchar2_list( + «FOR schema : schemaList SEPARATOR ", "» + '«schema»' + «ENDFOR» + ), + «ENDIF» + «IF includeObjectList.size > 0» + a_include_objects => ut_varchar2_list( + «FOR includeObject : includeObjectList SEPARATOR ", "» + '«includeObject»' + «ENDFOR» + ), + «ENDIF» + «IF excludeObjectList.size > 0» + a_exclude_objects => ut_varchar2_list( + «FOR excludeObject : excludeObjectList SEPARATOR ", "» + '«excludeObject»' + «ENDFOR» + ), + «ENDIF» + a_reporter => ut_coverage_html_reporter() + ) + ) ''' - jdbcTemplate.update(sql) - val ret = getDbmsOutput - disableDbmsOutput - return ret + val lines = jdbcTemplate.queryForList(sql, String) + val sb = new StringBuilder + for (line : lines.filter[it !== null]) { + sb.append(line) + sb.append("\n") + } + return sb.toString } /**