Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/IShapeInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/IShapeInfo.cs	(revision 2853)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/IShapeInfo.cs	(revision 2861)
@@ -27,4 +27,5 @@
 using System.Drawing;
 using Netron.Diagramming.Core;
+using HeuristicLab.Collections;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
@@ -34,5 +35,16 @@
     Size Size { get; set; }
 
+    void AddConnector(string connectorName);
+    void RemoveConnector(string connectorName);
+
+    IEnumerable<KeyValuePair<string,IShapeInfo>> Connections {get;}
+    INotifyObservableDictionaryItemsChanged<string, IShapeInfo> ObservableConnections { get; }
+
+    void AddConnection(string fromConnectorName, IShapeInfo toShapeInfo);
+    void RemoveConnection(string fromConnectorName);
+    void ChangeConnection(string fromConnector, IShapeInfo toShapeInfo);
+
     IShape CreateShape();
+    void UpdateShape(IShape shape);
   }
 }
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorGraphVisualizationInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorGraphVisualizationInfo.cs	(revision 2853)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorGraphVisualizationInfo.cs	(revision 2861)
@@ -30,15 +30,23 @@
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
-  public sealed class OperatorGraphVisualizationInfo : Item {
+  public sealed class OperatorGraphVisualizationInfo : DeepCloneable {
     private BidirectionalLookup<IOperator, IShapeInfo> shapeInfoMapping;
-
-    public OperatorGraphVisualizationInfo(OperatorGraph operatorGraph) {
+    private BidirectionalLookup<IOperator, IObservableKeyedCollection<string, IParameter>> operatorParameterCollectionMapping;
+    private Dictionary<IValueParameter<IOperator>, IOperator> parameterOperatorMapping;
+
+    private OperatorGraphVisualizationInfo() {
+      this.shapeInfoMapping = new BidirectionalLookup<IOperator, IShapeInfo>();
+      this.operatorParameterCollectionMapping = new BidirectionalLookup<IOperator, IObservableKeyedCollection<string, IParameter>>();
+      this.parameterOperatorMapping = new Dictionary<IValueParameter<IOperator>, IOperator>();
+
+      this.shapeInfos = new ObservableSet<IShapeInfo>();
+    }
+
+    public OperatorGraphVisualizationInfo(OperatorGraph operatorGraph)
+      : this() {
       this.operatorGraph = operatorGraph;
-      this.shapeInfoMapping = new BidirectionalLookup<IOperator, IShapeInfo>();
-      this.shapeInfos = new ObservableSet<IShapeInfo>();
-
+      this.operatorGraph.InitialOperatorChanged += new EventHandler(operatorGraph_InitialOperatorChanged);
       foreach (IOperator op in operatorGraph.Operators)
         this.AddOperator(op);
-      this.initialOperator = operatorGraph.InitialOperator;
 
       operatorGraph.Operators.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IOperator>(Operators_ItemsAdded);
@@ -47,4 +55,19 @@
     }
 
+    public event EventHandler InitialShapeChanged;
+    private void operatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
+      if (this.InitialShapeChanged != null)
+        this.InitialShapeChanged(this, new EventArgs());
+    }
+
+    public IShapeInfo InitialShape {
+      get {
+        IOperator op = this.operatorGraph.InitialOperator;
+        if (op == null)
+          return null;
+        return this.shapeInfoMapping.GetByFirst(op);
+      }
+    }
+
     private OperatorGraph operatorGraph;
     public OperatorGraph OperatorGraph {
@@ -56,25 +79,11 @@
       get { return this.shapeInfos; }
     }
-
     public IEnumerable<IShapeInfo> ShapeInfos {
       get { return this.shapeInfos; }
     }
 
-    private IOperator initialOperator;
-    public IOperator InitialOperator {
-      get { return this.initialOperator; }
-      set {
-        if (this.initialOperator != value) {
-          if (!this.shapeInfoMapping.ContainsFirst(value))
-            throw new ArgumentException("Could not set initial operator in graph visualization information, because the operator " +
-              value.ToString() + " is not contained in the operator set.");
-          this.initialOperator = value;
-          this.OnChanged();
-        }
-      }
-    }
-
     internal void AddShapeInfo(IOperator op, IShapeInfo shapeInfo) {
       this.RegisterOperatorEvents(op);
+      this.operatorParameterCollectionMapping.Add(op, op.Parameters);
       this.shapeInfoMapping.Add(op, shapeInfo);
       this.shapeInfos.Add(shapeInfo);
@@ -90,17 +99,24 @@
     #region operator events
     private void AddOperator(IOperator op) {
-      if (!shapeInfoMapping.ContainsFirst(op)) {
-        this.RegisterOperatorEvents(op);
-
-        IShapeInfo shapeInfo = ShapeInfoFactory.CreateShapeInfo(op);
-        this.shapeInfoMapping.Add(op, shapeInfo);
-        this.shapeInfos.Add(shapeInfo);
-      }
+      if (shapeInfoMapping.ContainsFirst(op))
+        return;
+
+      this.RegisterOperatorEvents(op);
+      IShapeInfo shapeInfo = Factory.CreateShapeInfo(op);
+      this.operatorParameterCollectionMapping.Add(op, op.Parameters);
+      this.shapeInfoMapping.Add(op, shapeInfo);
+      foreach (IParameter param in op.Parameters)
+        this.AddParameter(op, param);
+
+      this.shapeInfos.Add(shapeInfo);
     }
 
     private void RemoveOperator(IOperator op) {
       this.DeregisterOperatorEvents(op);
+      foreach (IParameter param in op.Parameters)
+        this.RemoveParameter(op, param);
 
       IShapeInfo shapeInfo = this.shapeInfoMapping.GetByFirst(op);
+      this.operatorParameterCollectionMapping.RemoveByFirst(op);
       this.shapeInfoMapping.RemoveByFirst(op);
       this.shapeInfos.Remove(shapeInfo);
@@ -139,16 +155,26 @@
 
     #region parameter events
-    private void AddParameter(IParameter param) {
+    private void AddParameter(IOperator op, IParameter param) {
       IValueParameter<IOperator> opParam = param as IValueParameter<IOperator>;
       if (opParam != null) {
-        RegisterOperatorParameterEvents(opParam);
-        //TODO add connector
-      }
-    }
-    private void RemoveParameter(IParameter param) {
+        this.RegisterOperatorParameterEvents(opParam);
+        this.parameterOperatorMapping.Add(opParam, op);
+        IShapeInfo shapeInfo = this.shapeInfoMapping.GetByFirst(op);
+        shapeInfo.AddConnector(param.Name);
+
+        if (opParam.Value != null) {
+          if (!this.shapeInfoMapping.ContainsFirst(opParam.Value))
+            this.AddOperator(opParam.Value);
+          shapeInfo.AddConnection(param.Name, this.shapeInfoMapping.GetByFirst(opParam.Value));
+        }
+      }
+    }
+    private void RemoveParameter(IOperator op, IParameter param) {
       IValueParameter<IOperator> opParam = param as IValueParameter<IOperator>;
       if (opParam != null) {
-        DeregisterOperatorParameterEvents(opParam);
-        //TODO remove connector
+        this.DeregisterOperatorParameterEvents(opParam);
+        this.parameterOperatorMapping.Remove(opParam);
+        IShapeInfo shapeInfo = this.shapeInfoMapping.GetByFirst(op);
+        shapeInfo.RemoveConnector(param.Name);
       }
     }
@@ -156,27 +182,44 @@
     private void opParam_ValueChanged(object sender, EventArgs e) {
       IValueParameter<IOperator> opParam = (IValueParameter<IOperator>)sender;
-      //TODO update connections
+      if (opParam != null) {
+        IOperator op = this.parameterOperatorMapping[opParam];
+        IShapeInfo shapeInfo = this.shapeInfoMapping.GetByFirst(op);
+
+        if (opParam.Value == null)
+          shapeInfo.RemoveConnection(opParam.Name);
+        else
+          shapeInfo.ChangeConnection(opParam.Name, this.shapeInfoMapping.GetByFirst(opParam.Value));
+      }
     }
 
     private void Parameters_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
-      foreach (IParameter param in e.Items)
-        AddParameter(param);
+      IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
+      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
+      foreach (IParameter param in e.Items)
+        AddParameter(op, param);
     }
     private void Parameters_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
-      foreach (IParameter param in e.Items)
-        RemoveParameter(param);
+      IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
+      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
+      foreach (IParameter param in e.Items)
+        RemoveParameter(op, param);
     }
     private void Parameters_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
+      IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
+      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
       foreach (IParameter param in e.OldItems)
-        RemoveParameter(param);
-      foreach (IParameter param in e.Items)
-        AddParameter(param);
+        RemoveParameter(op, param);
+      foreach (IParameter param in e.Items)
+        AddParameter(op, param);
     }
     private void Parameters_CollectionReset(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
+      IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
+      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
       foreach (IParameter param in e.OldItems)
-        RemoveParameter(param);
-      foreach (IParameter param in e.Items)
-        AddParameter(param);
-    }
+        RemoveParameter(op, param);
+      foreach (IParameter param in e.Items)
+        AddParameter(op, param);
+    }
+
 
     private void RegisterOperatorParameterEvents(IValueParameter<IOperator> opParam) {
@@ -187,23 +230,4 @@
     }
     #endregion
