From 9c9bcfd0638f192e89802c43b805bbb4bdf7b632 Mon Sep 17 00:00:00 2001
From: teramako
Date: Wed, 4 Mar 2009 15:11:28 +0000
Subject: require要素を追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@30841 d0d07461-0603-4401-acd4-de1884942a52
---
pluginManager.js | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
(limited to 'pluginManager.js')
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 += <> {makeLink(info.@document.toString())}>;
return xml;
},
+ require: function(infos){
+ let xml = <>>;
+ for (let i=0; i{name};
+ if (info.@type){
+ let type = info.@type.toString();
+ if (type == "extension"){
+ let id = info.@id.toString();
+ xml[i].* += {id};
+ if (Application.extensions.has(id)){
+ if (!Application.extensions.get(id).enabled){
+ xml[i].* += disabled;
+ }
+ } else {
+ xml[i].* += not installed;
+ }
+ } else if (type == "plugin"){
+ xml[i].* += (plugin);
+ if(!io.getRuntimeDirectories("plugin").some(function(file){
+ file.append(nanme);
+ return liberator.pluginFiles[file.path];
+ })){
+ xml[i].* += not installed;
+ }
+ }
+ }
+ }
+ return xml;
+ },
version: id,
maxVersion: id,
minVersion: id,
--
cgit v1.2.3