Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.7.0 #30

Merged
merged 16 commits into from
Oct 17, 2023
124 changes: 97 additions & 27 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@

val dartVersion: String by project
val flutterVersion: String by project
val sinceBuildVersion: String by project
val untilBuildVersion: String by project
val ideaVersion: String by project
val ideaType: String by project
val pluginVersion: String by project

plugins {
id("org.jetbrains.kotlin.jvm") version "1.9.0-RC"
id("org.jetbrains.intellij") version "1.15.0"
id("org.jetbrains.kotlin.plugin.serialization") version "1.8.21"
id("org.jetbrains.intellij") version "1.16.0"
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.20-RC"
}
group = "shop.itbug"
version = "3.5.1.as"
version = pluginVersion

repositories {
mavenCentral()
google()
Expand All @@ -16,20 +26,20 @@ repositories {




intellij {
version.set("2022.3.1.18")
type.set("AI")
version.set(ideaVersion)
type.set(ideaType)
plugins.set(
listOf(
"yaml",
"Dart:223.8950",
"io.flutter:74.0.3",
"Dart:$dartVersion",
"io.flutter:$flutterVersion",
"org.intellij.plugins.markdown",
"terminal"
"terminal",
)
)
}

kotlin {
sourceSets.all {
languageSettings {
Expand All @@ -41,25 +51,18 @@ kotlin {
}

dependencies {
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.5")
implementation("cn.hutool:hutool-all:5.8.15")
implementation("org.smartboot.socket:aio-core:1.6.3")
implementation("com.alibaba.fastjson2:fastjson2:2.0.25")
implementation("com.alibaba.fastjson2:fastjson2-kotlin:2.0.25")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("com.google.code.gson:gson:2.10.1")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
implementation("org.xerial:sqlite-jdbc:3.40.1.0")
implementation("io.ktor:ktor-client-cio-jvm:2.2.4")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
implementation("com.squareup.retrofit2:retrofit:latest.release")
implementation("com.squareup.retrofit2:converter-gson:latest.release")
implementation("cn.hutool:hutool-all:latest.release")
implementation("org.smartboot.socket:aio-core:latest.release")
implementation("com.alibaba.fastjson2:fastjson2:latest.release")
implementation("com.alibaba.fastjson2:fastjson2-kotlin:latest.release")
implementation("com.google.code.gson:gson:latest.release")
implementation("org.xerial:sqlite-jdbc:latest.release")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:latest.release")
}





var javaVersion = "17"
tasks {

Expand All @@ -76,10 +79,77 @@ tasks {
}

patchPluginXml {
sinceBuild.set("223")
untilBuild.set("223.*")
sinceBuild.set(sinceBuildVersion)
untilBuild.set(untilBuildVersion)
changeNotes.set(
"""
<div>
<h1>3.7.0</h1>
<ul>
<li>Dependency version detection using <pre>ExternalAnnotator</pre> override</li>
<li>Change the plugin name to: FlutterX</li>
<li>Removed Hive tool window, functionality is currently under development</li>
<li>Subsequent version update logs are only written in English</li>
<li>Add the 'Ignore Dependency Version Detection' feature</li>
<img src='https://github.com/mdddj/dd_flutter_idea_plugin/blob/3.7.0/images/do_not_check.png?raw=true' />
<li>
New parameter inline display
<img src='https://github.com/mdddj/dd_flutter_idea_plugin/blob/3.7.0/images/inlay_param_new.png?raw=true' />
</li>

</ul>
</div>

<div>
<h1>3.6.1</h1>
<ul>
<li>Bug 修复</li>
</ul>
<hr/>
<ul>
<li>Bug fix</li>
</ul>
<hr/>
<ul>
<li>bug修復</li>
</ul>
<hr/>
<ul>
<li>けっかん修复</li>
</ul>
<hr/>
<ul>
<li>결함修复</li>
</ul>
</div>

<div>
<h1>3.6.0</h1>
<ul>
<li>Bug 修复</li>
<li>添加shared_preferences查看工具</li>
</ul>
<hr/>
<ul>
<li>Bug fix</li>
<li>Add `shared_Preferences` viewing tool</li>
</ul>
<hr/>
<ul>
<li>bug修復</li>
<li>添加“shared_Preferences”查看工具</li>
</ul>
<hr/>
<ul>
<li>けっかん修复</li>
<li>shared _ Preferences表示ツールの追加</li>
</ul>
<hr/>
<ul>
<li>결함修复</li>
<li>shared_Preferences 보기 도구 추가</li>
</ul>
</div>
<div>
<h1>3.5.1.as (2023-07-27)</h1>
<ul>
Expand Down
26 changes: 24 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
kotlin.stdlib.default.dependency = true
kotlin.stdlib.default.dependency=true
kotlin.incremental.useClasspathSnapshot=false
kotlin.experimental.tryK2=true
kotlin.experimental.tryK2=true
pluginVersion=3.7.3
# AS release version : https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
dartVersion=223.8950
flutterVersion=75.1.2
sinceBuildVersion=223
untilBuildVersion=232.*
ideaVersion=2022.3.1.18
ideaType=AI
# AS Canary version : https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
#dartVersion=232.9559.10
#flutterVersion=75.1.4
#sinceBuildVersion=232
#untilBuildVersion=232.*
#ideaVersion=2023.2.1.7
#ideaType=AI
# idea eap
#dartVersion=232.9559.10
#flutterVersion=75.1.4
#sinceBuildVersion=232
#untilBuildVersion=232.*
#ideaVersion=LATEST-EAP-SNAPSHOT
#ideaType=IC
45 changes: 45 additions & 0 deletions hive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Hive - Use of toolbars

To use this tool, add `dd_check_plugin` with a version number greater than or equal to `3.0.2`

```yaml
dd_check_plugin: ^3.0.2
```

# example

```dart

void main() {
DdCheckPlugin().init(Dio(),
initHost: '127.0.0.1', //Replace it with your PC's native IP
port: 9999, //Replace it with your dio listening port, which defaults to 9999
projectName: "app project name",
extend: [

///Here, add your box list here
///It needs to implement the DdPluginHiveBox interface
HiveToolManager(boxList: [
DemoHiveBox()
])
]
);
}

```

```dart

class DemoHiveBox implements DdPluginHiveBox<String> {


@override
String get boxName => 'demo_box';

@override
Future<Box<String>> get getBox => Hive.isBoxOpen(boxName) ? Future.value(Hive.box(boxName)) : Hive.openBox(boxName);

}

```

Binary file added images/WX20230923-155830@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/do_not_check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inlay_param_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions note.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```kotlin
//重新分析文件
DaemonCodeAnalyzer.getInstance(project).restart(it)
```
1 change: 0 additions & 1 deletion src/main/kotlin/note/jdbc/SqliteConnect.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ object SqliteConnectManager {
}
Class.forName("org.sqlite.JDBC")
connect = DriverManager.getConnection("jdbc:sqlite:$filePath")
println("连接数据库成功!")
} catch (e: SQLException) {
println("连接sql失败:$e")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package shop.itbug.fluttercheckversionx.actions

import com.alibaba.fastjson2.JSON
import com.alibaba.fastjson2.JSONWriter
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import shop.itbug.fluttercheckversionx.common.MyAction
import shop.itbug.fluttercheckversionx.document.copyTextToClipboard
Expand Down Expand Up @@ -43,4 +44,8 @@ class ApiCopyAll:MyAction({"Copy All"}) {
e.presentation.isEnabled = e.api()!=null
super.update(e)
}

override fun getActionUpdateThread(): ActionUpdateThread {
return ActionUpdateThread.BGT
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package shop.itbug.fluttercheckversionx.actions

import cn.hutool.core.util.URLUtil
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import shop.itbug.fluttercheckversionx.common.MyAction
import shop.itbug.fluttercheckversionx.document.copyTextToClipboard
Expand All @@ -14,7 +15,7 @@ class ApiCopyPathAction: MyAction({"Copy Path"}) {
val path = URLUtil.getPath(url)

path.copyTextToClipboard().apply {
e.apiListProject()?.toast("Copy succeeded!")
e.project?.toast("Copy succeeded!")
}
}

Expand All @@ -23,4 +24,8 @@ class ApiCopyPathAction: MyAction({"Copy Path"}) {
super.update(e)
}

override fun getActionUpdateThread(): ActionUpdateThread {
return ActionUpdateThread.BGT
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package shop.itbug.fluttercheckversionx.actions

import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.components.service
import shop.itbug.fluttercheckversionx.common.jsonToFreezedRun
import shop.itbug.fluttercheckversionx.form.socket.getDataString
import shop.itbug.fluttercheckversionx.form.socket.isParseToJson
import shop.itbug.fluttercheckversionx.socket.service.AppService


///json 转 freezed
class DioRequestBodyToFreezedAction : AnAction() {


override fun actionPerformed(e: AnActionEvent) {
val currentSelectRequest = service<AppService>().currentSelectRequest
e.project?.jsonToFreezedRun(currentSelectRequest!!.getDataString())
}

override fun getActionUpdateThread(): ActionUpdateThread {
return ActionUpdateThread.EDT
}

override fun update(e: AnActionEvent) {
val currentSelectRequest = service<AppService>().currentSelectRequest
e.presentation.isEnabled = currentSelectRequest?.isParseToJson() == true
super.update(e)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package shop.itbug.fluttercheckversionx.actions

import com.alibaba.fastjson2.JSON
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.DataKey
import com.intellij.openapi.project.Project
import shop.itbug.fluttercheckversionx.form.components.ApiListPanel
import com.intellij.openapi.components.service
import shop.itbug.fluttercheckversionx.form.socket.Request
import shop.itbug.fluttercheckversionx.socket.service.AppService


fun Request.getDataJson() : Any {
Expand All @@ -18,10 +17,7 @@ fun Request.getDataJson() : Any {
return data ?: ""
}

///获取当前选中的项目
fun AnActionEvent.api(): Request? {
return getData(DataKey.create(ApiListPanel.SELECT_KEY))
return service<AppService>().currentSelectRequest
}

fun AnActionEvent.apiListProject() : Project? {
return getData(DataKey.create(ApiListPanel.PROJECT_KEY))
}
Loading