jbaron / cats

Code Assistant for TypeScript
Apache License 2.0
408 stars 66 forks source link

New file from menu "File“ #125

Closed MangelMaxime closed 9 years ago

MangelMaxime commented 10 years ago

When we try to add a new file by using the Menu File it's open a new editor area that part is ok. Then when we try to Save the file it's propose the path to the project. And if we save the file where we want it's will create a new file in the filesystem.

The problem, is that the new file created is not linked to the editor area so we need to double clic the new file from the tree view to edit it.

jbaron commented 10 years ago

Right now the new file feature is indeed not perfect. There are two things that would solve this:

1) after clicking new file, the user also has already to provide the name. So before the editor is openend we have all the required info. This would be easiest to implement.

2) after saving, we update the editor with the new name and reinitialize it. Because after knowing the name we know the type of file and the features to re-enable. A bit more tricky, but this how many editors work and possible better experience for the user.

option 2 sounds better, but will have to check how easy it will be to reinit the editor.

On 23 okt. 2014, at 22:36, Maxime Mangel notifications@github.com wrote:

When we try to add a new file by using the Menu File it's open a new editor area that part is ok. Then when we try to Save the file it's propose the path to the project. And if we save the file where we want it's will create a new file in the filesystem.

The problem, is that the new file created is not linked to the editor area so we need to double clic the new file from the tree view to edit it.

— Reply to this email directly or view it on GitHub.

MangelMaxime commented 10 years ago

The other solution is to take the number 1 and create a file, in the directory selected on the tree view and if not let the user choose like now or put at the project root.

Not sure, what people will prefer.

jbaron commented 10 years ago

Is now adding new file to project when saving it (latest unstable build)

MangelMaxime commented 10 years ago

It's working for me. Thanks again.

I leave it open, for if you want to do it another way.