From 7b2bee9d4938928b18420621b207aa6f0cfc96de Mon Sep 17 00:00:00 2001 From: Joe Walker Date: Wed, 24 Nov 2010 15:56:53 +0000 Subject: [PATCH] remove command support from the plugin manager, and tidy up --- plugins/pilot/lib/plugin_manager.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/plugins/pilot/lib/plugin_manager.js b/plugins/pilot/lib/plugin_manager.js index 75fceb61..79b5b4cc 100644 --- a/plugins/pilot/lib/plugin_manager.js +++ b/plugins/pilot/lib/plugin_manager.js @@ -63,7 +63,7 @@ exports.Plugin.prototype = { INSTALLED: 1, STARTED: 2, SHUTDOWN: 3, - + install: function(data, reason) { var pr = new Promise(); if (this.status > this.NEW) { @@ -79,7 +79,7 @@ exports.Plugin.prototype = { }.bind(this)); return pr; }, - + startup: function(data, reason) { var pr = new Promise(); if (this.status != this.INSTALLED) { @@ -95,7 +95,7 @@ exports.Plugin.prototype = { }.bind(this)); return pr; }, - + shutdown: function(data, reason) { if (this.status != this.STARTED) { return; @@ -121,7 +121,7 @@ exports.PluginCatalog.prototype = { } }.bind(this)); }, - + startupPlugins: function(data, reason) { var startupPromises = []; for (var pluginName in this.plugins) { @@ -134,16 +134,4 @@ exports.PluginCatalog.prototype = { exports.catalog = new exports.PluginCatalog(); -// TODO the code below is temporary to bootstrap while setting up the new command system -var PluginManager = { - commands : {}, - - registerCommand : function(name, command) { - this.commands[name] = command; - } -}; - -exports.PluginManager = PluginManager; - - });