GWT-538: make code more generic, to solve some inconsistencies: selection of role in assignment tabs + disable subtabs on deselection
GWT-538: make generic to avoid code duplication.
checkstyle.