Community
Participate
Working Groups
I200406090800. Tod has mentioned some concerns over the large if statement structure used to look up labels and match them to identifiers. This seems cumbersome, and should be looked over again.
The method is cumbersome, but I did not want to create new state (such as a map) for the sake of readability. I reorganized the code a bit to move the string matching to a separate method. This improves the readability of the button creation code, and also allows for multiple if/return statements in the new method, which is a bit more readable than the old code. More importantly, I changed the id used when a match is not found. It was using the loop index to assign the button id, which could cause id collisions depending on the buttons provided. Instead I use IDialogConstants.CLIENT_ID as the id if a match is not found, incrementing it each time used. Available >20050822.
Looks good in I20050920-0010
*** Bug 90840 has been marked as a duplicate of this bug. ***