remove command support from the plugin manager, and tidy up
This commit is contained in:
parent
a2cca9118e
commit
7b2bee9d49
1 changed files with 4 additions and 16 deletions
|
|
@ -63,7 +63,7 @@ exports.Plugin.prototype = {
|
||||||
INSTALLED: 1,
|
INSTALLED: 1,
|
||||||
STARTED: 2,
|
STARTED: 2,
|
||||||
SHUTDOWN: 3,
|
SHUTDOWN: 3,
|
||||||
|
|
||||||
install: function(data, reason) {
|
install: function(data, reason) {
|
||||||
var pr = new Promise();
|
var pr = new Promise();
|
||||||
if (this.status > this.NEW) {
|
if (this.status > this.NEW) {
|
||||||
|
|
@ -79,7 +79,7 @@ exports.Plugin.prototype = {
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
return pr;
|
return pr;
|
||||||
},
|
},
|
||||||
|
|
||||||
startup: function(data, reason) {
|
startup: function(data, reason) {
|
||||||
var pr = new Promise();
|
var pr = new Promise();
|
||||||
if (this.status != this.INSTALLED) {
|
if (this.status != this.INSTALLED) {
|
||||||
|
|
@ -95,7 +95,7 @@ exports.Plugin.prototype = {
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
return pr;
|
return pr;
|
||||||
},
|
},
|
||||||
|
|
||||||
shutdown: function(data, reason) {
|
shutdown: function(data, reason) {
|
||||||
if (this.status != this.STARTED) {
|
if (this.status != this.STARTED) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -121,7 +121,7 @@ exports.PluginCatalog.prototype = {
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
startupPlugins: function(data, reason) {
|
startupPlugins: function(data, reason) {
|
||||||
var startupPromises = [];
|
var startupPromises = [];
|
||||||
for (var pluginName in this.plugins) {
|
for (var pluginName in this.plugins) {
|
||||||
|
|
@ -134,16 +134,4 @@ exports.PluginCatalog.prototype = {
|
||||||
|
|
||||||
exports.catalog = new exports.PluginCatalog();
|
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;
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue