Move imports locator to ide_db
This commit is contained in:
parent
ec23030e16
commit
dfbe96750b
4 changed files with 11 additions and 11 deletions
|
@ -3,9 +3,9 @@
|
|||
use either::Either;
|
||||
use ra_assists::{AssistAction, AssistLabel};
|
||||
use ra_db::{FilePosition, FileRange};
|
||||
use ra_ide_db::RootDatabase;
|
||||
use ra_ide_db::{imports_locator::ImportsLocatorIde, RootDatabase};
|
||||
|
||||
use crate::{imports_locator::ImportsLocatorIde, FileId, SourceChange, SourceFileEdit};
|
||||
use crate::{FileId, SourceChange, SourceFileEdit};
|
||||
|
||||
pub use ra_assists::AssistId;
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ mod syntax_highlighting;
|
|||
mod parent_module;
|
||||
mod references;
|
||||
mod impls;
|
||||
mod imports_locator;
|
||||
mod assists;
|
||||
mod diagnostics;
|
||||
mod syntax_tree;
|
||||
|
|
|
@ -3,22 +3,22 @@
|
|||
|
||||
use hir::{db::HirDatabase, ModuleDef, SourceBinder};
|
||||
use ra_assists::ImportsLocator;
|
||||
use ra_ide_db::{
|
||||
defs::NameKind,
|
||||
symbol_index::{self, FileSymbol},
|
||||
RootDatabase,
|
||||
};
|
||||
use ra_prof::profile;
|
||||
use ra_syntax::{ast, AstNode, SyntaxKind::NAME};
|
||||
|
||||
use crate::{references::classify_name, Query};
|
||||
use crate::{
|
||||
defs::classify_name,
|
||||
defs::NameKind,
|
||||
symbol_index::{self, FileSymbol, Query},
|
||||
RootDatabase,
|
||||
};
|
||||
|
||||
pub(crate) struct ImportsLocatorIde<'a> {
|
||||
pub struct ImportsLocatorIde<'a> {
|
||||
source_binder: SourceBinder<'a, RootDatabase>,
|
||||
}
|
||||
|
||||
impl<'a> ImportsLocatorIde<'a> {
|
||||
pub(crate) fn new(db: &'a RootDatabase) -> Self {
|
||||
pub fn new(db: &'a RootDatabase) -> Self {
|
||||
Self { source_binder: SourceBinder::new(db) }
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ pub mod feature_flags;
|
|||
pub mod symbol_index;
|
||||
pub mod change;
|
||||
pub mod defs;
|
||||
pub mod imports_locator;
|
||||
mod wasm_shims;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
|
Loading…
Add table
Reference in a new issue