diff --git a/.gitignore b/.gitignore
index 04f175ff..59ec847b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,21 +2,20 @@
.DS_Store
*.swp
*.tmp
+*~
# Project files that should not be in the repo
-.project
-.settings/
-.settings.xml
-.settings
-.c9settings.xml
-.c9revisions
-.settings.xml.old
+.*
+\#*
+!/.gitignore
.*.gz
+*.tmTheme.js
# A handy place to put stuff that git should ignore:
/ignore/
node_modules/
-tool/node_modules/
+jam/
+* *
.git-ref
npm-debug.log
diff --git a/.gitmodules b/.gitmodules
index 4678c516..07bbe371 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
[submodule "doc/wiki"]
path = doc/wiki
- url = git://github.com/ajaxorg/ace.wiki.git
+ url = https://github.com/ajaxorg/ace.wiki.git
[submodule "build"]
path = build
- url = git://github.com/ajaxorg/ace-builds.git
+ url = https://github.com/ajaxorg/ace-builds.git
diff --git a/CNAME b/CNAME
new file mode 100644
index 00000000..75431b15
--- /dev/null
+++ b/CNAME
@@ -0,0 +1 @@
+ace.c9.io
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..062af59c
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,15 @@
+Contributing
+------------
+
+Ace is a community project and wouldn't be what it is without contributions! We actively encourage and support contributions. The Ace source code is released under the BSD License. This license is very simple, and 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!
+
+Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. To protect the interests of the Ace contributors and users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is the simplest of agreements, requiring that the contributions you make to an ajax.org project are only those you're allowed to make. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes ten minutes, and only needs to be completed once.
+
+There are two versions of the agreement:
+
+1. [The Individual CLA](https://docs.google.com/a/c9.io/forms/d/1MfmfrxqD_PNlNsuK0lC2KSelRLxGLGfh_wEcG0ijVvo/viewform): use this version if you're working on the Cloud9 SDK or open source projects in your spare time, or can clearly claim ownership of copyright in what you'll be submitting.
+2. [The Corporate CLA](https://docs.google.com/a/c9.io/forms/d/1vFejn4111GdnCNuQ6BfnJDaxdsUEMD4KCo1ayovAfu0/viewform): have your corporate lawyer review and submit this if your company is going to be contributing to the Cloud9 SDK and/or open source projects.
+
+If you want to contribute to the Cloud9 SDK and/or open source projects please go to the online form, fill it out and submit it.
+
+Happy coding, Cloud9
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 76b2313b..3077d171 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,229 @@
+Version 1.2.0-pre
+
+* New Features
+ - Indented soft wrap (danyaPostfactum)
+
+* API Changes
+ - unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745)
+ - "change" event listeners on session and editor get delta objects directly
+
+2015.04.03 Version 1.1.9
+
+ - Small Enhancements and Bugfixes
+
+2014.11.08 Version 1.1.8
+
+* API Changes
+ - `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid
+
+* New Features
+ - Improved autoindent for html and php modes (Adam Jimenez)
+ - Find All from searchbox (Colton Voege)
+
+* new language modes
+ - Elixir, Elm
+
+2014.09.21 Version 1.1.7
+
+* Bugfixes
+ - fix several bugs in autocompletion
+ - workaround for inaccurate getBoundingClientRect on chrome 37
+
+2014.08.17 Version 1.1.6
+
+* Bugfixes
+ - fix regression in double tap to highlight
+ - Improved Latex Mode (Daniel Felder)
+
+* API Changes
+ - editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that)
+
+* new language modes
+ - Praat (José Joaquín Atria)
+ - Eiffel (Victorien Elvinger)
+ - G-code (Adam Joseph Cook)
+
+2014.07.09 Version 1.1.5
+
+* Bugfixes
+ - fix regression in autocomplete popup
+
+* new language modes
+ - gitignore (Devon Carew)
+
+2014.07.01 Version 1.1.4
+
+* New Features
+ - Highlight matching tags (Adam Jimenez)
+ - Improved jump to matching command (Adam Jimenez)
+
+* new language modes
+ - AppleScript (Yaogang Lian)
+ - Vala
+
+2014.03.08 Version 1.1.3
+
+* New Features
+ - Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
+ - Add ColdFusion behavior (Abram Adams)
+ - add showLineNumbers option
+ - Add html syntax checker (danyaPostfactum)
+
+* new language modes
+ - Gherkin (Patrick Nevels)
+ - Smarty
+
+2013.12.02 Version 1.1.2
+
+* New Features
+ - Accessibility Theme for Ace (Peter Xiao)
+ - use snipetManager for expanding emmet snippets
+ - update jshint to 2.1.4
+ - improve php syntax checker (jdalegonzalez)
+ - add option for autoresizing
+ - add option for autohiding vertical scrollbar
+ - improvements to highlighting of xml like languages (danyaPostfactum)
+ - add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others)
+ - add option to merge similar changes in undo history
+ - add scrollPastEnd option
+ - use html5 dragndrop for text dragging (danyaPostfactum)
+
+* API Changes
+ - fixed typo in HashHandler commmandManager
+
+* new language modes
+ - Nix (Zef Hemel)
+ - Protobuf (Zef Hemel)
+ - Soy
+ - Handlebars
+
+2013.06.04 Version 1.1.1
+
+ - Improved emacs keybindings (Robert Krahn)
+ - Added markClean, isClean methods to UndoManager (Joonsoo Jeon)
+ - Do not allow `Toggle comments` command to remove spaces from indentation
+ - Softer colors for indent guides in dark themes
+
+* new language modes
+ - Ada
+ - Assembly_x86
+ - Cobol
+ - D
+ - ejs
+ - MATLAB
+ - MySQL
+ - Twig
+ - Verilog
+
+2013.05.01, Version 1.1.0
+
+* API Changes
+ - Default position of the editor container is changed to relative. Add `.ace_editor {position: absolute}` css rule to restore old behavior
+ - Changed default line-height to `normal` to not conflict with bootstrap. Use `line-height: inherit` for old behavior.
+ - Changed marker types accepted by session.addMarker. It now accepts "text"|"line"|"fullLine"|"screenLine"
+ - Internal classnames used by editor were made more consistent
+ - Introduced `editor.setOption/getOption/setOptions/getOptions` methods
+ - Introduced positionToIndex, indexToPosition methods
+
+* New Features
+ - Improved emacs mode (chetstone)
+ with Incremental search and Occur modes (Robert Krahn)
+
+ - Improved ime handling
+ - Searchbox (Vlad Zinculescu)
+
+ - Added elastic tabstops lite extension (Garen Torikian)
+ - Added extension for whitespace manipulation
+ - Added extension for enabling spellchecking from contextmenu
+ - Added extension for displaying available keyboard shortcuts (Matthew Christopher Kastor-Inare III)
+ - Added extension for displaying options panel (Matthew Christopher Kastor-Inare III)
+ - Added modelist extension (Matthew Christopher Kastor-Inare III)
+
+ - Improved toggleCommentLines and added ToggleCommentBlock command
+ - `:;` pairing in CSS mode (danyaPostfactum)
+
+ - Added suppoert for Delete and SelectAll from context menu (danyaPostfactum)
+
+ - Make wrapping behavior optional
+ - Selective bracket insertion/skipping
+
+ - Added commands for increase/decrease numbers, sort lines (Vlad Zinculescu)
+ - Folding for Markdown, Lua, LaTeX
+ - Selective bracket insertion/skipping for C-like languages
+
+* Many new languages
+ - Scheme (Mu Lei)
+ - Dot (edwardsp)
+ - FreeMarker (nguillaumin)
+ - Tiny Mushcode (h3rb)
+ - Velocity (Ryan Griffith)
+ - TOML (Garen Torikian)
+ - LSL (Nemurimasu Neiro, Builders Brewery)
+ - Curly (Libo Cannici)
+ - vbScript (Jan Jongboom)
+ - R (RStudio)
+ - ABAP
+ - Lucene (Graham Scott)
+ - Haml (Garen Torikian)
+ - Objective-C (Garen Torikian)
+ - Makefile (Garen Torikian)
+ - TypeScript (Garen Torikian)
+ - Lisp (Garen Torikian)
+ - Stylus (Garen Torikian)
+ - Dart (Garen Torikian)
+
+* Live syntax checks
+ - PHP (danyaPostfactum)
+ - Lua
+
+* New Themes
+ - Chaos
+ - Terminal
+
+2012.09.17, Version 1.0.0
+
+* New Features
+ - Multiple cursors and selections (https://c9.io/site/blog/2012/08/be-an-armenian-warrior-with-block-selection-on-steroids/)
+ - Fold buttons displayed in the gutter
+ - Indent Guides
+ - Completely reworked vim mode (Sergi Mansilla)
+ - Improved emacs keybindings
+ - Autoclosing of html tags (danyaPostfactum)
+
+* 20 New language modes
+ - Coldfusion (Russ)
+ - Diff
+ - GLSL (Ed Mackey)
+ - Go (Davide Saurino)
+ - Haxe (Jason O'Neil)
+ - Jade (Garen Torikian)
+ - jsx (Syu Kato)
+ - LaTeX (James Allen)
+ - Less (John Roepke)
+ - Liquid (Bernie Telles)
+ - Lua (Lee Gao)
+ - LuaPage (Choonster)
+ - Markdown (Chris Spencer)
+ - PostgreSQL (John DeSoi)
+ - Powershell (John Kane)
+ - Sh (Richo Healey)
+ - SQL (Jonathan Camile)
+ - Tcl (Cristoph Hochreiner)
+ - XQuery (William Candillion)
+ - Yaml (Meg Sharkey)
+
+ * Live syntax checks
+ - for XQuery and JSON
+
+* New Themes
+ - Ambiance (Irakli Gozalishvili)
+ - Dreamweaver (Adam Jimenez)
+ - Github (bootstraponline)
+ - Tommorrow themes (https://github.com/chriskempson/tomorrow-theme)
+ - XCode
+
+* Many Small Enhancements and Bugfixes
+
2011.08.02, Version 0.2.0
* Split view (Julian Viereck)
@@ -27,15 +253,14 @@
- SCAD (Jacob Hansson)
* Live syntax checks
- - Lint for Css using CSS Lint
+ - Lint for CSS using CSS Lint
- CoffeeScript
* New Themes
- Crimson Editor (iebuggy)
- Merbivore (Michael Schwartz)
- Merbivore soft (Michael Schwartz)
- - Solarized dark/light (David Alan
- Hjelle)
+ - Solarized dark/light (David Alan Hjelle)
- Vibrant Ink (Michael Schwartz)
* Small Features/Enhancements
@@ -48,10 +273,8 @@
highlight are not affected (Irakli Gozalishvili)
- Added setFontSize method
- Improved vi keybindings (Trent Ogren)
- - When unfocused make cursor transparent instead of removing it (Harutyun
- Amirjanyan)
- - Support for matching groups in tokenizer with arrays of tokens (Chris
- Spencer)
+ - When unfocused make cursor transparent instead of removing it (Harutyun Amirjanyan)
+ - Support for matching groups in tokenizer with arrays of tokens (Chris Spencer)
* Bug fixes
- Add support for the new OSX scroll bars
@@ -59,8 +282,7 @@
- Proper handling of unicode characters in JavaScript identifiers
- Fix remove lines command on last line (Harutyun Amirjanyan)
- Fix scroll wheel sluggishness in Safari
- - Make keyboard infrastructure route keys like []^$ the right way (Julian
- Viereck)
+ - Make keyboard infrastructure route keys like []^$ the right way (Julian Viereck)
2011.02.14, Version 0.1.6
@@ -113,4 +335,4 @@
* Add Ruby mode contributed by Shlomo Zalman Heigh
* Add Java mode contributed by Tom Tasche
* Fix annotation bug
-* Changing a document added a new empty line at the end
\ No newline at end of file
+* Changing a document added a new empty line at the end
diff --git a/Makefile b/Makefile
index 373d4c88..29cf0495 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,17 @@ pre_build:
build: pre_build
./Makefile.dryice.js normal
./Makefile.dryice.js demo
- ./Makefile.dryice.js bm
+
+# Minimal build: call Makefile.dryice.js only if our sources changed
+basic: build/src/ace.js
+
+build/src/ace.js : ${wildcard lib/*} \
+ ${wildcard lib/*/*} \
+ ${wildcard lib/*/*/*} \
+ ${wildcard lib/*/*/*/*} \
+ ${wildcard lib/*/*/*/*/*} \
+ ${wildcard lib/*/*/*/*/*/*}
+ ./Makefile.dryice.js
doc:
cd doc;\
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
index f7396e39..0ce7c657 100755
--- a/Makefile.dryice.js
+++ b/Makefile.dryice.js
@@ -4,7 +4,7 @@
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -15,7 +15,7 @@
* * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -30,21 +30,25 @@
* ***** END LICENSE BLOCK ***** */
var fs = require("fs");
-if (!fs.existsSync)
- fs.existsSync = require("path").existsSync;
-var copy = require('dryice').copy;
+var path = require("path");
+var copy = require('architect-build/copy');
+var build = require('architect-build/build');
var ACE_HOME = __dirname;
var BUILD_DIR = ACE_HOME + "/build";
+var CACHE = {};
function main(args) {
+ if (args.indexOf("updateModes") !== -1) {
+ return updateModes();
+ }
var type = "minimal";
args = args.map(function(x) {
if (x[0] == "-" && x[1] != "-")
return "-" + x;
return x;
- });
-
+ }).filter(Boolean);
+
if (args[2] && (args[2][0] != "-" || args[2].indexOf("h") != -1))
type = args[2];
@@ -52,442 +56,461 @@ function main(args) {
if (i != -1 && args[i+1])
BUILD_DIR = args[i+1];
- if (type == "minimal") {
- buildAce({
- compress: args.indexOf("--m") != -1,
- noconflict: args.indexOf("--nc") != -1
- });
- } else if (type == "normal") {
- ace();
- } else if (type == "demo") {
- demo();
- } else if (type == "bm") {
- bookmarklet();
- } else if (type == "full") {
- ace();
- demo();
- bookmarklet();
+ if (args.indexOf("--h") == -1) {
+ if (type == "minimal") {
+ buildAce({
+ compress: args.indexOf("--m") != -1,
+ noconflict: args.indexOf("--nc") != -1,
+ shrinkwrap: args.indexOf("--s") != -1
+ });
+ } else if (type == "normal") {
+ ace();
+ } else if (type == "demo") {
+ demo();
+ } else if (type == "full") {
+ ace();
+ demo();
+ } else if (type == "highlighter") {
+ // TODO
+ }
}
-
+}
+
+function showHelp(type) {
console.log("--- Ace Dryice Build Tool ---");
console.log("");
console.log("Options:");
- console.log(" normal Runs embedded build of Ace");
- console.log(" demo Runs demo build of Ace");
- console.log(" bm Runs bookmarklet build of Ace");
- console.log(" full all of above");
- console.log("flags:");
- console.log(" -m minify");
- console.log(" -nc namespace require");
+ console.log(" minimal Places necessary Ace files out in build dir; uses configuration flags below [default]");
+ console.log(" normal Runs four Ace builds--minimal, minimal-noconflict, minimal-min, and minimal-noconflict-min");
+ console.log(" demo Runs demo build of Ace");
+ console.log(" full all of above");
+ console.log(" highlighter ");
+ console.log("args:");
console.log(" --target ./path path to build folder");
+ console.log("flags:");
+ console.log(" --h print this help");
+ console.log(" --m minify");
+ console.log(" --nc namespace require");
+ console.log(" --s shrinkwrap (combines all output files into one)");
console.log("");
- if (BUILD_DIR)
- console.log(" output generated in " + type + __dirname + "/" + BUILD_DIR)
-
- process.exit(0);
-
-}
-
-function bookmarklet() {
- var targetDir = BUILD_DIR + "/textarea";
- copy({
- source: "build_support/editor_textarea.html",
- dest: targetDir + '/editor.html'
- });
- copy({
- source: "build_support/style.css",
- dest: targetDir + '/style.css'
- });
-
- buildAce({
- targetDir: targetDir + "/src",
- ns: "__ace_shadowed__",
- exportModule: "ace/ext/textarea",
- compress: false,
- noconflict: true,
- suffix: "",
- name: "ace-bookmarklet",
- workers: [],
- keybindings: []
- });
+ if (type)
+ console.log(" output for " + type + " generated in " + BUILD_DIR);
}
function ace() {
- console.log('# ace ---------');
-
- // uncompressed
- buildAce({
- compress: false,
- noconflict: false
- });
- buildAce({
- compress: false,
- noconflict: true
- });
-
- // compressed
- buildAce({
- compress: true,
- noconflict: false
- });
- buildAce({
- compress: true,
- noconflict: true
- });
-
console.log('# ace License | Readme | Changelog ---------');
- copy({
- source: ACE_HOME + "/build_support/editor.html",
- dest: BUILD_DIR + "/editor.html"
- });
- copy({
- source: ACE_HOME + "/LICENSE",
- dest: BUILD_DIR + "/LICENSE"
- });
- copy({
- source: ACE_HOME + "/ChangeLog.txt",
- dest: BUILD_DIR + "/ChangeLog.txt"
- });
+ copy.file(ACE_HOME + "/build_support/editor.html", BUILD_DIR + "/editor.html");
+ copy.file(ACE_HOME + "/LICENSE", BUILD_DIR + "/LICENSE");
+ copy.file(ACE_HOME + "/ChangeLog.txt", BUILD_DIR + "/ChangeLog.txt");
+
+ console.log('# ace ---------');
+ for (var i = 0; i < 4; i++)
+ buildAce({compress: i & 2, noconflict: i & 1});
}
function demo() {
console.log('# kitchen sink ---------');
- var version, ref;
+ var version = "", ref = "";
try {
version = JSON.parse(fs.readFileSync(ACE_HOME + "/package.json")).version;
ref = fs.readFileSync(ACE_HOME + "/.git-ref").toString();
- } catch(e) {
- ref = "";
- version = "";
+ } catch(e) {}
+
+ function changeComments(data) {
+ return (data
+ .replace("doc/site/images/ace-logo.png", "demo/kitchen-sink/ace-logo.png")
+ .replace(//g, "")
+ .replace(/PACKAGE\-\->|/g, "")
- .replace(/PACKAGE\-\->|")}
+ function script(str) {result.push('')}
+ scripts.forEach(function(s) {
+ s = s.replace(/"/g, "");
+ if (s == "ace/ace") {
+ comment("load ace");
+ script("ace");
+ } else {
+ var extName = s.match(/[^/]*$/)[0];
+ comment("load ace " + extName + " extension");
+ script("ext-" + extName);
+ }
+ });
+ result.push("
-
-
-
-
-