remove doc comments describing events that ace doesn't emit

This commit is contained in:
nightwing 2012-08-17 00:04:47 +04:00
commit 330ca76bfe
5 changed files with 58 additions and 83 deletions

View file

@ -97,10 +97,10 @@ var Anchor = exports.Anchor = function(doc, row, column) {
};
/**
* Anchor@onChange(e)
* Anchor@change(e)
* - e (Event): Contains data about the event
*
* Fires whenever the anchor position changes. Events that can trigger this function include `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
* Fires whenever the anchor position changes. Events that can trigger this function include `'insertText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
*
**/

View file

@ -205,12 +205,12 @@ var BackgroundTokenizer = function(tokenizer, editor) {
this.running = false;
};
/** related to: BackgroundTokenizer.$tokenizeRows
* BackgroundTokenizer.getTokens(firstRow, lastRow) -> [Object]
/**
* BackgroundTokenizer.getTokens(row) -> [Object]
* - firstRow (Number): The row to start at
* - lastRow (Number): The row to finish at
*
* Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
* Gives list of tokens of the row. (tokens are cached)
*
**/
this.getTokens = function(row) {

View file

@ -46,7 +46,7 @@ var Anchor = require("./anchor").Anchor;
/**
* class Document
*
* Contains the text of the document. Documents are controlled by a single [[EditSession `EditSession`]]. At its core, `Document`s are just an array of strings, with each row in the document matching up to the array index.
* Contains the text of the document. Document can be attached to several [[EditSession `EditSession`]]s. At its core, `Document`s are just an array of strings, with each row in the document matching up to the array index.
*
*
**/

View file

@ -56,10 +56,40 @@ var SearchHighlight = require("./search_highlight").SearchHighlight;
/**
* class EditSession
*
* Stores various states related to a [[Document `Document`]]. A single `EditSession` can be in charge of several `Document`s.
* Stores all the data about [[Editor `Editor`]] state providing easy way to change editors state. `EditSession` can be attached to only one [[Document `Document`]]. Same `Document` can be attached to several `EditSession`s.
*
**/
// events
/**
* EditSession@change(e)
*
* Emitted when the document changes.
**/
/**
* EditSession@tokenizerUpdate(e)
*
* Emitted when a background tokenizer asynchronousely processes new rows.
*
**/
/**
* EditSession@changeFold(e)
*
* Emitted when a code fold added or removed.
*
**/
/**
* EditSession@changeScrollTop()
*
* Emitted when the scroll top changes.
**/
/**
* EditSession@changeScrollLeft()
*
* Emitted when the scroll left changes.
**/
/**
* new EditSession(text, mode)
* - text (Document | String): If `text` is a `Document`, it associates the `EditSession` with it. Otherwise, a new `Document` is created, with the initial text
@ -174,22 +204,11 @@ var EditSession = function(text, mode) {
return low && low -1;
};
/**
* EditSession@onChangeFold(e)
*
* Emitted when a code fold changes its state.
*
**/
this.onChangeFold = function(e) {
var fold = e.data;
this.$resetRowCache(fold.start.row);
};
/**
* EditSession@onChange(e)
*
* Emitted when the document changes.
**/
this.onChange = function(e) {
var delta = e.data;
this.$modified = true;
@ -580,11 +599,11 @@ var EditSession = function(text, mode) {
};
/**
* EditSession.addDynamicMarker(marker) -> {update}
* - marker : object with update method
* - inFront (Boolean): Set to `true` to establish a front marker
*
**/
* EditSession.addDynamicMarker(marker) -> Object
* - marker (Object): object with update method
* - inFront (Boolean): Set to `true` to establish a front marker
*
**/
this.addDynamicMarker = function(marker, inFront) {
if (!marker.update)
return;
@ -804,7 +823,7 @@ var EditSession = function(text, mode) {
};
/**
* EditSession@onReloadTokenizer(e)
* EditSession.onReloadTokenizer(e)
*
* Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event.
**/

View file

@ -392,7 +392,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onFocus()
* Editor@focus()
*
* Emitted once the editor comes into focus.
**/
@ -406,7 +406,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onBlur()
* Editor@blur()
*
* Emitted once the editor has been blurred.
**/
@ -424,7 +424,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onDocumentChange(e)
* Editor@change(e)
* - e (Object): Contains a single property, `data`, which has the delta of changes
*
* Emitted whenever the document is changed.
@ -447,37 +447,22 @@ var Editor = function(renderer, session) {
this.$cursorChange();
};
/**
* Editor@onTokenizerUpdate(e)
* - e (Object): Contains a single property, `data`, which indicates the changed rows
*
* Emitted when the a tokenizer is updated.
**/
this.onTokenizerUpdate = function(e) {
var rows = e.data;
this.renderer.updateLines(rows.first, rows.last);
};
/**
* Editor@onScrollTopChange()
*
* Emitted when the scroll top changes.
**/
this.onScrollTopChange = function() {
this.renderer.scrollToY(this.session.getScrollTop());
};
/**
* Editor@onScrollLeftChange()
*
* Emitted when the scroll left changes.
**/
this.onScrollLeftChange = function() {
this.renderer.scrollToX(this.session.getScrollLeft());
};
/**
* Editor@onCursorChange()
* Editor@cursorChange()
*
* Emitted when the cursor changes.
**/
@ -523,7 +508,7 @@ var Editor = function(renderer, session) {
/**
* Editor@onSelectionChange(e)
* Editor@selectionChange(e)
* - e (Object): Contains a single property, `data`, which has the delta of changes
*
* Emitted when a selection has changed.
@ -581,7 +566,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeFrontMarker()
* Editor@changeFrontMarker()
*
* Emitted when a front marker changes.
**/
@ -590,7 +575,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeBackMarker()
* Editor@changeBackMarker()
*
* Emitted when a back marker changes.
**/
@ -599,7 +584,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeBreakpoint()
* Editor@changeBreakpoint()
*
* Emitted when a breakpoint changes.
**/
@ -608,7 +593,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeAnnotation()
* Editor@changeAnnotation()
*
* Emitted when an annotation changes.
**/
@ -617,7 +602,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeMode()
* Editor@changeMode()
*
* Emitted when the mode changes.
**/
@ -626,7 +611,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeWrapLimit()
* Editor@changeWrapLimit()
*
* Emitted when the wrap limit changes.
**/
@ -635,7 +620,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeWrapMode()
* Editor@changeWrapMode()
*
* Emitted when the wrap mode changes.
**/
@ -644,7 +629,7 @@ var Editor = function(renderer, session) {
};
/**
* Editor@onChangeFold()
* Editor@changeFold()
*
* Emitted when the code folds change.
**/
@ -799,22 +784,10 @@ var Editor = function(renderer, session) {
mode.autoOutdent(lineState, session, cursor.row);
};
/**
* Editor@onTextInput(text, pasted)
* - text (String): The text entered
* - pasted (Boolean): Identifies whether the text was pasted (`true`) or not
*
* Emitted when text is entered.
**/
this.onTextInput = function(text) {
this.keyBinding.onTextInput(text);
};
/**
* Editor@onCommandKey(e, hashId, keyCode)
*
* Emitted when the command-key is pressed.
**/
this.onCommandKey = function(e, hashId, keyCode) {
this.keyBinding.onCommandKey(e, hashId, keyCode);
};
@ -1500,31 +1473,14 @@ var Editor = function(renderer, session) {
};
};
/** internal, hide
* Editor@onCompositionStart(text)
* - text (String): The text being written
*
*
**/
this.onCompositionStart = function(text) {
this.renderer.showComposition(this.getCursorPosition());
};
/** internal, hide
* Editor@onCompositionUpdate(text)
* - text (String): The text being written
*
*
**/
this.onCompositionUpdate = function(text) {
this.renderer.setCompositionText(text);
};
/** internal, hide
* Editor@onCompositionEnd()
*
*
**/
this.onCompositionEnd = function() {
this.renderer.hideComposition();
};