All language (COBOL first) - Navigate and interact with opened source code in an editor using an API #204
FALLAI-Denis
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
In the issue #193, API for interacting with source code opened in Z Open Editor, I expressed the wish to have at the Z Open Editor level, an API allowing to work on the open source code in an editor.
I have another use case that could be processed by this same API: reference to the source code from a markdown document, either to dynamically include source code in the document, or to trigger a positioning in the source code from the document (hyperlink from the document to the source code).
Technically, it would be necessary to have an API making it possible to reference the abstract syntax tree of the program opened in an editor, and the various nodes of this abstract syntax tree, (type of node, name of the node).
The API functions would be:
API calls should be able to be triggered from a third-party extension, to be developed, but also be supported by a macro system directly at the Z Open Editor level.
The format to support these macros remains to be determined.
If you want to do somewhat sophisticated things with conditions and loops, variables, etc., you have to use a programming language (JavaScript, which would be natural in VS Code, or support from Rexx which is a language commonly used in the mainframe world and Z Open Editor is aimed at mainframers).
In the ISPF/PDF world, equivalent functions exist: these are the "EDIT macros" of the ISREDIT editor. They do not work on a syntax tree, but they allow you to perform the various actions described below, (and even more, such as global search and replace actions, for example).
Reproducing known functionalities in the ISPF/PDF editor would be logical because Z Open Editor is intended to replace this system. For that it must take back the maximum of its functionalities.
See Abstract for ISPF Edit and Edit Macros.
Beta Was this translation helpful? Give feedback.
All reactions