kopia lustrzana https://github.com/c9/core
Merge pull request +8116 from c9/fix/collab-monitor-updates
Sending error if watcher detects a file change but collab doesn't pick up on it somehowpull/117/merge
commit
3a8c24250e
|
@ -67,7 +67,7 @@
|
||||||
"c9.ide.language.javascript.tern": "#2b0bb024da",
|
"c9.ide.language.javascript.tern": "#2b0bb024da",
|
||||||
"c9.ide.language.javascript.infer": "#cfec494a3c",
|
"c9.ide.language.javascript.infer": "#cfec494a3c",
|
||||||
"c9.ide.language.jsonalyzer": "#ba3e0d298c",
|
"c9.ide.language.jsonalyzer": "#ba3e0d298c",
|
||||||
"c9.ide.collab": "#ca8cc53a66",
|
"c9.ide.collab": "#c98b539847",
|
||||||
"c9.ide.local": "#a9703b630c",
|
"c9.ide.local": "#a9703b630c",
|
||||||
"c9.ide.find": "#6cc6d3379d",
|
"c9.ide.find": "#6cc6d3379d",
|
||||||
"c9.ide.find.infiles": "#72582de3cd",
|
"c9.ide.find.infiles": "#72582de3cd",
|
||||||
|
|
|
@ -23,7 +23,7 @@ define(function(require, exports, module) {
|
||||||
/***** Initialization *****/
|
/***** Initialization *****/
|
||||||
|
|
||||||
var plugin = new Plugin("Ajax.org", main.consumes);
|
var plugin = new Plugin("Ajax.org", main.consumes);
|
||||||
// var emit = plugin.getEmitter();
|
var emit = plugin.getEmitter();
|
||||||
|
|
||||||
var removedPaths, changedPaths;
|
var removedPaths, changedPaths;
|
||||||
var deleteDialog, changeDialog, initialFocus;
|
var deleteDialog, changeDialog, initialFocus;
|
||||||
|
@ -123,12 +123,9 @@ define(function(require, exports, module) {
|
||||||
watcher.on("change", function(e) {
|
watcher.on("change", function(e) {
|
||||||
var tab = tabManager.findTab(e.path);
|
var tab = tabManager.findTab(e.path);
|
||||||
if (tab) {
|
if (tab) {
|
||||||
if (collabEnabled && tab.editorType == "ace") {
|
// If collab picks this up and handles the change it will return false
|
||||||
// Collab is supposed to handle this change
|
if (emit("docChange", {tab: tab}) === false)
|
||||||
// TODO make this a setting
|
|
||||||
console.warn("[watchers] change ignored because of Collab", e.path);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
addChangedTab(tab, e.type === "change");
|
addChangedTab(tab, e.type === "change");
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,6 +106,10 @@ require([
|
||||||
x.check = function(){};
|
x.check = function(){};
|
||||||
return x;
|
return x;
|
||||||
})(),
|
})(),
|
||||||
|
"watcher.gui": (function(){
|
||||||
|
var x = new EventEmitter();
|
||||||
|
return x;
|
||||||
|
})(),
|
||||||
save: (function(){
|
save: (function(){
|
||||||
var x = new EventEmitter();
|
var x = new EventEmitter();
|
||||||
x.saveAll = function(c){ c(); };
|
x.saveAll = function(c){ c(); };
|
||||||
|
|
Ładowanie…
Reference in New Issue