Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/05/10 11:37:57 (14 years ago)
Author:
gkronber
Message:

Refactored class names and fixed a dependency-selection bug. #994 (Clean up plugin infrastructure project)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/UploadPluginsView.cs

    r3624 r3627  
    3434
    3535namespace HeuristicLab.PluginInfrastructure.Advanced {
    36   internal partial class PluginEditor : InstallationManagerControl {
     36  internal partial class UploadPluginsView : InstallationManagerControl {
    3737    private const string UploadMessage = "Uploading plugins...";
    3838    private const string RefreshMessage = "Downloading plugin information from deployment service...";
     
    4848    }
    4949
    50     public PluginEditor() {
     50    public UploadPluginsView() {
    5151      InitializeComponent();
    5252      pluginImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.Resources.plugin_16);
     
    192192          if (!modifiedPlugins.Contains(plugin))
    193193            modifiedPlugins.Add(plugin);
    194           foreach (var dep in GetAllDependencies(plugin)) {
     194          foreach (var dep in Util.GetAllDependencies(plugin)) {
    195195            if (!modifiedPlugins.Contains(dep))
    196196              modifiedPlugins.Add(dep);
     
    204204          if (!modifiedPlugins.Contains(plugin))
    205205            modifiedPlugins.Add(plugin);
    206           foreach (var dep in GetAllDependents(plugin)) {
     206          foreach (var dep in Util.GetAllDependents(plugin, localAndServerPlugins.Keys)) {
    207207            if (!modifiedPlugins.Contains(dep))
    208208              modifiedPlugins.Add(dep);
     
    242242      Util.ResizeColumns(listView.Columns.OfType<ColumnHeader>());
    243243      ignoreItemCheckedEvents = false;
    244     }
    245 
    246     private IEnumerable<IPluginDescription> GetAllDependents(IPluginDescription plugin) {
    247       return from p in localAndServerPlugins.Keys
    248              let matchingEntries = from dep in GetAllDependencies(p)
    249                                    where dep.Name == plugin.Name
    250                                    where dep.Version == plugin.Version
    251                                    select dep
    252              where matchingEntries.Any()
    253              select p;
    254     }
    255 
    256     private IEnumerable<IPluginDescription> GetAllDependencies(IPluginDescription plugin) {
    257       foreach (var dep in plugin.Dependencies) {
    258         foreach (var recDep in GetAllDependencies(dep)) {
    259           yield return recDep;
    260         }
    261         yield return dep;
    262       }
    263244    }
    264245
Note: See TracChangeset for help on using the changeset viewer.