revert workspace changes

This commit is contained in:
K Simmons 2022-10-17 17:05:08 -07:00
parent 05b4b443d9
commit d99a074bc0
2 changed files with 0 additions and 29 deletions

View File

@ -23,7 +23,6 @@ client = { path = "../client" }
collections = { path = "../collections" }
context_menu = { path = "../context_menu" }
drag_and_drop = { path = "../drag_and_drop" }
db = { path = "../db" }
fs = { path = "../fs" }
gpui = { path = "../gpui" }
language = { path = "../language" }

View File

@ -14,7 +14,6 @@ use anyhow::{anyhow, Context, Result};
use call::ActiveCall;
use client::{proto, Client, PeerId, TypedEnvelope, UserStore};
use collections::{hash_map, HashMap, HashSet};
use db::{SerializedItem, SerializedItemKind};
use dock::{DefaultItemFactory, Dock, ToggleDockButton};
use drag_and_drop::DragAndDrop;
use fs::{self, Fs};
@ -78,9 +77,6 @@ type FollowableItemBuilders = HashMap<
),
>;
type ItemDeserializers =
HashMap<SerializedItemKind, fn(SerializedItem, &mut ViewContext<Pane>) -> Box<dyn ItemHandle>>;
#[derive(Clone, PartialEq)]
pub struct RemoveWorktreeFromProject(pub WorktreeId);
@ -234,14 +230,6 @@ pub fn register_followable_item<I: FollowableItem>(cx: &mut MutableAppContext) {
});
}
pub fn register_deserializable_item<I: Item>(cx: &mut MutableAppContext) {
cx.update_default_global(|deserializers: &mut ItemDeserializers, _| {
deserializers.insert(I::serialized_item_kind(), |serialized_item, cx| {
Box::new(cx.add_view(|cx| I::deserialize(serialized_item, cx)))
})
});
}
pub struct AppState {
pub languages: Arc<LanguageRegistry>,
pub themes: Arc<ThemeRegistry>,
@ -260,7 +248,6 @@ pub enum ItemEvent {
UpdateTab,
UpdateBreadcrumbs,
Edit,
Serialize(SerializedItem),
}
pub trait Item: View {
@ -346,9 +333,6 @@ pub trait Item: View {
fn breadcrumbs(&self, _theme: &Theme, _cx: &AppContext) -> Option<Vec<ElementBox>> {
None
}
fn serialized_item_kind() -> SerializedItemKind;
fn deserialize(serialized_item: SerializedItem, cx: &mut ViewContext<Self>) -> Self;
fn serialize(&self) -> SerializedItem;
}
pub trait ProjectItem: Item {
@ -3627,18 +3611,6 @@ mod tests {
fn to_item_events(_: &Self::Event) -> Vec<ItemEvent> {
vec![ItemEvent::UpdateTab, ItemEvent::Edit]
}
fn serialized_item_kind() -> SerializedItemKind {
unimplemented!()
}
fn deserialize(_serialized_item: SerializedItem, _cx: &mut ViewContext<Self>) -> Self {
unimplemented!()
}
fn serialize(&self) -> SerializedItem {
unimplemented!()
}
}
impl SidebarItem for TestItem {}