-
Notifications
You must be signed in to change notification settings - Fork 28
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
Developer #258
Developer #258
Conversation
Hi @sam94dion |
...ain/java/org/openmainframeproject/cobolcheck/features/interpreter/InterpreterController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openmainframeproject/cobolcheck/workers/Generator.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the pull request - happy that there's more to come. If you can fix the issues I've commented on, I'll approve the Pull Request. It's some good changes, and it seems you have a good understanding of the code :)
...ain/java/org/openmainframeproject/cobolcheck/features/interpreter/InterpreterController.java
Outdated
Show resolved
Hide resolved
line.setUnNumberedString(" **"); | ||
} | ||
if(lineRepository.getFileSectionStatements().size() > 0) { | ||
for(int i=0; i < lineRepository.getFileSectionStatements().size(); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of looping through all file section statements, the method addExpandedCopyDB2Statements
could return the elements that were added, so we only need to look through the new elements.
@@ -25,6 +25,8 @@ public List<String> getTokens() { | |||
return tokens; | |||
} | |||
public String getToken(int index) { return tokens.get(index); } | |||
|
|||
public void setUnNumberedString(String s) {unNumberedString = s;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method invalidates the object, as the tokens, the original string and the other fields are not updated. I do not see the need to specifically set unNumberedString
. Could you refactor the method, so that it takes the original string, and then update all the other fields like it's done in the constructor?
src/main/java/org/openmainframeproject/cobolcheck/features/interpreter/LineRepository.java
Outdated
Show resolved
Hide resolved
...ain/java/org/openmainframeproject/cobolcheck/features/interpreter/InterpreterController.java
Outdated
Show resolved
Hide resolved
Thank you for your kind words :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Samuel
You are required to sign off your commits in order for the pull request to be approved. Please go through your commits and sign them off - it is a bit of a hassle, please do let me know if you are having any trouble :). Make sure to also sign off any future commits.
Please also make sure to not include extensive refactoring along with functional changes in one pull request. It makes it hard to review your functional changes. Extensive refactoring is welcome, but keep it in its own pull request.
Again thank you very much for your contribution.
return convertToStrings(reader.getCurrentStatement()); | ||
} | ||
|
||
//Getting info from reader | ||
public boolean hasStatementBeenRead(){ | ||
public CobolLine getCurrentLineAsStatement() throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary. At line 433 you make sure that the line is read as a statement:
extractedCopyBook = lineRepository.addExpandedCopyDB2Statements(reader.readStatementAsOneLine());
This ensures that the Generator
will write the whole statement. What you are trying to achieve is already handled.
writerController.writeStubbedLine(sourceLine); | ||
if (interpreter.shouldCurrentLineBeStubbed()) { | ||
if(interpreter.isReading(Constants.WORKING_STORAGE_SECTION)) | ||
writerController.writeStubbedLine(interpreter.getCurrentLineAsStatement().getUnNumberedString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary. See comment about getCurrentLineAsStatement
. It will always be written as a statement, by the check at line 161: hasStatementBeenRead()
.
Added fonction to include DB2 copybooks Also when a numeric variable was copied from a copybook it was not taken into account fixed that
Added cursors handling in the working section. Moved the stubbing to the generate class. Added cursor in the DB2PROG example.
Signed-off-by: sam94dion <[email protected]>
Signed-off-by: sam94dion <[email protected]>
Signed-off-by: sam94dion <[email protected]>
Signed-off-by: Samuel <[email protected]>
Signed-off-by: sam94dion <[email protected]> Signed-off-by: Samuel <[email protected]>
…into Developer
Hi @sam94dion |
Add function so one can include DB2 copybooks