Doc API updates...almost ready
This commit is contained in:
parent
c2caee8024
commit
23f74a3be3
4 changed files with 47 additions and 54 deletions
|
|
@ -1,11 +1,8 @@
|
||||||
var argv = require("optimist").argv,
|
var panino = require("panino");
|
||||||
ndoc = require(argv._[0] || "./build/ndoc/bin/ndoc");
|
|
||||||
|
|
||||||
console.log("GENERATING DOCUMENTATION");
|
|
||||||
|
|
||||||
var srcPath = process.cwd() + "/../lib/ace";
|
var srcPath = process.cwd() + "/../lib/ace";
|
||||||
|
|
||||||
ndoc.main(["--path=" + srcPath, "-o", "./out/", "-t", "ACE API", "--skin", "./resources/ace/skins"], function(err) {
|
panino.main(["--path=" + srcPath, "-o", "./out/", "-r", "-t", "ACE API", "--skin", "./resources/ace/skins"], function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
process.exit(-1);
|
process.exit(-1);
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,7 @@
|
||||||
"node": "~0.6.0"
|
"node": "~0.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colors": "~0.6.0",
|
"panino" : "~1.0.0"
|
||||||
"optimist": "~0.3.1",
|
|
||||||
"nomnom": "~1.5.1",
|
|
||||||
"jade": "~0.20.0",
|
|
||||||
"marked": "~0.1.5",
|
|
||||||
"fs-tools": "~0.1.0",
|
|
||||||
"markdown_conrefs": "1.0.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {}
|
"devDependencies": {}
|
||||||
}
|
}
|
||||||
|
|
@ -111,9 +111,7 @@ var Marker = function(parentEl) {
|
||||||
return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
|
return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
// Draws a marker, which spans a range of text on multiple lines
|
||||||
* Draws a marker, which spans a range of text on multiple lines
|
|
||||||
*/
|
|
||||||
this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig) {
|
this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig) {
|
||||||
// selection start
|
// selection start
|
||||||
var row = range.start.row;
|
var row = range.start.row;
|
||||||
|
|
@ -137,9 +135,7 @@ var Marker = function(parentEl) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
// Draws a multi line marker, where lines span the full width
|
||||||
* Draws a multi line marker, where lines span the full width
|
|
||||||
*/
|
|
||||||
this.drawMultiLineMarker = function(stringBuilder, range, clazz, layerConfig, type) {
|
this.drawMultiLineMarker = function(stringBuilder, range, clazz, layerConfig, type) {
|
||||||
var padding = type === "background" ? 0 : this.$padding;
|
var padding = type === "background" ? 0 : this.$padding;
|
||||||
var layerWidth = layerConfig.width + 2 * this.$padding - padding;
|
var layerWidth = layerConfig.width + 2 * this.$padding - padding;
|
||||||
|
|
@ -186,9 +182,7 @@ var Marker = function(parentEl) {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
// Draws a marker which covers part or whole width of a single screen line
|
||||||
* Draws a marker which covers part or whole width of a single screen line
|
|
||||||
*/
|
|
||||||
this.drawSingleLineMarker = function(stringBuilder, range, clazz, layerConfig, extraLength, type) {
|
this.drawSingleLineMarker = function(stringBuilder, range, clazz, layerConfig, extraLength, type) {
|
||||||
var padding = type === "background" ? 0 : this.$padding;
|
var padding = type === "background" ? 0 : this.$padding;
|
||||||
var height = layerConfig.lineHeight;
|
var height = layerConfig.lineHeight;
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,11 @@ var EditSession = require("./edit_session").EditSession;
|
||||||
this.rangeList = null;
|
this.rangeList = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selection.addRange(Range) -> Void
|
* Selection.addRange(range, $blockChangeEvents) -> Void
|
||||||
|
* - range (Range): The new range to add
|
||||||
|
* - $blockChangeEvents (Boolean): Whether or not to block changing events
|
||||||
*
|
*
|
||||||
* adds a range to selection entering multiselect mode if necessary
|
* Adds a range to a selection by entering multiselect mode, if necessary.
|
||||||
**/
|
**/
|
||||||
this.addRange = function(range, $blockChangeEvents) {
|
this.addRange = function(range, $blockChangeEvents) {
|
||||||
if (!range)
|
if (!range)
|
||||||
|
|
@ -119,10 +121,10 @@ var EditSession = require("./edit_session").EditSession;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selection.addRange(pos) -> Range
|
* Selection.substractPoint(pos) -> Range
|
||||||
* pos: {row, column}
|
* - pos (Range): The position to remove, as a `{row, column}` object
|
||||||
*
|
*
|
||||||
* removes range containing pos (if exists)
|
* Removes a Range containing pos (if it exists).
|
||||||
**/
|
**/
|
||||||
this.substractPoint = function(pos) {
|
this.substractPoint = function(pos) {
|
||||||
var removed = this.rangeList.substractPoint(pos);
|
var removed = this.rangeList.substractPoint(pos);
|
||||||
|
|
@ -210,10 +212,13 @@ var EditSession = require("./edit_session").EditSession;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selection.rectangularRangeBlock(screenCursor, screenAnchor, includeEmptyLines) -> [Range]
|
* Selection.rectangularRangeBlock(screenCursor, screenAnchor, includeEmptyLines) -> Range
|
||||||
* gets list of ranges composing rectangular block on the screen
|
* - screenCursor (Cursor): The cursor to use
|
||||||
* @includeEmptyLines if true includes ranges inside the block which
|
* - screenAnchor (Anchor): The anchor to use
|
||||||
* are empty becuase of the clipping
|
* - includeEmptyLins (Boolean): If true, this includes ranges inside the block which are empty due to clipping
|
||||||
|
*
|
||||||
|
* Gets list of ranges composing rectangular block on the screen
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
|
this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
|
||||||
var rectSel = [];
|
var rectSel = [];
|
||||||
|
|
@ -295,9 +300,9 @@ var Editor = require("./editor").Editor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.addSelectionMarker(orientedRange) -> Range
|
* Editor.addSelectionMarker(orientedRange) -> Range
|
||||||
* - orientedRange: range with cursor
|
* - orientedRange (Range): A range containing a cursor
|
||||||
*
|
*
|
||||||
* adds selection and cursor
|
* Adds the selection and cursor.
|
||||||
**/
|
**/
|
||||||
this.addSelectionMarker = function(orientedRange) {
|
this.addSelectionMarker = function(orientedRange) {
|
||||||
if (!orientedRange.cursor)
|
if (!orientedRange.cursor)
|
||||||
|
|
@ -313,9 +318,9 @@ var Editor = require("./editor").Editor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.removeSelectionMarker(range) -> Void
|
* Editor.removeSelectionMarker(range) -> Void
|
||||||
* - range: selection range added with addSelectionMarker
|
* - range (Range): The selection range added with [[addSelectionMarker `addSelectionMarker()`]].
|
||||||
*
|
*
|
||||||
* removes selection marker
|
* Removes the selection marker.
|
||||||
**/
|
**/
|
||||||
this.removeSelectionMarker = function(range) {
|
this.removeSelectionMarker = function(range) {
|
||||||
if (!range.marker)
|
if (!range.marker)
|
||||||
|
|
@ -399,10 +404,10 @@ var Editor = require("./editor").Editor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.forEachSelection(cmd, args) -> Void
|
* Editor.forEachSelection(cmd, args) -> Void
|
||||||
* - cmd: command to execute
|
* - cmd (String): The command to execute
|
||||||
* - args: arguments to the command
|
* - args (String): Any arguments for the command
|
||||||
*
|
*
|
||||||
* executes command for each selection range
|
* Executes a command for each selection range.
|
||||||
**/
|
**/
|
||||||
this.forEachSelection = function(cmd, args) {
|
this.forEachSelection = function(cmd, args) {
|
||||||
if (this.inVirtualSelectionMode)
|
if (this.inVirtualSelectionMode)
|
||||||
|
|
@ -462,13 +467,17 @@ var Editor = require("./editor").Editor;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.findAll(dir, options) -> Number
|
* Editor.findAll(needle, dir, additive) -> Number
|
||||||
* - needle: text to find
|
* - needle (String): The text to find
|
||||||
* - options: search options
|
* - options (Object): Any of the additional [[Search search options]]
|
||||||
* - additive: keeps
|
* - additive (Boolean): TODO
|
||||||
|
*
|
||||||
|
* Finds and selects all the occurences of needle
|
||||||
|
*
|
||||||
|
* #### Returns
|
||||||
|
*
|
||||||
|
* The number of found ranges.
|
||||||
*
|
*
|
||||||
* finds and selects all the occurencies of needle
|
|
||||||
* returns number of found ranges
|
|
||||||
**/
|
**/
|
||||||
this.findAll = function(needle, options, additive) {
|
this.findAll = function(needle, options, additive) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
@ -496,10 +505,10 @@ var Editor = require("./editor").Editor;
|
||||||
// commands
|
// commands
|
||||||
/**
|
/**
|
||||||
* Editor.selectMoreLines(dir, skip) -> Void
|
* Editor.selectMoreLines(dir, skip) -> Void
|
||||||
* - dir: -1 up, 1 down
|
* - dir (Number): The direction of lines to select: -1 for up, 1 for down
|
||||||
* - skip: remove active selection range if true
|
* - skip (Boolean): If `true`, removes the active selection range
|
||||||
*
|
*
|
||||||
* adds cursor above or bellow active cursor
|
* Adds a cursor above or below the active cursor.
|
||||||
**/
|
**/
|
||||||
this.selectMoreLines = function(dir, skip) {
|
this.selectMoreLines = function(dir, skip) {
|
||||||
var range = this.selection.toOrientedRange();
|
var range = this.selection.toOrientedRange();
|
||||||
|
|
@ -541,10 +550,10 @@ var Editor = require("./editor").Editor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.transposeSelections(dir) -> Void
|
* Editor.transposeSelections(dir) -> Void
|
||||||
* - dir: direction to rotate selections
|
* - dir (Number): The direction to rotate selections
|
||||||
*
|
*
|
||||||
* contents
|
* Transposes the selected ranges.
|
||||||
* empty ranges are expanded to word
|
*
|
||||||
**/
|
**/
|
||||||
this.transposeSelections = function(dir) {
|
this.transposeSelections = function(dir) {
|
||||||
var session = this.session;
|
var session = this.session;
|
||||||
|
|
@ -585,11 +594,10 @@ var Editor = require("./editor").Editor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editor.selectMore(dir, skip) -> Void
|
* Editor.selectMore(dir, skip) -> Void
|
||||||
* - dir: 1 next, -1 previous
|
* - dir (Number): The direction of lines to select: -1 for up, 1 for down
|
||||||
* - skip: remove active selection range if true
|
* - skip (Boolean): If `true`, removes the active selection range
|
||||||
*
|
*
|
||||||
* finds next occurence of text in active selection
|
* Finds the next occurence of text in an active selection and adds it to the selections.
|
||||||
* and adds it to the selections
|
|
||||||
**/
|
**/
|
||||||
this.selectMore = function (dir, skip) {
|
this.selectMore = function (dir, skip) {
|
||||||
var session = this.session;
|
var session = this.session;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue