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

File Already Exists #123

Closed
wuseal opened this issue Mar 28, 2019 · 13 comments
Closed

File Already Exists #123

wuseal opened this issue Mar 28, 2019 · 13 comments
Labels
Milestone

Comments

@wuseal
Copy link
Owner

wuseal commented Mar 28, 2019

PluginVersion:3.0.1
User Config:

{
  "uuid": "a1b5882e-ec6d-4567-823e-5e0cf5505958",
  "pluginVersion": "3.0.1",
  "isPropertiesVar": false,
  "isCommentOff": true,
  "isOrderByAlphabetical": true,
  "propertyTypeStrategy": "AutoDeterMineNullableOrNot",
  "initWithDefaultValue": false,
  "targetJsonConverterLib": "Gson",
  "isInnerClassMode": false,
  "customAnnotationImportClassString": "import kotlinx.serialization.SerialName\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.Optional",
  "customClassAnnotationFormatString": "@Serializable",
  "customPropertyAnnotationFormatString": "@Optional\n@SerialName(\"%s\")",
  "enableMapType": false,
  "enableAutoReformat": true,
  "enableMinimalAnnotation": false,
  "parenClassTemplate": "",
  "keywordPropertyValid": true,
  "extensionsConfig": "",
  "timeStamp": "1553474343902",
  "daytime": "2019-03-24"
}
com.intellij.util.IncorrectOperationException: Cannot create file 'C:\src\training-master\app\src\main\java\com\example\post_sample\Model\user.kt'. File already exists.
	at com.intellij.psi.impl.file.PsiDirectoryImpl.checkName(PsiDirectoryImpl.java:465)
	at com.intellij.psi.impl.file.PsiDirectoryImpl.checkAdd(PsiDirectoryImpl.java:454)
	at com.intellij.psi.impl.file.PsiJavaDirectoryImpl.checkAdd(PsiJavaDirectoryImpl.java:80)
	at com.intellij.psi.impl.file.PsiDirectoryImpl.add(PsiDirectoryImpl.java:393)
	at com.intellij.psi.impl.file.PsiJavaDirectoryImpl.add(PsiJavaDirectoryImpl.java:65)
	at wu.seal.jsontokotlin.utils.KotlinDataClassFileGenerator$generateKotlinDataClassFile$1.invoke(KotlinDataClassFileGenerator.kt:234)
	at wu.seal.jsontokotlin.utils.KotlinDataClassFileGenerator$generateKotlinDataClassFile$1.invoke(KotlinDataClassFileGenerator.kt:21)
	at wu.seal.jsontokotlin.utils.SimplifiedMethodsKt$executeCouldRollBackAction$1$1.run(SimplifiedMethods.kt:26)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1038)
	at wu.seal.jsontokotlin.utils.SimplifiedMethodsKt$executeCouldRollBackAction$1.run(SimplifiedMethods.kt:25)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:139)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:97)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:87)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:73)
	at wu.seal.jsontokotlin.utils.SimplifiedMethodsKt.executeCouldRollBackAction(SimplifiedMethods.kt:24)
	at wu.seal.jsontokotlin.utils.KotlinDataClassFileGenerator.generateKotlinDataClassFile(KotlinDataClassFileGenerator.kt:231)
	at wu.seal.jsontokotlin.utils.KotlinDataClassFileGenerator.generateMultipleDataClassFiles(KotlinDataClassFileGenerator.kt:66)
	at wu.seal.jsontokotlin.GenerateKotlinFileAction.doGenerateKotlinDataClassFileAction(GenerateKotlinFileAction.kt:101)
	at wu.seal.jsontokotlin.GenerateKotlinFileAction.actionPerformed(GenerateKotlinFileAction.kt:63)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:255)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:272)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:304)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:307)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:106)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:294)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:114)
	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
	at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:114)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:529)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:49)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:549)
	at java.awt.Component.processMouseEvent(Component.java:6548)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
	at java.awt.Component.processEvent(Component.java:6313)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4903)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:817)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:394)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Error Json String:

