Hi,
I agree with both of you.
Anatoly:
Yes, we could come with a clearer description for the Workspace's
tooltip. When I'm reading the text you were referring to, I think it's
too complicated indeed -- at least more complicated than it really is.
Carlos:
Yes, we should be able to create a project without having defined a
Workspace first. I agree with that independantly from the source code
I wrote for the project explorer. But when I add to rewrite the
project explorer widget, I had to make a choice.
The old implementation was very slow: when using a couple of big
projects in it, Spyder's startup time was greatly increased. Not to
mention it was very buggy too: changes in the filesystem were
sometimes not reflected unless restarting Spyder and some file system
manipulations were not working all the time, forcing the user to do
them outside Spyder. A whole file system model was implemented in this
widget and not in the most efficient or intelligent way, so it was
really hard to maintain and the code was full of bug workarounds (a
couple of ugly try: [...] except RuntimeError: [...] to handle cases
where destroyed Qt C++ objects were accessed...).
So, it was really necessary to rewrite this widget from scratch and
when I did it, the cleanest way I found was to use a QFileSystemModel
(multithreaded!) to handle the file system model, together with a
QSortFilterProxyModel to filter this model and show only the project
directories. And the simplest way to work it out was to assume that
project directories were located in a common root directory (the
"Workspace"). So this is the reason why I've introduced the notion of
"Workspace". Otherwise, I would have kept the old concept which was to
create projects anywhere.
So basically, in its current implementation, the project explorer
can't handle a project without a workspace.
Anyway, we could add a "Open recent workspace" option to the File
menu, that's an excellent idea indeed.
Cheers,
Pierre