Skip to content

Commit

Permalink
fix: WebviewBridge
Browse files Browse the repository at this point in the history
  • Loading branch information
dineug committed Feb 8, 2024
1 parent 28de8a3 commit 08151d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class ErdEditor(

is VscodeBridgeAction.VscodeImportFile -> {
// val type = action.payload.type
// val op = action.payload.op
// val extensions = action.payload.accept.split(",")
// .map { it.substringAfterLast(".", "") }
// .toTypedArray()
Expand All @@ -120,18 +121,20 @@ class ErdEditor(
// )
//
// ApplicationManager.getApplication().invokeLater {
// FileChooserFactory.getInstance().createFileChooser(descriptor, null, null).choose(null).also { files ->
// if (files.isEmpty()) {
// return@invokeLater
// }
// FileChooserFactory.getInstance()
// .createFileChooser(descriptor, null, null)
// .choose(null).also { files ->
// if (files.isEmpty()) {
// return@invokeLater
// }
//
// val file = files.first()
// val value = file.inputStream.reader().readText()
// webviewPanel.dispatch(
// WebviewBridgeAction.WebviewImportFile(
// WebviewImportFilePayload(type, value)
// val file = files.first()
// val value = file.inputStream.reader().readText()
// webviewPanel.dispatch(
// WebviewBridgeAction.WebviewImportFile(
// WebviewImportFilePayload(type, op, value)
// )
// )
// )
// }
// }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ sealed class VscodeBridgeAction {
}
}
data class VscodeExportFilePayload(val value: String, val fileName: String)
data class VscodeImportFilePayload(val type: String, val accept: String)
data class VscodeImportFilePayload(val type: String, val op: String, val accept: String)
data class VscodeSaveValuePayload(val value: String)
data class VscodeSaveReplicationPayload(val actions: Any)
data class VscodeSaveThemePayload(val appearance: String, val grayColor: String, val accentColor: String)
Expand All @@ -70,7 +70,7 @@ sealed class WebviewBridgeAction {
val type = "webviewReplication"

Check warning on line 70 in src/main/kotlin/com/github/dineug/erdeditorintellijplugin/editor/WebviewBridge.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Property "type" is never used
}
}
data class WebviewImportFilePayload(val type: String, val value: String)
data class WebviewImportFilePayload(val type: String, val op: String, val value: String)
data class WebviewInitialValuePayload(val value: String)
data class WebviewUpdateThemePayload(val appearance: String?, val grayColor: String?, val accentColor: String?)
data class WebviewReplicationPayload(val actions: Any)

0 comments on commit 08151d9

Please sign in to comment.