File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed
src/main/kotlin/com/github/zhangruiyu/flutterjsonbeanfactory Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ object GsonUtil {
101101 `in `.endArray()
102102 list
103103 }
104+
104105 JsonToken .BEGIN_OBJECT -> {
105106 val map: MutableMap <String , Any ?> =
106107 LinkedTreeMap ()
@@ -111,6 +112,7 @@ object GsonUtil {
111112 `in `.endObject()
112113 map
113114 }
115+
114116 JsonToken .STRING -> `in `.nextString()
115117 JsonToken .NUMBER -> {
116118 /* *
@@ -125,11 +127,13 @@ object GsonUtil {
125127 0.0
126128 }
127129 }
130+
128131 JsonToken .BOOLEAN -> `in `.nextBoolean()
129132 JsonToken .NULL -> {
130133 `in `.nextNull()
131134 null
132135 }
136+
133137 else -> throw IllegalStateException ()
134138 }
135139 }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ class JsonUtils {
2424 }
2525 return returnData
2626 }
27+
2728 is List <* > -> {
2829 if (data.isEmpty()) return listOf<String >()
2930 return if (data.first() is Map <* , * >) {
@@ -42,6 +43,7 @@ class JsonUtils {
4243 }
4344
4445 }
46+
4547 else -> {
4648 return data
4749 }
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import com.intellij.openapi.project.Project
1313/* *
1414 * do the action that could be roll-back
1515 */
16- fun Project?.executeCouldRollBackAction ( action : (Project ? ) -> Unit ) {
16+ fun Project?.executeCouldRollBackAction (action : (Project ? ) -> Unit ) {
1717 CommandProcessor .getInstance().executeCommand(this , {
1818 ApplicationManager .getApplication().runWriteAction {
1919 action.invoke(this )
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class FileGenerator(private val project: Project) {
3939// builder.append("\n")
4040 builder.append(getJSONFieldContent())
4141 val jsonConvertContent = builder.toString()
42- FileHelpers .getJsonConvertJsonFiledFile(project,pubSpecConfig.generatedPath) { file ->
42+ FileHelpers .getJsonConvertJsonFiledFile(project, pubSpecConfig.generatedPath) { file ->
4343 psiManager.findFile(file)?.let { dartFile ->
4444 documentManager.getDocument(dartFile)?.let { document ->
4545 if (document.text != jsonConvertContent) {
You can’t perform that action at this time.
0 commit comments