File tree Expand file tree Collapse file tree 3 files changed +33
-15
lines changed
kotlin/irony/pycharm/qsseditor Expand file tree Collapse file tree 3 files changed +33
-15
lines changed Original file line number Diff line number Diff line change 1313package irony.pycharm.qsseditor
1414import com.intellij.openapi.diagnostic.logger
1515import kotlinx.serialization.json.*
16- import okhttp3.OkHttpClient
17- import okhttp3.Request
18- import okhttp3.WebSocket
19- import okhttp3.WebSocketListener
16+ import okhttp3.*
2017import java.util.concurrent.TimeUnit
2118
2219private val Log = logger<QSSClient >()
@@ -37,14 +34,14 @@ class QSSClient : WebSocketListener() {
3734 }
3835
3936 override fun onOpen (
40- webSocket : okhttp3. WebSocket ,
41- response : okhttp3. Response ,
37+ webSocket : WebSocket ,
38+ response : Response ,
4239 ) {
4340 Log .debug(" onOpen" )
4441 }
4542
4643 override fun onMessage (
47- webSocket : okhttp3. WebSocket ,
44+ webSocket : WebSocket ,
4845 text : String ,
4946 ) {
5047 Log .debug(" onMessage: $text " )
@@ -65,7 +62,7 @@ class QSSClient : WebSocketListener() {
6562 }
6663
6764 override fun onClosing (
68- webSocket : okhttp3. WebSocket ,
65+ webSocket : WebSocket ,
6966 code : Int ,
7067 reason : String ,
7168 ) {
@@ -78,9 +75,9 @@ class QSSClient : WebSocketListener() {
7875 }
7976
8077 override fun onFailure (
81- webSocket : okhttp3. WebSocket ,
78+ webSocket : WebSocket ,
8279 t : Throwable ,
83- response : okhttp3. Response ? ,
80+ response : Response ? ,
8481 ) {
8582 Log .warn(" onFailure, ${t.message} " )
8683 if (done) {
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ package irony.pycharm.qsseditor
1212
1313import com.intellij.openapi.diagnostic.logger
1414import com.intellij.openapi.project.Project
15- import com.intellij.openapi.startup.StartupActivity
15+ import com.intellij.openapi.startup.ProjectActivity
1616
1717private val Log = logger<QSSStartup >()
1818
19- internal class QSSStartup : StartupActivity {
20- override fun runActivity (project : Project ) {
19+ class QSSStartup : ProjectActivity {
20+ override suspend fun execute (project : Project ) {
2121 // 启动客户端连接
2222 Log .info(" project[${project.name} ] opened" )
2323 QSSClient .connect(QSSState .instance.host, QSSState .instance.port)
Original file line number Diff line number Diff line change 1414 Simple HTML elements (text formatting, paragraphs, and lists) can be added inside of <![CDATA[ ]]> tag.
1515 Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-description -->
1616 <description ><
24+
25+ ## Notice
26+
27+ Must Install Proxy Server from [QSSEditor](https://github.com/PyQt5/QSSEditor/releases) first
28+
29+ ## Configure
30+
31+ `vscode` Setting Panel, search `QSSEditor`
32+
33+ - auto apply
34+ - server host
35+ - server port
36+
37+ ## Preview
38+
39+ 
1940 ]]> </description >
2041
2142 <!-- Product and plugin compatibility requirements.
You can’t perform that action at this time.
0 commit comments