Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/10 10:31:40 (14 years ago)
Author:
gkronber
Message:

Copied refactored plugin infrastructure from branch and merged changeset r2586:2589 from branch into the trunk. #799

Location:
trunk/sources/HeuristicLab.Core/3.2
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.2/ChooseItemDialog.cs

    r1529 r2591  
    8989      }
    9090
    91       DiscoveryService discoveryService = new DiscoveryService();
    92       foreach (PluginInfo plugin in discoveryService.Plugins) {
     91      foreach (IPluginDescription plugin in ApplicationManager.Manager.Plugins) {
    9392        TreeNode pluginNode = new TreeNode(plugin.Name);
    9493        pluginNode.Tag = null;
    9594
    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();
  • trunk/sources/HeuristicLab.Core/3.2/ChooseOperatorDialog.cs

    r1529 r2591  
    7070      builtinOperatorsTreeView.TreeViewNodeSorter = nodeSorter;
    7171
    72       DiscoveryService discoveryService = new DiscoveryService();
    73       PluginInfo[] plugins = discoveryService.Plugins;
    74       foreach(PluginInfo plugin in plugins) {
     72      foreach (IPluginDescription plugin in ApplicationManager.Manager.Plugins) {
    7573        TreeNode pluginItem = new TreeNode();
    7674        pluginItem.Text = plugin.Name;
    7775        pluginItem.Tag = plugin;
    7876
    79         Type[] operators = discoveryService.GetTypes(typeof(IOperator), plugin);
    80         foreach(Type type in operators) {
    81           if(!type.IsAbstract) {
     77        IEnumerable<Type> operators = ApplicationManager.Manager.GetTypes(typeof(IOperator), plugin);
     78        foreach (Type type in operators) {
     79          if (!type.IsAbstract) {
    8280            TreeNode operatorItem = new TreeNode();
    8381            operatorItem.Text = type.Name;
     
    8785        }
    8886        // add plugin node only if it contains operators
    89         if(pluginItem.Nodes.Count > 0) {
     87        if (pluginItem.Nodes.Count > 0) {
    9088          builtinOperatorsTreeView.Nodes.Add(pluginItem);
    9189        }
  • trunk/sources/HeuristicLab.Core/3.2/ChooseTypeDialog.cs

    r1529 r2591  
    9090      }
    9191
    92       DiscoveryService discoveryService = new DiscoveryService();
    93       foreach (PluginInfo plugin in discoveryService.Plugins) {
     92      foreach (IPluginDescription plugin in ApplicationManager.Manager.Plugins) {
    9493        TreeNode pluginNode = new TreeNode(plugin.Name);
    9594        pluginNode.Tag = null;
    9695
    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;
  • trunk/sources/HeuristicLab.Core/3.2/HeuristicLabCorePlugin.cs

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

    r776 r2591  
    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.
  • trunk/sources/HeuristicLab.Core/3.2/OperatorGraphView.cs

    r2474 r2591  
    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) {
  • trunk/sources/HeuristicLab.Core/3.2/OperatorLibraryEditor.cs

    r1529 r2591  
    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
  • trunk/sources/HeuristicLab.Core/3.2/ScopeView.cs

    r2474 r2591  
    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.