-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Persist and reload ProjectManager's jstree #61
Conversation
…ject tree. When launching, use stored paths to map to jstree node IDs as they are created. Use those IDs to open paths in the tree.
Reviewing |
|
||
// Determine depth of the node by counting path separators. | ||
// Children at the root have depth of zero. | ||
// TODO (jasonsj): PATH_SEPARATOR per native OS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all these in Native File System paths? This seems problematic to use a path separator token here. I think the best would be if this were normalized to file:/// urls, then you could always use this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Does path-utils do that for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will work with file URLS and relative URLS. I just started looking at the native file system and I don't know where a good line is for doing this. I wasn't sure if the shell file APIs should always return things as fileUrls or should the NativeFileSystem be responsible for it? My gut tells me the Shell App should be the one converting to/from file APIs because that's the thing that's going to change on each platform but I don't know if you guys have already talked about this and already thought of where to draw that line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our Entry classes implement the HTML5 filesystem API. The fullPath property is supposed to be an absolute path from the root, prefixed with "/". So we can't use a file URI there. http://dev.w3.org/2009/dap/file-system/pub/FileSystem/#dfn-absolute-path
We can refactor the PATH_SEPARATOR prop based on the file system at a later time. (e.g. Java System.getProperty("file.separator")). S'ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The start of that section in the link says:
The directory separator is '/', regardless of the directory separator used by the underlying system, if any.
So I think you can just remove the TODO here, and put a note in NativeFileSystem that is should normalize paths the same way.
Persist and reload ProjectManager's jstree
This version is required to load and run brackets properly on node-webkit. See requirejs/text#55 for node-specific details. Summary of changes: > rev to 2.0.10 > Merge pull request adobe#61 from AnSavvides/master > Merge pull request adobe#60 from dakota/patch-1 > rev to 2.0.9 > Merge pull request adobe#55 from busykai/master > Fixes adobe#57 xpcshell: windows FileUtils.File does not like / paths > Rev version for 2.0.7 > Fixes adobe#52, handle non-existent files in node > Fixes issue mentioned in comments for requirejs/r.js#221 about Java usage > Merge pull request adobe#49 from fsbdev/patch-1
Fix adobe#50 Fixed process-tick error via submodule update
No description provided.