import gcli properly

This commit is contained in:
Joe Walker 2011-04-07 06:16:12 +01:00
commit ab3ac17533
2 changed files with 4 additions and 5 deletions

View file

@ -42,7 +42,7 @@ define(function(require, exports, module) {
var keybinding = require('ace/keyboard/keybinding'); var keybinding = require('ace/keyboard/keybinding');
exports.launch = function(env) { exports.launch = function(env) {
var canon = require("cockpit/canon"); var gcli = require("cockpit/index");
var event = require("pilot/event"); var event = require("pilot/event");
var Editor = require("ace/editor").Editor; var Editor = require("ace/editor").Editor;
var Renderer = require("ace/virtual_renderer").VirtualRenderer; var Renderer = require("ace/virtual_renderer").VirtualRenderer;
@ -395,7 +395,7 @@ exports.launch = function(env) {
*/ */
// Command to focus the command line from the editor. // Command to focus the command line from the editor.
canon.addCommand({ gcli.addCommand({
name: "focuscli", name: "focuscli",
exec: function() { exec: function() {
env.cli.cliView.element.focus(); env.cli.cliView.element.focus();
@ -404,7 +404,7 @@ exports.launch = function(env) {
keybinding.bindCommand({ win: "Ctrl-J", mac: "Command-J" }, "focuscli"); keybinding.bindCommand({ win: "Ctrl-J", mac: "Command-J" }, "focuscli");
// Command to focus the editor line from the command line. // Command to focus the editor line from the command line.
canon.addCommand({ gcli.addCommand({
name: "focuseditor", name: "focuseditor",
exec: function() { exec: function() {
env.editor.focus(); env.editor.focus();
@ -413,7 +413,7 @@ exports.launch = function(env) {
keybinding.bindCommand({ win: "Ctrl-J", mac: "Command-J" }, "focuseditor"); keybinding.bindCommand({ win: "Ctrl-J", mac: "Command-J" }, "focuseditor");
// Fake-Save, works from the editor and the command line. // Fake-Save, works from the editor and the command line.
canon.addCommand({ gcli.addCommand({
name: "save", name: "save",
exec: function() { exec: function() {
alert("Fake Save File"); alert("Fake Save File");

View file

@ -42,7 +42,6 @@ define(function(require, exports, module) {
var useragent = require('pilot/useragent'); var useragent = require('pilot/useragent');
var event = require('pilot/event'); var event = require('pilot/event');
var typecheck = require('pilot/typecheck'); var typecheck = require('pilot/typecheck');
var canon = require('cockpit/canon');
var keyUtil = require('ace/keys'); var keyUtil = require('ace/keys');
var settings = require('ace/settings').settings; var settings = require('ace/settings').settings;