Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 494043

Summary: TypeError: saveCommand is undefined (in editorCommands.js)
Product: [ECD] Orion Reporter: Grant Gayed <grant_gayed>
Component: ClientAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: libingw
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Grant Gayed CLA 2016-05-19 11:43:39 EDT
Reported by GA, 'saveCommand' can be null on the line marked below (note that it appears to be in the context of the logs page):

overwriteKeyBindings: function(editor) {
	var that = this;
	this.editor = editor;
	if (editor.getTextView && editor.getTextView()) {
		var textView = editor.getTextView();
		textView.setKeyBinding(new mKeyBinding.KeyBinding('s', true), "save"); //$NON-NLS-1$ //$NON-NLS-2$
		var saveCommand = that.commandService.findCommand("orion.edit.save"); //$NON-NLS-0$
		textView.setAction("save", function() { //$NON-NLS-0$
			saveCommand.callback.call({inputManager: that.inputManager}); // <---------

The stack from Firefox:

S.prototype.overwriteKeyBindings/<@/code/cfui/logs.js:11:11983 S.prototype.invokeAction@/code/cfui/logs.js:23:26812 S.prototype._doAction@/code/cfui/logs.js:24:21883 S.prototype._handleKeyDown@/code/cfui/logs.js:24:7093 S.prototype._hookEvents/<.handler@/code/cfui/logs.js:25:24496
Comment 1 libing wang CLA 2016-05-27 11:32:14 EDT
Eric, could you take a look? Thanks.