From a85a2c4d151d9d2e8fb016d76aad99a6ca88bc75 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 11 May 2021 16:15:31 +0200 Subject: Allow viewing the crate graph in a webview --- crates/ide/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ide/src/lib.rs') diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index 8e5b72044..34360501a 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -49,6 +49,7 @@ mod syntax_tree; mod typing; mod markdown_remove; mod doc_links; +mod view_crate_graph; use std::sync::Arc; @@ -287,6 +288,10 @@ impl Analysis { self.with_db(|db| view_hir::view_hir(&db, position)) } + pub fn view_crate_graph(&self) -> Cancelable> { + self.with_db(|db| view_crate_graph::view_crate_graph(&db)) + } + pub fn expand_macro(&self, position: FilePosition) -> Cancelable> { self.with_db(|db| expand_macro::expand_macro(db, position)) } -- cgit v1.2.3