sassoftware / vscode-sas-extension

This SAS Extension for Visual Studio Code provides support for the SAS language, including features such as SAS syntax highlighting, code completion, hover help, code folding, outline, SAS code snippets and run SAS code.
https://sassoftware.github.io/vscode-sas-extension/
Apache License 2.0
117 stars 47 forks source link

Add default folder of data download from library #952

Open ShuguangSun opened 5 months ago

ShuguangSun commented 5 months ago

Is your feature request related to a problem? Please describe. Now it default to to the root path of the system (remote development) or the some folder vscode last used, and I need many steps to find the target folder.

Describe the solution you'd like Set the default folder the vscode workspace or a worksapce customable variable (e.g. "${workspaceFolder}/csv")

scnwwu commented 5 months ago

Does the VS Code setting files.dialog.defaultPath help?

ShuguangSun commented 5 months ago

It seems not helpful.

snlwih commented 3 months ago

@ShuguangSun, depending on the connection type used, we have a download option in one or more panels. For example, a Viya 4 connection has a download option in the SAS Explorer panel and in the SAS Libraries panel. And as the items shown in those panels are of different type, would it make sense for the extension to remember for each of those panels what the last-used download location was for that panel?

And it sounds like you would want it to remember that in the context of a VSCode workspace as well, right? Meaning that if you have multiple VSCode workspaces, you would like it to remember the last-used download location for that panel for the specific workspace that is active. Right?

Btw. does VSCode workspace support a generic setting for workspace default folder? Reason for asking is that if the download option is used the first time in a VSCode workspace, and there is no "last-used" SAS panel specific location yet, we might default to the workspace default folder.

Btw. this is just brainstorming the User eXperience, I have no idea whether this is technically feasible at all.

ShuguangSun commented 2 months ago

Here is an example how to handle the issue: https://github.com/RandomFractals/vscode-data-preview/blob/master/src/data.preview.ts#L728 . It uses 'rootPath' workspace folder for saving remote data file.