diff options
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r-- | crates/ra_analysis/src/lib.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index a1d462528..c7e7dc1c0 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs | |||
@@ -20,7 +20,7 @@ use std::{fmt, sync::Arc}; | |||
20 | 20 | ||
21 | use rustc_hash::FxHashMap; | 21 | use rustc_hash::FxHashMap; |
22 | use ra_syntax::{SourceFileNode, TextRange, TextUnit}; | 22 | use ra_syntax::{SourceFileNode, TextRange, TextUnit}; |
23 | use ra_text_edit::AtomTextEdit; | 23 | use ra_text_edit::TextEdit; |
24 | use rayon::prelude::*; | 24 | use rayon::prelude::*; |
25 | use relative_path::RelativePathBuf; | 25 | use relative_path::RelativePathBuf; |
26 | 26 | ||
@@ -159,26 +159,27 @@ impl AnalysisHost { | |||
159 | #[derive(Debug)] | 159 | #[derive(Debug)] |
160 | pub struct SourceChange { | 160 | pub struct SourceChange { |
161 | pub label: String, | 161 | pub label: String, |
162 | pub source_file_edits: Vec<SourceFileNodeEdit>, | 162 | pub source_file_edits: Vec<SourceFileEdit>, |
163 | pub file_system_edits: Vec<FileSystemEdit>, | 163 | pub file_system_edits: Vec<FileSystemEdit>, |
164 | pub cursor_position: Option<FilePosition>, | 164 | pub cursor_position: Option<FilePosition>, |
165 | } | 165 | } |
166 | 166 | ||
167 | #[derive(Debug)] | 167 | #[derive(Debug)] |
168 | pub struct SourceFileNodeEdit { | 168 | pub struct SourceFileEdit { |
169 | pub file_id: FileId, | 169 | pub file_id: FileId, |
170 | pub edits: Vec<AtomTextEdit>, | 170 | pub edit: TextEdit, |
171 | } | 171 | } |
172 | 172 | ||
173 | #[derive(Debug)] | 173 | #[derive(Debug)] |
174 | pub enum FileSystemEdit { | 174 | pub enum FileSystemEdit { |
175 | CreateFile { | 175 | CreateFile { |
176 | anchor: FileId, | 176 | source_root: SourceRootId, |
177 | path: RelativePathBuf, | 177 | path: RelativePathBuf, |
178 | }, | 178 | }, |
179 | MoveFile { | 179 | MoveFile { |
180 | file: FileId, | 180 | src: FileId, |
181 | path: RelativePathBuf, | 181 | dst_source_root: SourceRootId, |
182 | dst_path: RelativePathBuf, | ||
182 | }, | 183 | }, |
183 | } | 184 | } |
184 | 185 | ||