Rename runnables into tasks (#8119)

Release Notes:

- N/A
This commit is contained in:
Kirill Bulatov 2024-02-21 14:56:43 +02:00 committed by GitHub
parent 45e2c01773
commit 2679457b02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 316 additions and 332 deletions

View file

@ -88,8 +88,8 @@ release_channel.workspace = true
rope.workspace = true
rpc.workspace = true
rsa = "0.4"
runnable.workspace = true
runnables_ui.workspace = true
task.workspace = true
tasks_ui.workspace = true
rust-embed.workspace = true
schemars.workspace = true
search.workspace = true

View file

@ -53,7 +53,7 @@ impl JsonLspAdapter {
},
cx,
);
let runnables_schema = runnable::static_source::DefinitionProvider::generate_json_schema();
let tasks_schema = task::static_source::DefinitionProvider::generate_json_schema();
serde_json::json!({
"json": {
"format": {
@ -72,8 +72,8 @@ impl JsonLspAdapter {
"schema": KeymapFile::generate_json_schema(&action_names),
},
{
"fileMatch": [schema_file_match(&paths::RUNNABLES)],
"schema": runnables_schema,
"fileMatch": [schema_file_match(&paths::TASKS)],
"schema": tasks_schema,
}
]
}

View file

@ -244,7 +244,7 @@ fn main() {
outline::init(cx);
project_symbols::init(cx);
project_panel::init(Assets, cx);
runnables_ui::init(cx);
tasks_ui::init(cx);
channel::init(&client, user_store.clone(), cx);
search::init(cx);
semantic_index::init(fs.clone(), http.clone(), languages.clone(), cx);

View file

@ -22,14 +22,14 @@ use project_panel::ProjectPanel;
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,
DEFAULT_KEYMAP_PATH,
};
use std::{borrow::Cow, ops::Deref, path::Path, sync::Arc};
use task::static_source::StaticSource;
use tasks_ui::OneshotSource;
use terminal_view::terminal_panel::{self, TerminalPanel};
use util::{
asset_str,
@ -59,7 +59,7 @@ actions!(
OpenDefaultKeymap,
OpenDefaultSettings,
OpenKeymap,
OpenRunnables,
OpenTasks,
OpenLicenses,
OpenLocalSettings,
OpenLog,
@ -159,16 +159,16 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
let project = workspace.project().clone();
if project.read(cx).is_local() {
let runnables_file_rx = watch_config_file(
let tasks_file_rx = watch_config_file(
&cx.background_executor(),
app_state.fs.clone(),
paths::RUNNABLES.clone(),
paths::TASKS.clone(),
);
let static_source = StaticSource::new(runnables_file_rx, cx);
let static_source = StaticSource::new(tasks_file_rx, cx);
let oneshot_source = OneshotSource::new(cx);
project.update(cx, |project, cx| {
project.runnable_inventory().update(cx, |inventory, cx| {
project.task_inventory().update(cx, |inventory, cx| {
inventory.add_source(oneshot_source, cx);
inventory.add_source(static_source, cx);
})
@ -278,10 +278,10 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
},
)
.register_action(
move |_: &mut Workspace, _: &OpenRunnables, cx: &mut ViewContext<Workspace>| {
move |_: &mut Workspace, _: &OpenTasks, cx: &mut ViewContext<Workspace>| {
open_settings_file(
&paths::RUNNABLES,
|| settings::initial_runnables_content().as_ref().into(),
&paths::TASKS,
|| settings::initial_tasks_content().as_ref().into(),
cx,
);
},