From bce0d67bf336371dabb0c2c2d1296a30f531e8a6 Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Mon, 3 Aug 2015 08:52:27 +0000 Subject: [PATCH 01/34] Add langauge handler unregistering --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c09261d..0bce1d8c 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "c9" ], "c9plugins": { - "c9.ide.language": "#4a3fb360aa", + "c9.ide.language": "#cb4053d08f", "c9.ide.language.css": "#ef8a28943e", "c9.ide.language.generic": "#77d43cfaf0", "c9.ide.language.html": "#bbe81afed1", From 66a0453b07a783d1323cad2993b1fba06d45f377 Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Mon, 3 Aug 2015 08:52:34 +0000 Subject: [PATCH 02/34] Add token types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bce1d8c..df19aed8 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "c9" ], "c9plugins": { - "c9.ide.language": "#cb4053d08f", + "c9.ide.language": "#7519f7d1ab", "c9.ide.language.css": "#ef8a28943e", "c9.ide.language.generic": "#77d43cfaf0", "c9.ide.language.html": "#bbe81afed1", From f93c72a1c57e069810275040b7bd4821faacfb72 Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Mon, 3 Aug 2015 14:13:30 +0000 Subject: [PATCH 03/34] Pass row and column to worker --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df19aed8..db1bde4d 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "c9" ], "c9plugins": { - "c9.ide.language": "#7519f7d1ab", + "c9.ide.language": "#954c2da6a9", "c9.ide.language.css": "#ef8a28943e", "c9.ide.language.generic": "#77d43cfaf0", "c9.ide.language.html": "#bbe81afed1", From 7e23e9ec8413b26095724ef4418590ed12df14d4 Mon Sep 17 00:00:00 2001 From: Ruben Daniels Date: Tue, 4 Aug 2015 21:01:10 +0000 Subject: [PATCH 04/34] Fixes c9 cli installer for when specifying the version number --- plugins/c9.cli.publish/install.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/c9.cli.publish/install.js b/plugins/c9.cli.publish/install.js index 3475fd5b..67ef3a02 100644 --- a/plugins/c9.cli.publish/install.js +++ b/plugins/c9.cli.publish/install.js @@ -219,11 +219,11 @@ define(function(require, exports, module) { function install(packageName, options, callback){ // Call install url var parts = packageName.split("@"); - var name = parts[0]; + var name = packageName = parts[0]; var version = parts[1]; var repository; - if ((!version || options.debug) && !options.test) { + if (!options.test) { if (verbose) console.log("Retrieving package info"); @@ -232,8 +232,10 @@ define(function(require, exports, module) { if (verbose) console.log("Found:", info); + + if (!version) + version = info.latest; - version = info.latest; repository = info.repository; installPackage(); @@ -362,7 +364,9 @@ define(function(require, exports, module) { request.on('response', function(res) { if (res.statusCode != 200) - return callback(new Error("Unknown Error:" + res.statusCode)); + return callback(new Error("Unknown Error getting " + + host + (port ? ":" + port : "") + + path + ":" + res.statusCode)); }); file.on('finish', function() { @@ -451,7 +455,7 @@ define(function(require, exports, module) { return callback(null, { version: "test" }); if (verbose) - console.log("Notifying c9.io that packages needs to be installed"); + console.log("Notifying c9.io that package is installed"); var endpoint = options.global ? api.user : api.project; var url = "install/" + packageName + "/" + version + "?mode=silent"; From 2ce70b0b802e79ce1e9757e79cdc31b2b2550844 Mon Sep 17 00:00:00 2001 From: Ruben Daniels Date: Tue, 4 Aug 2015 23:42:45 +0000 Subject: [PATCH 05/34] Fixing tests for cli. Fixing install of same package but different version --- plugins/c9.cli.publish/publish_test.js | 56 +++++++++++++++----------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/plugins/c9.cli.publish/publish_test.js b/plugins/c9.cli.publish/publish_test.js index 22d46a7e..f58f48c5 100644 --- a/plugins/c9.cli.publish/publish_test.js +++ b/plugins/c9.cli.publish/publish_test.js @@ -37,6 +37,7 @@ describe("cli.publish", function(){ baseTest(function (err, s) { // Services can be tested immediately by mocking API signatures params - (req, res, next) - or (user, params, callback) services = s; + HOST = "localhost:" + s.apiPort; next(err); }); }); @@ -49,7 +50,7 @@ describe("cli.publish", function(){ var json = { "name": "c9.ide.example", "latest": "1.0.0", - "owner": "https://api.c9.dev/user/2000", + "owner": "https://api.$DOMAIN/user/2000", "enabled": true, "categories": [ "example" @@ -60,10 +61,14 @@ describe("cli.publish", function(){ }, "longname": "c9.ide.example", "website": "", - "description": "Cloud9 Custom Example Plugin", - "star_avg": 0, + "description": "", + "star_count": 0, + "star_total": 0, + + "installs": 0, "screenshots": [ - "example" + // TODO Screenshots are broken + // "example" ] }; @@ -118,13 +123,6 @@ describe("cli.publish", function(){ done(); }); }); - it("should fail if the description in the package.json is missing", function(done){ - fs.writeFileSync(packagePath, packageJson.replace(/"description":.*/, '')); - runCLI("publish", ["major"], function(err, stdout, stderr){ - expect(stderr).to.match(/ERROR: Missing description property in package.json/); - done(); - }); - }); it("should fail if the repository in the package.json is missing", function(done){ fs.writeFileSync(packagePath, packageJson.replace(/"repository[\s\S]*?\},/, "")); runCLI("publish", ["major"], function(err, stdout, stderr){ @@ -157,9 +155,10 @@ describe("cli.publish", function(){ it("should publish when using force and increase the patch version", function(done){ var strJson = packageJson.replace(/"version": "[\d\.]+"/, '"version": "0.0.0"'); fs.writeFileSync(packagePath, strJson); - runCLI("publish", ["patch", "--force"], function(err, stdout, stderr){ + fs.writeFileSync(readmePath, readmeMD); + runCLI("publish", ["patch", "--force", "--tag"], function(err, stdout, stderr){ assert(!err, err); - expect(stdout).to.match(/Succesfully published version 0.0.1/); + expect(stdout).to.match(/Successfully published version 0.0.1/); runCLI("list", ["--json"], function(err, stdout, stderr){ assert(!err, err); @@ -182,7 +181,7 @@ describe("cli.publish", function(){ fs.writeFileSync(readmePath, readmeMD); runCLI("publish", ["minor"], function(err, stdout, stderr){ assert(!err, err); - expect(stdout).to.match(/Succesfully published version 0.1.0/); + expect(stdout).to.match(/Successfully published version 0.1.0/); runCLI("list", ["--json"], function(err, stdout, stderr){ assert(!err, err); @@ -204,7 +203,7 @@ describe("cli.publish", function(){ it("should increase the major version", function(done){ runCLI("publish", ["major"], function(err, stdout, stderr){ assert(!err, err); - expect(stdout).to.match(/Succesfully published version 1.0.0/); + expect(stdout).to.match(/Successfully published version 1.0.0/); runCLI("list", ["--json"], function(err, stdout, stderr){ assert(!err, err); @@ -226,7 +225,7 @@ describe("cli.publish", function(){ it("should hide the package when it is unpublished", function(done){ runCLI("unpublish", [], function(err, stdout, stderr){ assert(!err, err); - expect(stdout).to.match(/Succesfully disabled package/); + expect(stdout).to.match(/Successfully disabled package/); runCLI("list", ["--json"], function(err, stdout, stderr){ assert(!err, err); @@ -237,7 +236,7 @@ describe("cli.publish", function(){ }); }); - describe("install and remove (uninstall)", function() { + describe.only("install and remove (uninstall)", function() { var pluginDir = join(process.env.HOME, ".c9/plugins/c9.ide.example"); // Lets make sure there is at least one package in the database @@ -265,7 +264,7 @@ describe("cli.publish", function(){ it("should install a package locally", function(done){ runCLI("install", ["--local", "c9.ide.example"], function(err, stdout, stderr){ - expect(stdout).to.match(/Succesfully installed c9.ide.example@10.0.0/); + expect(stdout).to.match(/Successfully installed c9.ide.example@10.0.0/); expect(fs.existsSync(pluginDir)).ok; done(); }); @@ -278,14 +277,25 @@ describe("cli.publish", function(){ }); it("should install a package in debug mode", function(done){ runCLI("install", ["--force", "--debug", "c9.ide.example"], function(err, stdout, stderr){ - expect(stdout).to.match(/Succesfully installed c9.ide.example/); + expect(stdout).to.match(/Successfully installed c9.ide.example/); expect(fs.existsSync(join(pluginDir, "/.git"))).ok; done(); }); }); it("should install a package via the database", function(done){ - runCLI("install", ["c9.ide.example"], function(err, stdout, stderr){ - expect(stdout).to.match(/Succesfully installed c9.ide.example/); + runCLI("install", ["c9.ide.example", "--force"], function(err, stdout, stderr){ + console.log(stdout, stderr); + expect(stdout).to.match(/Successfully installed c9.ide.example/); + + // @TODO check if it's actually in the database - add list --own to cli + + done(); + }); + }); + it("should install a package with a specific version via the database", function(done){ + runCLI("install", ["c9.ide.example", "9.0.0", "--force"], function(err, stdout, stderr){ + console.log(stdout, stderr); + expect(stdout).to.match(/Successfully installed c9.ide.example@9.0.0/); // @TODO check if it's actually in the database - add list --own to cli @@ -294,14 +304,14 @@ describe("cli.publish", function(){ }); it("should remove a package locally", function(done){ runCLI("remove", ["--local", "c9.ide.example"], function(err, stdout, stderr){ - expect(stdout).to.match(/Succesfully removed c9.ide.example/); + expect(stdout).to.match(/Successfully removed c9.ide.example/); expect(fs.existsSync(pluginDir)).not.ok; done(); }); }); it("should remove a from the database", function(done){ runCLI("remove", ["c9.ide.example"], function(err, stdout, stderr){ - expect(stdout).to.match(/Succesfully removed c9.ide.example/); + expect(stdout).to.match(/Successfully removed c9.ide.example/); // @TODO check if it's actually in the database - add list --own to cli From 626c3c996da63db8685cf17cadbd34ab1fb87ec9 Mon Sep 17 00:00:00 2001 From: Ruben Daniels Date: Wed, 5 Aug 2015 01:19:58 +0000 Subject: [PATCH 06/34] GH+3 Start MySQL and Apache automatically for WordPress users --- package.json | 4 ++-- plugins/c9.ide.keys/commands.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8ec4634b..1e1dea62 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "c9.ide.navigate": "#f358997d93", "c9.ide.newresource": "#f1f0624768", "c9.ide.openfiles": "#28a4f5af16", - "c9.ide.preview": "#d10e9d75e1", + "c9.ide.preview": "#a75e218d3e", "c9.ide.preview.browser": "#c50007ebbc", "c9.ide.preview.markdown": "#ab8d30ad9f", "c9.ide.pubsub": "#a85fb27eca", @@ -111,6 +111,6 @@ "c9.ide.threewaymerge": "#229382aa0b", "c9.ide.undo": "#b028bcb4d5", "c9.ide.upload": "#0bd010d3dc", - "c9.ide.welcome": "#c370b3f191" + "c9.ide.welcome": "#0cb72cfc56" } } \ No newline at end of file diff --git a/plugins/c9.ide.keys/commands.js b/plugins/c9.ide.keys/commands.js index 2260f181..90f73771 100644 --- a/plugins/c9.ide.keys/commands.js +++ b/plugins/c9.ide.keys/commands.js @@ -104,6 +104,8 @@ define(function(require, exports, module) { }, 500); function exec(command, editor, args, e) { + var sCommand = command; + if (!editor || editor.fake) editor = emit("getEditor"); @@ -119,8 +121,10 @@ define(function(require, exports, module) { if (typeof command === 'string') command = commands[command]; - if (!command) + if (!command) { + console.warn("Could not find command ", sCommand); return false; + } if (command.isAvailable && !command.isAvailable(editor, args, e)) return; //Disable commands for other contexts From cbae4d02c9c64491ba6c2a44fe15ad3344dfe644 Mon Sep 17 00:00:00 2001 From: Ruben Daniels Date: Wed, 5 Aug 2015 02:53:57 +0000 Subject: [PATCH 07/34] Fix tests (unable to add new test) --- plugins/c9.cli.publish/install.js | 7 ++++--- plugins/c9.cli.publish/publish_test.js | 17 ++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/c9.cli.publish/install.js b/plugins/c9.cli.publish/install.js index 67ef3a02..63647e5e 100644 --- a/plugins/c9.cli.publish/install.js +++ b/plugins/c9.cli.publish/install.js @@ -109,10 +109,11 @@ define(function(require, exports, module) { } var name = argv._[1]; + var test = name == "."; if (test) name = require("path").basename(process.cwd()); - + install( name, { @@ -219,7 +220,7 @@ define(function(require, exports, module) { function install(packageName, options, callback){ // Call install url var parts = packageName.split("@"); - var name = packageName = parts[0]; + var name = parts[0]; var version = parts[1]; var repository; @@ -458,7 +459,7 @@ define(function(require, exports, module) { console.log("Notifying c9.io that package is installed"); var endpoint = options.global ? api.user : api.project; - var url = "install/" + packageName + "/" + version + "?mode=silent"; + var url = "install/" + name + "/" + version + "?mode=silent"; endpoint.post(url, function(err, info){ callback(err, info); diff --git a/plugins/c9.cli.publish/publish_test.js b/plugins/c9.cli.publish/publish_test.js index f58f48c5..b17489db 100644 --- a/plugins/c9.cli.publish/publish_test.js +++ b/plugins/c9.cli.publish/publish_test.js @@ -284,7 +284,6 @@ describe("cli.publish", function(){ }); it("should install a package via the database", function(done){ runCLI("install", ["c9.ide.example", "--force"], function(err, stdout, stderr){ - console.log(stdout, stderr); expect(stdout).to.match(/Successfully installed c9.ide.example/); // @TODO check if it's actually in the database - add list --own to cli @@ -292,16 +291,16 @@ describe("cli.publish", function(){ done(); }); }); - it("should install a package with a specific version via the database", function(done){ - runCLI("install", ["c9.ide.example", "9.0.0", "--force"], function(err, stdout, stderr){ - console.log(stdout, stderr); - expect(stdout).to.match(/Successfully installed c9.ide.example@9.0.0/); + // it("should install a package with a specific version via the database", function(done){ + // runCLI("install", ["c9.ide.example@1.0.0", "--force"], function(err, stdout, stderr){ + // console.log(stdout, stderr); + // expect(stdout).to.match(/Successfully installed c9.ide.example@1.0.0/); - // @TODO check if it's actually in the database - add list --own to cli + // // @TODO check if it's actually in the database - add list --own to cli - done(); - }); - }); + // done(); + // }); + // }); it("should remove a package locally", function(done){ runCLI("remove", ["--local", "c9.ide.example"], function(err, stdout, stderr){ expect(stdout).to.match(/Successfully removed c9.ide.example/); From bed3266af87c547e3dddf49d9647e41feed26929 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Wed, 5 Aug 2015 10:10:40 +0200 Subject: [PATCH 08/34] Work around +8552 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ec4634b..f15a2576 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "c9.ide.language.javascript": "#8479d0a9c1", "c9.ide.language.javascript.immediate": "#0535804ada", "c9.ide.language.javascript.eslint": "#9b2721c3d0", - "c9.ide.language.javascript.tern": "#a8f7ed0e30", + "c9.ide.language.javascript.tern": "#88ec419283", "c9.ide.language.javascript.infer": "#cfec494a3c", "c9.ide.language.jsonalyzer": "#ba3e0d298c", "c9.ide.collab": "#b49eda3791", From 44f6b8f985dbb4224e0e20fc2c78c13ea1f8fad5 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 5 Aug 2015 09:54:32 +0000 Subject: [PATCH 09/34] checkin vargs node module because it is broken on npm --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4993c658..a6ff3610 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ node_modules/kaefer/node_modules/ !node_modules/ui !node_modules/react-bootstrap !node_modules/oldclient +!node_modules/vargs node_modules/oldclient/node_modules node_modules/oldclient/plugins-server/c9.api.project/tmp* From 7ef3f3ef32ead0c172a67f3353f1388aa0a398e4 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 8 Jul 2015 16:01:13 +0400 Subject: [PATCH 10/34] add simple git ui --- configs/client-default.js | 7 +++ node_modules/ace/lib/ace/layer/marker.js | 4 +- node_modules/ace/lib/ace/lib/dom.js | 4 +- .../lib/ace_tree/mouse/default_handlers.js | 2 +- node_modules/ace_tree/lib/ace_tree/tooltip.js | 50 ++++++++++++------- node_modules/ace_tree/lib/ace_tree/tree.js | 1 + .../ace_tree/lib/ace_tree/virtual_renderer.js | 24 ++++++++- package.json | 1 + plugins/c9.ide.ace/ace.js | 5 ++ .../less/c9-toolbarbutton-glossy.less | 2 +- plugins/c9.ide.tree/tree.js | 3 ++ plugins/c9.ide.ui/lib/flexbox.js | 3 +- plugins/c9.vfs.standalone/www/places.html | 3 +- 13 files changed, 79 insertions(+), 30 deletions(-) diff --git a/configs/client-default.js b/configs/client-default.js index 245e3093..bde855b6 100644 --- a/configs/client-default.js +++ b/configs/client-default.js @@ -700,6 +700,13 @@ module.exports = function(options) { staticPrefix: staticPrefix + "/plugins/c9.ide.collab/notifications" }, ]; + + if (options.standalone || options.local) { + plugins.push( + "plugins/c9.ide.scm/status", + "plugins/c9.ide.scm/editor" + ); + } if (packaging || !devel) { plugins.push({ diff --git a/node_modules/ace/lib/ace/layer/marker.js b/node_modules/ace/lib/ace/layer/marker.js index 9818d225..c2050ff3 100644 --- a/node_modules/ace/lib/ace/layer/marker.js +++ b/node_modules/ace/lib/ace/layer/marker.js @@ -56,9 +56,7 @@ var Marker = function(parentEl) { }; this.update = function(config) { - var config = config || this.config; - if (!config) - return; + if (!config) return; this.config = config; diff --git a/node_modules/ace/lib/ace/lib/dom.js b/node_modules/ace/lib/ace/lib/dom.js index 9cfc20d9..c30176da 100644 --- a/node_modules/ace/lib/ace/lib/dom.js +++ b/node_modules/ace/lib/ace/lib/dom.js @@ -46,7 +46,7 @@ exports.createElement = function(tag, ns) { }; exports.hasCssClass = function(el, name) { - var classes = (el.className || "").split(/\s+/g); + var classes = (el.className + "").split(/\s+/g); return classes.indexOf(name) !== -1; }; @@ -84,7 +84,7 @@ exports.toggleCssClass = function(el, name) { add = false; classes.splice(index, 1); } - if(add) + if (add) classes.push(name); el.className = classes.join(" "); diff --git a/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js b/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js index 7fd87c06..83fbcd47 100644 --- a/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js +++ b/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js @@ -76,7 +76,7 @@ function DefaultHandlers(mouseHandler) { title = provider.getTooltipText ? provider.getTooltipText(node) : provider.getText(node); } - if (editor.container.title != title) + if (!editor.tooltip && editor.container.title != title) editor.container.title = title; this.updateHoverState(node); }; diff --git a/node_modules/ace_tree/lib/ace_tree/tooltip.js b/node_modules/ace_tree/lib/ace_tree/tooltip.js index 81de9138..5b1bd7fe 100644 --- a/node_modules/ace_tree/lib/ace_tree/tooltip.js +++ b/node_modules/ace_tree/lib/ace_tree/tooltip.js @@ -2,6 +2,7 @@ define(function(require, exports, module) { "use strict"; var dom = require("ace/lib/dom"); var lang = require("ace/lib/lang"); +var MouseEvent = require("./mouse/mouse_event").MouseEvent; dom.importCssString(".no-events * {pointer-events:none!important}"); function Tooltip(tree) { this.tree = tree; @@ -9,7 +10,8 @@ function Tooltip(tree) { this.tree.on("mousewheel", this.onMouseMove.bind(this, null)); this.tree.renderer.scroller.addEventListener("mouseout", this.onMouseOut.bind(this)); this.setUp(); - // this.tree.renderer.on("afterRender", this.updateNodeClass.bind(this)); + this.update = this.update.bind(this); + this.tree.renderer.on("afterRender", this.updateNodeClass.bind(this)); this.clearDelayed = lang.delayedCall(this.onMouseMove.bind(this), 50); } @@ -20,7 +22,7 @@ function Tooltip(tree) { this.root.className = container.className + " no-events"; this.root.style.cssText = "border: 0px;margin: 0px;" + "position: absolute; bottom: initial; right: initial; width: auto; height: auto;" - + "overflow: visible;z-index: 1000000; white-space: pre;" + + "overflow: visible;z-index: 190000; white-space: pre;" + "pointer-events: none"; // var color = dom.computedStyle(container).backgroundColor; // if (!color) @@ -28,20 +30,24 @@ function Tooltip(tree) { document.body.appendChild(this.root); }; - this.updateNode = function(treeNode) { + this.updateNode = function(treeDomNode) { if (this.node) { this.node.parentNode.removeChild(this.node); this.node = null; } - this.treeNode = treeNode; - if (!treeNode) { + this.treeDomNode = treeDomNode; + var rect = treeDomNode && treeDomNode.getBoundingClientRect(); + var maxW = this.tree.renderer.layerConfig.width; + if (!rect || treeDomNode.lastChild.getBoundingClientRect().right <= maxW) { this.root.style.display = "none"; return; } + // if (rect.width ) + this.root.className = this.tree.container.className + " no-events"; this.root.style.display = ""; - var rect = treeNode.getBoundingClientRect(); - this.node = treeNode.cloneNode(true); + + this.node = treeDomNode.cloneNode(true); this.node.style.margin = "0px"; this.root.appendChild(this.node); @@ -50,10 +56,11 @@ function Tooltip(tree) { }; this.updateNodeClass = function() { - if (this.node && this.treeNode) { - if (this.treeNode.parentNode == this.tree.renderer.$cellLayer.element) - this.node.className = this.treeNode.className; - else + if (this.node && this.treeDomNode) { + if (this.treeDomNode.parentNode == this.tree.renderer.$cellLayer.element) { + this.node.className = this.treeDomNode.className; + this.root.className = this.tree.container.className + " no-events"; + } else this.updateNode(null); } }; @@ -67,20 +74,25 @@ function Tooltip(tree) { }; this.onMouseMove = function(ev) { - var target = ev && ev.domEvent.target; - while (target && !dom.hasCssClass(target, "tree-row")) { - target = target.parentElement; - } - if (target == this.treeNode) + var node = ev && ev.getNode && ev.getNode(); + if (node == this.treeNode) return; - this.updateNode(target); - if (target) + this.treeNode = node; + if (node) this.clearDelayed.cancel(); + this.tree.renderer.on("afterRender", this.update); }; + this.update = function() { + var renderer = this.tree.renderer; + renderer.off("afterRender", this.update); + var i = renderer.layerConfig.vRange.indexOf(this.treeNode); + var domNode = renderer.$cellLayer.getDomNodeAtIndex(i + renderer.layerConfig.firstRow); + this.updateNode(domNode, this.treeNode); + }; this.onMouseOut = function(e) { - this.onMouseMove({domEvent: e}) + this.onMouseMove(); }; this.onMouseOver = function(ev) { this.clearDelayed.schedule(); diff --git a/node_modules/ace_tree/lib/ace_tree/tree.js b/node_modules/ace_tree/lib/ace_tree/tree.js index 78513294..4392dca7 100644 --- a/node_modules/ace_tree/lib/ace_tree/tree.js +++ b/node_modules/ace_tree/lib/ace_tree/tree.js @@ -105,6 +105,7 @@ var Tree = function(element, cellWidth, cellHeight) { } this.provider = provider; + this.model = provider; // TODO remove provider in favor of model if (provider) { this.renderer.setDataProvider(provider); diff --git a/node_modules/ace_tree/lib/ace_tree/virtual_renderer.js b/node_modules/ace_tree/lib/ace_tree/virtual_renderer.js index 68cab1c1..1ac072e7 100644 --- a/node_modules/ace_tree/lib/ace_tree/virtual_renderer.js +++ b/node_modules/ace_tree/lib/ace_tree/virtual_renderer.js @@ -110,6 +110,7 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { h: 0 }; + this.$scrollIntoView = null; this.$loop = new RenderLoop( this.$renderChanges.bind(this), @@ -142,6 +143,7 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { **/ this.setDataProvider = function(provider) { this.provider = provider; + this.model = provider; if (this.scrollMargin.top && provider && provider.getScrollTop() <= 0) provider.setScrollTop(-this.scrollMargin.top); @@ -300,6 +302,12 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { // provider.setScrollTop(this.getScrollTop()); changes |= this.CHANGE_SCROLL; } + + if (this.$scrollIntoView) + if (this.$scrollIntoView.model == this.model) { + this.scrollCaretIntoView(this.$scrollIntoView.caret, this.$scrollIntoView.offset); + this.$scrollIntoView = null; + } } if (width && (force || size.width != width)) { @@ -517,6 +525,9 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { this.$updateScrollBar(); this._signal("afterRender"); + + if (this.$scrollIntoView) + this.$scrollIntoView = null; }; @@ -688,6 +699,14 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { * Scrolls the Caret into the first visible area of the editor **/ this.scrollCaretIntoView = function(caret, offset) { + this.$scrollIntoView = { + caret: caret, + offset: offset, + scrollTop: this.scrollTop, + model: this.model, + height: this.$size.scrollerHeight + }; + // the editor is not visible if (this.$size.scrollerHeight === 0) return; @@ -703,8 +722,7 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { var height = nodePos.height; var left = 0; var width = 0; - - + if (this.scrollTop > top) { if (offset) top -= offset * this.$size.scrollerHeight; @@ -726,6 +744,8 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { } else if (scrollLeft + this.$size.scrollerWidth < left + width) { this.provider.setScrollLeft(Math.round(left + width - this.$size.scrollerWidth)); } + + this.$scrollIntoView.scrollTop = this.scrollTop; }; /** diff --git a/package.json b/package.json index f15a2576..c2ff284f 100644 --- a/package.json +++ b/package.json @@ -106,6 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", + "c9.ide.scm": "#c7a2698d9b", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", diff --git a/plugins/c9.ide.ace/ace.js b/plugins/c9.ide.ace/ace.js index a689326d..60e50541 100644 --- a/plugins/c9.ide.ace/ace.js +++ b/plugins/c9.ide.ace/ace.js @@ -1672,6 +1672,11 @@ define(function(require, exports, module) { */ defineSyntax: defineSyntax, + /** + * @ignore + */ + getSyntaxForPath: getSyntaxForPath, + /** * @ignore this is used by statusbar */ diff --git a/plugins/c9.ide.layout.classic/less/c9-toolbarbutton-glossy.less b/plugins/c9.ide.layout.classic/less/c9-toolbarbutton-glossy.less index f6abff1f..21838461 100644 --- a/plugins/c9.ide.layout.classic/less/c9-toolbarbutton-glossy.less +++ b/plugins/c9.ide.layout.classic/less/c9-toolbarbutton-glossy.less @@ -12,7 +12,7 @@ .box-shadow(~"inset 1px 1px @{button-glossy-hover-shadow-color}, inset -1px -1px @{button-glossy-hover-shadow-color}"); text-shadow: @button-glossy-hover-text-shadow; } -.c9-toolbarbutton-glossyDown { +.c9-toolbarbutton-glossyDown, .c9-toolbarbutton-glossyActive { border: 1px solid @button-glossy-active-border-color; .gradient(~"linear-gradient(top, @{button-glossy-active-background-1} 0%, @{button-glossy-active-background-2} 55%, @{button-glossy-active-background-3} 55%, @{button-glossy-active-background-4} 100%)"); .box-shadow(~"inset 1px 1px @{button-glossy-active-shadow-color}, inset -1px -1px @{button-glossy-active-shadow-color}"); diff --git a/plugins/c9.ide.tree/tree.js b/plugins/c9.ide.tree/tree.js index 2d291ed9..2e6fb03d 100644 --- a/plugins/c9.ide.tree/tree.js +++ b/plugins/c9.ide.tree/tree.js @@ -30,6 +30,7 @@ define(function(require, exports, module) { var showError = imports["dialog.error"].show; var Tree = require("ace_tree/tree"); + var Tooltip = require("ace_tree/tooltip"); var TreeEditor = require("ace_tree/edit"); var markup = require("text!./tree.xml"); @@ -237,6 +238,8 @@ define(function(require, exports, module) { tree.setDataProvider(fsCache.model); tree.setOption("enableDragDrop", true); + // tree.tooltip = new Tooltip(tree); + fsCache.model.$indentSize = 12; fsCache.model.getIconHTML = function(node) { var icon = node.isFolder ? "folder" : util.getFileIcon(node.label); diff --git a/plugins/c9.ide.ui/lib/flexbox.js b/plugins/c9.ide.ui/lib/flexbox.js index 17f54cf7..f092e5f0 100644 --- a/plugins/c9.ide.ui/lib/flexbox.js +++ b/plugins/c9.ide.ui/lib/flexbox.js @@ -203,7 +203,8 @@ apf.vbox = function(struct, tagName) { var nodes = this.childNodes; for (var i = 0, l = nodes.length; i < l; i++) { - if ((node = nodes[i]).nodeFunc != apf.NODE_VISIBLE || !node.$amlLoaded) //|| node.visible === false + var node = nodes[i]; + if (node.nodeFunc != apf.NODE_VISIBLE || !node.$amlLoaded) //|| node.visible === false continue; node.$ext.style.textAlign = apf.getStyle(node.$ext, "textAlign") || "left"; diff --git a/plugins/c9.vfs.standalone/www/places.html b/plugins/c9.vfs.standalone/www/places.html index 21f72b4e..443a3b2c 100644 --- a/plugins/c9.vfs.standalone/www/places.html +++ b/plugins/c9.vfs.standalone/www/places.html @@ -22,7 +22,8 @@ var places = { Ace: { kitchen_sink: ["/static/lib/ace/kitchen-sink.html", "/../lib/ace/test/tests.html"], tree: "/static/lib/ace_tree/demo.html", - list: "/static/lib/ace_tree/list_demo.html" + list: "/static/lib/ace_tree/list_demo.html", + diff: "/static/plugins/c9.ide.scm/diff/index.html" }, Treehugger: { test: "/static/lib/treehugger/test.html" From 357cf3f033d5b86fcacb692bbba719451d930679 Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Tue, 4 Aug 2015 00:06:28 +0000 Subject: [PATCH 11/34] Change title to "Compare" --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c2ff284f..ae69dce2 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#c7a2698d9b", + "c9.ide.scm": "#e3d057698b", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From e4c9dc8bbcbb0d958054eb3a9ad7b0cbc3f5ad31 Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Tue, 4 Aug 2015 00:16:32 +0000 Subject: [PATCH 12/34] Align diffs by default as it provides better scrolling --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae69dce2..30f160a7 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#e3d057698b", + "c9.ide.scm": "#2dea9aed3e", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From cabfe947c9bd87d3b73cfac4833c1068c36b8e2d Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Tue, 4 Aug 2015 00:37:19 +0000 Subject: [PATCH 13/34] Move arrow buttons to center; remove unused markup Conflicts: plugins/c9.ide.git/editor.xml --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 30f160a7..9b561f9d 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#2dea9aed3e", + "c9.ide.scm": "#aa7fba3fac", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From 31d94072c6c4790c31f440d5e0a92636e2f42e57 Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Tue, 4 Aug 2015 01:03:31 +0000 Subject: [PATCH 14/34] Remove c9.ide.git and use c9.ide.scm --- configs/client-default.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/client-default.js b/configs/client-default.js index bde855b6..1ff9b389 100644 --- a/configs/client-default.js +++ b/configs/client-default.js @@ -704,7 +704,7 @@ module.exports = function(options) { if (options.standalone || options.local) { plugins.push( "plugins/c9.ide.scm/status", - "plugins/c9.ide.scm/editor" + "plugins/c9.ide.scm/editor" ); } diff --git a/package.json b/package.json index 9b561f9d..c32bb6f8 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#aa7fba3fac", + "c9.ide.scm": "#fb391f81d3", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From 227cec66ebb6c021bef4ce81b07dc240e6e37744 Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Tue, 4 Aug 2015 03:08:52 +0000 Subject: [PATCH 15/34] Update theme colors --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c32bb6f8..2e3317bf 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#fb391f81d3", + "c9.ide.scm": "#680016646f", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From 40f213c70abedb08e0429b4f3e3027875b61d130 Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Tue, 4 Aug 2015 03:09:19 +0000 Subject: [PATCH 16/34] Improve gutter rendering --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2e3317bf..d15ff29a 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#680016646f", + "c9.ide.scm": "#9644cc3c04", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From 02ff46f11f219fba5b2eef325beb1b8fcb6332b8 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 5 Aug 2015 23:28:23 +0400 Subject: [PATCH 17/34] hide partially working buttons --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d15ff29a..cab975cf 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#9644cc3c04", + "c9.ide.scm": "#d34437e613", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From 68c62cc1821c98750f5c7bac21a7b16d5e5b6f61 Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Wed, 5 Aug 2015 22:37:03 +0000 Subject: [PATCH 18/34] Change back to default fluid-mode --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cab975cf..2be41823 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", - "c9.ide.scm": "#d34437e613", + "c9.ide.scm": "#f3847917b8", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", From 2c2ae6b96f701eb669e6738296788c2281f32bc8 Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Thu, 6 Aug 2015 10:42:48 +0000 Subject: [PATCH 19/34] Fix analyzeOthers() implementation confusion --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f15a2576..f7cccb9c 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "c9.ide.language.javascript.eslint": "#9b2721c3d0", "c9.ide.language.javascript.tern": "#88ec419283", "c9.ide.language.javascript.infer": "#cfec494a3c", - "c9.ide.language.jsonalyzer": "#ba3e0d298c", + "c9.ide.language.jsonalyzer": "#fd22996a38", "c9.ide.collab": "#b49eda3791", "c9.ide.local": "#a9703b630c", "c9.ide.find": "#6cc6d3379d", From 82f5691438acb6bd010007c41a01b0fb7af37a2b Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Thu, 6 Aug 2015 10:43:15 +0000 Subject: [PATCH 20/34] Show completion popup after new data received and no previous popup shown --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f7cccb9c..911e477f 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "c9" ], "c9plugins": { - "c9.ide.language": "#954c2da6a9", + "c9.ide.language": "#b2d7e9c08a", "c9.ide.language.css": "#ef8a28943e", "c9.ide.language.generic": "#77d43cfaf0", "c9.ide.language.html": "#bbe81afed1", From 01d733ee9252d67af1a2a690dc041381c0c34a4e Mon Sep 17 00:00:00 2001 From: Nikolai Onken Date: Thu, 6 Aug 2015 10:59:26 +0000 Subject: [PATCH 21/34] Wrap after --- plugins/c9.ide.preferences/preferences_test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/c9.ide.preferences/preferences_test.js b/plugins/c9.ide.preferences/preferences_test.js index c21b7ec9..cd892555 100644 --- a/plugins/c9.ide.preferences/preferences_test.js +++ b/plugins/c9.ide.preferences/preferences_test.js @@ -185,10 +185,12 @@ require([ }); }); - after(function(done) { - document.body.style.marginBottom = ""; - done(); - }); + if (!onload.remain) { + after(function(done) { + document.body.style.marginBottom = ""; + done(); + }); + } }); onload && onload(); From 6ba184d3de67b273394634ea147056b88ec81124 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 6 Aug 2015 15:49:56 +0400 Subject: [PATCH 22/34] add mock folders to test blacklist --- test/filefinder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/filefinder.js b/test/filefinder.js index 1841092a..435b3ef3 100644 --- a/test/filefinder.js +++ b/test/filefinder.js @@ -122,13 +122,16 @@ filefinder.prototype.treewalk = function(basedir, subdir, fnpattern, blacklist, function next() { var file = list[i++]; if (!file) return cb(null, foundfilesarray.length); + var partName = path.join(subdir, file); var filepath = path.join(fulldir, file); // get file info fs.stat(filepath, function(err, stat) { if (stat && stat.isDirectory()) { + if (blacklist && blacklist.indexOf(partName + "/") !== -1) + return next(); // directory, so recurse - _self.treewalk(basedir, path.join(subdir, file), fnpattern, blacklist, foundfilesarray, function(err, res) { + _self.treewalk(basedir, partName, fnpattern, blacklist, foundfilesarray, function(err, res) { results = results.concat(res); next(); }); @@ -141,7 +144,6 @@ filefinder.prototype.treewalk = function(basedir, subdir, fnpattern, blacklist, } // check if blacklisted - var partName = path.join(subdir, file); if (!blacklist || blacklist.indexOf(partName) == -1) { if (DEBUGMODE) console.log("file found: %s", partName); foundfilesarray.push(partName); From e5e2c2abddc2ba06efacb713a54cd3d1d5533903 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 6 Aug 2015 12:26:02 +0000 Subject: [PATCH 23/34] fake commit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 49740313..71a8e5d8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Cloud9 3.0 SDK for Plugin Development ====================================== This is the core repository for the Cloud9 v3 SDK. The SDK allows you to run a version of Cloud9 that allows you to develop plugins and create a custom IDE based on Cloud9. - + #### Project Status: *ALPHA* During the alpha stage, expect many things to break, not work or simply fail. From 6f13697870c58d58b1e39d7b528fe08e0024320c Mon Sep 17 00:00:00 2001 From: Nikolai Onken Date: Thu, 6 Aug 2015 12:50:41 +0000 Subject: [PATCH 24/34] Guard --- plugins/c9.vfs.standalone/www/test.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/c9.vfs.standalone/www/test.html b/plugins/c9.vfs.standalone/www/test.html index 11d99d24..a3927244 100644 --- a/plugins/c9.vfs.standalone/www/test.html +++ b/plugins/c9.vfs.standalone/www/test.html @@ -363,7 +363,9 @@ if (require == requirejs) { require = function(a, b, c) { if (!c && Array.isArray(a)) - c = function(err) { lastDone(err.message); }; + c = function(err) { + lastDone && lastDone(err.message); + }; return requirejs(a, b, c); }; Object.keys(requirejs).forEach(function(x) { From 7c8a5aa1fd420a9bb0e154446a4a0872a2185f1c Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Thu, 6 Aug 2015 13:24:36 +0000 Subject: [PATCH 25/34] Avoid this in ctags_util, it doesn't work from sdk plugin --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 911e477f..2fb08723 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "c9.ide.language.javascript.eslint": "#9b2721c3d0", "c9.ide.language.javascript.tern": "#88ec419283", "c9.ide.language.javascript.infer": "#cfec494a3c", - "c9.ide.language.jsonalyzer": "#fd22996a38", + "c9.ide.language.jsonalyzer": "#245abb51f5", "c9.ide.collab": "#b49eda3791", "c9.ide.local": "#a9703b630c", "c9.ide.find": "#6cc6d3379d", From abeef0aaa743bb54f6bd8ed7d4e294d27383af23 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 6 Aug 2015 19:15:57 +0400 Subject: [PATCH 26/34] fix test runner stopping on metrics test --- package.json | 1 + plugins/c9.vfs.standalone/www/test.html | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 65c36093..79ebf12d 100644 --- a/package.json +++ b/package.json @@ -106,6 +106,7 @@ "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", "c9.ide.save": "#58b8616a88", + "c9.ide.scm": "#undefined", "c9.ide.terminal.monitor": "#b0b4d03280", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", diff --git a/plugins/c9.vfs.standalone/www/test.html b/plugins/c9.vfs.standalone/www/test.html index a3927244..ca9b577c 100644 --- a/plugins/c9.vfs.standalone/www/test.html +++ b/plugins/c9.vfs.standalone/www/test.html @@ -226,8 +226,10 @@ running = false; lastDone && lastDone(); } - running ? done() : mocha.run(done); - running = true; + if (!running) { + running = true; + mocha.run(done); + } }; onload.remain = onload.remain == "1"; From 5d57d94da4d8a825d2311350b85a6971a929d1f1 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 6 Aug 2015 22:35:25 +0400 Subject: [PATCH 27/34] fix long broken tests --- .../build_support/mini_require.js | 4 +-- package.json | 4 +-- plugins/c9.vfs.standalone/www/test.html | 28 ++++++++++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/node_modules/architect-build/build_support/mini_require.js b/node_modules/architect-build/build_support/mini_require.js index 92370517..8d4c219c 100644 --- a/node_modules/architect-build/build_support/mini_require.js +++ b/node_modules/architect-build/build_support/mini_require.js @@ -134,7 +134,7 @@ var processLoadQueue = function(err, id) { } }; -define.amd = true; +define.amd = {}; define.queue = []; define.loaded = {}; define.errors = {}; @@ -296,7 +296,7 @@ require.MODULE_LOAD_URL = MODULE_LOAD_URL; require.toUrl = function(moduleName, ext, skipExt) { var absRe = /^([\w\+\.\-]+:|\/)/; var index = moduleName.indexOf("!"); - if (index !== -1 || !ext) + if (index !== -1 || !ext || /^\/|\.js$/.test(moduleName)) ext = ""; var paths = config.paths; diff --git a/package.json b/package.json index 79ebf12d..55130041 100644 --- a/package.json +++ b/package.json @@ -105,9 +105,9 @@ "c9.ide.run": "#1e99c8c1d2", "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#3b1520f83d", - "c9.ide.save": "#58b8616a88", + "c9.ide.save": "#cc613b6ead", "c9.ide.scm": "#undefined", - "c9.ide.terminal.monitor": "#b0b4d03280", + "c9.ide.terminal.monitor": "#b52a3f2144", "c9.ide.theme.flat": "#2de8414db7", "c9.ide.threewaymerge": "#229382aa0b", "c9.ide.undo": "#b028bcb4d5", diff --git a/plugins/c9.vfs.standalone/www/test.html b/plugins/c9.vfs.standalone/www/test.html index ca9b577c..422fbb8a 100644 --- a/plugins/c9.vfs.standalone/www/test.html +++ b/plugins/c9.vfs.standalone/www/test.html @@ -16,7 +16,7 @@
- +