diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa368fd..87fb721 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
+## [1.9.0] -2024-07-04
+
+- 更新插件名字和图标
+- 新增sea-orm-cli可视化面板 文档
+- 更新日志
+
## [1.8.0] - 2024-06-21
- 添加json生成sea orm migration代码功能,查看文档
diff --git a/build.gradle.kts b/build.gradle.kts
index 4640159..1aac9f0 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,12 +4,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.jetbrains.kotlin.jvm") version "2.0.0"
- id("org.jetbrains.intellij.platform") version "2.0.0-beta7"
+ id("org.jetbrains.intellij.platform") version "2.0.0-beta8"
id("org.jetbrains.changelog") version "2.2.0"
}
group = "shop.itbug"
-version = "1.8.0"
+version = "1.9.0"
repositories {
mavenCentral()
@@ -24,7 +24,7 @@ repositories {
dependencies {
intellijPlatform {
- rustRover("2024.1.2")
+ rustRover("2024.1.3")
bundledPlugins("com.jetbrains.rust","JavaScriptBase")
zipSigner()
instrumentationTools()
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a80b22c..a441313 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/src/main/kotlin/shop/itbug/salvorstool/action/seaorm/SeamOrmCommandAction.kt b/src/main/kotlin/shop/itbug/salvorstool/action/seaorm/SeamOrmCommandAction.kt
new file mode 100644
index 0000000..3076de3
--- /dev/null
+++ b/src/main/kotlin/shop/itbug/salvorstool/action/seaorm/SeamOrmCommandAction.kt
@@ -0,0 +1,134 @@
+package shop.itbug.salvorstool.action.seaorm
+
+import com.intellij.openapi.actionSystem.*
+import com.intellij.openapi.project.Project
+import com.intellij.openapi.ui.DialogWrapper
+import com.intellij.ui.dsl.builder.bindText
+import com.intellij.ui.dsl.builder.panel
+import shop.itbug.salvorstool.dialog.GenerateEntityDialog
+import shop.itbug.salvorstool.help.SeaOrmCommandHelp
+import shop.itbug.salvorstool.i18n.MyI18n
+import shop.itbug.salvorstool.icons.MyIcon
+import javax.swing.JComponent
+
+
+class SeamOrmCommandActionGroup: DefaultActionGroup() {
+
+ override fun update(e: AnActionEvent) {
+ val vf = e.getData(PlatformDataKeys.VIRTUAL_FILE)
+ e.presentation.isEnabledAndVisible = vf != null && vf.isDirectory && e.project != null && vf.findChild("Cargo.toml") != null
+ e.presentation.icon = MyIcon.pluginIcon
+ super.update(e)
+ }
+
+ override fun getActionUpdateThread(): ActionUpdateThread {
+ return ActionUpdateThread.BGT
+ }
+}
+
+abstract class SeamOrmCommandBaseAction : AnAction() {
+ override fun getActionUpdateThread(): ActionUpdateThread {
+ return ActionUpdateThread.BGT
+ }
+
+ fun AnActionEvent.getProj(): Project = this.project!!
+ private fun AnActionEvent.getVf() = this.getData(CommonDataKeys.VIRTUAL_FILE)!!
+ fun AnActionEvent.getSeaOrmHelper() = SeaOrmCommandHelp(getVf().path, getProj())
+}
+
+///初始化
+class SeaOrmInitAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ e.getSeaOrmHelper().migrateInit()
+ }
+}
+
+///创建table
+class SeaOrmCreateTableFileAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ Dialog(e.getProj()) {
+ e.getSeaOrmHelper().migrateGenerate(it.filename)
+ }.show()
+ }
+
+ private class Dialog(project: Project, val ok: (model: Model) -> Unit) : DialogWrapper(project, true) {
+ data class Model(var filename: String = "")
+
+ val configModel = Model()
+
+ init {
+ super.init()
+ title = "Seam Orm Create Table File"
+ }
+
+ override fun createCenterPanel(): JComponent {
+ return panel {
+ row(MyI18n.getMessage("file_name")) {
+ textField().bindText(configModel::filename)
+ }
+ }
+ }
+
+ override fun doOKAction() {
+ super.doOKAction()
+ ok.invoke(configModel)
+ }
+ }
+}
+
+
+/// 生成实体
+class SeaOrmRunGenerateEntityAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ GenerateEntityDialog(e.getProj()) { _, s ->
+ run {
+ e.getSeaOrmHelper().customRunCommand(*s.split(" ").toTypedArray())
+ }
+ }.show()
+ }
+
+}
+
+
+/// up
+class SeaOrmRunUpAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ e.getSeaOrmHelper().runUp()
+ }
+}
+
+/// Down
+class SeaOrmRunDownAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ e.getSeaOrmHelper().runDown()
+ }
+}
+
+/// check status
+class SeaOrmRunCheckStatusAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ e.getSeaOrmHelper().checkStatus()
+ }
+}
+
+/// check status
+class SeaOrmRunFreshAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ e.getSeaOrmHelper().runFresh()
+ }
+}
+
+/// refresh
+class SeaOrmRunRefreshAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ e.getSeaOrmHelper().runRefresh()
+ }
+}
+
+// reset
+class SeaOrmRunResetAction : SeamOrmCommandBaseAction() {
+ override fun actionPerformed(e: AnActionEvent) {
+ e.getSeaOrmHelper().runReset()
+ }
+}
+
diff --git a/src/main/kotlin/shop/itbug/salvorstool/cache/SeaOrmCache.kt b/src/main/kotlin/shop/itbug/salvorstool/cache/SeaOrmCache.kt
new file mode 100644
index 0000000..1bffd09
--- /dev/null
+++ b/src/main/kotlin/shop/itbug/salvorstool/cache/SeaOrmCache.kt
@@ -0,0 +1,15 @@
+package shop.itbug.salvorstool.cache
+
+import com.intellij.openapi.components.*
+import com.intellij.openapi.project.Project
+import shop.itbug.salvorstool.dialog.GenerateEntityDialog
+
+@Service(Service.Level.PROJECT)
+@State(name = "SeaOrmGenerateEntityConfig.xml", category = SettingsCategory.PLUGINS)
+@Storage(roamingType = RoamingType.DEFAULT)
+class SeaOrmCache: SimplePersistentStateComponent(GenerateEntityDialog.Config()) {
+
+ companion object{
+ fun getInstance(project: Project): SeaOrmCache = project.service()
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/shop/itbug/salvorstool/dialog/GenerateEntityDialog.kt b/src/main/kotlin/shop/itbug/salvorstool/dialog/GenerateEntityDialog.kt
new file mode 100644
index 0000000..4c88c56
--- /dev/null
+++ b/src/main/kotlin/shop/itbug/salvorstool/dialog/GenerateEntityDialog.kt
@@ -0,0 +1,257 @@
+package shop.itbug.salvorstool.dialog
+
+import com.intellij.openapi.components.BaseState
+import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
+import com.intellij.openapi.project.Project
+import com.intellij.openapi.ui.DialogPanel
+import com.intellij.openapi.ui.DialogWrapper
+import com.intellij.ui.components.fields.ExpandableTextField
+import com.intellij.ui.dsl.builder.*
+import com.intellij.util.Alarm
+import shop.itbug.salvorstool.cache.SeaOrmCache
+import shop.itbug.salvorstool.help.MyWebHelpProvider
+import shop.itbug.salvorstool.i18n.MyI18n
+import java.util.*
+import javax.swing.JComponent
+import javax.swing.SwingUtilities
+
+
+///生成实体弹窗
+class GenerateEntityDialog(val project: Project, val runCommand: (Config, String) -> Unit) :
+ DialogWrapper(project, true) {
+
+ data class Config(
+ var databaseUrl: String = "",
+ var databaseSchema: String = "",
+ var outputDir: String = "",
+ var verbose: Boolean = false,
+ var libs: Boolean = false,
+ var includeHiddenTables: Boolean = false,
+ var ignoreTables: String = "",
+ var compactFormat: Boolean = true,
+ var expandedFormat: Boolean = false,
+ var serde: Serde = Serde.None,
+ var skipDeserializingPrimaryKey: Boolean = false,
+ var skipHiddenColumn: Boolean = false,
+ var timeCrate: TimeCrate = TimeCrate.Chrono,
+ var maxConnections: Int = 1,
+ var modelExtraDerives: Boolean = false,
+ var modelExtraAttributes: Boolean = false,
+ var enumExtraDerives: Boolean = false,
+ var enumExtraAttributes: Boolean = false,
+ var seaography: Boolean = false
+ ) : BaseState()
+
+ enum class Serde {
+ None, Serialize, Deserialize, Both
+ }
+
+ enum class TimeCrate {
+ Chrono, Time
+ }
+
+ private lateinit var panel: DialogPanel
+ private lateinit var preview: Cell
+ private val config = SeaOrmCache.getInstance(project).state
+ private val alarm = Alarm(disposable)
+
+ init {
+ super.init()
+ setOKButtonText(MyI18n.getMessage("run"))
+ SwingUtilities.invokeLater {
+ updatePreviewLabel()
+ preview.component.text = "sea-orm-cli " + config.generateCommand()
+ }
+ }
+
+ private fun updatePreviewLabel() {
+ if (this.isDisposed) {
+ return
+ }
+ alarm.addRequest({
+ if (panel.isModified()) {
+ panel.apply()
+ SeaOrmCache.getInstance(project).loadState(config)
+ preview.component.text = "sea-orm-cli " + config.generateCommand()
+ }
+ updatePreviewLabel()
+ }, 1000)
+ }
+
+ override fun createCenterPanel(): JComponent {
+ this.panel = panel {
+ row("Database url") {
+ textField()
+ .align(Align.FILL)
+ .bindText(config::databaseUrl)
+ .comment("Database URL (default: DATABASE_URL specified in ENV)")
+ }
+ row("Database schema") {
+ textField()
+ .align(Align.FILL)
+ .bindText(config::databaseSchema)
+ .comment("Database schema (default: DATABASE_SCHEMA specified in ENV)")
+ }
+ row("Output dir") {
+ textFieldWithBrowseButton(
+ "Select Folder", project,
+ FileChooserDescriptorFactory.createSingleFolderDescriptor()
+ ) { it.path }
+ .align(Align.FILL)
+ .bindText(
+ config::outputDir
+ )
+ }
+ row("Include hidden tables") {
+ checkBox("Generate entity files from hidden tables (tables with names starting with an underscore are hidden and ignored by default)").bindSelected(
+ config::includeHiddenTables
+ )
+ }
+
+ row("Lib") {
+ checkBox("Generate index file as lib.rs instead of mod.rs").bindSelected(config::libs)
+
+ }
+ row("Verbose") {
+ checkBox("Print debug messages").bindSelected(config::verbose)
+
+ }
+ row("Compact format") {
+ checkBox("Generate entity file of compact format (default: true)").bindSelected(config::compactFormat)
+ }
+
+ row("Ignore tables") {
+ textField().bindText(config::ignoreTables)
+ .comment("Skip generating entity file for specified tables (default: seaql_migrations)")
+ }
+
+ row("Expanded Format") {
+ checkBox("Generate entity file of expanded format").bindSelected(config::expandedFormat)
+ }
+ buttonsGroup("Serde") {
+ row {
+ Serde.entries.forEach {
+ radioButton(it.name, it)
+ }
+ }.comment("Automatically derive serde Serialize / Deserialize traits for the entity (none, serialize, deserialize, both) (default: none)")
+
+ }.bind(config::serde)
+ row("Serde skip deserializing primary key") {
+ checkBox("Generate entity model with primary key field labeled as #[serde(skip_deserializing)]").bindSelected(
+ config::skipDeserializingPrimaryKey
+ )
+ }
+ row("Skip hidden column") {
+ checkBox("Generate entity model with hidden column (column name starts with _) field labeled as #[serde(skip)]").bindSelected(
+ config::skipHiddenColumn
+ )
+ }
+ buttonsGroup("Time crate") {
+ row {
+ TimeCrate.entries.forEach {
+ radioButton(it.name, it)
+ }
+ }.comment("The datetime crate to use for generating entities (chrono, time) (default: chrono)")
+ }.bind(config::timeCrate)
+ row("Max Connections") {
+ spinner(1..100).bindIntValue(config::maxConnections)
+ .comment("Maximum number of database connections to be initialized in the connection pool (default: 1)")
+ }
+ row("Model extra attributes") {
+ checkBox("Append extra attributes to generated model struct").bindSelected(config::modelExtraAttributes)
+ }
+ row("Model extra derives") {
+ checkBox("Append extra derive macros to the generated model struct").bindSelected(config::modelExtraDerives)
+ }
+ row("Enum Extra derives") {
+ checkBox("Append extra derive macros to generated enums").bindSelected(config::enumExtraDerives)
+ }
+ row("Enum extra attributes") {
+ checkBox("Append extra attributes to generated enums").bindSelected(config::enumExtraAttributes)
+ }
+ row("Sea ography") {
+ checkBox("Generate addition structs in entities for seaography integration").bindSelected(config::seaography)
+ }
+ row("Preview Command") {
+ preview = expandableTextField().align(Align.FILL)
+ }
+ }
+ return this.panel
+ }
+
+ //生成命令
+ private fun Config.generateCommand(): String {
+ val sb = StringBuilder()
+ sb.append("generate entity")
+ if (databaseUrl.isNotBlank()) {
+ sb.append(" -u $databaseUrl")
+ }
+ if (databaseSchema.isNotBlank()) {
+ sb.append(" -s $databaseSchema")
+ }
+ if (outputDir.isNotBlank()) {
+ sb.append(" -o $outputDir")
+ }
+ if (verbose) {
+ sb.append(" -v")
+ }
+ if (libs) {
+ sb.append(" -l")
+ }
+ if (includeHiddenTables) {
+ sb.append(" --include-hidden-tables ")
+ }
+ if (ignoreTables.isNotBlank()) {
+ sb.append(" --ignore-tables $ignoreTables ")
+ }
+ if (compactFormat) {
+ sb.append(" --compact-format ")
+ }
+ if (expandedFormat) {
+ sb.append(" --expanded-format ")
+ }
+ if (serde != Serde.None) {
+ sb.append(" --with-serde ${serde.name.lowercase(Locale.getDefault())}")
+ }
+
+ if (skipDeserializingPrimaryKey) {
+ sb.append(" --serde-skip-deserializing-primary-key ")
+ }
+ if (skipHiddenColumn) {
+ sb.append(" --serde-skip-hidden-column ")
+ }
+ if (timeCrate != TimeCrate.Chrono) {
+ sb.append(" --date-time-create ${timeCrate.name.lowercase(Locale.getDefault())}")
+ }
+
+ if (maxConnections > 0 && maxConnections != 1) {
+ sb.append(" --max-connections $maxConnections")
+ }
+ if (modelExtraDerives) {
+ sb.append(" --model-extra-derives ")
+ }
+ if (modelExtraAttributes) {
+ sb.append(" --model-extra-attributes ")
+ }
+ if (enumExtraDerives) {
+ sb.append(" --enum-extra-derives ")
+ }
+ if (enumExtraAttributes) {
+ sb.append(" --enum-extra-attributes ")
+ }
+ if (seaography) {
+ sb.append(" --seaography ")
+ }
+ return sb.toString()
+ }
+
+ override fun doOKAction() {
+ super.doOKAction()
+ SeaOrmCache.getInstance(project).loadState(config)
+ runCommand(config, config.generateCommand())
+ }
+
+ override fun getHelpId(): String? {
+ return MyWebHelpProvider.SEA_ORM_COMMAND
+ }
+}
\ No newline at end of file
diff --git a/src/main/kotlin/shop/itbug/salvorstool/help/SeaOrmCommandHelp.kt b/src/main/kotlin/shop/itbug/salvorstool/help/SeaOrmCommandHelp.kt
new file mode 100644
index 0000000..e066a9f
--- /dev/null
+++ b/src/main/kotlin/shop/itbug/salvorstool/help/SeaOrmCommandHelp.kt
@@ -0,0 +1,94 @@
+package shop.itbug.salvorstool.help
+
+import com.intellij.execution.configurations.GeneralCommandLine
+import com.intellij.execution.process.OSProcessHandler
+import com.intellij.execution.process.ProcessOutput
+import com.intellij.execution.util.ExecUtil
+import com.intellij.openapi.progress.ProgressManager
+import com.intellij.openapi.project.Project
+import com.intellij.openapi.util.ThrowableComputable
+import shop.itbug.salvorstool.tool.NotificationUtil
+import java.io.File
+
+class SeaOrmCommandHelp(val dirPath: String, val project: Project) {
+
+ private val COMMAND_CLI = "sea-orm-cli"
+
+
+ ///获取版本
+ fun getVersion(): String? {
+ val output = runCommand("--version")
+ return output?.stdout?.trim()
+ }
+
+
+ ///初始化
+ fun migrateInit(customDir: String? = null) {
+ val params = mutableSetOf()
+ if (customDir != null) {
+ params.add("-d")
+ params.add(customDir)
+ }
+ runCommand("init", *params.toTypedArray())
+ }
+
+
+ fun runUp() {
+ runCommand("migrate", "up")
+ }
+
+ fun runDown() {
+ runCommand("migrate", "down")
+ }
+
+ fun checkStatus() {
+ runCommand("migrate", "status")
+ }
+
+ fun runFresh() {
+ runCommand("migrate", "fresh")
+ }
+
+ fun runRefresh() {
+ runCommand("migrate", "refresh")
+ }
+
+ fun runReset() {
+ runCommand("migrate", "reset")
+ }
+
+ ///生成数据表
+ fun migrateGenerate(filename: String) {
+ runCommand("migrate", "generate", filename)
+ }
+
+ ///生成模型
+ fun customRunCommand(vararg commands: String) {
+ runCommand(*commands)
+ }
+
+ ///执行命令
+ private fun runCommand(vararg args: String): ProcessOutput? {
+ val commandLine = GeneralCommandLine(COMMAND_CLI).apply {
+ this.workDirectory = File(dirPath)
+ this.addParameters(args.toMutableList().filter { it.isNotBlank() })
+ }
+ try {
+ val result = ProgressManager.getInstance().runProcessWithProgressSynchronously(ThrowableComputable {
+ OSProcessHandler(commandLine).startNotify()
+ val po = ExecUtil.execAndGetOutput(commandLine)
+ po
+ }, COMMAND_CLI, true, project)
+ if (result.exitCode != 0) {
+ NotificationUtil.getInstance(project).seaOrmNotifyError(result.stderr)
+ } else {
+ NotificationUtil.getInstance(project).seaOrmNotifyInfo(result.stdout.trim())
+ }
+ return result
+ } catch (e: Exception) {
+ NotificationUtil.getInstance(project).seaOrmNotifyError(e.localizedMessage)
+ }
+ return null
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/kotlin/shop/itbug/salvorstool/help/WebHelpProvider.kt b/src/main/kotlin/shop/itbug/salvorstool/help/WebHelpProvider.kt
index 7bec6ed..a50e418 100644
--- a/src/main/kotlin/shop/itbug/salvorstool/help/WebHelpProvider.kt
+++ b/src/main/kotlin/shop/itbug/salvorstool/help/WebHelpProvider.kt
@@ -4,14 +4,11 @@ import com.intellij.openapi.help.WebHelpProvider
class MyWebHelpProvider : WebHelpProvider() {
- init {
- println("my web help provider initialized!")
- }
override fun getHelpPageUrl(helpTopicId: String): String? {
- println("help id $helpTopicId")
return when (helpTopicId) {
- GENERATE_SEA_ORM_HELP -> "https://itbug.shop/sea-orm-help"
+ GENERATE_SEA_ORM_HELP -> "https://mdddj.github.io/SalvoRsToolDocument/sea-orm-json-gen-migration-code.html"
+ SEA_ORM_COMMAND -> "https://www.sea-ql.org/SeaORM/docs/generate-entity/sea-orm-cli/"
else -> {
null
}
@@ -25,5 +22,6 @@ class MyWebHelpProvider : WebHelpProvider() {
companion object {
const val GENERATE_SEA_ORM_HELP = "sea:generate_sea_orm_helper"
+ const val SEA_ORM_COMMAND = "sea:sea_orm_command_run"
}
}
\ No newline at end of file
diff --git a/src/main/kotlin/shop/itbug/salvorstool/json/MyJsonParse.kt b/src/main/kotlin/shop/itbug/salvorstool/json/MyJsonParse.kt
index 9fa5ce5..e4cfdf7 100644
--- a/src/main/kotlin/shop/itbug/salvorstool/json/MyJsonParse.kt
+++ b/src/main/kotlin/shop/itbug/salvorstool/json/MyJsonParse.kt
@@ -106,7 +106,8 @@ abstract class SeaOrmTableFactory(tableName: String) {
private fun getColumns(columns: List>): String {
val sb = StringBuilder()
columns.forEach {
- sb.appendLine("\t" + getColumnBy(it))
+ val isLast = columns.last() == it
+ sb.appendLine("\t" + getColumnBy(it) + if (isLast) ".to_owned()" else "")
}
return sb.toString()
}
diff --git a/src/main/kotlin/shop/itbug/salvorstool/tool/NotificationUtil.kt b/src/main/kotlin/shop/itbug/salvorstool/tool/NotificationUtil.kt
new file mode 100644
index 0000000..ba4263b
--- /dev/null
+++ b/src/main/kotlin/shop/itbug/salvorstool/tool/NotificationUtil.kt
@@ -0,0 +1,30 @@
+package shop.itbug.salvorstool.tool
+
+import com.intellij.notification.NotificationGroupManager
+import com.intellij.notification.NotificationType
+import com.intellij.openapi.components.Service
+import com.intellij.openapi.components.service
+import com.intellij.openapi.project.Project
+
+@Service(Service.Level.PROJECT)
+class NotificationUtil(val project: Project) {
+
+ private val SEA_ORM_CLI_GROUP_ID = "SeaOrmCliNotification"
+
+ ///弹出一个通知
+ fun seaOrmNotifyInfo(text: String) {
+ NotificationGroupManager.getInstance().getNotificationGroup(SEA_ORM_CLI_GROUP_ID)
+ .createNotification(text, NotificationType.INFORMATION).notify(project)
+ }
+
+ fun seaOrmNotifyError(text: String) {
+ NotificationGroupManager.getInstance().getNotificationGroup(SEA_ORM_CLI_GROUP_ID)
+ .createNotification(text, NotificationType.ERROR).notify(project)
+ }
+
+ companion object {
+ fun getInstance(project: Project): NotificationUtil = project.service()
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml
index 0e5d564..69ab6ed 100644
--- a/src/main/resources/META-INF/plugin.xml
+++ b/src/main/resources/META-INF/plugin.xml
@@ -1,6 +1,6 @@
shop.itbug.SalvoRsTool
- SalvoRsTool
+ RustX
梁典典
com.intellij.modules.platform
com.jetbrains.rust
@@ -17,9 +17,10 @@
-
+
-
+
+
@@ -28,7 +29,7 @@
-
+
-
+
-
+
@@ -56,13 +58,38 @@
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/META-INF/pluginIcon.svg b/src/main/resources/META-INF/pluginIcon.svg
index 10add80..6a012b9 100644
--- a/src/main/resources/META-INF/pluginIcon.svg
+++ b/src/main/resources/META-INF/pluginIcon.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/main/resources/icons/logo.svg b/src/main/resources/icons/logo.svg
index 14d8559..6a012b9 100644
--- a/src/main/resources/icons/logo.svg
+++ b/src/main/resources/icons/logo.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/main/resources/messages/pluginBundle.properties b/src/main/resources/messages/pluginBundle.properties
index c2c0bb5..26176c4 100644
--- a/src/main/resources/messages/pluginBundle.properties
+++ b/src/main/resources/messages/pluginBundle.properties
@@ -24,3 +24,5 @@ preview-the-code=代码预览
valid_failed=数据验证失败
sea_orm_json_tips=输入json字符串,只支持简单的对象,不支持嵌套对象和数组
+
+run=运行
diff --git a/src/main/resources/messages/pluginBundle_ar.properties b/src/main/resources/messages/pluginBundle_ar.properties
index f104db7..47dc19a 100644
--- a/src/main/resources/messages/pluginBundle_ar.properties
+++ b/src/main/resources/messages/pluginBundle_ar.properties
@@ -24,3 +24,5 @@ preview-the-code=كود المعاينة
valid_failed=فشل التحقق من البيانات
sea_orm_json_tips=أدخل جسون سلسلة ، فقط دعم الكائنات البسيطة ، لا تدعم الكائنات المتداخلة والمصفوفات
+
+run=تشغيل .
diff --git a/src/main/resources/messages/pluginBundle_de.properties b/src/main/resources/messages/pluginBundle_de.properties
index f34396f..d6c9af9 100644
--- a/src/main/resources/messages/pluginBundle_de.properties
+++ b/src/main/resources/messages/pluginBundle_de.properties
@@ -24,3 +24,5 @@ preview-the-code=Codevorschau
valid_failed=Datenvalidierung fehlgeschlagen
sea_orm_json_tips=JSON-Zeichenfolge eingeben, unterstützt nur einfache Objekte, unterstützt keine verschachtelten Objekte und Arrays
+
+run=Funktion
diff --git a/src/main/resources/messages/pluginBundle_en.properties b/src/main/resources/messages/pluginBundle_en.properties
index 00e0bb6..b1cce6e 100644
--- a/src/main/resources/messages/pluginBundle_en.properties
+++ b/src/main/resources/messages/pluginBundle_en.properties
@@ -24,3 +24,5 @@ preview-the-code=Code Preview
valid_failed=Data validation failed
sea_orm_json_tips=Input JSON string, only supports simple objects, does not support nested objects and arrays
+
+run=function
diff --git a/src/main/resources/messages/pluginBundle_fr.properties b/src/main/resources/messages/pluginBundle_fr.properties
index 9d342b4..708dc18 100644
--- a/src/main/resources/messages/pluginBundle_fr.properties
+++ b/src/main/resources/messages/pluginBundle_fr.properties
@@ -24,3 +24,5 @@ preview-the-code=Aperçu du Code
valid_failed=Échec de la validation des données
sea_orm_json_tips=Entrez une chaîne json, seuls les objets simples sont pris en charge, pas les objets imbriqués et les tableaux
+
+run=Fonctionnement
diff --git a/src/main/resources/messages/pluginBundle_hk.properties b/src/main/resources/messages/pluginBundle_hk.properties
index 592d356..e2267a3 100644
--- a/src/main/resources/messages/pluginBundle_hk.properties
+++ b/src/main/resources/messages/pluginBundle_hk.properties
@@ -22,3 +22,5 @@ sea-orm-table-name-title-comment=資料表名稱,例子:order
preview-the-code=程式碼預覽
sea_orm_json_tips=輸入json字串,只支持簡單的對象,不支持嵌套對象和數組
+
+run=運行
diff --git a/src/main/resources/messages/pluginBundle_it.properties b/src/main/resources/messages/pluginBundle_it.properties
index e7b8ba7..1f278ef 100644
--- a/src/main/resources/messages/pluginBundle_it.properties
+++ b/src/main/resources/messages/pluginBundle_it.properties
@@ -24,3 +24,5 @@ preview-the-code=Anteprima codice
valid_failed=Validazione dei dati non riuscita
sea_orm_json_tips=Stringa JSON di input, supporta solo oggetti semplici, non supporta oggetti nidificati e array
+
+run=funzione
diff --git a/src/main/resources/messages/pluginBundle_ja.properties b/src/main/resources/messages/pluginBundle_ja.properties
index 81dbb84..e5a7f69 100644
--- a/src/main/resources/messages/pluginBundle_ja.properties
+++ b/src/main/resources/messages/pluginBundle_ja.properties
@@ -24,3 +24,5 @@ preview-the-code=コードプレビュー
valid_failed=データ検証に失敗しました
sea_orm_json_tips=単純なオブジェクトのみをサポートし、ネストされたオブジェクトや配列はサポートしないjson文字列を入力します
+
+run=うんてん
diff --git a/src/main/resources/messages/pluginBundle_ko.properties b/src/main/resources/messages/pluginBundle_ko.properties
index 1d1602f..a57f142 100644
--- a/src/main/resources/messages/pluginBundle_ko.properties
+++ b/src/main/resources/messages/pluginBundle_ko.properties
@@ -24,3 +24,5 @@ preview-the-code=코드 미리 보기
valid_failed=데이터 검증 실패
sea_orm_json_tips=json 문자열을 입력하십시오. 간단한 객체만 지원하고 중첩된 객체와 배열은 지원되지 않습니다.
+
+run=실행
diff --git a/src/main/resources/messages/pluginBundle_nl.properties b/src/main/resources/messages/pluginBundle_nl.properties
index a3f69c7..2618146 100644
--- a/src/main/resources/messages/pluginBundle_nl.properties
+++ b/src/main/resources/messages/pluginBundle_nl.properties
@@ -24,3 +24,5 @@ preview-the-code=Codevoorbeeld
valid_failed=Gegevensvalidatie mislukt
sea_orm_json_tips=JSON-tekenreeks invoeren, ondersteunt alleen eenvoudige objecten, ondersteunt geen geneste objecten en arrays
+
+run=functie
diff --git a/src/main/resources/messages/pluginBundle_pl.properties b/src/main/resources/messages/pluginBundle_pl.properties
index b4f9c99..48f3f01 100644
--- a/src/main/resources/messages/pluginBundle_pl.properties
+++ b/src/main/resources/messages/pluginBundle_pl.properties
@@ -24,3 +24,5 @@ preview-the-code=Podgląd kodu
valid_failed=Niepowodzenie walidacji danych
sea_orm_json_tips=Wprowadzanie łańcucha JSON, obsługuje tylko proste obiekty, nie obsługuje zagnieżdżonych obiektów i tablic
+
+run=funkcja
diff --git a/src/main/resources/messages/pluginBundle_pt.properties b/src/main/resources/messages/pluginBundle_pt.properties
index 09d0049..7d3cd0d 100644
--- a/src/main/resources/messages/pluginBundle_pt.properties
+++ b/src/main/resources/messages/pluginBundle_pt.properties
@@ -24,3 +24,5 @@ preview-the-code=Antevisão do Código
valid_failed=A validação dos dados falhou
sea_orm_json_tips=Entrada JSON string, suporta apenas objetos simples, não suporta objetos aninhados e arrays
+
+run=função
diff --git a/src/main/resources/messages/pluginBundle_ru.properties b/src/main/resources/messages/pluginBundle_ru.properties
index 2eed855..3fa6e3d 100644
--- a/src/main/resources/messages/pluginBundle_ru.properties
+++ b/src/main/resources/messages/pluginBundle_ru.properties
@@ -24,3 +24,5 @@ preview-the-code=Предварительный просмотр кода
valid_failed=Ошибка проверки данных
sea_orm_json_tips=Введите строку json, которая поддерживает только простые объекты, а не встроенные объекты и массивы
+
+run=Запуск