diff options
Diffstat (limited to 'crates/ide/src/lib.rs')
-rw-r--r-- | crates/ide/src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index b600178ee..baa80cf43 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs | |||
@@ -445,6 +445,15 @@ impl Analysis { | |||
445 | self.with_db(|db| runnables::runnables(db, file_id)) | 445 | self.with_db(|db| runnables::runnables(db, file_id)) |
446 | } | 446 | } |
447 | 447 | ||
448 | /// Returns the set of tests for the given file position. | ||
449 | pub fn related_tests( | ||
450 | &self, | ||
451 | position: FilePosition, | ||
452 | search_scope: Option<SearchScope>, | ||
453 | ) -> Cancelable<Vec<Runnable>> { | ||
454 | self.with_db(|db| runnables::related_tests(db, position, search_scope)) | ||
455 | } | ||
456 | |||
448 | /// Computes syntax highlighting for the given file | 457 | /// Computes syntax highlighting for the given file |
449 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HlRange>> { | 458 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HlRange>> { |
450 | self.with_db(|db| syntax_highlighting::highlight(db, file_id, None, false)) | 459 | self.with_db(|db| syntax_highlighting::highlight(db, file_id, None, false)) |