def run(self, edit):
"""Run goto declaration command.
Navigates to delcaration of entity located by current position
of cursor.
"""
if not Tools.is_valid_view(self.view):
return
config_manager = EasyClangComplete.view_config_manager
if not config_manager:
return
location = config_manager.trigger_get_declaration_location(self.view)
if location:
loc = location.file.name
loc += ":" + str(location.line)
loc += ":" + str(location.column)
log.debug("Navigating to declaration: %s", loc)
sublime.active_window().open_file(loc, sublime.ENCODED_POSITION)
评论列表
文章目录