{
    "user": {
        "id": 29,
        "google_id": null,
        "name": "snoop",
        "email": "[email protected]",
        "image": null,
        "category_id": 1,
        "created_at": "2019-03-22 19:05:33",
        "updated_at": "2019-03-22 19:05:33"
    }
}
@wuseal
Copy link
Owner Author

wuseal commented Mar 28, 2019

How to trigger it:
First, create a new file named user.kt
Then use this plugin to do generate kotlin data class File from json Action with root class name: User
Click generate and then this error will happen

@wuseal
Copy link
Owner Author

wuseal commented Mar 28, 2019

And this JSON with root class name : BetSet will also happen this error

{
	"error_state": {
		"code": 200,
		"description": "SUCCESS"
	},
	"results": {
		"predictions": [{
			"type": "simple",
			"sport": "soccer",
			"risk": "safe",
			"isFree": true,
			"betsets": [{
				"bets": [{
					"type": "home",
					"odds": [{
						"label": "H",
						"value": 1.34,
						"isSuggested": true,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 1.34,
						"isSuggested": false,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 1.34,
						"isSuggested": false,
						"bookmaker": "betclic"
					}],
					"homeTeam": "PSG",
					"awayTeam": "OM",
					"league": "Ligue 1",
					"game_date": "2019-01-01 14h"
				}],
				"probability": 75,
				"totalOdd": 1.34
			}]
		}, {
			"type": "combine",
			"sport": "soccer",
			"risk": "safe",
			"isFree": false,
			"betsets": [{
				"bets": [{
					"type": "home",
					"odds": [{
						"label": "H",
						"value": 1.21,
						"isSuggested": false,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 2.34,
						"isSuggested": true,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 3.42,
						"isSuggested": false,
						"bookmaker": "betclic"
					}],
					"homeTeam": "Manchester City",
					"awayTeam": "Arsenal",
					"league": "Ligue 1",
					"game_date": "2019-01-01 14h"
				}, {
					"type": "home",
					"odds": [{
						"label": "H",
						"value": 1.14,
						"isSuggested": true,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 3.45,
						"isSuggested": false,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 6.5,
						"isSuggested": false,
						"bookmaker": "betclic"
					}],
					"homeTeam": "AS Roma",
					"awayTeam": "Palerme",
					"league": "Ligue 1",
					"game_date": "2019-01-01 14h"
				}],
				"probability": 60,
				"totalOdd": 2.67
			}]
		}, {
			"type": "multiple",
			"sport": "soccer",
			"risk": "risky",
			"isFree": false,
			"betsets": [{
				"bets": [{
					"type": "home",
					"odds": [{
						"label": "H",
						"value": 1.34,
						"isSuggested": true,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 1.34,
						"isSuggested": false,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 1.34,
						"isSuggested": false,
						"bookmaker": "betclic"
					}],
					"homeTeam": "PSG",
					"awayTeam": "OM",
					"league": "Ligue 1",
					"game_date": "2019-01-01 14h"
				}],
				"probability": 60,
				"totalOdd": 1.34
			}, {
				"bets": [{
					"type": "home",
					"odds": [{
						"label": "H",
						"value": 1.34,
						"isSuggested": true,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 1.34,
						"isSuggested": false,
						"bookmaker": "betclic"
					}, {
						"label": "H",
						"value": 1.34,
						"isSuggested": false,
						"bookmaker": "betclic"
					}],
					"homeTeam": "PSG",
					"awayTeam": "OM",
					"league": "Ligue 1",
					"game_date": "2019-01-01 14h"
				}],
				"probability": 60,
				"totalOdd": 1.34
			}]
		}],
		"affiliates": [{
			"partner": "https:\/\/www.top10-sites-paris-sportifs.fr\/wp-content\/uploads\/betclic-tsps.png",
			"bonusAmount": 150,
			"message": "100\u20ac offerts que le pari soit gagnant ou perdant !",
			"link": "http:\/\/google.fr"
		}, {
			"partner": "https:\/\/www.top10-sites-paris-sportifs.fr\/wp-content\/uploads\/betclic-tsps.png",
			"bonusAmount": 150,
			"message": "Pariez sans risques",
			"link": "http:\/\/google.fr"
		}]
	}
}

