Ignore:
Timestamp:
Jun 21, 2010, 11:40:22 PM (11 years ago)
Author:
kopal
Message:
  • error messages or warning messages now lead to coloring of the plugins view (currently color stays then) - plugins with error messages will not be executed again in the current run of the chain
  • a plugin now will be executed if all mandatory connectors are set (regardless if other connectors have data)
  • corrected calls of plugin methods (Execute, PreExecution...) according to state diagram of https://www.cryptool.org/trac/CrypTool2/wiki/IPluginHints
  • bug fix in view: PluginContainerView now does not flash between icon and Presentation if it is resized
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Execution/ExecutionEngine.cs

    r1680 r1684  
    104104                //By using round-robin we give each protocol to another scheduler to gain
    105105                //a good average load balancing of the schedulers
     106                //we also initalize each plugin
    106107                int counter=0;
    107108                foreach (PluginModel pluginModel in workspaceModel.AllPluginModels)
    108109                {
     110                    pluginModel.Plugin.PreExecution();
    109111                    PluginProtocol pluginProtocol = new PluginProtocol(schedulers[counter], pluginModel,this);
    110112                    pluginModel.PluginProtocol = pluginProtocol;
     
    119121                        msg.PluginModel = pluginModel;
    120122                        pluginProtocol.BroadcastMessageReliably(msg);
    121 
    122123                    }
    123124                }
     
    131132        public void Stop()
    132133        {
     134            //First stop alle plugins
     135            foreach (PluginModel pluginModel in workspaceModel.AllPluginModels)
     136            {
     137                pluginModel.Plugin.Stop();
     138                pluginModel.Plugin.PostExecution();
     139            }           
     140
    133141            IsRunning = false;
    134             //First stop all Gears4Net Schedulers
     142            //Secondly stop all Gears4Net Schedulers
    135143            foreach (Scheduler scheduler in schedulers)
    136144            {
    137145                scheduler.Shutdown();
    138146            }
    139             //Secondly stop alle plugins
    140             foreach(PluginModel pluginModel in workspaceModel.AllPluginModels)
    141             {
    142                 pluginModel.Plugin.Stop();
    143             }           
     147             
    144148        }
    145149
     
    328332        private void HandleExecute(MessageExecution msg)
    329333        {
    330             msg.PluginModel.Plugin.PreExecution();
    331 
     334           
    332335            //executionEngine.GuiLogMessage("HandleExecute for \"" + msg.PluginModel.Name + "\"", NotificationLevel.Debug);
    333336            //Fill the plugins Inputs with data
     
    349352            }
    350353           
    351             msg.PluginModel.Plugin.Execute();
    352 
    353             msg.PluginModel.Plugin.PostExecution();
     354            msg.PluginModel.Plugin.Execute();           
    354355
    355356            if (this.executionEngine.BenchmarkPlugins)
Note: See TracChangeset for help on using the changeset viewer.