Skip to content

Commit dabca6b

Browse files
committed
release: 6.9.4
- add Dart VM memory module and optimize VM panels - expand i18n coverage for VM/Drift/Provider - fix i18n placeholder rendering and align JVM target to 21
1 parent ec89ace commit dabca6b

24 files changed

Lines changed: 4878 additions & 267 deletions

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
## Unreleased
44

5+
## 6.9.4 - 2026-04-03
6+
7+
### Improvements
8+
- Added the Dart VM Memory module with Profile, Diff Snapshots, and Trace Instances panels.
9+
- Refined memory chart interactions and layout, including hover usage tooltips and cleaner controls.
10+
- Unified Drift export save flow and improved export notifications.
11+
12+
### Localization
13+
- Expanded i18n coverage for Dart VM and Drift UI in zh/en/hk/ja/ko.
14+
15+
### Fixes
16+
- Fixed i18n parameter formatting that displayed `Object@...` text in memory summaries.
17+
- Aligned Java/Kotlin JVM target to 21 to remove build target mismatch warnings.
518

619
## 6.9.3 - 2026-03-24
720

build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ plugins {
3434
group = "shop.itbug"
3535
version = pluginVersion
3636

37+
java {
38+
sourceCompatibility = JavaVersion.VERSION_21
39+
targetCompatibility = JavaVersion.VERSION_21
40+
}
41+
3742
repositories {
3843
mavenCentral()
3944
google()

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
kotlin.stdlib.default.dependency=false
2-
pluginVersion=6.9.3
2+
pluginVersion=6.9.4
33
dartVersion=503.0.0
44
sinceBuildVersion=252
55
kotlin.daemon.jvmargs=-Xmx5024m

src/main/kotlin/shop/itbug/flutterx/i18n/PluginBundle.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const val pathToBundleKey = "messages.pluginBundle"
88
object PluginBundle : DynamicPluginBundle(pathToBundleKey) {
99

1010
fun get(key: String, vararg params: Any): String {
11-
return getMessage(key.trim(), params)
11+
return getMessage(key.trim(), *params)
1212
}
1313

1414
val doc: String get() = get("doc")
@@ -18,4 +18,4 @@ object PluginBundle : DynamicPluginBundle(pathToBundleKey) {
1818

1919
fun String.i18n(): String {
2020
return PluginBundle.get(this)
21-
}
21+
}

src/main/kotlin/shop/itbug/flutterx/window/DartVmServiceWindowsFactory.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class DartVmServiceWindowsFactory : ToolWindowFactory {
2020
toolWindow.addComposeTab("Vm") {
2121
DartVmStatusComponent(project)
2222
}
23+
toolWindow.addComposeTab("Memory") {
24+
DartVmMemoryComponent(project)
25+
}
2326
//TODO widget tree 有点不好弄!
2427
// toolWindow.addComposeTab("Widget Tree") {
2528
// WidgetTreeWindowContent(project)
@@ -64,4 +67,3 @@ class DartVmServiceWindowsFactory : ToolWindowFactory {
6467

6568
fun Project.getDartVmWindow() = ToolWindowManager.getInstance(this).getToolWindow(dartVmToolWindowId)
6669
const val dartVmToolWindowId = "FlutterX Dart VM"
67-

src/main/kotlin/shop/itbug/flutterx/window/android/MigrateWindow.kt

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import com.intellij.openapi.application.runReadAction
1616
import com.intellij.openapi.project.DumbService
1717
import com.intellij.openapi.project.Project
1818
import com.intellij.openapi.project.guessProjectDir
19-
import com.intellij.openapi.vfs.LocalFileSystem
2019
import com.intellij.openapi.vfs.VfsUtilCore
2120
import com.intellij.openapi.vfs.VirtualFile
2221
import com.intellij.openapi.vfs.readText
@@ -26,6 +25,7 @@ import com.intellij.ui.OnePixelSplitter
2625
import com.intellij.ui.components.JBList
2726
import com.intellij.ui.components.JBScrollPane
2827
import com.intellij.util.ui.components.BorderLayoutPanel
28+
import shop.itbug.flutterx.i18n.PluginBundle
2929
import shop.itbug.flutterx.manager.FlutterAndroidMigrateManager
3030
import java.awt.Dimension
3131
import java.io.File
@@ -74,16 +74,16 @@ sealed class AndroidMigrateFile(open val file: VirtualFile) {
7474

7575
class AndroidBuildFile(androidBuildFile: VirtualFile) : AndroidMigrateFile(androidBuildFile) {
7676

77-
override fun updatePsi(project: Project, vf: VirtualFile) {
78-
FlutterAndroidMigrateManager.getInstance(project).getNewAndroidBuildFile(vf)
77+
override fun updatePsi(project: Project, file: VirtualFile) {
78+
FlutterAndroidMigrateManager.getInstance(project).getNewAndroidBuildFile(file)
7979
}
8080
}
8181

8282

8383
class AndroidAppBuildFile(androidAppBuildFile: VirtualFile) : AndroidMigrateFile(androidAppBuildFile) {
8484

85-
override fun updatePsi(project: Project, vf: VirtualFile) {
86-
FlutterAndroidMigrateManager.getInstance(project).getNewAppBuildFile(vf)
85+
override fun updatePsi(project: Project, file: VirtualFile) {
86+
FlutterAndroidMigrateManager.getInstance(project).getNewAppBuildFile(file)
8787
}
8888
}
8989

@@ -99,14 +99,12 @@ class AndroidSettingsFile(override val file: VirtualFile) : AndroidMigrateFile(f
9999
* android 适配窗口
100100
*
101101
*/
102-
class FlutterXAndroidMigrateWindow(val project: Project) : BorderLayoutPanel(),
102+
class FlutterXAndroidMigrateWindow(private val project: Project) : BorderLayoutPanel(),
103103
ListSelectionListener {
104104

105105
private val androidService = FlutterAndroidMigrateManager.getInstance(project)
106106
private val sp = OnePixelSplitter()
107107

108-
//将要修改的文件列表
109-
private val willUpdateFiles = mutableSetOf<AndroidMigrateFile>()
110108
private var diffPanel: DiffRequestPanel? = null
111109
private val list = JBList<AndroidMigrateFile>().apply {
112110
model = DefaultListModel()
@@ -137,31 +135,28 @@ class FlutterXAndroidMigrateWindow(val project: Project) : BorderLayoutPanel(),
137135
val findAndroidBuildFile = androidService.findAndroidBuildFile()
138136
if (findAndroidBuildFile != null) {
139137
val file = AndroidBuildFile(findAndroidBuildFile)
140-
willUpdateFiles.add(file)
141138
getListModel().addElement(file)
142139
showDiffWindow(file)
143140
}
144141
val findAppBuildFile = androidService.findAppBuildFile()
145142
if (findAppBuildFile != null) {
146143
val file = AndroidAppBuildFile(findAppBuildFile)
147-
willUpdateFiles.add(file)
148144
getListModel().addElement(file)
149145
}
150146

151147
val settingsFile = androidService.findSettingsFile()
152148
if (settingsFile != null) {
153149
val file = AndroidSettingsFile(settingsFile)
154-
willUpdateFiles.add(file)
155150
getListModel().addElement(file)
156151
}
157-
list.selectedIndex = 0
152+
if (getListModel().size > 0) {
153+
list.selectedIndex = 0
154+
}
158155

159156
}
160157

161158

162-
private fun getListModel(): DefaultListModel<AndroidMigrateFile> {
163-
return list.model as DefaultListModel<AndroidMigrateFile>
164-
}
159+
private fun getListModel(): DefaultListModel<AndroidMigrateFile> = list.model as DefaultListModel<AndroidMigrateFile>
165160

166161

167162
///显示 diff 窗口
@@ -180,34 +175,34 @@ class FlutterXAndroidMigrateWindow(val project: Project) : BorderLayoutPanel(),
180175
diffPanel = panel
181176
sp.secondComponent = panel.component
182177
} else {
183-
diffPanel!!.setRequest(request)
178+
diffPanel?.setRequest(request)
184179
}
185180
}
186181
}
187182

188183
}
189184

190-
private fun createActionsList(): List<AnAction> {
191-
return listOf(FlutterAndroidMigrateAction())
192-
}
185+
private fun createActionsList(): List<AnAction> = listOf(FlutterAndroidMigrateAction())
193186

194187
override fun valueChanged(e: ListSelectionEvent?) {
195-
if (e != null && e.valueIsAdjusting) {
196-
val index = e.firstIndex
197-
if (index >= 0) {
198-
val select = list.selectedValue
199-
showDiffWindow(select)
200-
}
188+
if (e == null || e.valueIsAdjusting) return
189+
val selected = list.selectedValue ?: return
190+
if (list.selectedIndex >= 0) {
191+
showDiffWindow(selected)
201192
}
202193
}
203194
}
204195

205196

206-
class FileListRender(val project: Project) : ColoredListCellRenderer<AndroidMigrateFile>() {
197+
class FileListRender(private val project: Project) : ColoredListCellRenderer<AndroidMigrateFile>() {
207198
override fun customizeCellRenderer(
208-
p0: JList<out AndroidMigrateFile?>, p1: AndroidMigrateFile?, p2: Int, p3: Boolean, p4: Boolean
199+
_list: JList<out AndroidMigrateFile?>,
200+
value: AndroidMigrateFile?,
201+
_index: Int,
202+
_selected: Boolean,
203+
_hasFocus: Boolean,
209204
) {
210-
p1?.let {
205+
value?.let {
211206
icon = it.file.fileType.icon
212207
append(it.findRelativePath(project))
213208
}
@@ -217,15 +212,14 @@ class FileListRender(val project: Project) : ColoredListCellRenderer<AndroidMigr
217212

218213

219214
//将更改应用到项目中
220-
class FlutterAndroidMigrateAction : AnAction("同意这些更改", "", AllIcons.Actions.Checked) {
215+
class FlutterAndroidMigrateAction : AnAction(PluginBundle.get("android.migrate.apply.changes"), "", AllIcons.Actions.Checked) {
221216

222217

223218
override fun actionPerformed(e: AnActionEvent) {
219+
val project = e.project ?: return
224220
val editor = e.getData(DiffDataKeys.DIFF_REQUEST) ?: return
225-
val file = editor.getUserData(FlutterAndroidMigrateManager.FILE)!!
226-
LocalFileSystem.getInstance().apply {
227-
file.doReplace(e.project!!)
228-
}
221+
val file = editor.getUserData(FlutterAndroidMigrateManager.FILE) ?: return
222+
file.doReplace(project)
229223

230224
}
231225

@@ -241,4 +235,4 @@ class FlutterAndroidMigrateAction : AnAction("同意这些更改", "", AllIcons.
241235
override fun getActionUpdateThread(): ActionUpdateThread {
242236
return ActionUpdateThread.BGT
243237
}
244-
}
238+
}

0 commit comments

Comments
 (0)