debugger: Start on tabless design (#27837)
 Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
parent
9986a21970
commit
ece4a1cd7c
33 changed files with 1287 additions and 1092 deletions
|
@ -48,6 +48,7 @@ use worktree::Worktree;
|
|||
|
||||
pub enum DapStoreEvent {
|
||||
DebugClientStarted(SessionId),
|
||||
DebugSessionInitialized(SessionId),
|
||||
DebugClientShutdown(SessionId),
|
||||
DebugClientEvent {
|
||||
session_id: SessionId,
|
||||
|
@ -862,6 +863,10 @@ fn create_new_session(
|
|||
}
|
||||
}
|
||||
|
||||
this.update(cx, |_, cx| {
|
||||
cx.emit(DapStoreEvent::DebugSessionInitialized(session_id));
|
||||
})?;
|
||||
|
||||
Ok(session)
|
||||
});
|
||||
task
|
||||
|
|
|
@ -537,7 +537,11 @@ impl LocalMode {
|
|||
Ok((adapter, binary))
|
||||
}
|
||||
|
||||
pub fn initialize_sequence(
|
||||
pub fn label(&self) -> String {
|
||||
self.config.label.clone()
|
||||
}
|
||||
|
||||
fn initialize_sequence(
|
||||
&self,
|
||||
capabilities: &Capabilities,
|
||||
initialized_rx: oneshot::Receiver<()>,
|
||||
|
|
|
@ -125,6 +125,22 @@ impl Inventory {
|
|||
cx.new(|_| Self::default())
|
||||
}
|
||||
|
||||
pub fn list_debug_tasks(&self) -> Vec<&TaskTemplate> {
|
||||
self.templates_from_settings
|
||||
.worktree
|
||||
.values()
|
||||
.flat_map(|tasks| {
|
||||
tasks.iter().filter_map(|(kind, tasks)| {
|
||||
if matches!(kind.1, TaskKind::Debug) {
|
||||
Some(tasks)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
})
|
||||
.flatten()
|
||||
.collect()
|
||||
}
|
||||
/// Pulls its task sources relevant to the worktree and the language given,
|
||||
/// returns all task templates with their source kinds, worktree tasks first, language tasks second
|
||||
/// and global tasks last. No specific order inside source kinds groups.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue