diff --git a/build.gradle.kts b/build.gradle.kts
index 5ec85aa8..0396fc3c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,3 @@
-
val dartVersion: String by project
val flutterVersion: String by project
val sinceBuildVersion: String by project
@@ -83,6 +82,14 @@ tasks {
untilBuild.set(untilBuildVersion)
changeNotes.set(
"""
+
+
3.8.0
+
+ - Add compact mode layout to the Dio url list
+ - Add Hive tool, document:document (Bete))
+ - Optimize partial connection logic
+
+
3.7.0
diff --git a/gradle.properties b/gradle.properties
index 2ca6a817..ce45f626 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,7 +1,7 @@
kotlin.stdlib.default.dependency=true
kotlin.incremental.useClasspathSnapshot=false
kotlin.experimental.tryK2=true
-pluginVersion=3.7.3
+pluginVersion=3.8.0
# AS release version : https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
dartVersion=223.8950
flutterVersion=75.1.2
diff --git a/src/main/kotlin/shop/itbug/fluttercheckversionx/activity/FlutterProjectOpenActivity.kt b/src/main/kotlin/shop/itbug/fluttercheckversionx/activity/FlutterProjectOpenActivity.kt
index fa30b481..dc61a6cf 100644
--- a/src/main/kotlin/shop/itbug/fluttercheckversionx/activity/FlutterProjectOpenActivity.kt
+++ b/src/main/kotlin/shop/itbug/fluttercheckversionx/activity/FlutterProjectOpenActivity.kt
@@ -21,7 +21,6 @@ import shop.itbug.fluttercheckversionx.config.GenerateAssetsClassConfig
import shop.itbug.fluttercheckversionx.icons.MyIcons
import shop.itbug.fluttercheckversionx.services.FlutterService
import shop.itbug.fluttercheckversionx.services.Release
-import shop.itbug.fluttercheckversionx.util.CacheUtil
import shop.itbug.fluttercheckversionx.util.MyDartPsiElementUtil
import shop.itbug.fluttercheckversionx.util.RunUtil
@@ -57,6 +56,9 @@ class FlutterProjectOpenActivity : StartupActivity.Background, Disposable {
fun run(project: Project) {
///监听assets资源目录更改事件
+ if (project.isDisposed) {
+ return
+ }
connect = project.messageBus.connect(this)
connect.subscribe(VirtualFileManager.VFS_CHANGES, object :
BulkFileListener {
@@ -78,15 +80,6 @@ class FlutterProjectOpenActivity : StartupActivity.Background, Disposable {
}
})
- cleanPubPluginsCache()
-
- CacheUtil.clean()
- }
-
-
- ///清理插件的数据缓存
- private fun cleanPubPluginsCache() {
- CacheUtil.clean()
}
diff --git a/src/main/kotlin/shop/itbug/fluttercheckversionx/fix/NewVersionFix.kt b/src/main/kotlin/shop/itbug/fluttercheckversionx/fix/NewVersionFix.kt
deleted file mode 100644
index efc0413e..00000000
--- a/src/main/kotlin/shop/itbug/fluttercheckversionx/fix/NewVersionFix.kt
+++ /dev/null
@@ -1,40 +0,0 @@
-package shop.itbug.fluttercheckversionx.fix
-
-import com.intellij.codeInspection.LocalQuickFixOnPsiElement
-import com.intellij.openapi.project.Project
-import com.intellij.psi.PsiElement
-import com.intellij.psi.PsiFile
-import org.jetbrains.yaml.YAMLElementGenerator
-import org.jetbrains.yaml.psi.impl.YAMLKeyValueImpl
-import shop.itbug.fluttercheckversionx.i18n.PluginBundle
-import shop.itbug.fluttercheckversionx.model.PubVersionDataModel
-import shop.itbug.fluttercheckversionx.util.CacheUtil
-
-
-/**
- * 存在新版本的快速修复
- */
-class NewVersionFix(
- psiElement: PsiElement,
- private val newVersion: String,
- private val pubVersionDataModel: PubVersionDataModel,
- val invokeCallback: () -> Unit
-) : LocalQuickFixOnPsiElement(psiElement) {
-
- override fun getFamilyName(): String {
- return " ${PluginBundle.get("replace.with")}:$newVersion"
- }
-
- override fun getText(): String {
- return familyName
- }
-
- override fun invoke(project: Project, file: PsiFile, startElement: PsiElement, endElement: PsiElement) {
- val pluginName = (startElement as YAMLKeyValueImpl).keyText
- val newElement = YAMLElementGenerator.getInstance(project).createYamlKeyValue(pluginName, newVersion)
- startElement.replace(newElement)
- CacheUtil.remove(pubVersionDataModel.name)
- invokeCallback()
- }
-
-}
diff --git a/src/main/kotlin/shop/itbug/fluttercheckversionx/hive/action/HiveTutorialHelp.kt b/src/main/kotlin/shop/itbug/fluttercheckversionx/hive/action/HiveTutorialHelp.kt
index fe32234f..0afa26ac 100644
--- a/src/main/kotlin/shop/itbug/fluttercheckversionx/hive/action/HiveTutorialHelp.kt
+++ b/src/main/kotlin/shop/itbug/fluttercheckversionx/hive/action/HiveTutorialHelp.kt
@@ -1,5 +1,6 @@
package shop.itbug.fluttercheckversionx.hive.action
+import com.intellij.ide.BrowserUtil
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
@@ -7,8 +8,9 @@ import com.intellij.openapi.actionSystem.AnActionEvent
//hive使用文档 // todo 编写使用文档
class HiveTutorialHelp : AnAction() {
+ val url = "https://github.com/mdddj/dd_flutter_idea_plugin/blob/master/hive.md"
override fun actionPerformed(e: AnActionEvent) {
- println("前往文档")
+ BrowserUtil.browse(url)
}
override fun getActionUpdateThread(): ActionUpdateThread {
diff --git a/src/main/kotlin/shop/itbug/fluttercheckversionx/notif/PubPluginVersionCheckNotification.kt b/src/main/kotlin/shop/itbug/fluttercheckversionx/notif/PubPluginVersionCheckNotification.kt
index f380315c..a07ff6fa 100644
--- a/src/main/kotlin/shop/itbug/fluttercheckversionx/notif/PubPluginVersionCheckNotification.kt
+++ b/src/main/kotlin/shop/itbug/fluttercheckversionx/notif/PubPluginVersionCheckNotification.kt
@@ -15,7 +15,6 @@ import io.flutter.sdk.FlutterSdkUtil
import shop.itbug.fluttercheckversionx.dialog.SearchDialog
import shop.itbug.fluttercheckversionx.i18n.PluginBundle
import shop.itbug.fluttercheckversionx.icons.MyIcons
-import shop.itbug.fluttercheckversionx.util.CacheUtil
import shop.itbug.fluttercheckversionx.util.getPubspecYAMLFile
import shop.itbug.fluttercheckversionx.window.AllPluginsCheckVersion
import java.util.function.Function
@@ -37,7 +36,7 @@ class PubPluginVersionCheckNotification : EditorNotificationProvider {
if (filename != "pubspec.yaml") {
return@Function null
}
- if(!FlutterSdkUtil.hasFlutterModules(project)){
+ if (!FlutterSdkUtil.hasFlutterModules(project)) {
return@Function null
}
YamlFileNotificationPanel(it, project)
@@ -64,13 +63,6 @@ class YamlFileNotificationPanel(private val fileEditor: FileEditor, val project:
myLinksPanel.add(searchPluginLabel)
- //清理缓存
- val cleanCacheBtn = createActionLabel(PluginBundle.get("clean.cache")) {
- CacheUtil.clean()
- }
- myLinksPanel.add(cleanCacheBtn)
-
-
//重新索引
// val reIndex = createActionLabel("扫描未使用的包") {
// ApplicationManager.getApplication().run {
diff --git a/src/main/kotlin/shop/itbug/fluttercheckversionx/util/CacheUtil.kt b/src/main/kotlin/shop/itbug/fluttercheckversionx/util/CacheUtil.kt
deleted file mode 100644
index 7189bfbe..00000000
--- a/src/main/kotlin/shop/itbug/fluttercheckversionx/util/CacheUtil.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package shop.itbug.fluttercheckversionx.util
-
-import com.google.common.cache.Cache
-import com.google.common.cache.CacheBuilder
-import shop.itbug.fluttercheckversionx.model.PubVersionDataModel
-import java.util.concurrent.TimeUnit
-
-
-object CacheUtil {
-
- private val cache: Cache = CacheBuilder.newBuilder()
- .initialCapacity(1)
- .maximumSize(1000)
- .expireAfterWrite(1, TimeUnit.DAYS)
- .build()
-
-
- fun getCatch(): Cache {
- return cache
- }
-
- fun set(name: String, model: PubVersionDataModel) {
- cache.put(name, model)
- }
-
-
- fun remove(name: String) {
- cache.invalidate(name)
- }
-
- fun clean() {
- cache.invalidateAll()
- }
-}
\ No newline at end of file