Fix missed renames in #22632 (#23688)

Fix a bug where a GPUI macro still used `ModelContext`
Rename `AsyncAppContext` -> `AsyncApp`
Rename update_model, read_model, insert_model, and reserve_model to
update_entity, read_entity, insert_entity, and reserve_entity

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2025-01-26 15:37:34 -08:00 committed by GitHub
parent 83141d07e9
commit a6b1514246
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
118 changed files with 708 additions and 757 deletions

View file

@ -104,7 +104,7 @@ async fn test_host_disconnect(
.unwrap();
//TODO: focus
assert!(cx_b.update_window_model(&editor_b, |editor, window, _| editor.is_focused(window)));
assert!(cx_b.update_window_entity(&editor_b, |editor, window, _| editor.is_focused(window)));
editor_b.update_in(cx_b, |editor, window, cx| editor.insert("X", window, cx));
cx_b.update(|_, cx| {
@ -208,7 +208,7 @@ async fn test_newline_above_or_below_does_not_move_guest_cursor(
.unwrap();
let cx_a = cx_a.add_empty_window();
let editor_a = cx_a
.new_window_model(|window, cx| Editor::for_buffer(buffer_a, Some(project_a), window, cx));
.new_window_entity(|window, cx| Editor::for_buffer(buffer_a, Some(project_a), window, cx));
let mut editor_cx_a = EditorTestContext {
cx: cx_a.clone(),
@ -224,7 +224,7 @@ async fn test_newline_above_or_below_does_not_move_guest_cursor(
.await
.unwrap();
let editor_b = cx_b
.new_window_model(|window, cx| Editor::for_buffer(buffer_b, Some(project_b), window, cx));
.new_window_entity(|window, cx| Editor::for_buffer(buffer_b, Some(project_b), window, cx));
let mut editor_cx_b = EditorTestContext {
cx: cx_b.clone(),
@ -327,7 +327,7 @@ async fn test_collaborating_with_completion(cx_a: &mut TestAppContext, cx_b: &mu
.await
.unwrap();
let cx_b = cx_b.add_empty_window();
let editor_b = cx_b.new_window_model(|window, cx| {
let editor_b = cx_b.new_window_entity(|window, cx| {
Editor::for_buffer(buffer_b.clone(), Some(project_b.clone()), window, cx)
});
@ -1206,7 +1206,7 @@ async fn test_share_project(
.unwrap();
let editor_b =
cx_b.new_window_model(|window, cx| Editor::for_buffer(buffer_b, None, window, cx));
cx_b.new_window_entity(|window, cx| Editor::for_buffer(buffer_b, None, window, cx));
// Client A sees client B's selection
executor.run_until_parked();
@ -1313,7 +1313,7 @@ async fn test_on_input_format_from_host_to_guest(
.await
.unwrap();
let cx_a = cx_a.add_empty_window();
let editor_a = cx_a.new_window_model(|window, cx| {
let editor_a = cx_a.new_window_entity(|window, cx| {
Editor::for_buffer(buffer_a, Some(project_a.clone()), window, cx)
});
@ -1435,7 +1435,7 @@ async fn test_on_input_format_from_guest_to_host(
.await
.unwrap();
let cx_b = cx_b.add_empty_window();
let editor_b = cx_b.new_window_model(|window, cx| {
let editor_b = cx_b.new_window_entity(|window, cx| {
Editor::for_buffer(buffer_b, Some(project_b.clone()), window, cx)
});
@ -2195,10 +2195,10 @@ async fn test_collaborating_with_editorconfig(
.await
.unwrap();
let cx_a = cx_a.add_empty_window();
let main_editor_a = cx_a.new_window_model(|window, cx| {
let main_editor_a = cx_a.new_window_entity(|window, cx| {
Editor::for_buffer(main_buffer_a, Some(project_a.clone()), window, cx)
});
let other_editor_a = cx_a.new_window_model(|window, cx| {
let other_editor_a = cx_a.new_window_entity(|window, cx| {
Editor::for_buffer(other_buffer_a, Some(project_a), window, cx)
});
let mut main_editor_cx_a = EditorTestContext {
@ -2229,10 +2229,10 @@ async fn test_collaborating_with_editorconfig(
.await
.unwrap();
let cx_b = cx_b.add_empty_window();
let main_editor_b = cx_b.new_window_model(|window, cx| {
let main_editor_b = cx_b.new_window_entity(|window, cx| {
Editor::for_buffer(main_buffer_b, Some(project_b.clone()), window, cx)
});
let other_editor_b = cx_b.new_window_model(|window, cx| {
let other_editor_b = cx_b.new_window_entity(|window, cx| {
Editor::for_buffer(other_buffer_b, Some(project_b.clone()), window, cx)
});
let mut main_editor_cx_b = EditorTestContext {