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.setOverwrite(!this.$overwrite);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* EditSession.addGutterDecoration(row, className) -> Void
|
||||
* - 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.
|
||||
*
|
||||
**/
|
||||
this.setBreakpoints = function(rows) {
|
||||
this.$breakpoints = [];
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
this.$breakpoints[rows[i]] = true;
|
||||
}
|
||||
this.setBreakpoints = function(breakpoints) {
|
||||
this.$breakpoints = breakpoints;
|
||||
this._emit("changeBreakpoint", {});
|
||||
};
|
||||
|
||||
|
|
@ -554,11 +551,17 @@ var EditSession = function(text, mode) {
|
|||
/**
|
||||
* EditSession.setBreakpoint(row)
|
||||
* - 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.
|
||||
**/
|
||||
this.setBreakpoint = function(row) {
|
||||
this.$breakpoints[row] = true;
|
||||
this.setBreakpoint = function(row, className) {
|
||||
if (className === undefined)
|
||||
className = "ace_breakpoint";
|
||||
if (className)
|
||||
this.$breakpoints[row] = className;
|
||||
else
|
||||
delete this.$breakpoints[row];
|
||||
this._emit("changeBreakpoint", {});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue