adobe/brackets — pull request #1639 by njx (2012-09-13 06:37:58+00:00)
Title: INITIAL REVIEW: Update path to welcome project in newer builds

@gruehle

This is a proposed fix for #1512. It's a little more code change than I'd like, so I'm just putting this up for initial review now.

The overall changes are:
* Instead of storing projects as just a path string, we store them as a "project info" object, which has the root path as well as a "type". Currently, the only types are "welcome" and "localFolder" (the idea being that in the future we could have other project types, with additional metadata). This applies to the pref for the last opened project as well as the list of recent projects maintained by the recent projects extension.
* When accessing either the last opened project or the recent projects list, we check for the welcome project, and change its root path to be whatever the welcome project is for the currently running source folder.

Note that we don't detect welcome projects from before this sprint, so people upgrading from Sprint 13 to Sprint 14 will still have the old welcome project in their last opened project/recent projects list. (However, the last opened project/recent projects list from older sprints will still be recognized even though they're in a different format.) We'll need to release note this.

The main concerns I have are that there are a fair number of cases that are affected, and the logic in the recent projects dropdown has changed enough that we really need to do a thorough retest. I've tested the ones I could think of, but there might be more.

Here are the cases I can think of, along with their expected behavior:
1. Trash prefs and launch Brackets to get the Getting Started project. Quit Brackets. Restart Brackets with a new source folder. You should see the Getting Started project from the new folder.
2. Trash prefs and launch Brackets to get the Getting Started project. Open another folder, so the recent projects dropdown now has the Getting Started project in it. Quit Brackets. Restart Brackets with a new source folder. The recent projects dropdown should now have the Getting Started project from the new folder.
3. Like (1), but instead of restarting Brackets with a new source folder, just switch the language before relaunching. You should see the Getting Started project for the new language.
4. Like (2), but instead of restarting Brackets with a new source folder, just switch the language before relaunching. You should see the Getting Started project for the new language in the recent projects dropdown.
5. Trash prefs and launch Brackets Sprint 13. Open some folders. Quit Brackets. Launch Brackets Sprint 14. The last opened project and recent projects dropdown should still show what they showed in Sprint 13. (However, the Getting Started project from Sprint 13 will still be there.)

Note that this also means that the last opened project/recent projects won't be saved if you downgrade from >Sprint 14 to