eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.96k stars 2.5k forks source link

Closing a workspace should not update the file recentWorkspace.json #2998

Open lmcbout opened 6 years ago

lmcbout commented 6 years ago

When I open a second workspace, the "current" workspace is the last one openned. If I select the top corner "X" of the previous workspace to close it since I don't need it anymore, it refreshes the file "/.theia/recentworkspace.json", so making the current workspace the wrong one. Closing a workspace should not refresh the file "recentWorkspace.json". Depending the order the workspaces are closed would make on the next restart of the server the last closed workspace as the current one. The last edited workspace should be the current one, not the last one closed.

vince-fugnitto commented 5 years ago

Perhaps the correct implementation would be to set the current workspace whenever a new workspace is opened, and not when it is closed?

Imagine the following scenario:

  1. workspace a is opened, it is therefore set as the current workspace in recentworkspace.json.
  2. a new window is opened with workspace b, it is set as the current workspace.
  3. workspace a is closed, recentworkspace.json is not updated, keeping b as the recent.