Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a008c36

Browse files
enforce asynchronous runTest call in event thread
1 parent d5cab8d commit a008c36

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

sqldev/src/main/java/org/utplsql/sqldev/UtplsqlWorksheet.xtend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class UtplsqlWorksheet {
7676
}
7777
}
7878
79-
def runTest() {
79+
private def runTest() {
8080
val worksheet = openWorksheet
8181
worksheet.runScript
8282
logger.fine('''utPLSQL test called for «path» in «connectionName».''')

sqldev/src/main/java/org/utplsql/sqldev/editor/menu/UtplsqlEditorController.xtend

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ class UtplsqlEditorController implements Controller {
3434

3535
override handleEvent(IdeAction action, Context context) {
3636
if (action.commandId === UTLPLSQL_EDITOR_TEST_CMD_ID) {
37-
val Runnable runnable = [|runTest(context)]
38-
val thread = new Thread(runnable)
39-
thread.name = "utPLSQL run test"
40-
thread.start
37+
runTest(context)
4138
return true
4239
}
4340
return false
@@ -78,7 +75,7 @@ class UtplsqlEditorController implements Controller {
7875
connectionName = view.connectionName
7976
}
8077
val utPlsqlWorksheet = new UtplsqlWorksheet(path, connectionName)
81-
utPlsqlWorksheet.runTest
78+
utPlsqlWorksheet.runTestAsync
8279
}
8380
}
8481
}

0 commit comments

Comments
 (0)