@wuseal wuseal changed the title File Already Exsist File Already Exists Mar 28, 2019
@wuseal wuseal added the bug label Mar 28, 2019
@kezhenxu94 kezhenxu94 added this to the 3.2.0 milestone Mar 28, 2019
@wuseal wuseal self-assigned this Apr 2, 2019
@Karthik2007
Copy link
Collaborator

@wuseal can I take up this one?

@wuseal
Copy link
Owner Author

wuseal commented Apr 3, 2019

@Karthik2007 Yeah, Of course! That's Great!

@wuseal wuseal removed their assignment Apr 3, 2019
@Karthik2007
Copy link
Collaborator

While Looking into the issue, I ran into another bug. Please check.

Wrongly referenced Renamed class

Steps:
innerclassmodel = false
use plugin to do generate kotlin data class File from json Action with root class name: ff

Json

{
  "user": {
    "id": 29,
    "google_id": null,
    "name": "snoop",
    "email": "[email protected]",
    "image": null,
    "category_id": 1,
    "created_at": "2019-03-22 19:05:33",
    "updated_at": "2019-03-22 19:05:33"
  },
  "owner": {
    "user": {
      "privilege": "owner"
    }
  }
}

Bug: UserX class is generated after renaming but it is not referenced in the Final class structure.

@kezhenxu94
Copy link
Collaborator

While Looking into the issue, I ran into another bug. Please check.

Wrongly referenced Renamed class

Steps:
innerclassmodel = false
use plugin to do generate kotlin data class File from json Action with root class name: ff

Json

{
  "user": {
    "id": 29,
    "google_id": null,
    "name": "snoop",
    "email": "[email protected]",
    "image": null,
    "category_id": 1,
    "created_at": "2019-03-22 19:05:33",
    "updated_at": "2019-03-22 19:05:33"
  },
  "owner": {
    "user": {
      "privilege": "owner"
    }
  }
}

Bug: UserX class is generated after renaming but it is not referenced in the Final class structure.

Thanks for reporting, I've created another issue to track this one, comment under #136 and if you're interested in it, feel free to leave a comment and work on it, thanks

@wuseal
Copy link
Owner Author

wuseal commented Apr 20, 2019

@Karthik2007 For this issue belonged to the plan miles 3.2.0 and it's due by this weekend, we hope this issue could be fixed ahead the end of this weekend, And if any problem, please contact us, Thanks.
Also, If you would like to join us to be collaborator,Feel free to add my wechat account sealkingking, thanks.

@Karthik2007
Copy link
Collaborator

@wuseal Sure. Planning to close this by weekend. Will post an update by tomorrow.

Karthik2007 pushed a commit to Karthik2007/JsonToKotlinClass that referenced this issue Apr 21, 2019
@wuseal
Copy link
Owner Author

wuseal commented Apr 21, 2019

Fixed in version 3.2.0

@wuseal wuseal closed this as completed Apr 21, 2019
@wuseal wuseal added the fixed but not released this issue has been solved but is not released yet label Apr 21, 2019
wuseal pushed a commit that referenced this issue Apr 21, 2019
* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)
@Karthik2007
Copy link
Collaborator

@Karthik2007 For this issue belonged to the plan miles 3.2.0 and it's due by this weekend, we hope this issue could be fixed ahead the end of this weekend, And if any problem, please contact us, Thanks.
Also, If you would like to join us to be collaborator,Feel free to add my wechat account sealkingking, thanks.

