Skip to content

Commit a89e295

Browse files
committed
Rename server to adapter inside the dap log
1 parent 8ceb115 commit a89e295

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

crates/debugger_tools/src/dap_log.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ impl LogStore {
102102
fn new(cx: &ModelContext<Self>) -> Self {
103103
let (rpc_tx, mut rpc_rx) = unbounded::<(DebugAdapterClientId, IoKind, String)>();
104104
cx.spawn(|this, mut cx| async move {
105-
while let Some((server_id, io_kind, message)) = rpc_rx.next().await {
105+
while let Some((client_id, io_kind, message)) = rpc_rx.next().await {
106106
if let Some(this) = this.upgrade() {
107107
this.update(&mut cx, |this, cx| {
108-
this.on_rpc_log(server_id, io_kind, &message, cx);
108+
this.on_rpc_log(client_id, io_kind, &message, cx);
109109
})?;
110110
}
111111

@@ -118,10 +118,10 @@ impl LogStore {
118118
let (adapter_log_tx, mut adapter_log_rx) =
119119
unbounded::<(DebugAdapterClientId, IoKind, String)>();
120120
cx.spawn(|this, mut cx| async move {
121-
while let Some((server_id, io_kind, message)) = adapter_log_rx.next().await {
121+
while let Some((client_id, io_kind, message)) = adapter_log_rx.next().await {
122122
if let Some(this) = this.upgrade() {
123123
this.update(&mut cx, |this, cx| {
124-
this.on_adapter_log(server_id, io_kind, &message, cx);
124+
this.on_adapter_log(client_id, io_kind, &message, cx);
125125
})?;
126126
}
127127

@@ -387,7 +387,7 @@ impl Render for DapLogToolbarItemView {
387387
let dap_menu: PopoverMenu<_> = PopoverMenu::new("DapLogView")
388388
.anchor(gpui::Corner::TopLeft)
389389
.trigger(Button::new(
390-
"debug_server_menu_header",
390+
"debug_client_menu_header",
391391
current_client
392392
.map(|sub_item| {
393393
Cow::Owned(format!(
@@ -400,7 +400,7 @@ impl Render for DapLogToolbarItemView {
400400
}
401401
))
402402
})
403-
.unwrap_or_else(|| "No server selected".into()),
403+
.unwrap_or_else(|| "No adapter selected".into()),
404404
))
405405
.menu(move |cx| {
406406
let log_view = log_view.clone();
@@ -434,7 +434,7 @@ impl Render for DapLogToolbarItemView {
434434
.into_any_element()
435435
},
436436
cx.handler_for(&log_view, move |view, cx| {
437-
view.show_log_messages_for_server(sub_item.client_id, cx);
437+
view.show_log_messages_for_adapter(sub_item.client_id, cx);
438438
}),
439439
);
440440
}
@@ -646,7 +646,7 @@ impl DapLogView {
646646
cx.focus(&self.focus_handle);
647647
}
648648

649-
fn show_log_messages_for_server(
649+
fn show_log_messages_for_adapter(
650650
&mut self,
651651
client_id: DebugAdapterClientId,
652652
cx: &mut ViewContext<Self>,
@@ -711,7 +711,7 @@ impl Render for DapLogView {
711711
}
712712
}
713713

714-
actions!(debug, [OpenDebuggerServerLogs]);
714+
actions!(debug, [OpenDebuggerAdapterLogs]);
715715

716716
pub fn init(cx: &mut AppContext) {
717717
let log_store = cx.new_model(|cx| LogStore::new(cx));
@@ -725,7 +725,7 @@ pub fn init(cx: &mut AppContext) {
725725
}
726726

727727
let log_store = log_store.clone();
728-
workspace.register_action(move |workspace, _: &OpenDebuggerServerLogs, cx| {
728+
workspace.register_action(move |workspace, _: &OpenDebuggerAdapterLogs, cx| {
729729
let project = workspace.project().read(cx);
730730
if project.is_local() {
731731
workspace.add_item_to_active_pane(

0 commit comments

Comments
 (0)