debugger: More tidy up for SSH (#28993)
Split `locator` out of DebugTaskDefinition to make it clearer when location needs to happen. Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Anthony <anthony@zed.dev> Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
parent
d13cd007a2
commit
9d35f0389d
57 changed files with 1146 additions and 884 deletions
|
@ -8,8 +8,7 @@ use project::{Location, TaskContexts, TaskSourceKind, Worktree};
|
|||
use task::{
|
||||
RevealTarget, TaskContext, TaskId, TaskModal, TaskTemplate, TaskVariables, VariableName,
|
||||
};
|
||||
use workspace::tasks::schedule_task;
|
||||
use workspace::{Workspace, tasks::schedule_resolved_task};
|
||||
use workspace::Workspace;
|
||||
|
||||
mod modal;
|
||||
|
||||
|
@ -50,15 +49,15 @@ pub fn init(cx: &mut App) {
|
|||
let task_contexts = task_contexts.await;
|
||||
let default_context = TaskContext::default();
|
||||
workspace
|
||||
.update_in(cx, |workspace, _, cx| {
|
||||
schedule_task(
|
||||
workspace,
|
||||
.update_in(cx, |workspace, window, cx| {
|
||||
workspace.schedule_task(
|
||||
task_source_kind,
|
||||
&original_task,
|
||||
task_contexts
|
||||
.active_context()
|
||||
.unwrap_or(&default_context),
|
||||
false,
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
})
|
||||
|
@ -75,11 +74,11 @@ pub fn init(cx: &mut App) {
|
|||
}
|
||||
}
|
||||
|
||||
schedule_resolved_task(
|
||||
workspace,
|
||||
workspace.schedule_resolved_task(
|
||||
task_source_kind,
|
||||
last_scheduled_task,
|
||||
false,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
}
|
||||
|
@ -217,7 +216,7 @@ where
|
|||
})?;
|
||||
|
||||
let did_spawn = workspace
|
||||
.update(cx, |workspace, cx| {
|
||||
.update_in(cx, |workspace, window, cx| {
|
||||
let default_context = TaskContext::default();
|
||||
let active_context = task_contexts.active_context().unwrap_or(&default_context);
|
||||
|
||||
|
@ -228,12 +227,12 @@ where
|
|||
target_task.reveal_target = target_override;
|
||||
}
|
||||
}
|
||||
schedule_task(
|
||||
workspace,
|
||||
workspace.schedule_task(
|
||||
task_source_kind.clone(),
|
||||
target_task,
|
||||
active_context,
|
||||
false,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue