Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2484


Ignore:
Timestamp:
11/12/09 17:40:12 (14 years ago)
Author:
gkronber
Message:

Copied main HL plugins from trunk for testing. #799

Location:
branches/PluginInfrastructure Refactoring
Files:
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Core/3.2/ChooseItemDialog.cs

    r1529 r2484  
    8989      }
    9090
    91       DiscoveryService discoveryService = new DiscoveryService();
    92       foreach (PluginInfo plugin in discoveryService.Plugins) {
     91
     92      foreach (var plugin in ApplicationManager.Manager.Plugins) {
    9393        TreeNode pluginNode = new TreeNode(plugin.Name);
    9494        pluginNode.Tag = null;
    9595
    96         Type[] types = discoveryService.GetTypes(itemType, plugin);
    97         foreach (Type type in types) {
     96        foreach (Type type in ApplicationManager.Manager.GetTypes(itemType, plugin)) {
    9897          if (!type.IsAbstract) {
    9998            TreeNode itemNode = new TreeNode();
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Core/3.2/ChooseOperatorDialog.cs

    r1529 r2484  
    7070      builtinOperatorsTreeView.TreeViewNodeSorter = nodeSorter;
    7171
    72       DiscoveryService discoveryService = new DiscoveryService();
    73       PluginInfo[] plugins = discoveryService.Plugins;
    74       foreach(PluginInfo plugin in plugins) {
     72      foreach (var pluginDescription in ApplicationManager.Manager.Plugins) {
    7573        TreeNode pluginItem = new TreeNode();
    76         pluginItem.Text = plugin.Name;
    77         pluginItem.Tag = plugin;
     74        pluginItem.Text = pluginDescription.Name;
     75        pluginItem.Tag = pluginDescription;
    7876
    79         Type[] operators = discoveryService.GetTypes(typeof(IOperator), plugin);
    80         foreach(Type type in operators) {
    81           if(!type.IsAbstract) {
     77        foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IOperator), pluginDescription)) {
     78          if (!type.IsAbstract) {
    8279            TreeNode operatorItem = new TreeNode();
    8380            operatorItem.Text = type.Name;
     
    8784        }
    8885        // add plugin node only if it contains operators
    89         if(pluginItem.Nodes.Count > 0) {
     86        if (pluginItem.Nodes.Count > 0) {
    9087          builtinOperatorsTreeView.Nodes.Add(pluginItem);
    9188        }
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Core/3.2/ChooseTypeDialog.cs

    r1529 r2484  
    9090      }
    9191
    92       DiscoveryService discoveryService = new DiscoveryService();
    93       foreach (PluginInfo plugin in discoveryService.Plugins) {
     92      foreach (var 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;
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Core/3.2/HeuristicLabCorePlugin.cs

    r1529 r2484  
    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)]
     32  [Plugin("HeuristicLab.Core-3.2")]
     33  [PluginFile("HeuristicLab.Core-3.2.dll", PluginFileType.Assembly)]
    3434  public class HeuristicLabCorePlugin : PluginBase {
    3535  }
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Core/3.2/OperatorGraphView.cs

    r1529 r2484  
    183183        IView view = op.CreateView();
    184184        if (view != null)
    185           PluginManager.ControlManager.ShowControl(view);
     185          ControlManager.Manager.ShowControl(view);
    186186      }
    187187    }
     
    410410    private void viewToolStripMenuItem_Click(object sender, EventArgs e) {
    411411      IView view = (IView)((ToolStripMenuItem)sender).Tag;
    412       PluginManager.ControlManager.ShowControl(view);
     412      ControlManager.Manager.ShowControl(view);
    413413    }
    414414    private void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) {
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Core/3.2/OperatorLibraryEditor.cs

    r1529 r2484  
    148148
    149149    private void MergeOperatorLibrary(IOperatorGroup src, IOperatorGroup dest) {
    150       foreach(IOperator op in src.Operators) {
    151         if(!Contains(dest, op)) {
     150      foreach (IOperator op in src.Operators) {
     151        if (!Contains(dest, op)) {
    152152          dest.AddOperator(op);
    153153        }
    154154      }
    155155
    156       foreach(OperatorGroup group in src.SubGroups) {
     156      foreach (OperatorGroup group in src.SubGroups) {
    157157        bool mergedIntoExistingGroup = false;
    158158        // try to find a group in dest with matching name
    159         foreach(OperatorGroup destGroup in dest.SubGroups) {
    160           if(group.Name == destGroup.Name) {
     159        foreach (OperatorGroup destGroup in dest.SubGroups) {
     160          if (group.Name == destGroup.Name) {
    161161            MergeOperatorLibrary(group, destGroup);
    162162            mergedIntoExistingGroup = true;
     
    164164          }
    165165        }
    166         if(!mergedIntoExistingGroup) {
     166        if (!mergedIntoExistingGroup) {
    167167          OperatorGroup newGroup = new OperatorGroup();
    168168          newGroup.Name = group.Name;
     
    174174
    175175    private bool Contains(IOperatorGroup group, IOperator op) {
    176       foreach(IOperator destOp in group.Operators) {
    177         if(op.Name == destOp.Name) {
     176      foreach (IOperator destOp in group.Operators) {
     177        if (op.Name == destOp.Name) {
    178178          return true;
    179179        }
     
    204204          IView view = op.CreateView();
    205205          if (view != null)
    206             PluginManager.ControlManager.ShowControl(view);
     206            ControlManager.Manager.ShowControl(view);
    207207        }
    208208      }
     
    236236    }
    237237    private void importButton_Click(object sender, EventArgs e) {
    238       if(openFileDialog.ShowDialog() == DialogResult.OK) {
     238      if (openFileDialog.ShowDialog() == DialogResult.OK) {
    239239        IOperatorLibrary loadedLibrary = (PersistenceManager.Load(openFileDialog.FileName) as IOperatorLibrary);
    240         if(loadedLibrary == null) {
     240        if (loadedLibrary == null) {
    241241          Auxiliary.ShowErrorMessageBox("The selected file does not contain an operator library");
    242242        } else {
     
    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/PluginInfrastructure Refactoring/HeuristicLab.Core/3.2/ScopeView.cs

    r1529 r2484  
    128128    private void scopesTreeView_DoubleClick(object sender, EventArgs e) {
    129129      // make sure that we can't get NullPointerExceptions
    130       if(scopesTreeView.SelectedNode != null && scopesTreeView.SelectedNode.Tag != null) {
     130      if (scopesTreeView.SelectedNode != null && scopesTreeView.SelectedNode.Tag != null) {
    131131        IScope scope = (IScope)scopesTreeView.SelectedNode.Tag;
    132         PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));
     132        ControlManager.Manager.ShowControl(new VariablesScopeView(scope));
    133133      }
    134134    }
     
    198198    private void variablesToolStripMenuItem_Click(object sender, EventArgs e) {
    199199      IScope scope = (IScope)scopesTreeView.SelectedNode.Tag;
    200       PluginManager.ControlManager.ShowControl(new VariablesScopeView(scope));
     200      ControlManager.Manager.ShowControl(new VariablesScopeView(scope));
    201201    }
    202202    private void showViewToolStripMenuItem_Click(object sender, EventArgs e) {
    203203      IItem item = (IItem)((ToolStripMenuItem)sender).Tag;
    204       PluginManager.ControlManager.ShowControl(item.CreateView());
     204      ControlManager.Manager.ShowControl(item.CreateView());
    205205    }
    206206    #endregion
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Data/3.2/HeuristicLabDataPlugin.cs

    r1529 r2484  
    2929  /// Plugin class for HeuristicLab.Data plugin.
    3030  /// </summary>
    31   [ClassInfo(Name = "HeuristicLab.Data-3.2")]
    32   [PluginFile(Filename = "HeuristicLab.Data-3.2.dll", Filetype = PluginFileType.Assembly)]
    33   [Dependency(Dependency = "HeuristicLab.Core-3.2")]
     31  [Plugin("HeuristicLab.Data-3.2")]
     32  [PluginFile("HeuristicLab.Data-3.2.dll", PluginFileType.Assembly)]
     33  [PluginDependency("HeuristicLab.Core-3.2")]
    3434  public class HeuristicLabDataPlugin : PluginBase {
    3535  }
Note: See TracChangeset for help on using the changeset viewer.