How does Eclipse populate the Project Explorer? Where on the filesystem is the list of current projects stored and in what format?
If I move a project directory Bar/Foo from some workbench Bar/ to some other workbench Baz/, and then open Baz/ as current workbench, project Foo does not show up. Clearly Eclipse is not using existance of directories in the workbench directory to find projects.
Projects are declared in the workspace. You have to import or create the project to have them exist. Their existence is stored in some area in the .metadata folder in the workspace.
If you want to get the list of projects through the API, you will need the Resources API.
To get the list specifically, this is the call: