Skip to content

Commit

Permalink
Merge pull request #44 from exsilium/development
Browse files Browse the repository at this point in the history
v2.2.1 Release
  • Loading branch information
exsilium authored Jun 7, 2018
2 parents a644075 + 41eb83b commit 62fb4b3
Show file tree
Hide file tree
Showing 12 changed files with 4,016 additions and 312 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js
node_js:
- "node"
- "9"
- "8"
- "7"
- "6"
Expand Down
8 changes: 8 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
V2.2.1
======
* Improvements to UndoManager and APF ActionTracker usage (File editing status is correctly shown) #40
* Fix for possible server crash when refreshing browser with terminals open #42
* Dependency updates
* Gemnasium badge removal
* Includes ACE v1.3.3

V2.2.0
======
* Drop support for legacy node version v0.10, v0.11, v0.12, io.js
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Build Status](https://travis-ci.org/exsilium/cloud9.svg?branch=master)](https://travis-ci.org/exsilium/cloud9)
[![Master Dependency Status](https://beta.gemnasium.com/badges/github.com/exsilium/cloud9.svg)](https://beta.gemnasium.com/projects/github.com/exsilium/cloud9)
[![Development Dependency Status](https://beta.gemnasium.com/badges/bitbucket.org/c9dev/cloud9-development.svg)](https://beta.gemnasium.com/projects/bitbucket.org/c9dev/cloud9-development)
[![Master Dependency Status](https://snyk.io/test/github/exsilium/cloud9/badge.svg)](https://snyk.io/test/github/exsilium/cloud9)
[![Development Dependency Status](https://snyk.io/test/github/exsilium/cloud9/development/badge.svg)](https://snyk.io/test/github/exsilium/cloud9)
[![Bitcoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://www.coinbase.com/checkouts/9f4183a5164f2c4bd53d6afc74068ec4 "One-time donation to keep this fork alive")

# Cloud9 IDE v2
Expand Down
4,042 changes: 3,881 additions & 161 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cloud9",
"description": "Cloud9 IDE",
"version": "2.2.0",
"version": "2.2.1",
"homepage": "http://github.com/exsilium/cloud9",
"engines": {
"node": ">= 4.8.5"
Expand All @@ -15,24 +15,24 @@
"web": "https://github.com/exsilium/cloud9/blob/master/README.md"
},
"dependencies": {
"async": "~2.6.0",
"colors": "~1.1.2",
"async": "~2.6.1",
"colors": "~1.3.0",
"connect": "~3.6.6",
"express-session": "~1.15.6",
"cookie-parser": "~1.4.3",
"body-parser": "~1.18.2",
"serve-static": "~1.13.1",
"serve-favicon": "~2.4.5",
"body-parser": "~1.18.3",
"serve-static": "~1.13.2",
"serve-favicon": "~2.5.0",
"csurf": "~1.9.0",
"urlrouter": "~0.5.4",
"qs": "~6.5.1",
"qs": "~6.5.2",
"parseurl": "~1.3.2",
"passport": "~0.4.0",
"passport-http": "~0.3.0",
"optimist": "~0.6.1",
"msgpack-js-browser": "~0.1.4",
"engine.io": "~3.1.5",
"engine.io-client": "~3.1.5",
"engine.io": "~3.2.0",
"engine.io-client": "~3.2.1",
"dryice": "0.4.11",
"amd-loader": "~0.0.8",
"http-error": "~0.0.6",
Expand All @@ -42,7 +42,7 @@
"architect": "~0.1.13",
"node-pty": "~0.7.4",
"xterm": "~3.1.0",
"ace": "https://github.com/ajaxorg/ace/tarball/v1.3.1",
"ace": "https://github.com/ajaxorg/ace/tarball/v1.3.3",
"smith": "https://github.com/exsilium/smith/tarball/4d0f096553a47160330f5dd9bac8bf77cc27e8ab",
"architect-build": "https://github.com/exsilium/architect-build/tarball/299d7cf718c9a66192faf18cf85680b98ee3ac86",
"vfs-architect": "https://github.com/exsilium/vfs-architect/tarball/6a729efb9ba8241aab0c354f098caf1b0f7c18db",
Expand Down
25 changes: 9 additions & 16 deletions plugins-client/ext.code/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,13 @@ var UndoManager = require("ace/undomanager").UndoManager;

require("ace/config").setDefaultValue("renderer", "vScrollBarAlwaysVisible", true);

apf.actiontracker.actions.aceupdate = function(undoObj, undo){
var q = undoObj.args;

if (!undoObj.initial) {
undoObj.initial = true;
return;
}

if (undo)
q[1].undoChanges(q[0]);
else
q[1].redoChanges(q[0]);
};

var modes = require("./modes");
var SupportedModes = modes.all;

var fileExtensions = modes.extensions;
var ModesCaption = modes.captions;
var contentTypes = modes.types;


module.exports = ext.register("ext/code/code", {
name : "Code Editor",
extName : "ext/code/code",
Expand Down Expand Up @@ -219,7 +204,7 @@ module.exports = ext.register("ext/code/code", {
doc.acesession.c9doc = doc;

doc.acesession.setUndoManager(new UndoManager());

if (doc.isInited && doc.state)
_self.setState(doc, doc.state);

Expand Down Expand Up @@ -294,6 +279,14 @@ module.exports = ext.register("ext/code/code", {
//??? call doc.$page.destroy()
});
});

doc.acesession.addEventListener("change", function(e) {
if(doc.isInited) {
doc.$page.dispatchEvent("afterchange", {
action : "do"
});
}
});

doc.dispatchEvent("init");
}
Expand Down
2 changes: 1 addition & 1 deletion plugins-client/ext.dockpanel/libdock.js
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ var DockableLayout = module.exports = function(parentHBox, cbFindPage, cbStorePa
resizable : options.resizable === false ? false : "left bottom",
dock : 1,
minwidth : options.minWidth ? options.minWidth : 150,
minheight : options.minHeight ? options.minHeight : (options.height || 150),
minheight : options.minHeight ? options.minHeight : 150,
onhide : function(e){
if (this.firstChild && this.firstChild.getPage())
this.firstChild.getPage().$dockbutton.$dockData.showMenu = false;
Expand Down
62 changes: 21 additions & 41 deletions plugins-client/ext.editors/editors.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var util = require("core/util");
var settings = require("core/settings");
var commands = require("ext/commands/commands");
var anims = require("ext/anims/anims");
var UndoManager = require("ace/undomanager").UndoManager;

/*global tabEditors colMiddle barButtonContainer barButtons tabExtMgr tabmenubtn
trfiles logobar*/
Expand Down Expand Up @@ -439,8 +440,7 @@ module.exports = ext.register("ext/editors/editors", {
tabEditors.$buttons.style.overflow = "";

var model = new apf.model();
var fake = tabs.add("{([@changed] == 1 ? '*' : '') + %[.].getAttribute('name')}", filepath, editor.path, null, function(page){
page.$at = new apf.actiontracker();
var fake = tabs.add("{([@changed] == 1 ? '*' : '') + %[.].getAttribute('name')}", filepath, editor.path, null, function(page) {
page.$doc = doc;
doc.$page = page;
page.$editor = editor;
Expand Down Expand Up @@ -501,38 +501,27 @@ module.exports = ext.register("ext/editors/editors", {
},

initEditorEvents: function(page, model) {
model = model || page.$model;
page.$at.addEventListener("afterchange", function(e) {
if (e.action == "reset") {
delete this.undo_ptr;
return;
}

var val;
if (page.$at.ignoreChange) {
val = undefined;
page.$at.ignoreChange = false;
}
else if(this.undolength === 0 && !this.undo_ptr) {
val = undefined;
}
else {
val = (this.$undostack[this.$undostack.length - 1] !== this.undo_ptr)
? 1
: undefined;
}
model = model || page.$model;
page.addEventListener("afterchange", function(e) {
var val;
if(page.$editor.amlEditor.$editor.session.getUndoManager().$undoStack.length === 0) {
val = undefined;
}
else {
val = 1;
}

if (Number(model.queryValue("@changed")) !== Number(val)) {
model.setQueryValue("@changed", (val ? "1" : "0"));
if (Number(model.queryValue("@changed")) !== Number(val)) {
model.setQueryValue("@changed", (val ? "1" : "0"));

var node = page.$model.data;
ide.dispatchEvent("updatefile", {
changed : val ? 1 : 0,
xmlNode : node,
newPath: e.newPath
});
}
});
var node = page.$model.data;
ide.dispatchEvent("updatefile", {
changed : val ? 1 : 0,
xmlNode : node,
newPath: e.newPath
});
}
});
},

resizeTabs : function(cancel){
Expand Down Expand Up @@ -582,15 +571,6 @@ module.exports = ext.register("ext/editors/editors", {

//If there are no more pages left, reset location
if (tabEditors.getPages().length == 1) {
/*if (window.history.pushState) {
var p = location.pathname.split("/");
window.history.pushState(path, path, "/" + (p[1] || "") + "/" + (p[2] || ""));
}
else {
apf.history.setHash("");
}*/
//apf.history.setHash("");

editor.clear && editor.clear();
require("ext/editors/editors").currentEditor = null;

Expand Down
2 changes: 1 addition & 1 deletion plugins-client/ext.main/style/skins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@
color : #cecece;
height : 20px;
padding : 4px 2px 0 2px;
margin : 0 5px;
margin : 1px 5px;
text-shadow : rgba(41, 42, 43, 1) 0px 1px 0px;
}
Expand Down
Loading

0 comments on commit 62fb4b3

Please sign in to comment.