diff options
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 51947e4cc..5d8acf9df 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -25,6 +25,7 @@ mod call_info; | |||
25 | mod syntax_highlighting; | 25 | mod syntax_highlighting; |
26 | mod parent_module; | 26 | mod parent_module; |
27 | mod rename; | 27 | mod rename; |
28 | mod impls; | ||
28 | 29 | ||
29 | #[cfg(test)] | 30 | #[cfg(test)] |
30 | mod marks; | 31 | mod marks; |
@@ -58,6 +59,7 @@ pub use ra_ide_api_light::{ | |||
58 | pub use ra_db::{ | 59 | pub use ra_db::{ |
59 | Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId | 60 | Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId |
60 | }; | 61 | }; |
62 | pub use hir::Documentation; | ||
61 | 63 | ||
62 | // We use jemalloc mainly to get heap usage statistics, actual performance | 64 | // We use jemalloc mainly to get heap usage statistics, actual performance |
63 | // differnece is not measures. | 65 | // differnece is not measures. |
@@ -266,7 +268,7 @@ impl<T> RangeInfo<T> { | |||
266 | #[derive(Debug)] | 268 | #[derive(Debug)] |
267 | pub struct CallInfo { | 269 | pub struct CallInfo { |
268 | pub label: String, | 270 | pub label: String, |
269 | pub doc: Option<String>, | 271 | pub doc: Option<Documentation>, |
270 | pub parameters: Vec<String>, | 272 | pub parameters: Vec<String>, |
271 | pub active_parameter: Option<usize>, | 273 | pub active_parameter: Option<usize>, |
272 | } | 274 | } |
@@ -415,6 +417,13 @@ impl Analysis { | |||
415 | self.with_db(|db| goto_definition::goto_definition(db, position)) | 417 | self.with_db(|db| goto_definition::goto_definition(db, position)) |
416 | } | 418 | } |
417 | 419 | ||
420 | pub fn goto_implementation( | ||
421 | &self, | ||
422 | position: FilePosition, | ||
423 | ) -> Cancelable<Option<RangeInfo<Vec<NavigationTarget>>>> { | ||
424 | self.with_db(|db| impls::goto_implementation(db, position)) | ||
425 | } | ||
426 | |||
418 | /// Finds all usages of the reference at point. | 427 | /// Finds all usages of the reference at point. |
419 | pub fn find_all_refs(&self, position: FilePosition) -> Cancelable<Vec<(FileId, TextRange)>> { | 428 | pub fn find_all_refs(&self, position: FilePosition) -> Cancelable<Vec<(FileId, TextRange)>> { |
420 | self.with_db(|db| db.find_all_refs(position)) | 429 | self.with_db(|db| db.find_all_refs(position)) |