Skip to content

Commit 014a918

Browse files
committed
refactor(ext-database): Simplify GenerateFunctionAction logic by removing unnecessary checks.
1 parent 9d39866 commit 014a918

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

exts/ext-database/src/main/kotlin/cc/unitmesh/database/actions/GenerateFunctionAction.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ class GenerateFunctionAction : ChatBaseIntention() {
2525
override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?): Boolean {
2626
if (editor == null || file == null) return false
2727
val isOracle = file.language is OraDialect
28-
val selectedText = editor.selectionModel
29-
val element = file.findElementAt(selectedText.selectionStart)
30-
31-
if (element != null) {
32-
logger.info("element: ${element.text}")
33-
}
28+
// val selectedText = editor.selectionModel
29+
// val element = file.findElementAt(selectedText.selectionStart)
3430

3531
return isOracle
3632
}

0 commit comments

Comments
 (0)