You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ajax.org Cloud9 Editor (Ace)
I'm (very) confused as to how I enable setting of breakpoints in an
embedded ace editor (with a custom edit mode)?
I can see how you can do session.setBreakpoint(), but how do you allow
users to click the gutter/press a key to set a breakpoint on a line?
The standard editor doesn't seem to do this.
If it helps, I'm creating the editor in javascript with something
like: var editor = ace.edit(sourceId);
Harutyun Amirjanyan
unread,
May 12, 2012, 2:43:08 AM5/12/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ace-d...@googlegroups.com
you can use this function
editor.on("guttermousedown", function(e){
var target = e.domEvent.target;
if (target.className.indexOf("ace_gutter-cell") == -1)
return;
if (!editor.isFocused())
return;
if (e.clientX > 25 + target.getBoundingClientRect().left)
return;
var row = e.getDocumentPosition().row
e.editor.session.setBreakpoint(row)
e.stop()
})
and don't forget to add some styling for breakpoints e.g.
.ace_gutter-cell.ace_breakpoint{
border-radius: 20px 0px 0px 20px;
box-shadow: 0px 0px 1px 1px red inset;
}
Tuna
unread,
May 12, 2012, 5:15:12 AM5/12/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ajax.org Cloud9 Editor (Ace)
Absolutely fantastic - just what I needed. I struggled to find the
relevant documentation on the Ace site.
Thank you very much!
Tuna
unread,
May 12, 2012, 8:17:55 AM5/12/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ajax.org Cloud9 Editor (Ace)
Hum. That's interesting. The breakpoints are independent of the lines
of code? So if you put in a newline before a breakpoint, it doesn't
move with the code?
Harutyun Amirjanyan
unread,
May 12, 2012, 9:01:48 AM5/12/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message