Open file from tree#12
Conversation
…anager to start to decouple different parts of the app.
…anager to start to decouple different parts of the app.
…open-file-from-tree
There was a problem hiding this comment.
Fwiw, the official Closure docs put the type before the parameter name. I don't know if it also accepts this reverse order (which I actually think is nicer... so maybe it's worth testing whether this will work?)
…in file open command. Small code review fixes.
|
FYI, this is not yet ready for master--waiting on finalizing Ty's pull request for the open file API. |
There was a problem hiding this comment.
We should use JSDoc comment style for top-level declarations
There was a problem hiding this comment.
The first time I read this I thought it meant the browser title bar... should we call it something different to disambiguate?
There was a problem hiding this comment.
Does our FileEntry.file() take an error callback as a 2nd arg, like the PhoneGap one? If so, I wonder if we should add a "TODO" error callback like you did above with the reader. That way we'll have TODOs for all known cases of missing error handling.
Open file from tree - looks good!
merging latest Brackets (Sprint 26) master
Implemented opening a file by clicking on it in the file tree, and also implemented File > Open to show a file dialog that the user can select from.
As part of this, I created a simple CommandManager to start to decouple parts of the UI from each other. When a file in the tree is clicked, the ProjectManager tells the CommandManager to execute the "file.open" command. This command is registered in brackets.js as part of the boot sequence.
Eventually we can add things like key binding, and perhaps undo/redo handling, to the CommandManager. Also, we should consider factoring out some of the code in brackets.js out into a more formal application controller.