Remove vestigial backwards syncing functionality.

This functionality won't be present until the refactor in 0.5.0
This commit is contained in:
Lucien Greathouse
2018-05-26 16:44:25 -07:00
parent 40c41b4400
commit e7fe4ac3ec
4 changed files with 3 additions and 37 deletions

View File

@@ -9,13 +9,6 @@ pub enum TransformFileResult {
// TODO: Error case
}
pub enum RbxChangeResult {
Write(Option<VfsItem>),
Pass,
// TODO: Error case
}
pub enum FileChangeResult {
MarkChanged(Option<Vec<Route>>),
Pass,
@@ -26,10 +19,6 @@ pub trait Plugin {
/// into a Roblox instance.
fn transform_file(&self, plugins: &PluginChain, vfs_item: &VfsItem) -> TransformFileResult;
/// Invoked when a Roblox Instance change is reported by the Roblox Studio
/// plugin and needs to be turned into a file to save.
fn handle_rbx_change(&self, route: &Route, rbx_item: &RbxInstance) -> RbxChangeResult;
/// Invoked when a file changes on the filesystem. The result defines what
/// routes are marked as needing to be refreshed.
fn handle_file_change(&self, route: &Route) -> FileChangeResult;
@@ -58,17 +47,6 @@ impl PluginChain {
None
}
pub fn handle_rbx_change(&self, route: &Route, rbx_item: &RbxInstance) -> Option<VfsItem> {
for plugin in &self.plugins {
match plugin.handle_rbx_change(route, rbx_item) {
RbxChangeResult::Write(vfs_item) => return vfs_item,
RbxChangeResult::Pass => {},
}
}
None
}
pub fn handle_file_change(&self, route: &Route) -> Option<Vec<Route>> {
for plugin in &self.plugins {
match plugin.handle_file_change(route) {

View File

@@ -1,7 +1,7 @@
use std::collections::HashMap;
use core::Route;
use plugin::{Plugin, PluginChain, TransformFileResult, RbxChangeResult, FileChangeResult};
use plugin::{Plugin, PluginChain, TransformFileResult, FileChangeResult};
use rbx::{RbxInstance, RbxValue};
use vfs::VfsItem;
@@ -60,8 +60,4 @@ impl Plugin for DefaultPlugin {
fn handle_file_change(&self, route: &Route) -> FileChangeResult {
FileChangeResult::MarkChanged(Some(vec![route.clone()]))
}
fn handle_rbx_change(&self, _route: &Route, _rbx_item: &RbxInstance) -> RbxChangeResult {
RbxChangeResult::Pass
}
}

View File

@@ -2,7 +2,7 @@ use regex::Regex;
use serde_json;
use core::Route;
use plugin::{Plugin, PluginChain, TransformFileResult, RbxChangeResult, FileChangeResult};
use plugin::{Plugin, PluginChain, TransformFileResult, FileChangeResult};
use rbx::RbxInstance;
use vfs::VfsItem;
@@ -48,8 +48,4 @@ impl Plugin for JsonModelPlugin {
fn handle_file_change(&self, _route: &Route) -> FileChangeResult {
FileChangeResult::Pass
}
fn handle_rbx_change(&self, _route: &Route, _rbx_item: &RbxInstance) -> RbxChangeResult {
RbxChangeResult::Pass
}
}

View File

@@ -3,7 +3,7 @@ use std::collections::HashMap;
use regex::Regex;
use core::Route;
use plugin::{Plugin, PluginChain, TransformFileResult, RbxChangeResult, FileChangeResult};
use plugin::{Plugin, PluginChain, TransformFileResult, FileChangeResult};
use rbx::{RbxInstance, RbxValue};
use vfs::VfsItem;
@@ -117,8 +117,4 @@ impl Plugin for ScriptPlugin {
FileChangeResult::Pass
}
}
fn handle_rbx_change(&self, _route: &Route, _rbx_item: &RbxInstance) -> RbxChangeResult {
RbxChangeResult::Pass
}
}