-
-
-
-
-
-
-
-
-    private static IConnection CreateConnection(IShape from, IShape to) {
-      IConnector parentConnector = from.Connectors.Where(c => c.Name == "Bottom connector").First();
-      IConnector operatorConnector = to.Connectors.Where(c => c.Name == "Top connector").First();
-
-      IConnection connection = new Connection(parentConnector.Point, operatorConnector.Point);
-
-      parentConnector.AttachConnector(connection.From);
-      operatorConnector.AttachConnector(connection.To);
-
-      return connection;
-    }
   }
 }
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorShape.cs	(revision 2853)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorShape.cs	(revision 2861)
@@ -30,36 +30,60 @@
   public class OperatorShape : ClassShape {
 
-    private BidirectionalLookup<string, IConnector> additionalConnectors;
     public OperatorShape()
       : base() {
-      this.additionalConnectors = new BidirectionalLookup<string,IConnector>();
+      this.additionalConnectors = new List<IConnector>();
     }
 
-    private Connector predecessor;
-    public Connector Predecessor {
+    private List<IConnector> additionalConnectors;
+    public IEnumerable<string> AdditionalConnectorNames {
+      get { return this.additionalConnectors.Select(c => c.Name); }
+    }
+
+    private IConnector predecessor;
+    public IConnector Predecessor {
       get { return this.predecessor; }
     }
 
-    private Connector successor;
-    public Connector Successor {
+    private IConnector successor;
+    public IConnector Successor {
       get { return this.successor; }
     }
 
+    private IConnector CreateConnector(string connectorName, Point location) {
+      Connector connector = new Connector(location);
+      connector.ConnectorStyle = ConnectorStyle.Square;
+      connector.Parent = this;
+      connector.Name = connectorName;
+      return connector;
+    }
+
+
 
     public void AddConnector(string connectorName) {
-      Connector connector = new Connector(new Point(Rectangle.Right, Rectangle.Bottom));
-      connector.ConnectorStyle = ConnectorStyle.Square;
-      connector.Parent = this;
-      this.additionalConnectors.Add(connectorName, connector);
-      Connectors.Add(connector);
+      IConnector connector = this.CreateConnector(connectorName, this.BottomRightCorner);
+
+      this.additionalConnectors.Add(connector);
+      this.Connectors.Add(connector);
+      this.UpdateConnectorLocation();
     }
 
     public void RemoveConnector(string connectorName) {
-      this.additionalConnectors.RemoveByFirst(connectorName);
-      this.UpdateConnectorLocation();
+      IConnector connector = this.additionalConnectors.Where(c => c.Name ==connectorName).FirstOrDefault();
+      if (connector != null) {
+        this.additionalConnectors.Remove(connector);
+        this.Connectors.Remove(connector);
+        this.UpdateConnectorLocation();
+      }
     }
 
-    private void UpdateConnectorLocation() { 
-      //TODO set x position of connectors
+    private void UpdateConnectorLocation() {
+      int spacing = this.Rectangle.Width / this.additionalConnectors.Count + 1;
+      int margin = spacing / 2;
+      int posX = margin + this.Rectangle.X;
+      int posY = this.additionalConnectors[0].Point.Y;
+      for (int i = 0; i < this.additionalConnectors.Count; i++) {
+        this.additionalConnectors[i].Point = new Point(posX, posY);
+        posX += spacing;
+      }
     }
 
@@ -71,14 +95,8 @@
       this.Connectors.Clear();
 
-      predecessor = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)));
-      predecessor.ConnectorStyle = ConnectorStyle.Square;
-      predecessor.Name = "Predecessor";
-      predecessor.Parent = this;
+      predecessor = this.CreateConnector("Predecessor", new Point(Rectangle.Left, Center.Y));
       Connectors.Add(predecessor);
 
-      successor = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)));
-      predecessor.ConnectorStyle = ConnectorStyle.Square;
-      successor.Name = "Successor";
-      successor.Parent = this;
+      successor = this.CreateConnector("Successor",(new Point(Rectangle.Right, Center.Y)));
       Connectors.Add(successor);
       #endregion
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorShapeInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorShapeInfo.cs	(revision 2853)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/OperatorShapeInfo.cs	(revision 2861)
@@ -27,12 +27,13 @@
 using System.Drawing;
 using Netron.Diagramming.Core;
+using System.Windows.Forms;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
   internal class OperatorShapeInfo : ShapeInfo {
 
-    private HashSet<string> connectorNames;
+    private List<string> connectorNames;
     public OperatorShapeInfo()
       : base(typeof(OperatorShape)) {
-      this.connectorNames = new HashSet<string>();
+      this.connectorNames = new List<string>();
     }
 
@@ -43,14 +44,32 @@
     }
 
-    public void AddConnector(string connectorName) {
-      if (this.connectorNames.Add(connectorName))
+    public override void AddConnector(string connectorName) {
+      if (!this.connectorNames.Contains(connectorName) && connectorName != "Successor") {
+        this.connectorNames.Add(connectorName);
         this.OnChanged();
+      }
     }
 
-    public void RemoveConnector(string connectorName) {
-      if (this.connectorNames.Remove(connectorName))
+    public override void RemoveConnector(string connectorName) {
+      if (this.connectorNames.Contains(connectorName)) {
+        this.connectorNames.Remove(connectorName);
+        if (this.connections.ContainsKey(connectorName))
+          this.connections.Remove(connectorName);
         this.OnChanged();
+      }
     }
 
+    public override void AddConnection(string fromConnectorName, IShapeInfo toShapeInfo) {
+      this.connections.Add(fromConnectorName, toShapeInfo);
+    }
+
+    public override void RemoveConnection(string fromConnectorName) {
+      if (this.connections.ContainsKey(fromConnectorName))
+        this.connections.Remove(fromConnectorName);
+    }
+
+    public override void ChangeConnection(string fromConnectorName, IShapeInfo toShapeInfo) {
+      this.connections[fromConnectorName] = toShapeInfo;
+    }
 
     private string title;
@@ -96,4 +115,34 @@
       return shape;
     }
+
+    public override void UpdateShape(IShape shape) {
+      base.UpdateShape(shape);
+      OperatorShape operatorShape = shape as OperatorShape;
+
+      if (operatorShape != null) {
+        operatorShape.Title = this.Title;
+        operatorShape.SubTitle = this.Text;
+        operatorShape.HeadColor = this.HeadColor;
+
+        int i = 0;
+        int j = 0;
+        //remove old connectors and skip correct connectors
+        List<string> oldConnectorNames = operatorShape.AdditionalConnectorNames.ToList();
+        while (i < this.connectorNames.Count && j < oldConnectorNames.Count) {
+          if (this.connectorNames[i] != oldConnectorNames[j]) {
+            operatorShape.RemoveConnector(oldConnectorNames[j]);
+          } else
+            i++;
+          j++;
+        }
+        //remove old connectors
+        for (; j < oldConnectorNames.Count; i++)
+          operatorShape.RemoveConnector(oldConnectorNames[j]);
+
+        //add new connectors
+        for (; i < this.connectorNames.Count; i++)
+          operatorShape.AddConnector(this.connectorNames[i]);
+      }
+    }
   }
 }
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/ShapeInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/ShapeInfo.cs	(revision 2853)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/ShapeInfo.cs	(revision 2861)
@@ -27,13 +27,13 @@
 using System.Drawing;
 using Netron.Diagramming.Core;
+using HeuristicLab.Collections;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
   internal abstract class ShapeInfo : Item, IShapeInfo {
-
-
     protected ShapeInfo(Type shapeType) {
       if (!typeof(IShape).IsAssignableFrom(shapeType))
         throw new ArgumentException("The passed shape type " + shapeType + " must be derived from IShape.");
       this.shapeType = shapeType;
+      this.connections = new ObservableDictionary<string, IShapeInfo>();
     }
 
@@ -65,4 +65,19 @@
     }
 
+    protected ObservableDictionary<string, IShapeInfo> connections;
+    public IEnumerable<KeyValuePair<string, IShapeInfo>> Connections {
+      get { return this.connections; }
+    }
+    public INotifyObservableDictionaryItemsChanged<string, IShapeInfo> ObservableConnections {
+      get { return this.connections; }
+    }
+
+    public abstract void AddConnector(string connectorName);
+    public abstract void RemoveConnector(string connectorName);
+    public abstract void AddConnection(string fromConnectorName, IShapeInfo toShapeInfo);
+    public abstract void RemoveConnection(string fromConnectorName);
+    public abstract void ChangeConnection(string fromConnectorName, IShapeInfo toShapeInfo);
+
+
     public virtual IShape CreateShape() {
       IShape shape = (IShape)Activator.CreateInstance(this.shapeType);
@@ -72,4 +87,10 @@
       return shape;
     }
