generated from JetBrains/intellij-platform-plugin-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(database): init ModularDesignAction and modify VisualSqlAction f…
…or design #80 Add a new file `ModularDesignAction.kt` in the `cc.unitmesh.database.actions` package. This class extends `AbstractChatIntention` and provides implementation for various methods. It is not yet implemented. Modify the `cc.unitmesh.database.xml` file to include the `ModularDesignAction` class in the `autoDevIntention` section. Modify the `AutoDevBundle.properties` file to include a new message key `migration.database.plsql.modular.design` with the value "Modular Code". Modify the `VisualSqlAction.kt` file to extend `AbstractChatIntention` instead of `IntentionAction`. The `priority` method is overridden to return 1001. The `isAvailable` and `invoke` methods are not yet implemented.
- Loading branch information
Showing
4 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
exts/database/src/main/kotlin/cc/unitmesh/database/actions/ModularDesignAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package cc.unitmesh.database.actions | ||
|
||
import cc.unitmesh.devti.AutoDevBundle | ||
import cc.unitmesh.devti.intentions.action.base.AbstractChatIntention | ||
import com.intellij.openapi.editor.Editor | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.psi.PsiFile | ||
|
||
class ModularDesignAction : AbstractChatIntention() { | ||
override fun priority(): Int = 899 | ||
|
||
override fun startInWriteAction(): Boolean = false | ||
|
||
override fun getFamilyName(): String = AutoDevBundle.message("migration.database.plsql") | ||
|
||
override fun getText(): String = AutoDevBundle.message("migration.database.plsql.modular.design") | ||
|
||
override fun isAvailable(project: Project, editor: Editor?, psiFile: PsiFile?): Boolean { | ||
return false | ||
} | ||
|
||
override fun invoke(project: Project, editor: Editor?, psiFile: PsiFile?) { | ||
TODO("Not yet implemented") | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
exts/database/src/main/kotlin/cc/unitmesh/database/actions/VisualSqlAction.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
package cc.unitmesh.database.actions | ||
|
||
import cc.unitmesh.devti.AutoDevBundle | ||
import com.intellij.codeInsight.intention.IntentionAction | ||
import cc.unitmesh.devti.intentions.action.base.AbstractChatIntention | ||
import com.intellij.openapi.editor.Editor | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.psi.PsiFile | ||
|
||
class VisualSqlAction : IntentionAction { | ||
class VisualSqlAction : AbstractChatIntention() { | ||
override fun priority(): Int = 1001 | ||
|
||
override fun startInWriteAction(): Boolean = false | ||
|
||
override fun getFamilyName(): String = AutoDevBundle.message("migration.database.plsql") | ||
|
||
override fun getText(): String = AutoDevBundle.message("migration.database.plsql.visual") | ||
|
||
override fun isAvailable(project: Project, p1: Editor?, p2: PsiFile?): Boolean { | ||
override fun isAvailable(project: Project, editor: Editor?, psiFile: PsiFile?): Boolean { | ||
return false | ||
} | ||
|
||
override fun invoke(project: Project, p1: Editor?, p2: PsiFile?) { | ||
override fun invoke(project: Project, editor: Editor?, psiFile: PsiFile?) { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters