IBM / zopeneditor-about

IBM Z Open Editor: File issues here!
https://ibm.github.io/zopeneditor-about
Apache License 2.0
51 stars 20 forks source link

ZAPP Files in multiroot workspace settings #408

Open kraabrsg opened 6 months ago

kraabrsg commented 6 months ago

Maybe similar to https://github.com/IBM/zopeneditor-about/issues/350 https://github.com/IBM/zopeneditor-about/issues/342

Hi!

Our project includes several vscode extensions, and we would like to integration zowe explorer and z open editor for cobol.

We use a multiroot workspace , the structure is as follows:

Multiroot workspace folder    xxx.code-workspace file     PR-xxx-1 (Product release folder)         mycob1.cob (cobol source code)         mycob2.cob (cobol source code)     PR-xxx-2 (Product release folder)         mycob1.cob (cobol source code)         mycob3.cob (cobol source code)     PR-yyy-1 (Product release folder)     zowe.config.user.json file     zowe.schema.json file

We plan to place the zapp file in the first folder (hier PR-xxx-1) and want to "feed" this file with some variables.

It is possible that we have the same source code file (here mycob1.cob ) in more than one release (locally it links to the same folder containing the file ).

We need to provide per product release folder different search locations with the ZAPP file.

e.g. when openening mycob1.cob in Folder Pr-xxx-1 1.) user.lib 2.) xxx-1-test 3.) xxx-1-beta 4.) xxx-1-prod 5.) anylib.zzz

when opening mycob1.cob in Folder Pr-xxx-2 1.) user.lib 2.) xxx-2-test 3.) xxx-2-beta 4.) xxx-2-prod 5.) anylib.zzz

Options to fix this:

  1. when a user opens a cobol file trigger on "before file open" to change of the zopeneditor.zapp.variables in the multiroot workspace file (not tried yet)
  2. make a settings.json in every product release folder to set the zopeneditor.zapp.variables
  3. a zapp file for every single root workspace, but that does not work because the scanning is not restricted to the single root workspace. (preferred method but is not supported)

Is it possible to add option 3, or is there another way to solve this ?

Thanks!

FALLAI-Denis commented 6 months ago

Hi,

I completed the description of my request #350 with a proposal to be able to declare the download folder from mvs in the zapp.yaml file. See:

phaumer commented 6 months ago

Thanks for the discussion on this topic. We do want to improve scoping for applications organized in folders and will take all your input into our discussion, so please keep the ideas coming.

At the moment in multi-root workspaces property groups from multiple ZAPP files are evaluated globally as they get appended into one list in the order in which the workspaces are listed in the .code-workspace file. Variables are global as well. So scoping is needed indeed.

kraabrsg commented 6 months ago

Please consider something like this as api call, to be able for advanced usage with z open editor ( and improves multiroot workspace handling )

1.)Our Extension would look like:

image

2.)Zapp Extension would look like this: image

3.)internal call in z open editor: image