Skip to content

Bugfix/issue 86 93 #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions sqldev/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.version>1.8</jdk.version>
<jdk.version.test>1.8</jdk.version.test>
<xtend.version>2.18.0</xtend.version>
<xtend.version>2.20.0</xtend.version>
<!-- requires SQL Developer 4.1.0 or higher (first version based on JDK 1.8) -->
<sqldev.basedir>/Applications/SQLDeveloper19.1.0.app/Contents/Resources/sqldeveloper</sqldev.basedir>
<sqldev.basedir>/Applications/SQLDeveloper19.4.0.app/Contents/Resources/sqldeveloper</sqldev.basedir>
<final.name>utplsql_for_SQLDev_${project.version}</final.name>
</properties>
<dependencies>
Expand Down Expand Up @@ -170,12 +170,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.1.8.RELEASE</version>
<version>5.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.1.8.RELEASE</version>
<version>5.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.oddgen</groupId>
Expand Down Expand Up @@ -234,7 +234,7 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.8.0</version>
<version>3.8.1</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
Expand Down Expand Up @@ -337,7 +337,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
<executions>
<execution>
<id>parse-version</id>
Expand Down Expand Up @@ -400,7 +400,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.0</version>
<version>4.2.1</version>
<extensions>true</extensions>
<configuration>
<finalName>${project.name}</finalName>
Expand Down Expand Up @@ -450,7 +450,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version><!--$NO-MVN-MAN-VER$-->
<version>3.2.0</version><!--$NO-MVN-MAN-VER$-->
<configuration>
<finalName>${final.name}</finalName>
<appendAssemblyId>false</appendAssemblyId>
Expand Down
75 changes: 39 additions & 36 deletions sqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.xtend
Original file line number Diff line number Diff line change
Expand Up @@ -859,44 +859,47 @@ class UtplsqlDao {
* @throws DataAccessException if there is a problem
*/
def String htmlCodeCoverage(List<String> pathList, List<String> schemaList, List<String> includeObjectList, List<String> 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
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down