add support for breakpoint types (condition/disabled etc.)
This commit is contained in:
parent
599c540c20
commit
542364bf32
1 changed files with 11 additions and 8 deletions
|
|
@ -490,7 +490,7 @@ var EditSession = function(text, mode) {
|
||||||
this.toggleOverwrite = function() {
|
this.toggleOverwrite = function() {
|
||||||
this.setOverwrite(!this.$overwrite);
|
this.setOverwrite(!this.$overwrite);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EditSession.addGutterDecoration(row, className) -> Void
|
* EditSession.addGutterDecoration(row, className) -> Void
|
||||||
* - row (Number): The row number
|
* - row (Number): The row number
|
||||||
|
|
@ -533,11 +533,8 @@ var EditSession = function(text, mode) {
|
||||||
* Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
|
* Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.setBreakpoints = function(rows) {
|
this.setBreakpoints = function(breakpoints) {
|
||||||
this.$breakpoints = [];
|
this.$breakpoints = breakpoints;
|
||||||
for (var i=0; i<rows.length; i++) {
|
|
||||||
this.$breakpoints[rows[i]] = true;
|
|
||||||
}
|
|
||||||
this._emit("changeBreakpoint", {});
|
this._emit("changeBreakpoint", {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -554,11 +551,17 @@ var EditSession = function(text, mode) {
|
||||||
/**
|
/**
|
||||||
* EditSession.setBreakpoint(row)
|
* EditSession.setBreakpoint(row)
|
||||||
* - row (Number): A row index
|
* - row (Number): A row index
|
||||||
|
* - className: class of the breakpoint
|
||||||
*
|
*
|
||||||
* Sets a breakpoint on the row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
|
* Sets a breakpoint on the row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
|
||||||
**/
|
**/
|
||||||
this.setBreakpoint = function(row) {
|
this.setBreakpoint = function(row, className) {
|
||||||
this.$breakpoints[row] = true;
|
if (className === undefined)
|
||||||
|
className = "ace_breakpoint";
|
||||||
|
if (className)
|
||||||
|
this.$breakpoints[row] = className;
|
||||||
|
else
|
||||||
|
delete this.$breakpoints[row];
|
||||||
this._emit("changeBreakpoint", {});
|
this._emit("changeBreakpoint", {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue