'Return current object (string)'

def get_current_object(self):

    source_code = to_text_string(self.toPlainText())
    offset = self.get_position('cursor')
    return sourcecode.get_primary_at(source_code, offset)
