diff options
Diffstat (limited to 'crates/ide/src')
-rw-r--r-- | crates/ide/src/lib.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index 52c7f9775..a75cc85b6 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs | |||
@@ -490,8 +490,18 @@ impl Analysis { | |||
490 | .unwrap_or_default()) | 490 | .unwrap_or_default()) |
491 | } | 491 | } |
492 | 492 | ||
493 | /// Computes assists (aka code actions aka intentions) for the given | ||
494 | /// position. Computes enough info to show the lightbulb list in the editor, | ||
495 | /// but doesn't compute actual edits, to improve performance. | ||
496 | /// | ||
497 | /// When the user clicks on the assist, call `resolve_assists` to get the | ||
498 | /// edit. | ||
499 | pub fn assists(&self, config: &AssistConfig, frange: FileRange) -> Cancelable<Vec<Assist>> { | ||
500 | self.with_db(|db| Assist::unresolved(db, config, frange)) | ||
501 | } | ||
502 | |||
493 | /// Computes resolved assists with source changes for the given position. | 503 | /// Computes resolved assists with source changes for the given position. |
494 | pub fn resolved_assists( | 504 | pub fn resolve_assists( |
495 | &self, | 505 | &self, |
496 | config: &AssistConfig, | 506 | config: &AssistConfig, |
497 | frange: FileRange, | 507 | frange: FileRange, |
@@ -499,16 +509,6 @@ impl Analysis { | |||
499 | self.with_db(|db| assists::Assist::resolved(db, config, frange)) | 509 | self.with_db(|db| assists::Assist::resolved(db, config, frange)) |
500 | } | 510 | } |
501 | 511 | ||
502 | /// Computes unresolved assists (aka code actions aka intentions) for the given | ||
503 | /// position. | ||
504 | pub fn unresolved_assists( | ||
505 | &self, | ||
506 | config: &AssistConfig, | ||
507 | frange: FileRange, | ||
508 | ) -> Cancelable<Vec<Assist>> { | ||
509 | self.with_db(|db| Assist::unresolved(db, config, frange)) | ||
510 | } | ||
511 | |||
512 | /// Computes the set of diagnostics for the given file. | 512 | /// Computes the set of diagnostics for the given file. |
513 | pub fn diagnostics( | 513 | pub fn diagnostics( |
514 | &self, | 514 | &self, |