(self, api, resource)
Add GWT-specific annotations and naming schemes.
Add GWT-specific annotations and naming schemes.
Add GWT - specific annotations and naming schemes .
def AnnotateResource(self, api, resource):
    """Add GWT-specific annotations and naming schemes."""
    super(GwtGenerator, self).AnnotateResource(api, resource)
    parent_list = resource.ancestors[1:]
    parent_list.append(resource)
    parent_classes = [p.values.get('className') for p in parent_list]
    resource.SetTemplateValue('contextCodeType', '.'.join(parent_classes))
    # for the codeName, we do not lowercase my code name
    code_name = '_'.join(parent_classes[0:-1]).lower()
    if code_name:
      code_name += '_'
    code_name += resource.codeName
    resource.SetTemplateValue('contextCodeName', code_name)
def AnnotateResource ( self , api , resource ) : super ( GwtGenerator , self ) . AnnotateResource ( api , resource ) parent_list = resource . ancestors [ 1 : ] parent_list . append ( resource ) parent_classes = [ p . values . get ( 'className' ) for p in parent_list ] resource . SetTemplateValue ( 'contextCodeType' , '.' . join ( parent_classes ) ) # for the codeName, we do not lowercase my code name code_name = '_' . join ( parent_classes [ 0 : - 1 ] ) . lower ( ) if code_name : code_name += '_' code_name += resource . codeName resource . SetTemplateValue ( 'contextCodeName' , code_name )