| Summary: | codeEdit: Need a way to notify user when a command is invoked. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Editor | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 12.0 | ||
| Target Milestone: | 12.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
libing wang
The tab mode event is dispatched per the commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=846e07512e1bc0d0ca91dab2d4b11d363ab5cd59 I've also added the listener in the demo page on how to listen to the tab mode, wrap mode and overwrite mode change event. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=fa0497dd266a0f54c7f782bc71002527eb6f2323 embeddedEditor.create(params}).then(function(editorViewer) {
editorViewer.editor.getTextView().addEventListener("Options",function(evt){
if(evt.options) {
if(evt.options.tabMode !== undefined) {
//CTRL+m keys
//True: you can tab inside the editor. False: Tab will get out of the editor DIV
console.log("Tab mode has been changed to: " + evt.options.tabMode);
} else if(evt.options.wrapMode !== undefined) {
//CTRL+ALT+w keys
console.log("Wrap mode has been changed to: " + evt.options.wrapMode);
} else if(evt.options.overwriteMode !== undefined) {
//Insert key
console.log("Overwrite mode has been changed to: " + evt.options.overwriteMode);
} else {
console.log("Other options has been changed: ");
console.log(evt.options);
}
}
});
}
|