set default path when creating new project, according to the following logic:
path = os.homedir()
if there is an active editor, path = editor.getDirectoryPath()
2.1 if there are also projects open, find project directory associated with the currently active file and set path to parent directory of that directory
2.2 if there are no projects open or the active file isn't part of one, fallthrough case is (2)
if there is no active editor (in (2)), use first project's parent dir
if after 1-3 the default path is undefined (e.g. default buffer is open), set to os.homedir
if all else fails, fallthrough case is (1)
Test Plan
[X] when file is open from a project, default path is parent directory of project root
[X] when no file is open, but there are projects, default path is parent directory of first project root in list
[X] when no files or projects are open, default path is os.homedir
[X] when the default (untitled) file is open (e.g. when making a new window), default path is os.homedir
Summary
set default path when creating new project, according to the following logic:
path = os.homedir()
path = editor.getDirectoryPath()
2.1 if there are also projects open, find project directory associated with the currently active file and set path to parent directory of that directory 2.2 if there are no projects open or the active file isn't part of one, fallthrough case is (2)undefined
(e.g. default buffer is open), set toos.homedir
Test Plan
os.homedir
os.homedir
References
closes T569