Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into hotfix/splitview
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedeboer committed Apr 23, 2012
2 parents 30e82ca + aac03f7 commit 9423a6f
Show file tree
Hide file tree
Showing 43 changed files with 398 additions and 175 deletions.
5 changes: 5 additions & 0 deletions Makefile
@@ -1,3 +1,5 @@
.PHONY: apf ext worker mode theme package test

UNAME := $(shell uname)

# don't know what the uname values are for other platforms
Expand Down Expand Up @@ -36,3 +38,6 @@ theme:
cp `find support/ace/build/src | grep -E "theme-[a-zA-Z_]+.js"` client/build/theme

package: apf ext worker mode theme

test:
$(MAKE) -C test
2 changes: 1 addition & 1 deletion client/build/worker/worker-coffee.js
Expand Up @@ -2162,7 +2162,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
}

this.intersectsRange = function(range) {
this.intersects = function(range) {
var cmp = this.compareRange(range);
return (cmp == -1 || cmp == 0 || cmp == 1);
}
Expand Down
2 changes: 1 addition & 1 deletion client/build/worker/worker-css.js
Expand Up @@ -2136,7 +2136,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
}

this.intersectsRange = function(range) {
this.intersects = function(range) {
var cmp = this.compareRange(range);
return (cmp == -1 || cmp == 0 || cmp == 1);
}
Expand Down
2 changes: 1 addition & 1 deletion client/build/worker/worker-javascript.js
Expand Up @@ -2158,7 +2158,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
}

this.intersectsRange = function(range) {
this.intersects = function(range) {
var cmp = this.compareRange(range);
return (cmp == -1 || cmp == 0 || cmp == 1);
}
Expand Down
2 changes: 1 addition & 1 deletion client/build/worker/worker-json.js
Expand Up @@ -2173,7 +2173,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
}

this.intersectsRange = function(range) {
this.intersects = function(range) {
var cmp = this.compareRange(range);
return (cmp == -1 || cmp == 0 || cmp == 1);
}
Expand Down
2 changes: 1 addition & 1 deletion client/build/worker/worker.js
Expand Up @@ -5861,7 +5861,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
}

this.intersectsRange = function(range) {
this.intersects = function(range) {
var cmp = this.compareRange(range);
return (cmp == -1 || cmp == 0 || cmp == 1);
}
Expand Down
8 changes: 4 additions & 4 deletions client/core/ide.js
Expand Up @@ -40,7 +40,7 @@ define(function(require, exports, module) {
&& loc.indexOf("dev") == -1
&& (loc.indexOf("cloud9ide.com") > -1 || loc.indexOf("c9.io") > -1))
{
window.onerror = function(m, u, l) {
/*window.onerror = function(m, u, l) {
if (window.console)
console.log("An error occurred, the Cloud9 system admin has been notified.");
apf.ajax("/api/debug", {
Expand All @@ -54,10 +54,10 @@ define(function(require, exports, module) {
})
});
return true;
};
};*/

//Catch all APF Routed errors
apf.addEventListener("error", function(e){
/*apf.addEventListener("error", function(e){
apf.ajax("/api/debug", {
method : "POST",
contentType : "application/json",
Expand All @@ -72,7 +72,7 @@ define(function(require, exports, module) {
workspaceId : ide.workspaceId
})
});
});
});*/
}
else {
// window.onerror = function(m, u, l) {
Expand Down
16 changes: 10 additions & 6 deletions client/ext/consolehints/consolehints.js
Expand Up @@ -118,8 +118,9 @@ module.exports = ext.register("ext/consolehints/consolehints", {

//txtConsoleInput.addEventListener("blur", function(e) { _self.hide(); });
txtConsoleInput.addEventListener("keyup", function(e) {
// Ignore up/down cursor arrows here
if (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 9) return;
// Ignore up/down cursor arrows, enter, here
if (e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 9 || e.keyCode === 13)
return;
var getCmdMatches = function(filtered) {
var cli = e.currentTarget;
if (filtered.length && filtered[0] !== "[PATH]")
Expand Down Expand Up @@ -163,7 +164,7 @@ module.exports = ext.register("ext/consolehints/consolehints", {
// try executing the redefined mapping
// if it returns false, then execute the old func
if (!_self[redefinedKeys[keyCode]].call(_self)) {
previousKey(target);
previousKey && previousKey(target);
_self.hide();
}
}
Expand Down Expand Up @@ -215,6 +216,9 @@ module.exports = ext.register("ext/consolehints/consolehints", {
e.preventDefault();

var node = e.target;
this.setSelection(node);
},
setSelection: function(node){
if (node.parentNode != hintsContent && node != hintsContent)
node = node.parentNode;

Expand Down Expand Up @@ -306,12 +310,12 @@ module.exports = ext.register("ext/consolehints/consolehints", {
var hintNodes = hintsContent.childNodes;
for (var i = 0, l = hintNodes.length; i < l; ++i) {
if (hintNodes[i].className === "selected") {
this.click({ target: hintNodes[i] });
this.setSelection(hintNodes[i]);
handled = true;
break;
}
}

return handled;
},
selectUp: function() {
Expand Down Expand Up @@ -351,7 +355,7 @@ module.exports = ext.register("ext/consolehints/consolehints", {
return winHints && !!winHints.visible;
},
selected: function() {
return selectedHint && hintsContent.childNodes
return (selectedHint || selectedHint >= 0) && hintsContent.childNodes.length > 0
? hintsContent.childNodes[selectedHint]
: false;
}
Expand Down
1 change: 1 addition & 0 deletions client/ext/editors/editors.js
Expand Up @@ -11,6 +11,7 @@ var ide = require("core/ide");
var ext = require("core/ext");
var util = require("core/util");
var settings = require("ext/settings/settings");
var main = require("ext/main/main"); //Needed for execution sorting

module.exports = ext.register("ext/editors/editors", {
name : "Editors",
Expand Down
3 changes: 3 additions & 0 deletions client/ext/language/liveinspect.xml
@@ -1,4 +1,6 @@
<a:application xmlns:a="http://ajax.org/2005/aml">
<a:model id="mdlLiveInspect"/>

<a:bar id="winLiveInspect"
modal = "false"
center = "false"
Expand All @@ -17,6 +19,7 @@
scrollbar = "sbShared 20 2 2"
prerender = "false"
caching = "false"
model = "mdlLiveInspect"
empty-message = "Loading..."
loading-message = "Calculating...">
<a:actions />
Expand Down
56 changes: 2 additions & 54 deletions client/ext/main/style/skins.xml
Expand Up @@ -2797,7 +2797,8 @@
<a:style><![CDATA[
.ace_editor {
position: relative;
overflow: hidden;
font-family: Monaco, Menlo, Consolas, monospace;
color: black;
}
.ace_scroller {
Expand All @@ -2820,19 +2821,6 @@
user-select: none;
}
.ace_editor .ace_sb {
position: absolute;
overflow-x: hidden;
overflow-y: scroll;
right: 0;
}
.ace_editor .ace_sb div {
position: absolute;
width: 1px;
left: 0px;
}
.ace_editor .ace_printMargin {
position: absolute;
height: 100%;
Expand All @@ -2842,53 +2830,13 @@
.ace_layer {
z-index: 0;
position: absolute;
overflow: hidden;
white-space: nowrap;
height: 100%;
}
.ace_text-layer {
font-family: Monaco, Menlo, Consolas, monospace;
color: black;
}
.ace_cursor-layer {
cursor: text;
}
.ace_cursor {
z-index: 3;
position: absolute;
}
.ace_line {
white-space: nowrap;
}
.ace_marker-layer {
}
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
position: absolute;
z-index: 2;
}
.ace_marker-layer .ace_selection {
position: absolute;
z-index: 3;
}
.ace_marker-layer .ace_bracket {
position: absolute;
z-index: 4;
}
.ace_marker-layer .ace_active_line {
position: absolute;
z-index: 1;
}
.ceDisabled {
border: 1px solid #c3c3c3;
color: #bebebe;
Expand Down
8 changes: 7 additions & 1 deletion client/ext/searchinfiles/searchinfiles.js
Expand Up @@ -247,7 +247,13 @@ module.exports = ext.register("ext/searchinfiles/searchinfiles", {
davProject.report(node.getAttribute("path"), "codesearch", options, function(data, state, extra){
_self.replaceAll = false; // reset

var matches = parseInt(data.getAttribute("count"), 10);
var matches = data.getElementsByTagNameNS("DAV:", "excerpt").length;
var queryDetails = data.getElementsByTagNameNS("DAV:", "querydetail");
window.data = data;
if(queryDetails.length === 1) {
queryDetails[0].setAttribute("count", ""+matches);
queryDetails[0].setAttribute("filecount", ""+data.getElementsByTagNameNS("DAV:", "response").length);
}
if (state !== apf.SUCCESS || !matches) {
var optionsDesc = [];
if (Util.isTrue(options.casesensitive)) {
Expand Down
5 changes: 3 additions & 2 deletions client/ext/tabbehaviors/tabbehaviors.js
Expand Up @@ -669,10 +669,11 @@ module.exports = ext.register("ext/tabbehaviors/tabbehaviors", {

removeItem: function(page) {
var item, idx, keyId;
var i = this.menuOffset;
var i = 0;
var l = this.nodes.length;
var _self = this;
for (; i < l; ++i) {

for (; i < l; i++) {
if ((item = this.nodes[i]).relPage == page.id) {
item.destroy(true, true);
this.nodes.splice(i, 1);
Expand Down
10 changes: 8 additions & 2 deletions client/ext/tree/tree.xml
Expand Up @@ -76,7 +76,10 @@
<a:divider />
<a:item match="[file|folder|project]" onclick="
var store = apf.clipboard.store;
apf.clipboard.copySelection(apf.activeElement);
apf.clipboard.put(trFiles.getSelection().map(function (node) {
   return apf.xmldb.cleanNode(node.cloneNode(false))
}));
apf.clipboard.copied = true;
apf.clipboard.pasteSelection(apf.activeElement, trFiles.selected ? trFiles.selected.parentNode : trFiles.getFirstTraverseNode());
apf.clipboard.store = store;
">Duplicate</a:item>
Expand All @@ -85,7 +88,10 @@
apf.clipboard.cutSelection(apf.activeElement);
">Cut</a:item>
<a:item match="[file|folder[not(@root)]]" onclick="
apf.clipboard.copySelection(apf.activeElement);
apf.clipboard.put(trFiles.getSelection().map(function (node) {
   return apf.xmldb.cleanNode(node.cloneNode(false))
}));
apf.clipboard.copied = true;
">Copy</a:item>
<a:item match="[file|folder|project]" disabled="{apf.clipboard.empty}" onclick="
apf.clipboard.pasteSelection(apf.activeElement);
Expand Down
12 changes: 2 additions & 10 deletions client/js/apf_release.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/js/worker/worker.js
Expand Up @@ -5860,7 +5860,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
}

this.intersectsRange = function(range) {
this.intersects = function(range) {
var cmp = this.compareRange(range);
return (cmp == -1 || cmp == 0 || cmp == 1);
}
Expand Down
4 changes: 2 additions & 2 deletions server/cloud9/dav/permission.js
@@ -1,5 +1,5 @@
var jsDAV_ServerPlugin = require("DAV/plugin").jsDAV_ServerPlugin;
var sys = require("sys");
var util = require("util");
var Exec = require("child_process").exec;

var Permission = module.exports = function(handler) {
Expand All @@ -9,7 +9,7 @@ var Permission = module.exports = function(handler) {
handler.addEventListener("beforeMethod", this.checkPermission.bind(this));
};

sys.inherits(Permission, jsDAV_ServerPlugin);
util.inherits(Permission, jsDAV_ServerPlugin);

(function() {

Expand Down
6 changes: 3 additions & 3 deletions server/cloud9/error.js
@@ -1,12 +1,12 @@
var sys = require("sys");
var util = require("util");

exports.HttpError = function(message, code) {
Error.call(this, message);
//Error.captureStackTrace(this, arguments.callee);
this.message = message;
this.code = code;
};
sys.inherits(exports.HttpError, Error);
util.inherits(exports.HttpError, Error);

(function() {

Expand Down Expand Up @@ -85,7 +85,7 @@ for (var status in statusCodes) {
};
})(defaultMsg, status);

sys.inherits(error, exports.HttpError);
util.inherits(error, exports.HttpError);

var className = toCamelCase(defaultMsg);
exports[className] = error;
Expand Down
4 changes: 2 additions & 2 deletions server/cloud9/ext/auth/auth.js
Expand Up @@ -5,15 +5,15 @@
* @license GPLv3 <http://www.gnu.org/licenses/gpl.txt>
*/
var Plugin = require("cloud9/plugin");
var sys = require("sys");
var util = require("util");

var AuthPlugin = module.exports = function(ide, workspace) {
Plugin.call(this, ide, workspace);
this.hooks = ["command"];
this.name = "auth";
};

sys.inherits(AuthPlugin, Plugin);
util.inherits(AuthPlugin, Plugin);

(function() {

Expand Down

0 comments on commit 9423a6f

Please sign in to comment.