aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/lib.rs
diff options
context:
space:
mode:
authorvsrs <[email protected]>2021-02-27 14:59:52 +0000
committervsrs <[email protected]>2021-02-27 15:00:17 +0000
commit5d23d8bc299b718e7f026a7e6c1363dde3342817 (patch)
tree2307bfa224d8b18706b27e1d2756c177872624ac /crates/ide/src/lib.rs
parenta8cf346b972b5e79a3b18de5a7f71e49a228be7c (diff)
Add runnables::related_tests
Diffstat (limited to 'crates/ide/src/lib.rs')
-rw-r--r--crates/ide/src/lib.rs9
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))