-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a stack overflow bug
- Loading branch information
seal
committed
Mar 12, 2018
1 parent
088259d
commit f5e28d8
Showing
12 changed files
with
193 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<idea-plugin> | ||
<id>wu.seal.tool.jsontokotlin</id> | ||
<name>JsonToKotlinClass</name> | ||
<version>1.7.1</version> | ||
<name>JSON To Kotlin Class (JsonToKotlinClass)</name> | ||
<version>1.7.2</version> | ||
<vendor email="[email protected]" url="https://www.github.com/wuseal">Seal</vendor> | ||
|
||
<description><![CDATA[ | ||
|
@@ -15,7 +15,7 @@ | |
]]></description> | ||
|
||
<change-notes><![CDATA[ | ||
Rename back to JsonToKotlinClass for an Unknow exception cause the plugin unable to use on Android Studio.</br> | ||
Fix a stack overflow bug</br> | ||
1.Custom Annotation support multiple annotations on class and multiple annotations on property | ||
,With this function you could add extract annotation on class like `@Parcelize` | ||
,and also you could custom the annotation format to make it support `kotlinx.serializable` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
package wu.seal.jsontokotlin.feedback | ||
|
||
import com.intellij.ide.plugins.PluginManager | ||
import com.intellij.openapi.extensions.PluginId | ||
import wu.seal.jsontokotlin.ConfigManager | ||
import wu.seal.jsontokotlin.test.TestConfig | ||
|
||
/** | ||
* Flag relative | ||
* Created by Seal.Wu on 2017/9/25. | ||
*/ | ||
|
||
val PLUGIN_VERSION = if (TestConfig.isTestModel.not()){ | ||
PluginManager.getPlugin(PluginId.getId("wu.seal.tool.jsontokotlin"))?.version.toString() | ||
} else "1.X" | ||
|
||
val UUID = if (ConfigManager.userUUID.isEmpty()) { | ||
val uuid = java.util.UUID.randomUUID().toString() | ||
ConfigManager.userUUID = uuid | ||
uuid | ||
} else ConfigManager.userUUID | ||
} else ConfigManager.userUUID | ||
|
||
|
||
val PLUGIN_NAME = "JSON To Kotlin Class" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package wu.seal.jsontokotlin.utils | ||
|
||
import com.intellij.openapi.diagnostic.LoggerRt | ||
import wu.seal.jsontokotlin.feedback.PLUGIN_NAME | ||
import wu.seal.jsontokotlin.test.TestConfig | ||
import java.util.logging.Logger | ||
|
||
/** | ||
* Created by Seal.Wu on 2018/3/12. | ||
*/ | ||
internal object LogUtil { | ||
|
||
fun i(info: String) { | ||
if (TestConfig.isTestModel) { | ||
Logger.getLogger(PLUGIN_NAME).info(info) | ||
} else { | ||
LoggerRt.getInstance(PLUGIN_NAME).info(info) | ||
} | ||
} | ||
|
||
fun w(warning: String) { | ||
if (TestConfig.isTestModel) { | ||
Logger.getLogger(PLUGIN_NAME).warning(warning) | ||
} else { | ||
LoggerRt.getInstance(PLUGIN_NAME).warn(warning) | ||
} | ||
} | ||
|
||
fun e(message: String, e: Throwable) { | ||
if (TestConfig.isTestModel) { | ||
e.printStackTrace() | ||
} else { | ||
LoggerRt.getInstance(PLUGIN_NAME).error(message,e) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ class KPropertyTest { | |
} | ||
|
||
println("getPropertyStringBlock:\n$propertyStringBlock") | ||
|
||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters