mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-13 06:39:31 +03:00
Uncomment all inlay hint cache code and tests
This commit is contained in:
parent
81cc6e84b7
commit
a9c17e7407
@ -1,3 +1,7 @@
|
||||
use gpui::TestAppContext;
|
||||
use language::language_settings::{AllLanguageSettings, AllLanguageSettingsContent};
|
||||
use settings::SettingsStore;
|
||||
|
||||
// use super::*;
|
||||
// use crate::{
|
||||
// scroll::scroll_amount::ScrollAmount,
|
||||
@ -8152,16 +8156,16 @@
|
||||
// });
|
||||
// }
|
||||
|
||||
// pub(crate) fn update_test_language_settings(
|
||||
// cx: &mut TestAppContext,
|
||||
// f: impl Fn(&mut AllLanguageSettingsContent),
|
||||
// ) {
|
||||
// cx.update(|cx| {
|
||||
// cx.update_global::<SettingsStore, _, _>(|store, cx| {
|
||||
// store.update_user_settings::<AllLanguageSettings>(cx, f);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
pub(crate) fn update_test_language_settings(
|
||||
cx: &mut TestAppContext,
|
||||
f: impl Fn(&mut AllLanguageSettingsContent),
|
||||
) {
|
||||
cx.update(|cx| {
|
||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||
store.update_user_settings::<AllLanguageSettings>(cx, f);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// pub(crate) fn update_test_project_settings(
|
||||
// cx: &mut TestAppContext,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3448,27 +3448,27 @@ impl Workspace {
|
||||
})
|
||||
}
|
||||
|
||||
// todo!()
|
||||
// #[cfg(any(test, feature = "test-support"))]
|
||||
// pub fn test_new(project: ModelHandle<Project>, cx: &mut ViewContext<Self>) -> Self {
|
||||
// use node_runtime::FakeNodeRuntime;
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn test_new(project: Model<Project>, cx: &mut ViewContext<Self>) -> Self {
|
||||
use gpui::Context;
|
||||
use node_runtime::FakeNodeRuntime;
|
||||
|
||||
// let client = project.read(cx).client();
|
||||
// let user_store = project.read(cx).user_store();
|
||||
let client = project.read(cx).client();
|
||||
let user_store = project.read(cx).user_store();
|
||||
|
||||
// let workspace_store = cx.add_model(|cx| WorkspaceStore::new(client.clone(), cx));
|
||||
// let app_state = Arc::new(AppState {
|
||||
// languages: project.read(cx).languages().clone(),
|
||||
// workspace_store,
|
||||
// client,
|
||||
// user_store,
|
||||
// fs: project.read(cx).fs().clone(),
|
||||
// build_window_options: |_, _, _| Default::default(),
|
||||
// initialize_workspace: |_, _, _, _| Task::ready(Ok(())),
|
||||
// node_runtime: FakeNodeRuntime::new(),
|
||||
// });
|
||||
// Self::new(0, project, app_state, cx)
|
||||
// }
|
||||
let workspace_store = cx.build_model(|cx| WorkspaceStore::new(client.clone(), cx));
|
||||
let app_state = Arc::new(AppState {
|
||||
languages: project.read(cx).languages().clone(),
|
||||
workspace_store,
|
||||
client,
|
||||
user_store,
|
||||
fs: project.read(cx).fs().clone(),
|
||||
build_window_options: |_, _, _| Default::default(),
|
||||
initialize_workspace: |_, _, _, _| Task::ready(Ok(())),
|
||||
node_runtime: FakeNodeRuntime::new(),
|
||||
});
|
||||
Self::new(0, project, app_state, cx)
|
||||
}
|
||||
|
||||
// fn render_dock(&self, position: DockPosition, cx: &WindowContext) -> Option<AnyElement<Self>> {
|
||||
// let dock = match position {
|
||||
|
Loading…
Reference in New Issue
Block a user