diff options
author | teramako | 2009-03-04 15:11:28 +0000 |
---|---|---|
committer | teramako | 2009-03-04 15:11:28 +0000 |
commit | 9c9bcfd0638f192e89802c43b805bbb4bdf7b632 (patch) | |
tree | c0ab29419362d261f5557f8381f17f1fa0a6be44 /pluginManager.js | |
parent | 29d70209521b01e1004bcbd1574e2bf5e6c1710d (diff) | |
download | vimperator-plugins-9c9bcfd0638f192e89802c43b805bbb4bdf7b632.tar.bz2 |
require要素を追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@30841 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'pluginManager.js')
-rw-r--r-- | pluginManager.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pluginManager.js b/pluginManager.js index af9287d..63cf8e2 100644 --- a/pluginManager.js +++ b/pluginManager.js @@ -45,6 +45,15 @@ minVersion: プラグインが使用できるVimperatorの最小バージョン updateURL: プラグインの最新リソースURL +require: + プラグインが必要とする拡張機能や他のプラグイン + 拡張機能の場合、 + + type属性を"extension" + + id属性をその拡張機能のid (xxxx@example.com または UUID) + + 拡張機能名 + プラグインの場合 + + type属性を"plugin" + + プラグインファイル名 detail: ここにコマンドやマップ、プラグインの説明 CDATAセクションにwiki的に記述可能 @@ -114,6 +123,37 @@ var tags = { // {{{ xml += <><span> </span>{makeLink(info.@document.toString())}</>; return xml; }, + require: function(infos){ + let xml = <></>; + for (let i=0; i<infos.length(); i++){ + let info = infos[i]; + let name = info.toString(); + xml += <div>{name}</div>; + if (info.@type){ + let type = info.@type.toString(); + if (type == "extension"){ + let id = info.@id.toString(); + xml[i].* += <span highlight="Preview">{id}</span>; + if (Application.extensions.has(id)){ + if (!Application.extensions.get(id).enabled){ + xml[i].* += <span highlight="ErrorMsg">disabled</span>; + } + } else { + xml[i].* += <span highlight="ErrorMsg">not installed</span>; + } + } else if (type == "plugin"){ + xml[i].* += <span highlight="Preview">(plugin)</span>; + if(!io.getRuntimeDirectories("plugin").some(function(file){ + file.append(nanme); + return liberator.pluginFiles[file.path]; + })){ + xml[i].* += <span highlight="ErrorMsg">not installed</span>; + } + } + } + } + return xml; + }, version: id, maxVersion: id, minVersion: id, |