@Karthik2007 For this issue belonged to the plan miles 3.2.0 and it's due by this weekend, we hope this issue could be fixed ahead the end of this weekend, And if any problem, please contact us, Thanks.
Also, If you would like to join us to be collaborator,Feel free to add my wechat account sealkingking, thanks.

Hey. Thanks for the invitation. I would be happy to be there.

wuseal pushed a commit that referenced this issue Apr 22, 2019
* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* Update changelog
wuseal pushed a commit that referenced this issue Apr 25, 2019
* upgrade version to 3.1.0-EAP

* Move adding property Annotation function implement into interceptor.

* move init with default value function into interceptor

* move isPropertyVar config function into interceptor

* move order by alphabetical config function into interceptor

* move property nullable or not  config function into interceptor

* adjust unit test to make it to test pass, now only one still not be pass, will fix later

* fix unit test failed case

* Fixed issue #119

* Optimize the way to get PsiDirectory

* re-optimize the way to get PsiDirectory

* Optimize method addProperty

* Optimize getPrimitiveType and getArrayType methods

* Optimize adjustPropertyNameForGettingArrayChildType method

* replace "if statement" with "take if"

* Optimize removeDuplicateClassCode method

* Simplify "generateSingleDataClassFile" method

* Optimize "appendCodeMember" method

* re-Optimize "adjustPropertyNameForGettingArrayChildType" method

