axmor / typecs

TypEcs - TypeScript IDE for Eclipse
61 stars 14 forks source link

Renaming ts-files breaks typescript-editor-support #78

Open RasPelikan opened 9 years ago

RasPelikan commented 9 years ago

I created a file test.ts and added some lines of code. Everythings works fine: compiler, viewing errors, code completion.

Then I selected the file in the package-explore pressed F2 (for renaming) and renamed the file to juhu.ts.

After this action the log of "TS Bridge Console" says: [Error: Could not find file: 'src/main/ts/juhu.ts'.]

Then I renamed the file back to 'test.ts' and every is fine again.

According to http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2FresAdv_events.htm renaming is a move-event. For solving issue 75 I had to review the TypeScriptIndexManager and found the place where those events are processed (method "resourceChanged"): Only REMOVED and ADDED deltas are processed. A "move" is not available, only MOVE_FROM and MOVE_TO. I think both events are fired and should be treated as REMOVED and ADDED. Can you investigate this and provide a fix? At the moment I have not setup for debugging eclipse-plugins so I would appreciate I you attend to this.

p-kudrin commented 9 years ago

Tank you for your feedbacks. It seems that there is a more global problem. I catch the same error after creating a new .ts-file. It seems this is due to the move to version 1.5 compiler. I'm going to research this problem.

col-panic commented 9 years ago

Just did a fresh install to try it out ... after creating the first file it started going

[Error: Could not find file: 'src/parkinglot.ts'.]
[Error: Could not find file: 'src/parkinglot.ts'.]
[Error: Could not find file: 'src/parkinglot.ts'.]
[Error: Could not find file: 'src/parkinglot.ts'.]

what to do?? I am a noob in typescript ... thanks

RasPelikan commented 9 years ago

This is another facet of this bug. Renaming or creating. Just restart Eclipse. Afterwards it will pick up the new files correctly.

neo85 commented 8 years ago

Annoying bug. Do i have to restart eclipse every time i need to create a new file?

trendzetter commented 7 years ago

still seems the case..