New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copybook not being recognized after being copied down #108
Comments
@davidkjackson54 Did you try just reloading the window instead of exiting and restarting VS Code? I tried the same steps and Opened the Command Pallette, then ran the Developer: Reload Window command. The copybook was then resolved. |
@davidkjackson54 thanks for submitting. This is a great enhancement request. There has to be an event to tell the Language Server that the program file should be reevaluated. For example, if you simply edit the file (just a space somewhere) you see that the missing copybooks are immediately found. I assume that this will be a quite common scenario that developer download the program file, because they want to edit it. Then the errors will immediately go away. But I agree that this should also work without editing the file. For example, we would have to set watchers on the folders that are listed in the property groups that can fire an event right away when the files appear locally. We have to look into that. Until then edit the program file that has the COPY statements (e.g. add a space and do a ctrl-z to undo) is the easiest workaround I could find. Closing and opening the program (just close the editor tab, not the entire VS Code application) also works. |
Thanks Peter .
You are absolutely correct in that a simple change to the source causes the
copybook to then be found.
I have found however that closing the source editor tab (without making a
change ) doesn't have any effect.
David
…On Tue, Jan 12, 2021 at 5:06 PM Peter Haumer ***@***.***> wrote:
@davidkjackson54 <https://github.com/davidkjackson54> thanks for
submitting. This is a great enhancement request. There has to be an event
to tell the Language Server that the program file should be reevaluated.
For example, if you simply edit the file (just a space somewhere) you see
that the missing copybooks are immediately found. I assume that this will
be a quite common scenario that developer download the program file,
because they want to edit it. Then the errors will immediately go away.
But I agree that this should also work without editing the file. For
example, we would have to set watchers on the folders that are listed in
the property groups that can fire an event right away when the files appear
locally. We have to look into that.
Until then edit the program file that has the COPY statements (e.g. add a
space and do a ctrl-z to undo) is the easiest workaround I could find.
Closing and opening the program (just close the editor tab, not the entire
VS Code application) also works.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALAIHNAJL46AIDGG32K6JWTSZTW2TANCNFSM4VAEEZNA>
.
|
Added file watcher support in Z Open Editor 3.1.0. See the release notes for a limitation using libraries that we intend to address in the future. |
I have a VSCode extension that create a tree view. When the user clicks on a source member in the Treeview, it is downloaded with a .COB suffix and z/Open Editor takes over and displays it in the right hand pane.
A Copy statement is flagged as not being found - this is correct.
Whilst leaving the COBOL source member open, I bring down the Cobol copy member using one of our REST api's into the same local directory as the original source and give it a .CPY suffix which I have added in z/Open Editor settings as an acceptable copybook suffix.
The Copy statement is still flagged as 'not found' even though it does not exist. I can somewhat understand that as it has no knowledge that the copy file is now present.
I close the source member editor pane and from my Treeview, I once again open up the local source file - however once again z/Open Editor is still not recognizing the presence of the copybook file.
The only way I can get this to be accepted, is if I close VSCode down entirely and reopen it, then once again click in my Treeview to again present the source back to z/Open Editor. Then the presence of the copy member is recognized.
Development environment used
The text was updated successfully, but these errors were encountered: