Can we reopen project folder as last open‘s, not user's home folder? #12511
-
I think this is a useful tips. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@ouliuquan do you mean when performing "open folder" you want to see the dialog opened at the last folder opened by the user? If so anything is possible but you likely want to customise the implementation of the "Open Folder" command in a custom extension: theia/packages/workspace/src/browser/workspace-frontend-contribution.ts Lines 139 to 142 in d959af0 theia/packages/workspace/src/browser/workspace-frontend-contribution.ts Lines 312 to 331 in d959af0 We follow the default behavior of displaying the workspace root if a workspace is currently opened, and falling back to the user's home similarly to VS Code. In you custom extension you can try falling back to the previous workspace root if available. |
Beta Was this translation helpful? Give feedback.
@ouliuquan do you mean when performing "open folder" you want to see the dialog opened at the last folder opened by the user?
If so anything is possible but you likely want to customise the implementation of the "Open Folder" command in a custom extension:
theia/packages/workspace/src/browser/workspace-frontend-contribution.ts
Lines 139 to 142 in d959af0
theia/packages/workspace/src/browser/workspace-frontend-contribution.ts
Lines 312 to 331 in d959af0