An example VS Code extension demonstrating how to use the Zowe Explorer extension API. It implements Zowe CLI FTP plugin support for the USS explorer. You can then create Zowe CLI FTP profiles and add them to the USS Zowe Explorer to use the FTP protocol for accessing files instead of zOSMF.
This example will ony work with version 1.2.0 or newer of the Zowe Explorer.
- Install it from the VS Code Marketplace following the instructions described here.
- Test the Zowe Explorer using z/OSMF CLI profiles if you have z/OSMF available.
This example is using the Zowe FTP CLI plugin as a dependency to provide FTP capabilities.
- Go to the Zowe FTP CLI Plugin GitHub repository for instructions for how to install it: https://github.com/zowe/zowe-cli-ftp-plugin
- Create Zowe CLI FTP profile:
zowe profiles create zftp <profile name> -H <host> -u <user> -p <password> -P <port>
- Clone this
vscode-extension-for-zowe-api-sample
repo in a parallel directory:git clone [email protected]:phaumer/vscode-extension-for-zowe-api-sample.git
- Build the VS Code extension with
npm install && npm run build && npm run package
- Install the vsix file using the
Preferences > Extensions
menu or just run this extension from VS Code that has the Zowe Explorer built from the AI branch running with the<F5>
key.
- Start VS Code with the extension installed or via the
<F5>
out of the development workspace as described above. - A message will be shown telling you that activation was successful and that you need to refresh the USS Explorer.
- Do that by click the Refresh icon.
- Then click the
+
icon and you will see your Zowe FTP profile listed in the drop-down. - Select it and it will appear in the USS Explorer.
- Click the Search icon next to it to specify a USS path to list it.
- Try opening and saving files.
TBD, but the rough steps would be:
- Copy the file
src/ZoweExplorerAPI.ts
- Implement classes that implement any of the
IMvs
,IUss
,IJes
interfaces. - Implement a registration method similar to
registerFtpApi()
inextension.ts
that queries the Zowe Explorer API and calls the registration method.