revert workspace changes
This commit is contained in:
@@ -23,7 +23,6 @@ client = { path = "../client" }
|
|||||||
collections = { path = "../collections" }
|
collections = { path = "../collections" }
|
||||||
context_menu = { path = "../context_menu" }
|
context_menu = { path = "../context_menu" }
|
||||||
drag_and_drop = { path = "../drag_and_drop" }
|
drag_and_drop = { path = "../drag_and_drop" }
|
||||||
db = { path = "../db" }
|
|
||||||
fs = { path = "../fs" }
|
fs = { path = "../fs" }
|
||||||
gpui = { path = "../gpui" }
|
gpui = { path = "../gpui" }
|
||||||
language = { path = "../language" }
|
language = { path = "../language" }
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ use anyhow::{anyhow, Context, Result};
|
|||||||
use call::ActiveCall;
|
use call::ActiveCall;
|
||||||
use client::{proto, Client, PeerId, TypedEnvelope, UserStore};
|
use client::{proto, Client, PeerId, TypedEnvelope, UserStore};
|
||||||
use collections::{hash_map, HashMap, HashSet};
|
use collections::{hash_map, HashMap, HashSet};
|
||||||
use db::{SerializedItem, SerializedItemKind};
|
|
||||||
use dock::{DefaultItemFactory, Dock, ToggleDockButton};
|
use dock::{DefaultItemFactory, Dock, ToggleDockButton};
|
||||||
use drag_and_drop::DragAndDrop;
|
use drag_and_drop::DragAndDrop;
|
||||||
use fs::{self, Fs};
|
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)]
|
#[derive(Clone, PartialEq)]
|
||||||
pub struct RemoveWorktreeFromProject(pub WorktreeId);
|
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 struct AppState {
|
||||||
pub languages: Arc<LanguageRegistry>,
|
pub languages: Arc<LanguageRegistry>,
|
||||||
pub themes: Arc<ThemeRegistry>,
|
pub themes: Arc<ThemeRegistry>,
|
||||||
@@ -260,7 +248,6 @@ pub enum ItemEvent {
|
|||||||
UpdateTab,
|
UpdateTab,
|
||||||
UpdateBreadcrumbs,
|
UpdateBreadcrumbs,
|
||||||
Edit,
|
Edit,
|
||||||
Serialize(SerializedItem),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait Item: View {
|
pub trait Item: View {
|
||||||
@@ -346,9 +333,6 @@ pub trait Item: View {
|
|||||||
fn breadcrumbs(&self, _theme: &Theme, _cx: &AppContext) -> Option<Vec<ElementBox>> {
|
fn breadcrumbs(&self, _theme: &Theme, _cx: &AppContext) -> Option<Vec<ElementBox>> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
fn serialized_item_kind() -> SerializedItemKind;
|
|
||||||
fn deserialize(serialized_item: SerializedItem, cx: &mut ViewContext<Self>) -> Self;
|
|
||||||
fn serialize(&self) -> SerializedItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ProjectItem: Item {
|
pub trait ProjectItem: Item {
|
||||||
@@ -3627,18 +3611,6 @@ mod tests {
|
|||||||
fn to_item_events(_: &Self::Event) -> Vec<ItemEvent> {
|
fn to_item_events(_: &Self::Event) -> Vec<ItemEvent> {
|
||||||
vec![ItemEvent::UpdateTab, ItemEvent::Edit]
|
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 {}
|
impl SidebarItem for TestItem {}
|
||||||
|
|||||||
Reference in New Issue
Block a user