Runnables: Add oneshot runnables (#8061)
/cc @SomeoneToIgnore Fixes #7460 and partially addresses #7108 Release Notes: - N/A
This commit is contained in:
parent
8a73bc4c7d
commit
2ec910f772
10 changed files with 163 additions and 17 deletions
|
@ -23,6 +23,7 @@ use quick_action_bar::QuickActionBar;
|
|||
use release_channel::{AppCommitSha, ReleaseChannel};
|
||||
use rope::Rope;
|
||||
use runnable::static_source::StaticSource;
|
||||
use runnables_ui::OneshotSource;
|
||||
use search::project_search::ProjectSearchBar;
|
||||
use settings::{
|
||||
initial_local_settings_content, watch_config_file, KeymapFile, Settings, SettingsStore,
|
||||
|
@ -163,11 +164,14 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
|
|||
app_state.fs.clone(),
|
||||
paths::RUNNABLES.clone(),
|
||||
);
|
||||
let source = StaticSource::new(runnables_file_rx, cx);
|
||||
let static_source = StaticSource::new(runnables_file_rx, cx);
|
||||
let oneshot_source = OneshotSource::new(cx);
|
||||
|
||||
project.update(cx, |project, cx| {
|
||||
project
|
||||
.runnable_inventory()
|
||||
.update(cx, |inventory, cx| inventory.add_source(source, cx))
|
||||
project.runnable_inventory().update(cx, |inventory, cx| {
|
||||
inventory.add_source(oneshot_source, cx);
|
||||
inventory.add_source(static_source, cx);
|
||||
})
|
||||
});
|
||||
}
|
||||
cx.spawn(|workspace_handle, mut cx| async move {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue