purduesigbots / pros-atom3

Provides integration with the PROS 3.x ecosystem
https://pros.cs.purdue.edu
Mozilla Public License 2.0
7 stars 0 forks source link

🚸 add default path when creating new project #8

Closed HotelCalifornia closed 6 years ago

HotelCalifornia commented 6 years ago

Summary

set default path when creating new project, according to the following logic:

  1. path = os.homedir()
  2. 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)
  3. if there is no active editor (in (2)), use first project's parent dir
  4. if after 1-3 the default path is undefined (e.g. default buffer is open), set to os.homedir
  5. if all else fails, fallthrough case is (1)

Test Plan

References

closes T569