From f50cb5ff6cba0e203c29c134655eeca521b2a5c5 Mon Sep 17 00:00:00 2001 From: Alex Brausewetter Date: Mon, 9 Mar 2015 14:11:21 +0100 Subject: [PATCH] Merge pull request +6455 from c9/debugger Fix debugger not pausing on breakpoints - Smoke tested on local standalone - Reviewed as per DoD Level 1 --- node_modules/ace_tree/demo/styles.css | 23 +++++++++++++++++++ .../lib/ace_tree/mouse/default_handlers.js | 1 + .../lib/ace_tree/mouse/mouse_handler.js | 2 +- .../ace_tree/lib/ace_tree/virtual_renderer.js | 9 +++++--- node_modules/vfs-local/localfs.js | 19 +++++++++++++++ package.json | 6 ++--- plugins/c9.core/util.js | 2 +- .../c9.ide.layout.classic/less/list_dark.less | 12 +++++++--- plugins/c9.ide.ui/lib/menu/menu.js | 2 +- 9 files changed, 64 insertions(+), 12 deletions(-) diff --git a/node_modules/ace_tree/demo/styles.css b/node_modules/ace_tree/demo/styles.css index afcc070e..3265e4bc 100644 --- a/node_modules/ace_tree/demo/styles.css +++ b/node_modules/ace_tree/demo/styles.css @@ -49,4 +49,27 @@ body { border-left: 1px solid; } +.ace_tree-light .toggler { + overflow: visible; + width: 10px; + height: 10px; + background-image: url(../lib/ace_tree/css/tree_close_arrow_small.png); + background-repeat: no-repeat; + background-position: 0px 0px; + background-repeat: no-repeat; +} + +.ace_tree-light { + background-image: url(../lib/ace_tree/css/tree_background.png); +} + +.ace_tree_focus.ace_tree-light .tree-row.selected { + border-top: 1px solid #3A9BEC; + border-bottom: 1px solid #185F97; + background: linear-gradient(center bottom, #1f82d2 0%, #2890e5 100%) repeat scroll 0 0 transparent; + color: #f8f8f8; +} +.ace_tree_focus.ace_tree-light .tree-row.selected .tree-column{ + border-bottom-color: transparent; +} \ No newline at end of file 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 4ad84e79..5c9fa478 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 @@ -164,6 +164,7 @@ function DefaultHandlers(mouseHandler) { }; this.onMouseUp = function(ev) { + if (this.isMousePressed) return; var pos = ev.getDocumentPosition(); var node = this.editor.provider.findItemAtOffset(pos.y); if (node && this.$clickNode && this.$clickNode == node) { diff --git a/node_modules/ace_tree/lib/ace_tree/mouse/mouse_handler.js b/node_modules/ace_tree/lib/ace_tree/mouse/mouse_handler.js index 4693d776..77cf4235 100644 --- a/node_modules/ace_tree/lib/ace_tree/mouse/mouse_handler.js +++ b/node_modules/ace_tree/lib/ace_tree/mouse/mouse_handler.js @@ -54,7 +54,7 @@ var MouseHandler = function(editor) { }); event.addListener(mouseTarget, "mousemove", this.onMouseEvent.bind(this, "mousemove")); - // event.addListener(mouseTarget, "mouseup", this.onMouseEvent.bind(this, "mouseup")); + event.addListener(mouseTarget, "mouseup", this.onMouseEvent.bind(this, "mouseup")); event.addMultiMouseDownListener(mouseTarget, [300, 300, 250], this, "onMouseEvent"); event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [300, 300, 250], this, "onMouseEvent"); event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [300, 300, 250], this, "onMouseEvent"); 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 3400c429..031237ef 100644 --- a/node_modules/ace_tree/lib/ace_tree/virtual_renderer.js +++ b/node_modules/ace_tree/lib/ace_tree/virtual_renderer.js @@ -411,7 +411,7 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { sm.v = sm.top + sm.bottom; sm.h = sm.left + sm.right; if (sm.top && this.scrollTop <= 0 && this.provider) - this.provider.setScrollTop(sm.top); + this.provider.setScrollTop(-sm.top); this.updateFull(); }; this.$updateScrollBarV = function() { @@ -708,6 +708,8 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { if (this.scrollTop > top) { if (offset) top -= offset * this.$size.scrollerHeight; + if (top === 0) + top = -this.scrollMargin.top; this.provider.setScrollTop(top); } else if (this.scrollTop + this.$size.scrollerHeight < top + height) { if (offset) @@ -918,9 +920,10 @@ var VirtualRenderer = function(container, cellWidth, cellHeight) { * @returns {Boolean} **/ this.isScrollableBy = function(deltaX, deltaY) { - if (deltaY < 0 && this.getScrollTop() >= 1) + if (deltaY < 0 && this.getScrollTop() >= 1 - this.scrollMargin.top) return true; - if (deltaY > 0 && this.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight < -1) + if (deltaY > 0 && this.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight + < -1 + this.scrollMargin.bottom) return true; if (deltaX < 0 && this.getScrollLeft() >= 1) return true; diff --git a/node_modules/vfs-local/localfs.js b/node_modules/vfs-local/localfs.js index f5262624..2245553c 100644 --- a/node_modules/vfs-local/localfs.js +++ b/node_modules/vfs-local/localfs.js @@ -1972,6 +1972,7 @@ module.exports = function setup(fsOptions) { pty.kill = function() {}; } + this.killtree = this.kill = isOutput ? function(signal){ // We dont want to really kill, just stop the process if (signal == -1) { @@ -2198,6 +2199,8 @@ module.exports = function setup(fsOptions) { } function execFile(executablePath, options, callback) { + if (isWin && execFileWin(executablePath, options, callback)) + return; if (options.hasOwnProperty('env')) { options.env.__proto__ = fsOptions.defaultEnv; } else { @@ -2230,6 +2233,22 @@ module.exports = function setup(fsOptions) { }); }); } + + function execFileWin(executablePath, options, callback) { + if (executablePath == "kill") { + var pid = options.args && options.args[0]; + console.error(pid, sessions) + Object.keys(sessions).some(function(key) { + if (sessions[key].pid == pid && sessions[key].pty) { + console.error(sessions[key].pty.pid) + sessions[key].pty.killtree(-1); + return true; + } + }); + callback(); + return true; + } + } function killtree(pid, options, callback) { var code = options.code || "SIGKILL"; diff --git a/package.json b/package.json index ce796cde..96cc49bd 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "licenses": [], "c9plugins": { - "c9.ide.language": "#a6b859c38e", + "c9.ide.language": "#34de5e56ae", "c9.ide.language.css": "#afda1f867c", "c9.ide.language.generic": "#87a4a44671", "c9.ide.language.html": "#fa4833e117", @@ -65,7 +65,7 @@ "c9.ide.find": "#989c06e6a7", "c9.ide.find.infiles": "#f98dfef554", "c9.ide.find.replace": "#e4daf722b8", - "c9.ide.run.debug": "#df6615768a", + "c9.ide.run.debug": "#a3e0f7b134", "c9.ide.ace.emmet": "#e5f1a92ac3", "c9.ide.ace.gotoline": "#4d1a93172c", "c9.ide.ace.keymaps": "#6c4bb65b1f", @@ -94,7 +94,7 @@ "c9.ide.readonly": "#f6f07bbe42", "c9.ide.recentfiles": "#7c099abf40", "c9.ide.remote": "#37773d905b", - "c9.ide.run": "#431e263eac", + "c9.ide.run": "#f5a056e6ce", "c9.ide.run.build": "#6726030127", "c9.ide.save": "#a32a8f4346", "c9.ide.terminal.monitor": "#df9936daa2", diff --git a/plugins/c9.core/util.js b/plugins/c9.core/util.js index ada29ab0..538a5aa6 100644 --- a/plugins/c9.core/util.js +++ b/plugins/c9.core/util.js @@ -270,7 +270,7 @@ define(function(require, exports, module) { var reHome = new RegExp("^" + plugin.escapeRegExp(c9.home || "/home/ubuntu")); plugin.normalizePath = function(path){ if (!path || path.charAt(0) == "~") return path; - return ("/" + path.replace(/^[\/]+/, "")).replace(reHome, "~"); + return (path.replace(/^[\/]+/, "/")).replace(reHome, "~"); }; /** diff --git a/plugins/c9.ide.layout.classic/less/list_dark.less b/plugins/c9.ide.layout.classic/less/list_dark.less index 3a41a618..383a4616 100644 --- a/plugins/c9.ide.layout.classic/less/list_dark.less +++ b/plugins/c9.ide.layout.classic/less/list_dark.less @@ -1,7 +1,13 @@ .has_apf .list_dark{ display : block; } -.list_dark .menu_item:hover{ - background-color : #262626; - color : #a0b42a; +.list_dark .menu_item:hover, +.list_dark .tree-row:hover, +.list_dark .tree-row.hover { + background-color : @menu-item-hover-background; + color : @menu-item-hover-color; +} +.list_dark .tree-row .caption { + display: inline-block; + padding: @datagrid-row-padding; } \ No newline at end of file diff --git a/plugins/c9.ide.ui/lib/menu/menu.js b/plugins/c9.ide.ui/lib/menu/menu.js index dc71cabe..bfce4a33 100644 --- a/plugins/c9.ide.ui/lib/menu/menu.js +++ b/plugins/c9.ide.ui/lib/menu/menu.js @@ -938,7 +938,7 @@ apf.menu = function(struct, tagName){ // workaround for a chrome bug where clicking on shadow clciks on contents of overflown element this.$ext.addEventListener("mouseup", function(e) { var rect = this.getBoundingClientRect(); - if (e.clientY > rect.bottom) { + if (e.clientY > rect.bottom && rect.height) { e.stopPropagation(); e.preventDefault(); }