+
+    public virtual void UpdateShape(IShape shape) {
+      shape.Location = this.Location;
+      shape.Height = this.Size.Height;
+      shape.Width = this.Size.Width;
+    }
   }
 }
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/ShapeInfoFactory.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/ShapeInfoFactory.cs	(revision 2853)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/ShapeInfoFactory.cs	(revision 2861)
@@ -25,9 +25,20 @@
 using System.Text;
 using HeuristicLab.Core;
+using Netron.Diagramming.Core;
+using System.Drawing;
+using System.Drawing.Drawing2D;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
-  public static class ShapeInfoFactory {
+  public static class Factory {
+    private static LinePenStyle connectionPenStyle;
+
+    static Factory() {
+      connectionPenStyle = new LinePenStyle();
+      connectionPenStyle.EndCap = LineCap.ArrowAnchor;
+    }
+
     public static IShapeInfo CreateShapeInfo(IOperator op) {
-      OperatorShapeInfo operatorShapeInfo = new OperatorShapeInfo();
+      IEnumerable<string> paramterNames = op.Parameters.Where(p => p is IValueParameter<IOperator> && p.Name != "Successor").Select(p => p.Name);
+      OperatorShapeInfo operatorShapeInfo = new OperatorShapeInfo(paramterNames);
       operatorShapeInfo.Title = op.Name;
       operatorShapeInfo.Text = op.GetType().ToString();
@@ -35,4 +46,13 @@
       return operatorShapeInfo;
     }
+
+    public static IConnection CreateConnection(IConnector from, IConnector to) {
+      Connection connection = new Connection(from.Point, to.Point);
+      connection.AllowMove = false;
+      from.AttachConnector(connection.From);
+      to.AttachConnector(connection.To);
+      connection.PenStyle = connectionPenStyle;
+      return connection;
+    }
   }
 }
