TypeCobol
TypeCobol copied to clipboard
EI specific : new LSP request typecobol/GetEIRemarksData
What is the current problem
Our private IDZ plugin need to get the list of all our copy of type CPY
.
Describe the solution you'd like
Create a new request named "typecobol/GetEIRemarksData"
specific to EUROINFO.
All its code must be surrounded by #if EUROINFO_RULES / #endif
.
As input:
- TextDocumentIdentifier
This request must first check if copys are correctly downloaded. See CompilationDocument.MissingCopy
and check that it works for stacked and nested programs.
If at least 1 copy is missing, then return an error with ResponseError
:
- Error = TypeCobol.Tools.Options_Config.ReturnCode.MissingCopy
- Message = "Cannot find used copy before all copys are resolved"
If all copys are resolved, the request must provide in the response:
- The list of all copy of type CPY. Use
CompilationDocument.CopyTextNamesVariations
and do the intersection with the list of CPY managed byCopyNameMapFile
.- this list must contains the CPY of the main program, stacked programs and their nested programs resursively (nested inside nested).
- CPY inside CPY must also be returnted. Note : it should already be managed.
- The line following the name of the main program as an
int
.
Cobol code to illustrate
TODO
How to test automatically
- A specific unit test in TypeCobol.Test to check that
CompilationDocument.CopyTextNamesVariations
works for the main program, stacked and their nested resursively (nested inside nested). Also check that COPY inside COPY are detected. This check can be done in C# directly rather than with an expected file. - Standard LSR tests for the request.