Skip to content

Fix renaming regression and minor typo - #1

Merged
Rouche merged 2 commits into
Rouche:masterfrom
giovannipessiva:master
Jan 6, 2018
Merged

Fix renaming regression and minor typo#1
Rouche merged 2 commits into
Rouche:masterfrom
giovannipessiva:master

Conversation

@giovannipessiva

Copy link
Copy Markdown

Renaming (Alt + Shift + R) did not work on Oxygen2, I got this error:

java.lang.RuntimeException: Error parsing result: [{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Commons.ts","textSpan":{"start":10,"length":6},"isWriteAccess":true,"isDefinition":true},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Commons.ts","textSpan":{"start":137,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/util/Utils.ts","textSpan":{"start":10121,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/util/Utils.ts","textSpan":{"start":10133,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Event.ts","textSpan":{"start":608,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Event.ts","textSpan":{"start":824,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Event.ts","textSpan":{"start":882,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":541,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":2403,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":3347,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":3611,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":3948,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractScene.ts","textSpan":{"start":677,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractScene.ts","textSpan":{"start":2591,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/util/Input.ts","textSpan":{"start":6311,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/game/Game.ts","textSpan":{"start":3535,"length":6},"isWriteAccess":false,"isDefinition":false}]
at com.palantir.typescript.services.Bridge.call(Bridge.java:104)
at com.palantir.typescript.services.language.LanguageEndpoint.findRenameLocations(LanguageEndpoint.java:164)
at com.palantir.typescript.text.FileLanguageService.findRenameLocations(FileLanguageService.java:78)
at com.palantir.typescript.text.TypeScriptRenameProcessor.createChange(TypeScriptRenameProcessor.java:102)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.createChange(ProcessorBasedRefactoring.java:288)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:122)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:207)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "isDefinition" (class com.palantir.typescript.services.language.RenameLocation), not marked as ignorable (2 known properties: "fileName", "textSpan"])
at [Source: [{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Commons.ts","textSpan":{"start":10,"length":6},"isWriteAccess":true,"isDefinition":true},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Commons.ts","textSpan":{"start":137,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/util/Utils.ts","textSpan":{"start":10121,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/util/Utils.ts","textSpan":{"start":10133,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Event.ts","textSpan":{"start":608,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Event.ts","textSpan":{"start":824,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/model/Event.ts","textSpan":{"start":882,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":541,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":2403,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":3347,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":3611,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractGrid.ts","textSpan":{"start":3948,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractScene.ts","textSpan":{"start":677,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/AbstractScene.ts","textSpan":{"start":2591,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/core/util/Input.ts","textSpan":{"start":6311,"length":6},"isWriteAccess":false,"isDefinition":false},{"fileName":"eclipse:/ProjectL4W/client/modules/game/Game.ts","textSpan":{"start":3535,"length":6},"isWriteAccess":false,"isDefinition":false}]; line: 1, column: 148] (through reference chain: java.util.ArrayList[0]->com.palantir.typescript.services.language.RenameLocation["isDefinition"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62)
at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:855)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1083)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1389)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1367)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:230)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:404)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1123)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:298)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:277)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3789)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2817)
at com.palantir.typescript.services.Bridge.call(Bridge.java:102)
... 10 more

I fixed this by modifying RenameLocation.java (probably there is a better way, but this do the trick).
I also fixed a typo in the readme file: "maven" instead of "mvn"

@Rouche

Rouche commented Jan 6, 2018

Copy link
Copy Markdown
Owner

Nice catch for the Alt+Shift+R, never used it to be honest in TS editor

On windows its really mvn. Wich platform are you?
image

Edit: I just checked, the command line is mvn on Linux too. Ill merge but i need to keep the "mvn package"

@giovannipessiva

Copy link
Copy Markdown
Author

Exactly, it is "mvn", but the README reported it as "maven" (this is my commit: 0ca4e35)

@Rouche
Rouche merged commit f427974 into Rouche:master Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants