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
121 stars 48 forks source link

Libraries pane - Add support for deleting libraries and tables #790

Open Zhirong2022 opened 9 months ago

Zhirong2022 commented 9 months ago

Is your feature request related to a problem? Please describe. Open VSC SAS Extension base on main branch. It cannot delete a created library on SAS Libraries pane. And it also has no Keyboard support to delete tables or created library.

Describe the solution you'd like 1.It can delete a created library 2.It can delete a created library or tables through Keyboard

Additional context

  1. Open VSC SAS Extension
  2. Sign in with a valid profile (Viya connection )
  3. Type code below to create a library and tables
    
    cas; caslib _all_ assign;

data casuser.cascars; set sashelp.cars; run;

proc casutil; load data=SASHELP.BASEBALL outcaslib="CASUSER" casout="CASBALL";run;


4. Try to delete the created library
5. Try to delete a table

**Environment**
Client OS: [e.g. Windows 11]
Extension version: [e.g. v1.6.0]
snlwih commented 9 months ago

@Zhirong2022 , your example is for connection to Viya 4. Am I correct in guessing that you also would want to have this for connections of type SAS9 local/remote IOM (and any connection types that we might add in future)?

Side note: This functionality is supported in the Explorer pane of SAS Studio.

scottdover commented 7 months ago

Currently, we have the ability to delete tables using a viya connection. However, this hasn't been tested with CAS tables. For example, if you run...

data work.test;
set sashelp.class;
run;

A work table should be created that you can delete. I'm wondering if the table values are different for cas (I believe we get a readOnly property from the api that we use to determine whether or not we can delete tables or libraries).

In any case, it's worth exploring having keyboard actions for both the content and libraries pane.

Update: We should be able to use keybindings to enable keyboard shortcuts