eclipse-typescript icon indicating copy to clipboard operation
eclipse-typescript copied to clipboard

"Move" feature incomplete

Open xmehaut opened this issue 10 years ago • 2 comments

Hello, I would suggest an improvement in the "move" feature of a ts/tsx file. If I try to move a file to another directory, the "import... from ..." statement is not updated accordingly to the new folder where th file is placed in... Could it be done svp? Thanks xavier

xmehaut avatar Dec 10 '15 07:12 xmehaut

Unfortunately, as far as I know its not an operation supported natively by the TypeScript language services so it would likely need to be implemented directly in the Eclipse plug-in (which would potentially be hacky depending upon what is required). If its something that the Visual Studio editor supports, perhaps you could convince the TypeScript team to implement the functionality in a way that would work for other editors using the language service. It may also already be supported in the language service in which case hooking it up may be easy.

derekcicerone-zz avatar Dec 10 '15 07:12 derekcicerone-zz

as far as I know its not an operation supported natively by the TypeScript language services

Your suspicion is correct. I do have a function : https://github.com/TypeStrong/atom-typescript/blob/9a5c29ffe11ab0e5944bad4a24d9e17b83cb5717/lib/main/lang/modules/moveFiles.ts#L18 But even I didn't hook it up since atom tree doesn't provide a rename hook :rose:

basarat avatar Dec 12 '15 00:12 basarat