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/Model/PluginModel.cs

    r1681 r1684  
    4343        private IPlugin plugin;         
    4444        private int imageIndex = 0;
    45 
     45        private PluginModelState state = PluginModelState.Normal;
    4646        #endregion privates
     47
     48        /// <summary>
     49        /// State of the Plugin
     50        /// </summary>
     51       
     52        public PluginModelState State {
     53            get { return state; }
     54            set { state = value; }
     55        }
    4756
    4857        /// <summary>
     
    243252        /// </summary>
    244253        public void checkExecutable(ProtocolBase protocolBase)
    245         {                           
     254        {
     255            //We do not execute Plugins with Errors
     256            if (this.State == PluginModelState.Error)
     257            {
     258                return;
     259            }
     260
    246261            bool AtLeastOneInputSet = false;
    247262            //First test if every mandatory Connector has data
     
    249264            foreach (ConnectorModel connectorModel in this.InputConnectors)
    250265            {
    251                 if ((connectorModel.IsMandatory || connectorModel.InputConnection != null) && !connectorModel.HasData)
     266                if ((connectorModel.IsMandatory /*|| connectorModel.InputConnection != null*/) && !connectorModel.HasData)
    252267                {
    253268                    return;
     
    322337        }
    323338    }
     339
     340    public enum PluginModelState{
     341        Normal,
     342        Warning,
     343        Error
     344    }
    324345}
Note: See TracChangeset for help on using the changeset viewer.