|
Lines 83-88
exports.EditorCommandFactory = (function() {
Link Here
|
| 83 |
); |
83 |
); |
| 84 |
return true; |
84 |
return true; |
| 85 |
})); |
85 |
})); |
|
|
86 |
editor.getTextView().setAction("Refresh", dojo.hitch(this, function () { |
| 87 |
if (this.inputManager.lastFilePath) { |
| 88 |
this.inputManager.setInput(this.inputManager.lastFilePath, editor, true); |
| 89 |
} |
| 90 |
return true; |
| 91 |
})); |
| 92 |
|
| 86 |
var saveCommand = new mCommands.Command({ |
93 |
var saveCommand = new mCommands.Command({ |
| 87 |
name: "Save", |
94 |
name: "Save", |
| 88 |
tooltip: "Save this file", |
95 |
tooltip: "Save this file", |
|
Lines 90-98
exports.EditorCommandFactory = (function() {
Link Here
|
| 90 |
callback: function(editor) { |
97 |
callback: function(editor) { |
| 91 |
editor.getTextView().invokeAction("Save"); |
98 |
editor.getTextView().invokeAction("Save"); |
| 92 |
}}); |
99 |
}}); |
|
|
100 |
var refreshCommand = new mCommands.Command({ |
| 101 |
name: "Refresh", |
| 102 |
toolTip: "Refresh this file", |
| 103 |
id: "orion.refresh", |
| 104 |
callback: function(editor) { |
| 105 |
editor.getTextView().invokeAction("Refresh"); |
| 106 |
} |
| 107 |
}); |
| 93 |
this.commandService.addCommand(saveCommand, "dom"); |
108 |
this.commandService.addCommand(saveCommand, "dom"); |
|
|
109 |
this.commandService.addCommand(refreshCommand, "dom"); |
| 94 |
this.commandService.addCommandGroup("orion.editorActions.unlabeled", 200, null, null, this.toolbarId); |
110 |
this.commandService.addCommandGroup("orion.editorActions.unlabeled", 200, null, null, this.toolbarId); |
| 95 |
this.commandService.registerCommandContribution("orion.save", 1, this.toolbarId, "orion.editorActions.unlabeled", new mCommands.CommandKeyBinding('s', true)); |
111 |
this.commandService.registerCommandContribution("orion.save", 1, this.toolbarId, "orion.editorActions.unlabeled", new mCommands.CommandKeyBinding('s', true)); |
|
|
112 |
this.commandService.registerCommandContribution("orion.refresh", 2, this.toolbarId, "orion.editorActions.unlabeled"); |
| 96 |
|
113 |
|
| 97 |
// add the commands generated by plug-ins who implement the "orion.edit.command" extension. |
114 |
// add the commands generated by plug-ins who implement the "orion.edit.command" extension. |
| 98 |
// we currently position these first so that the regular commands always appear in the same place (on the right) regardless of installed plug-ins |
115 |
// we currently position these first so that the regular commands always appear in the same place (on the right) regardless of installed plug-ins |
| 99 |
- |
|
|