Beispiel #1
0
 def prepare_menu_data(self, tree_index, datum):
     if datum['refid'] and datum['refid'] in tree_index.data.variables:
         var = tree_index.data.variables[datum['refid']]
         typ = None
         if 'type' in var:
             typ = var['type']
         else:
             warn("no type for variable ref %s" % (var['qualname'], ))
         self.hover = truncate_value(typ, var['value'])
         return trim_dict(var, ['file_line', 'file_name', 'qualname'])
Beispiel #2
0
 def prepare_menu_data(self, tree_index, datum):
     if datum['refid'] and datum['refid'] in tree_index.data.types:
         typ = tree_index.data.types[datum['refid']]
         title = None
         if 'value' in typ:
             title = typ['value']
         else:
             warn('no value for %s %s' % (typ['kind'], typ['qualname']))
         self.hover = truncate_value("", title)
         return trim_dict(typ, ['file_line', 'file_name', 'qualname', 'kind'])
Beispiel #3
0
 def prepare_menu_data(self, tree_index, datum):
     if datum['refid'] and datum['refid'] in tree_index.data.variables:
         var = tree_index.data.variables[datum['refid']]
         typ = None
         if 'type' in var:
             typ = var['type']
         else:
             warn("no type for variable ref %s" % (var['qualname'],))
         self.hover = truncate_value(typ, var['value'])
         return trim_dict(var, ['file_line', 'file_name', 'qualname'])
Beispiel #4
0
 def prepare_menu_data(self, tree_index, datum):
     if datum['refid'] and datum['refid'] in tree_index.data.types:
         typ = tree_index.data.types[datum['refid']]
         title = None
         if 'value' in typ:
             title = typ['value']
         else:
             warn('no value for %s %s' % (typ['kind'], typ['qualname']))
         self.hover = truncate_value("", title)
         return trim_dict(typ,
                          ['file_line', 'file_name', 'qualname', 'kind'])
Beispiel #5
0
 def __init__(self,
              tree_config,
              datum,
              tree_index=None,
              hover=None,
              qualname=None,
              qualname_hash=None):
     super(VariableRef,
           self).__init__(tree_config, datum, tree_index,
                          truncate_value("", datum.get('type')), qualname,
                          qualname_hash)
Beispiel #6
0
 def __init__(self, tree_config, datum, tree_index=None, hover=None, qualname=None, qualname_hash=None):
     super(VariableRef, self).__init__(tree_config, datum, tree_index,
                                       truncate_value("", datum.get('type')), qualname,
                                       qualname_hash)