|
|
@ -212,13 +212,22 @@ namespace ICSharpCode.Core |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void Load(List<string> addInFiles) |
|
|
|
public static void Load(List<string> addInFiles, List<string> disabledAddIns) |
|
|
|
{ |
|
|
|
{ |
|
|
|
List<AddIn> list = new List<AddIn>(); |
|
|
|
List<AddIn> list = new List<AddIn>(); |
|
|
|
Dictionary<string, Version> dict = new Dictionary<string, Version>(); |
|
|
|
Dictionary<string, Version> dict = new Dictionary<string, Version>(); |
|
|
|
Dictionary<string, AddIn> addInDict = new Dictionary<string, AddIn>(); |
|
|
|
Dictionary<string, AddIn> addInDict = new Dictionary<string, AddIn>(); |
|
|
|
foreach (string fileName in addInFiles) { |
|
|
|
foreach (string fileName in addInFiles) { |
|
|
|
AddIn addIn = AddIn.Load(fileName); |
|
|
|
AddIn addIn = AddIn.Load(fileName); |
|
|
|
|
|
|
|
if (disabledAddIns != null && disabledAddIns.Count > 0) { |
|
|
|
|
|
|
|
foreach (string name in addIn.Manifest.Identities.Keys) { |
|
|
|
|
|
|
|
if (disabledAddIns.Contains(name)) { |
|
|
|
|
|
|
|
addIn.enabled = false; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (addIn.Enabled) { |
|
|
|
foreach (KeyValuePair<string, Version> pair in addIn.Manifest.Identities) { |
|
|
|
foreach (KeyValuePair<string, Version> pair in addIn.Manifest.Identities) { |
|
|
|
if (dict.ContainsKey(pair.Key)) { |
|
|
|
if (dict.ContainsKey(pair.Key)) { |
|
|
|
MessageService.ShowError("Name '" + pair.Key + "' is used by " + |
|
|
|
MessageService.ShowError("Name '" + pair.Key + "' is used by " + |
|
|
@ -230,6 +239,7 @@ namespace ICSharpCode.Core |
|
|
|
addInDict.Add(pair.Key, addIn); |
|
|
|
addInDict.Add(pair.Key, addIn); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
list.Add(addIn); |
|
|
|
list.Add(addIn); |
|
|
|
} |
|
|
|
} |
|
|
|
checkDependencies: |
|
|
|
checkDependencies: |
|
|
|