File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
src/main/kotlin/org/domaframework/doma/intellij Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ class SqlAnnotationConverter(
243243
244244 private fun generateSqlFileWithContent (content : String ) {
245245 // First generate the empty SQL file using existing functionality
246- psiDaoMethod.generateSqlFile()
246+ psiDaoMethod.generateSqlFile(false )
247247
248248 // Then update its content
249249 ApplicationManager .getApplication().invokeLater {
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class PsiDaoMethod(
169169 }
170170 }
171171
172- fun generateSqlFile () {
172+ fun generateSqlFile (fileJump : Boolean = true ) {
173173 ApplicationManager .getApplication().runReadAction {
174174 if (sqlFilePath.isEmpty()) return @runReadAction
175175 val rootDir = psiProject.getContentRoot(daoFile) ? : return @runReadAction
@@ -202,9 +202,11 @@ class PsiDaoMethod(
202202 .findDirectory(virtualFile) ? : return @runWriteCommandAction
203203 sqlOutputDirPath.findFile(sqlFileName)?.delete()
204204 val sqlVirtualFile = sqlOutputDirPath.createFile(sqlFileName).virtualFile ? : return @runWriteCommandAction
205- FileEditorManager
206- .getInstance(psiProject)
207- .openFile(sqlVirtualFile, true )
205+ if (fileJump) {
206+ FileEditorManager
207+ .getInstance(psiProject)
208+ .openFile(sqlVirtualFile, true )
209+ }
208210 writeEmptyElementSqlFile(sqlVirtualFile)
209211 }
210212 }
You can’t perform that action at this time.
0 commit comments