Open FALLAI-Denis opened 3 months ago
The language server requests the files and the extensions retrieves them and sends them back. They are stored in a canonical way in a temp folder and there is a setting to define the root directory. (However, Zowe v3 will make some changes here that we are evaluating.) So your extension could find the file in this folder after executing a File Open command. Providing a documented API for extenders is currently not something we have planned; however I do want to collect such use cases for internal discussion.
Hi @phaumer,
In our context of use, the copybook is not yet referenced in a COBOL program, and therefore ZOE does not know it yet and we cannot find it in the temporary folder. Furthermore it seems to me that for local copybooks ZOE does not copy them into the temporary folder?
See illustration in discussion IBM Z Open Editor User Survey:
Thanks.
Description of the enhancement requested
Hi,
Z Open Editor has a feature to search and download copybooks / includes referenced in a source program. It uses it to provide access to the files containing these copybooks / includes through a clickable hyperlink from the referencing program source code, which opens this copybook / include file in a new editor.
We have developed an internal extension that is an assistant for writing COBOL programs. This assistant has input screens, in the form of webviews, to enter various information including references to copybooks. We would like to offer in these input screens the function of opening files corresponding to copybooks. We could develop our own system for searching and downloading copybooks, but we would find it smarter (and also simpler for us!) to reuse the function already available in Z Open Editor. The copybook search and download function would be useful to us for:
Would it be possible for the Z Open Editor copybook search and download function to be exposed to third-party extensions in the form of an API? The expected result of calling this API, certainly asynchronous promise, would be a path string or a uri object, or an error. Then it is up to us to set up the hyperlink in the input screens of our assistant.
Is this search and download function dependent on the Language Server or only internal to the Z Open Editor extension? If it is dependent on the Language Server, then the exposed API must also ensure the startup of this server.
Thanks.