vscode-ibmi
vscode-ibmi copied to clipboard
Open path from URI
trafficstars
Changes
- [x] Add new url for opening files at a specific path
- [x] Add improved error handling in the new URI
- [x] When the host is provided, but the user is not connected, then automatically connect if the connection is defined
- [x] Depends on #1975
- [x] Nice to have: make sure Sandbox mode still works
How to test this PR
vscode://halcyontechltd.code-for-ibmi/open?path=/home/liama/xyzvscode://halcyontechltd.code-for-ibmi/open?host=1.1.1.1&path=/home/liama/xyz
Examples:
- Run the test cases
- Expand view A and right click on the node
- Run 'Execute Thing' from the command palette
Checklist
- [ ] have tested my change
- [ ] have created one or more test cases
- [ ] updated relevant documentation
- [ ] Remove any/all
console.logs I added - [ ] have added myself to the contributors' list in CONTRIBUTING.md
👋 A new build is available for this PR based on 7a6a00bd4ae268a49c80030bd1f2c5252ac0714b.
If they have no current connection would it beneficial to allow the user to pick one? Instead of a warning message.
Also I am unsure the purpose of the host param as the below two scenarios arent covered:
- Scenario 1: if you arent connected it doesnt auto connect to the given host, isntead it just gives a warning it cannot open the file. I think it should ask to auto connect if the given host is on the list. If the host is listed more than once then give me the option to pick which connection to initiate
- Scenario 2: if you are connected to the wrong host, it just prompts to open with the current connection. We should also have the option to switch to the correct connection, again if there is more that one listed conneciton to the same host then allow me to pick which connection to initiate
@julesyan Thanks for your great testing.
- Yes, we should automatically connect to the host given it is in the list.
- Right now we don't even have the internal logic to disconnect and reconnect to a new system automatically. Let me see if this is even possible (since we do have APIs to do both separately.)
@julesyan This works now:
vscode://halcyontechltd.code-for-ibmi/open?host=oss74dev&path=/home/LIAMA/hebrew.txt
Tested locally and found no more issues, looks good!