Go to Implementation for structs and enums

This commit is contained in:
Jeremy Kolb 2019-01-28 09:26:32 -05:00
parent 48d2acb297
commit 3c17643b30
14 changed files with 279 additions and 18 deletions

View file

@ -25,6 +25,7 @@ mod call_info;
mod syntax_highlighting;
mod parent_module;
mod rename;
mod impls;
#[cfg(test)]
mod marks;
@ -415,6 +416,13 @@ impl Analysis {
self.with_db(|db| goto_definition::goto_definition(db, position))
}
pub fn goto_implementation(
&self,
position: FilePosition,
) -> Cancelable<Option<RangeInfo<Vec<NavigationTarget>>>> {
self.with_db(|db| impls::goto_implementation(db, position))
}
/// Finds all usages of the reference at point.
pub fn find_all_refs(&self, position: FilePosition) -> Cancelable<Vec<(FileId, TextRange)>> {
self.with_db(|db| db.find_all_refs(position))