Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
TBH I don't understand the use case as it is working for me. So you removed the setComplete flag management but it looks ok for me. Can you describe the scenario ?
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.
You can create CRC adapter without this change?
I can unfortunately reply with the same: TBH I have no idea why it does not work without this change...
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.
Problem is that one cannot get finish button enabled even if he uses proper crc binary and pull secret file.
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.
Working good with 14.12.0.AM1.B5884
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.
That's before the error occured. Can you please try newer one? I was reproducing this on B5949.
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.
It came to me (I did not thoroughly check all the logical paths) that before there was no use of this setComplete method and logic whether enabled the button is here: https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.cdk.server/src/org/jboss/tools/openshift/internal/cdk/server/ui/CDKServerWizardFragment.java#L63
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.
I am taking back my previous statement. You seems to be right that how it is implemented should be ok and finish should get enabled after validation. BUT, it does not work. I will try to dig a bit more.
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.
It seems that there is something wrong in the sequence of calling some of CRC100ServerWizardFragment.PullSecretModifyListener#modifyText() -> CDKServerWizardFragment#validate() and CRC100ServerWizardFragment#findError(boolean) and CDKServerWizardFragment#isComplete().
Thing is, if CRC100ServerWizardFragment#findError(boolean) sets every time property complete to false here, it is ok when findError is called from validate, since the validate then sets complete property to correct value but it is not alright then findError is called from isComplete from the parent because the statement combines also super.isComplete which findError before sets to false, it never evaluates to true and finish button is never enabled.
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.
@jeffmaury ^^
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.
In short I think it is pointless to toggle completeness in findError at all because if findError method would return anything else than null it would not evaluate isComplete to true anyway.