Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/10 18:32:57 (14 years ago)
Author:
epitzer
Message:

update to new PluginInfrastructure (#802)

Location:
branches/Persistence Test
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/Persistence Test

  • branches/Persistence Test/HeuristicLab.Core/3.3/ChooseItemDialog.cs

    r1529 r2744  
    2929using System.Windows.Forms;
    3030using HeuristicLab.PluginInfrastructure;
     31using HeuristicLab.PluginInfrastructure.Manager;
    3132
    3233namespace HeuristicLab.Core {
     
    8990      }
    9091
    91       DiscoveryService discoveryService = new DiscoveryService();
    92       foreach (PluginInfo plugin in discoveryService.Plugins) {
     92      foreach (PluginDescription plugin in ApplicationManager.Manager.Plugins) {
    9393        TreeNode pluginNode = new TreeNode(plugin.Name);
    9494        pluginNode.Tag = null;
    95 
    96         Type[] types = discoveryService.GetTypes(itemType, plugin);
    97         foreach (Type type in types) {
     95        foreach (Type type in ApplicationManager.Manager.GetTypes(itemType, plugin)) {
    9896          if (!type.IsAbstract) {
    9997            TreeNode itemNode = new TreeNode();
  • branches/Persistence Test/HeuristicLab.Core/3.3/ChooseOperatorDialog.cs

    r1529 r2744  
    2929using System.Windows.Forms;
    3030using HeuristicLab.PluginInfrastructure;
     31using HeuristicLab.PluginInfrastructure.Manager;
    3132
    3233namespace HeuristicLab.Core {
     
    7071      builtinOperatorsTreeView.TreeViewNodeSorter = nodeSorter;
    7172
    72       DiscoveryService discoveryService = new DiscoveryService();
    73       PluginInfo[] plugins = discoveryService.Plugins;
    74       foreach(PluginInfo plugin in plugins) {
     73      foreach(PluginDescription plugin in ApplicationManager.Manager.Plugins) {
    7574        TreeNode pluginItem = new TreeNode();
    7675        pluginItem.Text = plugin.Name;
    7776        pluginItem.Tag = plugin;
    7877
    79         Type[] operators = discoveryService.GetTypes(typeof(IOperator), plugin);
    80         foreach(Type type in operators) {
     78        foreach(Type type in ApplicationManager.Manager.GetTypes(typeof(IOperator), plugin)) {
    8179          if(!type.IsAbstract) {
    8280            TreeNode operatorItem = new TreeNode();
  • branches/Persistence Test/HeuristicLab.Core/3.3/ChooseTypeDialog.cs

    r1529 r2744  
    2929using System.Windows.Forms;
    3030using HeuristicLab.PluginInfrastructure;
     31using HeuristicLab.PluginInfrastructure.Manager;
    3132
    3233namespace HeuristicLab.Core {
     
    9091      }
    9192
    92       DiscoveryService discoveryService = new DiscoveryService();
    93       foreach (PluginInfo plugin in discoveryService.Plugins) {
     93      foreach (PluginDescription plugin in ApplicationManager.Manager.Plugins) {
    9494        TreeNode pluginNode = new TreeNode(plugin.Name);
    9595        pluginNode.Tag = null;
    96 
    97         Type[] types = discoveryService.GetTypes(baseType, plugin);
    98         foreach (Type type in types) {
     96        foreach (Type type in ApplicationManager.Manager.GetTypes(baseType, plugin)) {
    9997          TreeNode itemNode = new TreeNode();
    10098          itemNode.Text = type.Name;
  • branches/Persistence Test/HeuristicLab.Core/3.3/HeuristicLabCorePlugin.cs

    r2474 r2744  
    3030  /// Plugin class for HeuristicLab.Core plugin.
    3131  /// </summary>
    32   [ClassInfo(Name = "HeuristicLab.Core-3.3")]
    33   [PluginFile(Filename = "HeuristicLab.Core-3.3.dll", Filetype = PluginFileType.Assembly)]
    34   [Dependency(Dependency = "HeuristicLab.Common-3.2")]
    35   [Dependency(Dependency = "HeuristicLab.Persistence-3.3")]
     32  [Plugin("HeuristicLab.Core-3.3")]
     33  [PluginFile("HeuristicLab.Core-3.3.dll", PluginFileType.Assembly)]
     34  [PluginDependency("HeuristicLab.Common-3.2")]
     35  [PluginDependency("HeuristicLab.Persistence-3.3")]
    3636  public class HeuristicLabCorePlugin : PluginBase {
    3737  }
  • branches/Persistence Test/HeuristicLab.Core/3.3/Interfaces/IView.cs

    r776 r2744  
    2929  /// An interface for all kinds visual representations of items (objects, operators...).
    3030  /// </summary>
    31   public interface IView : IControl {
     31  public interface IView {
    3232    /// <summary>
    3333    /// Gets the current item instance.
  • branches/Persistence Test/HeuristicLab.Core/3.3/OperatorGraphView.cs

    r2474 r2744  
    184184        IView view = op.CreateView();
    185185        if (view != null)
    186           PluginManager.ControlManager.ShowControl(view);
     186          ControlManager.Manager.ShowControl(view);
    187187      }
    188188    }
     
    411411    private void viewToolStripMenuItem_Click(object sender, EventArgs e) {
    412412      IView view = (IView)((ToolStripMenuItem)sender).Tag;
    413       PluginManager.ControlManager.ShowControl(view);
     413      ControlManager.Manager.ShowControl(view);
    414414    }
    415415    private void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) {
  • branches/Persistence Test/HeuristicLab.Core/3.3/OperatorLibraryEditor.cs

    r1529 r2744  
    204204          IView view = op.CreateView();
    205205          if (view != null)
    206             PluginManager.ControlManager.ShowControl(view);
     206            ControlManager.Manager.ShowControl(view);
    207207        }
    208208      }
     
    287287    private void viewToolStripMenuItem_Click(object sender, EventArgs e) {
    288288      IView view = (IView)viewToolStripMenuItem.Tag;
    289       PluginManager.ControlManager.ShowControl(view);
     289      ControlManager.Manager.ShowControl(view);
    290290    }
    291291    #endregion
  • branches/Persistence Test/HeuristicLab.Core/3.3/ScopeView.cs

    r2474 r2744  
    131131      if(scopesTreeView.SelectedNode != null && scopesTreeView.SelectedNode.Tag != null) {
    132132        IScope scope = (IScope)scopesTreeView.SelectedNode.Tag;
    133         PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));
     133        ControlManager.Manager.ShowControl(new VariablesScopeView(scope));
    134134      }
    135135    }
     
    199199    private void variablesToolStripMenuItem_Click(object sender, EventArgs e) {
    200200      IScope scope = (IScope)scopesTreeView.SelectedNode.Tag;
    201       PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));
     201      ControlManager.Manager.ShowControl(new VariablesScopeView(scope));
    202202    }
    203203    private void showViewToolStripMenuItem_Click(object sender, EventArgs e) {
    204204      IItem item = (IItem)((ToolStripMenuItem)sender).Tag;
    205       PluginManager.ControlManager.ShowControl(item.CreateView());
     205      ControlManager.Manager.ShowControl(item.CreateView());
    206206    }
    207207    #endregion
Note: See TracChangeset for help on using the changeset viewer.