* 3.2.0 optimize/code optimize (#138)

* Optimize some recursive methods with "tailrec"

* add String.containsAnyOf(List) method

* Optimize method couldGetAndReuseClassNameInCurrentEditFileForInsertCode

* Optimize http request

* make up send data function logic when send failed

* 3.2.0 (#151)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* [GH-108] Generate Kotlin classes from JSON Schema (#126)

* support generating class from JsonSchema

* Sync

*     support generating class from JsonSchema

* Sync

* Remove checking properties order

* Add unit test

* Support array

* Add more UT

* Update Kotlin version

* Fix UT

* Fix UT

* Add UT

* Reduce stacktrace

* Default value

* Simpify type name

* Default value

* Fix CI

* fix issue #122:just catch UnSupportJsonException like MakeKotlinClassAction do. (#154)

* Polish code and remove deprecated plugin.id (#155)

* 3.2.0 (#159)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* Update changelog

* Update version
wuseal pushed a commit that referenced this issue Apr 26, 2019
* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* 3.2.0 is released, merge it back to master branch (#160)

* upgrade version to 3.1.0-EAP

* Move adding property Annotation function implement into interceptor.

* move init with default value function into interceptor

* move isPropertyVar config function into interceptor

* move order by alphabetical config function into interceptor

* move property nullable or not  config function into interceptor

* adjust unit test to make it to test pass, now only one still not be pass, will fix later

* fix unit test failed case

* Fixed issue #119

* Optimize the way to get PsiDirectory

* re-optimize the way to get PsiDirectory

* Optimize method addProperty

* Optimize getPrimitiveType and getArrayType methods

* Optimize adjustPropertyNameForGettingArrayChildType method

* replace "if statement" with "take if"

* Optimize removeDuplicateClassCode method

* Simplify "generateSingleDataClassFile" method

* Optimize "appendCodeMember" method

* re-Optimize "adjustPropertyNameForGettingArrayChildType" method

* 3.2.0 optimize/code optimize (#138)

* Optimize some recursive methods with "tailrec"

* add String.containsAnyOf(List) method

* Optimize method couldGetAndReuseClassNameInCurrentEditFileForInsertCode

* Optimize http request

* make up send data function logic when send failed

* 3.2.0 (#151)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* [GH-108] Generate Kotlin classes from JSON Schema (#126)

* support generating class from JsonSchema

* Sync

*     support generating class from JsonSchema

* Sync

* Remove checking properties order

* Add unit test

* Support array

* Add more UT

* Update Kotlin version

* Fix UT

* Fix UT

* Add UT

* Reduce stacktrace

* Default value

* Simpify type name

* Default value

* Fix CI

* fix issue #122:just catch UnSupportJsonException like MakeKotlinClassAction do. (#154)

* Polish code and remove deprecated plugin.id (#155)

* 3.2.0 (#159)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* Update changelog

* Update version
@wuseal
Copy link
Owner Author

wuseal commented May 9, 2019

@Karthik2007
Please download Wechat APP and add my account to be friends, My account is: sealkingking, Then we could pull you into the group.

@Karthik2007
Copy link
Collaborator

Thanks @wuseal for the invitation. Happy to be there. I have joined the slack channel.

wuseal pushed a commit that referenced this issue Aug 23, 2019
* Fix Issue #123 - File Already exists

* bug fixed #225

* Test case added for Issue #225

* Test case content added for Issue #225
@wuseal wuseal removed the fixed but not released this issue has been solved but is not released yet label Mar 21, 2020
wuseal pushed a commit that referenced this issue Sep 20, 2021
* upgrade version to 3.1.0-EAP

* Move adding property Annotation function implement into interceptor.

* move init with default value function into interceptor

* move isPropertyVar config function into interceptor

* move order by alphabetical config function into interceptor

* move property nullable or not  config function into interceptor

* adjust unit test to make it to test pass, now only one still not be pass, will fix later

* fix unit test failed case

* Fixed issue #119

* Optimize the way to get PsiDirectory

* re-optimize the way to get PsiDirectory

* Optimize method addProperty

* Optimize getPrimitiveType and getArrayType methods

* Optimize adjustPropertyNameForGettingArrayChildType method

* replace "if statement" with "take if"

* Optimize removeDuplicateClassCode method

* Simplify "generateSingleDataClassFile" method

* Optimize "appendCodeMember" method

* re-Optimize "adjustPropertyNameForGettingArrayChildType" method

* 3.2.0 optimize/code optimize (#138)

* Optimize some recursive methods with "tailrec"

* add String.containsAnyOf(List) method

* Optimize method couldGetAndReuseClassNameInCurrentEditFileForInsertCode

* Optimize http request

* make up send data function logic when send failed

* 3.2.0 (#151)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* [GH-108] Generate Kotlin classes from JSON Schema (#126)

* support generating class from JsonSchema

* Sync

*     support generating class from JsonSchema

* Sync

* Remove checking properties order

* Add unit test

* Support array

* Add more UT

* Update Kotlin version

* Fix UT

* Fix UT

* Add UT

* Reduce stacktrace

* Default value

* Simpify type name

* Default value

* Fix CI

* fix issue #122:just catch UnSupportJsonException like MakeKotlinClassAction do. (#154)

* Polish code and remove deprecated plugin.id (#155)

* 3.2.0 (#159)

* Set theme jekyll-theme-cayman

* Add acknowledgement to JetBrains

* refactored 'settings' to 'advanced'

* Fix typo in README.md

* fix JsonArray.onlyHasOneSubArrayAndAllItemsAreObjectElementRecursive logic error

* add local.properties to .gitignore

* add test

* add issue test

* Rename test method name in Issue121Test

* [Fix] disable gson html escaping to fix format error (#137)

* disable html escaping to fix format error

* fix typo

* add gradle.properties to git ignore

* add saveAndReadExceptionInfo unit test and saveAndReadActionInfo unit test

* Fix #139 Folder .jsontokotlin in $HOME (#141)

Added additional class to provide cache directory.
It used directly, because not approach for IoC presented here.

* Change Action tip #135 (#145)

Changed "Convert Json Into Kotlin Class" to "Kotlin data classes from JSON"

* Fix Issue #123 - File Already exists (#157)

* Update changelog

* Update version
wuseal pushed a commit that referenced this issue Sep 20, 2021
* Fix Issue #123 - File Already exists

* bug fixed #225

* Test case added for Issue #225

* Test case content added for Issue #225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants