diff --git a/.gitmodules b/.gitmodules
index 22e3dda5..aee8d549 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,30 +1,9 @@
-[submodule "tool/support/node-o3-xml"]
- path = tool/support/node-o3-xml
- url = git://github.com/ajaxorg/node-o3-xml.git
-[submodule "tool/support/async"]
- path = tool/support/async
- url = git://github.com/fjakobs/async.js.git
-[submodule "support/requirejs"]
- path = support/requirejs
- url = git://github.com/jrburke/requirejs.git
[submodule "support/node-o3-xml"]
path = support/node-o3-xml
url = git://github.com/ajaxorg/node-o3-xml.git
-[submodule "support/async"]
- path = support/async
- url = git://github.com/fjakobs/async.js.git
-[submodule "support/jsdom"]
- path = support/jsdom
- url = git://github.com/tmpvar/jsdom.git
-[submodule "support/node-htmlparser"]
- path = support/node-htmlparser
- url = git://github.com/tautologistics/node-htmlparser.git
[submodule "support/cockpit"]
path = support/cockpit
- url = git://github.com/mozilla/cockpit.git
+ url = git://github.com/ajaxorg/cockpit.git
[submodule "support/pilot"]
path = support/pilot
- url = git://github.com/ajaxorg/pilot.git
-[submodule "support/dryice"]
- path = support/dryice
- url = git://github.com/mozilla/dryice.git
\ No newline at end of file
+ url = git://github.com/ajaxorg/pilot.git
\ No newline at end of file
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
old mode 100644
new mode 100755
index 6ed1dd70..c60702a3
--- a/Makefile.dryice.js
+++ b/Makefile.dryice.js
@@ -1,3 +1,4 @@
+#!/usr/bin/env node
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -44,7 +45,7 @@ var aceHome = __dirname;
var pilot = copy.createDataObject();
copy({
source: [ {
- root: aceHome + '/support/cockpit/support/pilot/lib',
+ root: aceHome + '/support/pilot/lib',
include: /.*\.js$/,
exclude: /tests?\//
} ],
@@ -137,7 +138,7 @@ copy({
// Create the compressed and uncompressed output files
copy({
source: data,
- filter: copy.filter.uglifyjs,
+ //filter: copy.filter.uglifyjs,
dest: 'build/ace.js'
});
copy({
diff --git a/Readme.md b/Readme.md
index 5d7f84c8..8897212b 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1,6 +1,70 @@
-ACE (Ajax.org Code Editor)
-==========================
+Ace (Ajax.org Cloud9 Editor)
+============================
-ACE is a standalone code editor written in JavaScript. It can be easily embedded in any web page and JavaScript application. It is currently used as the editor component of the [Cloud9 IDE](http://cloud9ide.com).
+Ace is a standalone code editor written in JavaScript. Our goal is to create a web based code editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page and JavaScript application. Ace is developed as the primary editor for [Cloud9 IDE](http://www.cloud9ide.com/) and the successor of the Mozilla Skywriter (Bespin) Project.
+
+Features
+--------
+
+* Syntax highlighting
+* Auto indentation and outdent
+* An optional command line
+* Work with huge documents (100,000 lines and more are no problem)
+* Fully customizable key bindings including VI and Emacs modes
+* Themes (TextMate themes can be imported)
+* Search and replace with regular expressions
+* Highlight matching parentheses
+* Toggle between soft tabs and real tabs
+* Displays hidden characters
+
+Take Ace for a spin!
+--------------------
+
+Check out the Ace live [demo](http://ajaxorg.github.com/ace/editor-build.html) or get a [Cloud9 IDE account](http://run.cloud9ide.com) to experience Ace while editing one of your own GitHub projects.
+
+History
+-------
+
+Previously known as “Bespin” or lately “Skywriter” it’s now known as Ace (Ajax.org Cloud9 Editor)! Bespin and Ace started as two independent projects both aiming to build a no compromise code editor component for the web. Bespin started as part of Mozilla Labs and was based on the canvas tag, while Ace is the Editor component of the Cloud9 IDE and is using the DOM for rendering. After the release of Ace at JSConf.eu 2010 in Berlin the Skywriter team decided to merge Ace with a simplified version of Skywriter's plugin system and some of Skywriter's extensibility points. All these changes have been merged back to Ace now, which supersedes Skywriter. Both Ajax.org and Mozilla are actively developing and maintaining Ace.
+
+Getting the code
+----------------
+
+Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the Mozilla tri-license (MPL/GPL/LGPL). This is the same license used by Firefox. This license is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!
+
+ git clone git://github.com/ajaxorg/ace.git
+ git submodule update --init --recursive
+
+Running Ace
+-----------
+
+After the checkout Ace works out of the box. No build step is required. Simply open 'editor.html' in any browser except Google Chrome. Google Chrome doesn't allow XMLHTTPRequests from files loaded from disc (i.e. with a file:/// URL). To open the Ace in Chrome simply start the bundled mini HTTP server:
+
+ ./static.py
+
+The editor can then be opened at http://localhost:9999/editor.html.
+
+Package Ace
+-----------
+
+To package Ace we use the dryice build tool developed by the Mozilla Skywriter team. To install dryice and all its dependencies simply call:
+
+ npm link .
+
+Afterwards Ace can by build by calling
+
+ ./Makefile.dryice.js
+
+The packaged Ace will be put in the 'build' folder.
+
+Running the Unit Tests
+----------------------
+
+The Ace unit tests run on node.js. Before the first run a couple of node mudules have to be installed. The easiest way to do this is by using the node package manager (npm). In the Ace base directory simply call
+
+ npm link .
+
+To run the tests call:
+
+ node lib/ace/test/all.js
-Checkout the [demo](http://ajaxorg.github.com/ace/editor-build.html)!
diff --git a/build_support/boot.js b/build_support/boot.js
index e311cebc..f61e91d6 100644
--- a/build_support/boot.js
+++ b/build_support/boot.js
@@ -51,20 +51,20 @@ var ace = {
var env = require("pilot/environment").create();
var catalog = require("pilot/plugin_manager").catalog;
catalog.startupPlugins({ env: env }).then(function() {
- var Document = require("ace/document").Document;
+ var EditSession = require("ace/edit_session").EditSession;
var JavaScriptMode = require("ace/mode/javascript").Mode;
var UndoManager = require("ace/undomanager").UndoManager;
var Editor = require("ace/editor").Editor;
var Renderer = require("ace/virtual_renderer").VirtualRenderer;
var theme = require("ace/theme/textmate");
- var doc = new Document(el.innerHTML);
+ var doc = new EditSession(el.innerHTML);
el.innerHTML = '';
doc.setMode(new JavaScriptMode());
doc.setUndoManager(new UndoManager());
env.document = doc;
env.editor = new Editor(new Renderer(el, theme));
- env.editor.setDocument(doc);
+ env.editor.setSession(doc);
env.editor.resize();
window.addEventListener("resize", function() {
env.editor.resize();
diff --git a/build_support/mini_require.js b/build_support/mini_require.js
index 63bcf28b..9500fbc2 100644
--- a/build_support/mini_require.js
+++ b/build_support/mini_require.js
@@ -88,6 +88,6 @@ function define(module, payload) {
return;
}
- console.log('defining module: ' + module + ' as a ' + typeof payload);
+ // console.log('defining module: ' + module + ' as a ' + typeof payload);
require.modules[module] = payload;
}
diff --git a/demo/startup.js b/demo/startup.js
index 41d8321f..419e2667 100644
--- a/demo/startup.js
+++ b/demo/startup.js
@@ -44,8 +44,8 @@ exports.launch = function(env) {
var event = require("pilot/event");
var Editor = require("ace/editor").Editor;
var Renderer = require("ace/virtual_renderer").VirtualRenderer;
- var theme = require("ace/theme/textmate");
- var Document = require("ace/document").Document;
+ var theme = require("ace/theme/textmate");
+ var EditSession = require("ace/edit_session").EditSession;
var JavaScriptMode = require("ace/mode/javascript").Mode;
var CssMode = require("ace/mode/css").Mode;
var HtmlMode = require("ace/mode/html").Mode;
@@ -63,26 +63,26 @@ exports.launch = function(env) {
var docs = {};
- docs.js = new Document(document.getElementById("jstext").innerHTML);
+ docs.js = new EditSession(document.getElementById("jstext").innerHTML);
docs.js.setMode(new JavaScriptMode());
docs.js.setUndoManager(new UndoManager());
var worker = new WorkerClient("../..", ["ace", "pilot"], "ace/worker/demo", "Demo");
worker.send("juhu");
- docs.css = new Document(document.getElementById("csstext").innerHTML);
+ docs.css = new EditSession(document.getElementById("csstext").innerHTML);
docs.css.setMode(new CssMode());
docs.css.setUndoManager(new UndoManager());
- docs.html = new Document(document.getElementById("htmltext").innerHTML);
+ docs.html = new EditSession(document.getElementById("htmltext").innerHTML);
docs.html.setMode(new HtmlMode());
docs.html.setUndoManager(new UndoManager());
- docs.python = new Document(document.getElementById("pythontext").innerHTML);
+ docs.python = new EditSession(document.getElementById("pythontext").innerHTML);
docs.python.setMode(new PythonMode());
docs.python.setUndoManager(new UndoManager());
- docs.php = new Document(document.getElementById("phptext").innerHTML);
+ docs.php = new EditSession(document.getElementById("phptext").innerHTML);
docs.php.setMode(new PhpMode());
docs.php.setUndoManager(new UndoManager());
@@ -107,7 +107,7 @@ exports.launch = function(env) {
var modeEl = document.getElementById("mode");
function setMode() {
- env.editor.getDocument().setMode(modes[modeEl.value] || modes.text);
+ env.editor.getSession().setMode(modes[modeEl.value] || modes.text);
}
modeEl.onchange = setMode;
setMode();
@@ -125,7 +125,7 @@ exports.launch = function(env) {
var docEl = document.getElementById("doc");
function onDocChange() {
var doc = docs[docEl.value];
- env.editor.setDocument(doc);
+ env.editor.setSession(doc);
var mode = doc.getMode();
if (mode instanceof JavaScriptMode) {
@@ -245,7 +245,7 @@ exports.launch = function(env) {
env.editor.onTextInput(reader.result);
modeEl.value = mode;
- env.editor.getDocument().setMode(modes[mode]);
+ env.editor.getSession().setMode(modes[mode]);
};
reader.readAsText(file);
}
diff --git a/editor-build.html b/editor-build.html
index e6008471..da01e173 100644
--- a/editor-build.html
+++ b/editor-build.html
@@ -197,11 +197,11 @@ echo $output;
-
-
+
+