◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
10 changes: 9 additions & 1 deletion sqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.xtend
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,17 @@ class UtplsqlDao {
if (cachedDbaViewAccessible === null) {
try {
val sql = '''
SELECT 1
FROM dba_objects
WHERE 1=2
'''
jdbcTemplate.execute(sql)
cachedDbaViewAccessible = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,22 @@ class UtplsqlController implements Controller {
public static final IdeAction UTPLSQL_GENERATE_ACTION = IdeAction.get(UtplsqlController.UTPLSQL_GENERATE_CMD_ID)

override handleEvent(IdeAction action, Context context) {
if (action.commandId === UTPLSQL_TEST_CMD_ID) {
runTest(context)
return true
} else if (action.commandId === UTPLSQL_COVERAGE_CMD_ID) {
codeCoverage(context)
return true
} else if (action.commandId === UTPLSQL_GENERATE_CMD_ID) {
generateTest(context)
return true
}
return false
}
Expand Down @@ -376,14 +383,21 @@ class UtplsqlController implements Controller {
reporter.showParameterWindow
}
} else if (view instanceof DBNavigatorWindow) {
val url=context.URL
if (url !== null) {
val connectionName = url.connectionName
logger.fine('''connectionName: «connectionName»''')
val pathList=context.pathList.dedupPathList
val includeObjectList = dependencies(context, connectionName)
val reporter = new CodeCoverageReporter(pathList, includeObjectList, connectionName)
reporter.showParameterWindow
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DalTest extends AbstractJdbcTest {
@BeforeClass
@AfterClass
def static void setupAndTeardown() {
sysJdbcTemplate.execute("CREATE OR REPLACE PUBLIC SYNONYM ut FOR ut3_latest_release.ut")
try {
jdbcTemplate.execute("DROP PACKAGE junit_utplsql_test_pkg")
} catch (BadSqlGrammarException e) {
Expand Down Expand Up @@ -83,7 +83,7 @@ class DalTest extends AbstractJdbcTest {
val dao = new UtplsqlDao(dataSource.connection)
Assert.assertEquals(null, dao.utplsqlSchema)
setupAndTeardown
Assert.assertEquals("UT3_LATEST_RELEASE", dao.utplsqlSchema)
}

@Test
Expand Down Expand Up @@ -491,7 +491,7 @@ class DalTest extends AbstractJdbcTest {
val actual = dao.includes('SCOTT', 'junit_utplsql_test_pkg')
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
Toggle all file notes Toggle all file annotations