Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Model.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Model.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Model.cs	(revision 2861)
@@ -490,5 +490,5 @@
             get
             {
-                throw new System.NotImplementedException();
+              return CurrentPage.Connections;
             }
 
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Connectors/Connector.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Connectors/Connector.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Connectors/Connector.cs	(revision 2861)
@@ -3,364 +3,343 @@
 using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-	/// <summary>
-	/// The default connector.  Represents an endpoint of a connection or a 
-    /// location of a bundle to which a connection can be attached.
-    /// </summary>
-    // ----------------------------------------------------------------------
-	public partial class Connector : ConnectorBase
-    {
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// Connector.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double connectorVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies how the connector is drawn on the canvas when 'IsVisible'
-        /// is true.  The default style is 'Simple', which is a transparent
-        /// background with a blue 'x' (similar to Visio).
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected ConnectorStyle myStyle = ConnectorStyle.Simple;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return connectorVersion;
-            }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The default connector.  Represents an endpoint of a connection or a 
+  /// location of a bundle to which a connection can be attached.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class Connector : ConnectorBase {
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// Connector.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double connectorVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies how the connector is drawn on the canvas when 'IsVisible'
+    /// is true.  The default style is 'Simple', which is a transparent
+    /// background with a blue 'x' (similar to Visio).
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected ConnectorStyle myStyle = ConnectorStyle.Simple;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return connectorVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets how the connector is drawn on the canvas when 
+    /// 'IsVisible' is true.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public ConnectorStyle ConnectorStyle {
+      get {
+        return this.myStyle;
+      }
+      set {
+        this.myStyle = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public override string EntityName {
+      get { return "Connector"; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The bounds of the paintable entity.
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public override Rectangle Rectangle {
+      get {
+        return new Rectangle(Point.X - 2, Point.Y - 2, 4, 4);
+      }
+      //set {               Point = value.Location;               
+      //TODO: think about what to do when setting the size            }
+    }
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:Connector"/> class.
+    /// </summary>
+    /// <param name="site">The site.</param>
+    // ------------------------------------------------------------------
+    public Connector(IModel site)
+      : base(site) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:Connector"/> class.
+    /// </summary>
+    /// <param name="p">The p.</param>
+    /// <param name="site">The site.</param>
+    // ------------------------------------------------------------------
+    public Connector(Point p, IModel site)
+      : base(p, site) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:Connector"/> class.
+    /// </summary>
+    /// <param name="p">The p.</param>
+    // ------------------------------------------------------------------
+    public Connector(Point p)
+      : base(p) {
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the connector on the canvas.
+    /// </summary>
+    /// <param name="g"></param>
+    // ------------------------------------------------------------------
+    public override void Paint(Graphics g) {
+      if (g == null) {
+        throw new ArgumentNullException(
+            "The Graphics object is 'null'");
+      }
+
+      if (Hovered || IsSelected) {
+        Rectangle area = Rectangle;
+        area.Inflate(3, 3);
+        g.DrawRectangle(
+            ArtPalette.ConnectionHighlightPen,
+            area);
+        //g.FillRectangle(
+        //    Brushes.Green,
+        //    Point.X - 4,
+        //    Point.Y - 4,
+        //    8,
+        //    8);
+      } else {
+        if (Visible) {
+          switch (this.myStyle) {
+            case ConnectorStyle.Simple:
+              DrawSimpleConnector(g);
+              break;
+
+            case ConnectorStyle.Round:
+              break;
+
+            case ConnectorStyle.Square:
+              DrawSquareConnector(g);
+              break;
+          }
+
+          if (this.mShowName) {
+            DrawName(g);
+          }
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets how the connector is drawn on the canvas when 
-        /// 'IsVisible' is true.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public ConnectorStyle ConnectorStyle
-        {
-            get
-            {
-                return this.myStyle;
-            }
-            set
-            {
-                this.myStyle = value;
-            }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Draws the name of this connector.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    // ------------------------------------------------------------------
+    void DrawName(Graphics g) {
+      Size size = Size.Round(
+          g.MeasureString(mName, mFont));
+
+      int xOffset = (size.Width - Rectangle.Width) / 2;
+      int yOffset = (size.Height - Rectangle.Height) / 2;
+
+      System.Drawing.Point location = Rectangle.Location;
+
+      switch (this.mNameLocation) {
+        case ConnectorNameLocation.Top:
+          location = new Point(
+              Rectangle.X - xOffset,
+              Rectangle.Y - size.Height);
+          break;
+
+        case ConnectorNameLocation.Bottom:
+          location = new Point(
+              Rectangle.X - xOffset,
+              Rectangle.Bottom + size.Height);
+          break;
+
+        case ConnectorNameLocation.Left:
+          location = new Point(
+              Rectangle.X - size.Width,
+              Rectangle.Y - yOffset);
+          break;
+
+        case ConnectorNameLocation.Right:
+          location = new Point(
+              Rectangle.Right,
+              Rectangle.Y - yOffset);
+          break;
+      }
+
+      Rectangle textArea = new Rectangle(location, size);
+      StringFormat format = new StringFormat();
+      format.FormatFlags = StringFormatFlags.FitBlackBox;
+      g.DrawString(
+          mName,
+          mFont,
+          new SolidBrush(mForeColor),
+          location);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Draws a blue 'x' using 'Dot' as the line style, with a transparent
+    /// color.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    // ------------------------------------------------------------------
+    protected virtual void DrawSimpleConnector(Graphics g) {
+      Pen pen = ArtPalette.GetSimpleConnectorPenStyle().DrawingPen();
+      Brush brush =
+          ArtPalette.GetSimpleConnectorPaintStyle().GetBrush(
+          this.Rectangle);
+
+      GraphicsPath path = new GraphicsPath();
+      // Diagonal line from top left to bottom right.
+      g.DrawLine(pen, this.TopLeftCorner, this.BottomRightCorner);
+
+
+      // Diagonal line from top right to bottom lrft.
+      g.DrawLine(pen, this.TopRightCorner, this.BottomLeftCorner);
+    }
+
+    protected virtual void DrawSquareConnector(Graphics g) {
+      Pen pen = ArtPalette.GetSimpleConnectorPenStyle().DrawingPen();
+      Brush brush = ArtPalette.GetSimpleConnectorPaintStyle().GetBrush(this.Rectangle);
+      g.DrawRectangle(pen, this.Rectangle);
+    }
+
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Tests if the mouse hits this connector.
+    /// </summary>
+    /// <param name="p">Point</param>
+    /// <returns>bool</returns>
+    // ------------------------------------------------------------------
+    public override bool Hit(Point p) {
+      Point a = p;
+      Point b = Point;
+      b.Offset(-7, -7);
+      //a.Offset(-1,-1);
+      Rectangle r = new Rectangle(a, new Size(0, 0));
+      Rectangle d = new Rectangle(b, new Size(15, 15));
+      return d.Contains(r);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the connector
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Invalidate() {
+      Point p = Point;
+      p.Offset(-5, -5);
+      if (Model != null)
+        Model.RaiseOnInvalidateRectangle(
+                  new Rectangle(p, new Size(10, 10)));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the connector with the given shift-vector.
+    /// </summary>
+    /// <param name="p">Point</param>
+    // ------------------------------------------------------------------
+    public override void MoveBy(Point p) {
+      Point pt = new Point(this.Point.X + p.X, this.Point.Y + p.Y);
+      IConnection con = null;
+      Point p1 = Point.Empty, p2 = Point.Empty;
+
+      Rectangle rec = new Rectangle(
+          Point.X - 10,
+          Point.Y - 10,
+          20,
+          20);
+
+      this.Point = pt;
+
+      #region Case of connection
+      if (typeof(IConnection).IsInstanceOfType(this.Parent)) {
+        (Parent as IConnection).Invalidate();
+      }
+      #endregion
+
+      #region Case of attached connectors
+      for (int k = 0; k < AttachedConnectors.Count; k++) {
+        if (typeof(IConnection).IsInstanceOfType(AttachedConnectors[k].Parent)) {
+          //keep a reference to the two points so we can invalidate the region afterwards
+          con = AttachedConnectors[k].Parent as IConnection;
+          p1 = con.From.Point;
+          p2 = con.To.Point;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public override string EntityName
-        {
-            get { return "Connector"; }
+        AttachedConnectors[k].MoveBy(p);
+        if (con != null) {
+          //invalidate the 'before the move'-region                     
+          Rectangle f = new Rectangle(p1, new Size(10, 10));
+          Rectangle t = new Rectangle(p2, new Size(10, 10));
+          Model.RaiseOnInvalidateRectangle(Rectangle.Union(f, t));
+          //finally, invalidate the region where the connection is now
+          (AttachedConnectors[k].Parent as IConnection).Invalidate();
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The bounds of the paintable entity.
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public override Rectangle Rectangle
-        {
-            get
-            {
-                return new Rectangle(Point.X - 2, Point.Y - 2, 4, 4);
-            }
-            //set {               Point = value.Location;               
-            //TODO: think about what to do when setting the size            }
-        }
-
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Connector"/> class.
-        /// </summary>
-        /// <param name="site">The site.</param>
-        // ------------------------------------------------------------------
-        public Connector(IModel site):base(site)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Connector"/> class.
-        /// </summary>
-        /// <param name="p">The p.</param>
-        /// <param name="site">The site.</param>
-        // ------------------------------------------------------------------
-		public Connector(Point p, IModel site):base(p, site)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Connector"/> class.
-        /// </summary>
-        /// <param name="p">The p.</param>
-        // ------------------------------------------------------------------
-        public Connector(Point p) : base(p)
-        {
-        }
-
-		#endregion
-
-		#region Methods
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Paints the connector on the canvas.
-		/// </summary>
-        /// <param name="g"></param>
-        // ------------------------------------------------------------------
-		public override void Paint(Graphics g)
-		{
-            if (g == null)
-            {
-                throw new ArgumentNullException(
-                    "The Graphics object is 'null'");
-            }
-
-            if (Hovered || IsSelected)
-            {
-                Rectangle area = Rectangle;
-                area.Inflate(3, 3);
-                g.DrawRectangle(
-                    ArtPalette.ConnectionHighlightPen,
-                    area);
-                //g.FillRectangle(
-                //    Brushes.Green,
-                //    Point.X - 4,
-                //    Point.Y - 4,
-                //    8,
-                //    8);
-            }
-            else
-            {
-                if (Visible)
-                {
-                    switch (this.myStyle)
-                    {
-                        case ConnectorStyle.Simple :
-                            DrawSimpleConnector(g);
-                            break;
-
-                        case ConnectorStyle.Round :
-                            break;
-
-                        case ConnectorStyle.Square :
-                            break;
-                    }
-
-                    if (this.mShowName)
-                    {
-                        DrawName(g);
-                    }
-                }
-            }
-		}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Draws the name of this connector.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        // ------------------------------------------------------------------
-        void DrawName(Graphics g)
-        {
-            Size size = Size.Round(
-                g.MeasureString(mName, mFont));
-
-            int xOffset = (size.Width - Rectangle.Width) / 2;
-            int yOffset = (size.Height - Rectangle.Height) / 2;
-
-            System.Drawing.Point location = Rectangle.Location;
-
-            switch (this.mNameLocation)
-            {
-                case ConnectorNameLocation.Top:
-                    location = new Point(
-                        Rectangle.X - xOffset, 
-                        Rectangle.Y - size.Height);
-                    break;
-
-                case ConnectorNameLocation.Bottom:
-                    location = new Point(
-                        Rectangle.X - xOffset,
-                        Rectangle.Bottom + size.Height);
-                    break;
-
-                case ConnectorNameLocation.Left:
-                    location = new Point(
-                        Rectangle.X - size.Width,
-                        Rectangle.Y - yOffset);
-                    break;
-
-                case ConnectorNameLocation.Right:
-                    location = new Point(
-                        Rectangle.Right,
-                        Rectangle.Y - yOffset);
-                    break;
-            }
-
-            Rectangle textArea = new Rectangle(location, size);
-            StringFormat format = new StringFormat();
-            format.FormatFlags = StringFormatFlags.FitBlackBox;
-            g.DrawString(
-                mName, 
-                mFont, 
-                new SolidBrush(mForeColor),
-                location);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Draws a blue 'x' using 'Dot' as the line style, with a transparent
-        /// color.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        // ------------------------------------------------------------------
-        protected virtual void DrawSimpleConnector(Graphics g)
-        {
-            Pen pen = ArtPalette.GetSimpleConnectorPenStyle().DrawingPen();
-            Brush brush = 
-                ArtPalette.GetSimpleConnectorPaintStyle().GetBrush(
-                this.Rectangle);
-
-            GraphicsPath path = new GraphicsPath();
-            // Diagonal line from top left to bottom right.
-            g.DrawLine(pen, this.TopLeftCorner, this.BottomRightCorner);
-
-            
-            // Diagonal line from top right to bottom lrft.
-            g.DrawLine(pen, this.TopRightCorner, this.BottomLeftCorner); 
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Tests if the mouse hits this connector.
-		/// </summary>
-        /// <param name="p">Point</param>
-        /// <returns>bool</returns>
-        // ------------------------------------------------------------------
-		public override bool Hit(Point p)
-		{
-			Point a = p;
-			Point b  = Point;
-			b.Offset(-7,-7);
-			//a.Offset(-1,-1);
-			Rectangle r = new Rectangle(a,new Size(0,0));
-			Rectangle d = new Rectangle(b, new Size(15,15));
-			return d.Contains(r);
-		}
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Invalidates the connector
-        /// </summary>
-        // ------------------------------------------------------------------
-		public override void Invalidate()
-		{
-			Point p = Point;
-			p.Offset(-5,-5);
-            if(Model!=null)
-			    Model.RaiseOnInvalidateRectangle(
-                    new Rectangle(p,new Size(10,10)));
-		}
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Moves the connector with the given shift-vector.
-		/// </summary>
-        /// <param name="p">Point</param>
-        // ------------------------------------------------------------------
-		public override void MoveBy(Point p)
-		{
-            Point pt = new Point(this.Point.X + p.X, this.Point.Y + p.Y);            
-            IConnection con = null;
-            Point p1 = Point.Empty, p2 = Point.Empty;
-
-            Rectangle rec = new Rectangle(
-                Point.X - 10, 
-                Point.Y - 10, 
-                20, 
-                20);
-
-            this.Point = pt;
-            
-            #region Case of connection
-            if (typeof(IConnection).IsInstanceOfType(this.Parent))
-            {
-                (Parent as IConnection).Invalidate();
-            }
-            #endregion
-
-            #region Case of attached connectors
-            for (int k = 0; k < AttachedConnectors.Count; k++)
-            {
-                if (typeof(IConnection).IsInstanceOfType(AttachedConnectors[k].Parent))
-                {
-                    //keep a reference to the two points so we can invalidate the region afterwards
-                    con = AttachedConnectors[k].Parent as IConnection;
-                    p1 = con.From.Point;
-                    p2 = con.To.Point;
-                }
-                AttachedConnectors[k].MoveBy(p);
-                if (con != null)
-                {
-                    //invalidate the 'before the move'-region                     
-                    Rectangle f = new Rectangle(p1, new Size(10, 10));
-                    Rectangle t = new Rectangle(p2, new Size(10, 10));
-                    Model.RaiseOnInvalidateRectangle(Rectangle.Union(f, t));
-                    //finally, invalidate the region where the connection is now
-                    (AttachedConnectors[k].Parent as IConnection).Invalidate();
-                }
-            } 
-            #endregion
-            //invalidate this connector, since it's been moved
-            Invalidate(rec);//before the move
-            this.Invalidate();//after the move
-            
-		}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Moves the connector with the given shift-vector
-        /// </summary>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
-        // ------------------------------------------------------------------
-		public void MoveBy(int x, int y)
-		{
-			Point pt = new Point( x, y);
-            MoveBy(pt);
-		}
-
-		#endregion
-	}
+      }
+      #endregion
+      //invalidate this connector, since it's been moved
+      Invalidate(rec);//before the move
+      this.Invalidate();//after the move
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the connector with the given shift-vector
+    /// </summary>
+    /// <param name="x">The x.</param>
+    /// <param name="y">The y.</param>
+    // ------------------------------------------------------------------
+    public void MoveBy(int x, int y) {
+      Point pt = new Point(x, y);
+      MoveBy(pt);
+    }
+
+    #endregion
+  }
 }
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/BalloonTreeLayout.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/BalloonTreeLayout.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/BalloonTreeLayout.cs	(revision 2861)
@@ -49,5 +49,4 @@
             : base("Balloon TreeLayout", controller)
         {
-
         }
         #endregion
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/FruchtermanReingoldLayout.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/FruchtermanReingoldLayout.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/FruchtermanReingoldLayout.cs	(revision 2861)
@@ -43,5 +43,4 @@
             : base("FruchtermanReingold Layout", controller)
         {
-
         }
         #endregion
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RadialTreeLayout.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RadialTreeLayout.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RadialTreeLayout.cs	(revision 2861)
@@ -69,5 +69,4 @@
             : base("Radial TreeLayout", controller)
         {
-
         }
         private bool Init()
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RandomLayout.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RandomLayout.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RandomLayout.cs	(revision 2861)
@@ -39,5 +39,4 @@
             : base("Random layout", controller)
         {
-
         }
         #endregion
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs	(revision 2861)
@@ -103,5 +103,5 @@
         {
 
-
+          Orientation = TreeOrientation.LeftRight;
 
         }
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectionTool.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectionTool.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectionTool.cs	(revision 2861)
@@ -5,154 +5,142 @@
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-   
-    class ConnectionTool : AbstractTool, IMouseListener
-    {
+namespace Netron.Diagramming.Core {
 
-        #region Fields
-        /// <summary>
-        /// the location of the mouse when the motion starts
-        /// </summary>
-        private Point initialPoint;
-        private bool doDraw;
+  class ConnectionTool : AbstractTool, IMouseListener {
+
+    #region Fields
+    /// <summary>
+    /// the location of the mouse when the motion starts
+    /// </summary>
+    private Point initialPoint;
+    private bool doDraw;
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectionTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public ConnectionTool(string name)
+      : base(name) {
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      Controller.View.CurrentCursor = CursorPalette.Grip;
+      this.SuspendOtherTools();
+      doDraw = false;
+    }
+
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) {
+
+        initialPoint = e.Location;
+        doDraw = true;
+        return true;
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      Point point = e.Location;
+      if (IsActive) {
+        if (foundConnector != null)
+          foundConnector.Hovered = false;
+        foundConnector = Selection.FindConnectorAt(e.Location);
+        if (foundConnector != null)
+          foundConnector.Hovered = true;
+      }
+      if (IsActive && doDraw) {
+        Controller.View.PaintGhostLine(initialPoint, point);
+        Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
+
+
+      }
+    }
+    private IConnector foundConnector;
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+        DeactivateTool();
+
+        // First, make sure the initial point is far enough away from 
+        // the final point to make a connection.
+        int maxX = Math.Abs(Math.Max(initialPoint.X, e.Location.X));
+        int maxY = Math.Abs(Math.Max(initialPoint.Y, e.Location.Y));
+
+        if (!(maxX > ConnectionBase.MinLength) ||
+            !(maxY > ConnectionBase.MinLength)) {
+          return;
+        }
+
+        //whatever comes hereafter, a compund command is the most economic approach
+        CompoundCommand package = new CompoundCommand(this.Controller);
+
+        //let's see if the connection endpoints hit other connectors
+        //note that the following can be done because the actual connection has not been created yet
+        //otherwise the search would find the endpoints of the newly created connection, which
+        //would create a loop and a stack overflow!
+        IConnector startConnector = Selection.FindConnectorAt(initialPoint);
+        IConnector endConnector = Selection.FindConnectorAt(e.Location);
+
+        #region Create the new connection
+        Connection cn = new Connection(this.initialPoint, e.Location, this.Controller.Model);
+        AddConnectionCommand newcon = new AddConnectionCommand(this.Controller, cn);
+
         #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectionTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public ConnectionTool(string name) : base(name)
-        {
+        #region Initial attachment?
+        if (startConnector != null) {
+          BindConnectorsCommand bindStart = new BindConnectorsCommand(this.Controller, startConnector, cn.From);
+          package.Commands.Add(bindStart);
         }
         #endregion
 
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            Controller.View.CurrentCursor =CursorPalette.Grip;
-            this.SuspendOtherTools(); 
-            doDraw = false;
-        }
-
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
-            {
-               
-                    initialPoint = e.Location;
-                    doDraw = true;
-                    return true;           
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            Point point = e.Location;
-            if (IsActive)
-            {
-                if (foundConnector != null)
-                    foundConnector.Hovered = false;
-                foundConnector = Selection.FindConnectorAt(e.Location);
-                if (foundConnector != null)
-                    foundConnector.Hovered = true;
-            }
-            if(IsActive && doDraw)
-            {
-                Controller.View.PaintGhostLine(initialPoint, point);
-                Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
-               
-                
-            }            
-        }
-        private IConnector foundConnector;
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
-                DeactivateTool();
-
-                // First, make sure the initial point is far enough away from 
-                // the final point to make a connection.
-                int maxX = Math.Abs(Math.Max(initialPoint.X, e.Location.X));
-                int maxY = Math.Abs(Math.Max(initialPoint.Y, e.Location.Y));
-
-                if (!(maxX > ConnectionBase.MinLength) ||
-                    !(maxY > ConnectionBase.MinLength))
-                {
-                    return;
-                }
-
-                //whatever comes hereafter, a compund command is the most economic approach
-                CompoundCommand package = new CompoundCommand(this.Controller);
-
-                //let's see if the connection endpoints hit other connectors
-                //note that the following can be done because the actual connection has not been created yet
-                //otherwise the search would find the endpoints of the newly created connection, which
-                //would create a loop and a stack overflow!
-                IConnector startConnector = Selection.FindConnectorAt(initialPoint);
-                IConnector endConnector = Selection.FindConnectorAt(e.Location);
-
-                #region Create the new connection
-                Connection cn = new Connection(this.initialPoint, e.Location, this.Controller.Model);
-                AddConnectionCommand newcon = new AddConnectionCommand(this.Controller, cn);
-                package.Commands.Add(newcon);
-                #endregion 
-			
-                #region Initial attachment?
-                if(startConnector != null)
-                {
-                    BindConnectorsCommand bindStart = new BindConnectorsCommand(this.Controller, startConnector, cn.From);
-                    package.Commands.Add(bindStart);
-                }
-                #endregion 
-
-                #region Final attachment?
-                if(endConnector != null)
-                {
-                    BindConnectorsCommand bindEnd = new BindConnectorsCommand(this.Controller, endConnector, cn.To);
-                    package.Commands.Add(bindEnd);
-                }
-                #endregion 
-			     package.Text = "New connection";
-                this.Controller.UndoManager.AddUndoCommand(package);
-               
-                //do it all
-                package.Redo();
-
-                //reset highlight of the found connector
-                if (foundConnector != null)
-                    foundConnector.Hovered = false;
-                //drop the painted ghost
-                Controller.View.ResetGhost();
-                //release other tools
-                this.UnsuspendTools();
-            }
+        #region Final attachment?
+        if (endConnector != null) {
+          BindConnectorsCommand bindEnd = new BindConnectorsCommand(this.Controller, endConnector, cn.To);
+          package.Commands.Add(bindEnd);
         }
         #endregion
+        package.Text = "New connection";
+        package.Commands.Add(newcon);
+        this.Controller.UndoManager.AddUndoCommand(package);
+
+        //do it all
+        package.Redo();
+
+        //reset highlight of the found connector
+        if (foundConnector != null)
+          foundConnector.Hovered = false;
+        //drop the painted ghost
+        Controller.View.ResetGhost();
+        //release other tools
+        this.UnsuspendTools();
+      }
     }
+    #endregion
+  }
 
 }
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj	(revision 2860)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj	(revision 2861)
@@ -95,6 +95,4 @@
     <None Include="HeuristicLabOperatorsViewsGraphVisualizationPlugin.cs.frame" />
     <None Include="Properties\AssemblyInfo.frame" />
-    <Compile Include="Model\ConnectionInfo.cs" />
-    <Compile Include="Model\IConnectionInfo.cs" />
     <Compile Include="Model\OperatorShapeInfo.cs" />
     <Compile Include="Model\OperatorGraphVisualizationInfo.cs" />
@@ -106,4 +104,5 @@
     </Compile>
     <Compile Include="Model\ShapeInfoFactory.cs" />
+    <Compile Include="ToolBarItems\ConnectionToolBarItem.cs" />
     <Compile Include="ToolBarItems\SelectToolBarItem.cs" />
     <Compile Include="ToolBarItems\PanToolBarItem.cs" />
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/IShapeInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/Model/IShapeInfo.cs	(revision 2860)
+++ 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 2860)
+++ 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 2860)
+++ 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 2860)
+++ 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 2860)
+++ 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 2860)
+++ 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;
+    }
   }
 }
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs	(revision 2861)
@@ -49,4 +49,5 @@
       this.graphVisualization.TabIndex = 0;
       this.graphVisualization.OnEntityRemoved += new System.EventHandler<global::Netron.Diagramming.Core.EntityEventArgs>(this.graphVisualization_OnEntityRemoved);
+      this.graphVisualization.OnEntityAdded += new System.EventHandler<global::Netron.Diagramming.Core.EntityEventArgs>(this.graphVisualization_OnEntityAdded);
       // 
       // OperatorGraphView
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs	(revision 2861)
@@ -34,10 +34,14 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Collections;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
+
   [Content(typeof(OperatorGraph), false)]
   public partial class OperatorGraphView : ContentView {
-    private BidirectionalLookup<IShapeInfo, IShape> shapeMapping;
-    private BidirectionalLookup<IConnectionInfo, IConnection> connectionMapping;
+    private BidirectionalLookup<IShapeInfo, IShape> shapeInfoShapeMapping;
+    private BidirectionalLookup<IShapeInfo, INotifyObservableDictionaryItemsChanged<string, IShapeInfo>> shapeInfoConnectionsMapping;
+    private Dictionary<IConnector, IShape> connectorShapeMapping;
+    private BidirectionalLookup<IConnection, KeyValuePair<IConnector, IConnector>> connectionConnectorsMapping;
 
     private bool causedUpdateOfShapeInfo;
@@ -46,6 +50,8 @@
       this.causedUpdateOfShapeInfo = false;
       Caption = "Operator Graph";
-      this.shapeMapping = new BidirectionalLookup<IShapeInfo, IShape>();
-      this.connectionMapping = new BidirectionalLookup<IConnectionInfo, IConnection>();
+      this.shapeInfoShapeMapping = new BidirectionalLookup<IShapeInfo, IShape>();
+      this.shapeInfoConnectionsMapping = new BidirectionalLookup<IShapeInfo, INotifyObservableDictionaryItemsChanged<string, IShapeInfo>>();
+      this.connectionConnectorsMapping = new BidirectionalLookup<IConnection, KeyValuePair<IConnector, IConnector>>();
+      this.connectorShapeMapping = new Dictionary<IConnector, IShape>();
     }
 
@@ -72,14 +78,33 @@
 
     private void UpdateVisualizationInfo() {
-      foreach (IShapeInfo shapeInfo in this.shapeMapping.FirstValues)
+      foreach (IShapeInfo shapeInfo in this.shapeInfoShapeMapping.FirstValues)
         this.RemoveShapeInfo(shapeInfo);
-      this.shapeMapping.Clear();
+
+      this.shapeInfoShapeMapping.Clear();
+      this.shapeInfoConnectionsMapping.Clear();
+      this.connectorShapeMapping.Clear();
+      this.connectionConnectorsMapping.Clear();
 
       foreach (IShapeInfo shapeInfo in this.VisualizationInfo.ShapeInfos)
         this.AddShapeInfo(shapeInfo);
+
+      this.UpdateLayoutRoot();
+    }
+
+    private void UpdateLayoutRoot() {
+      IShapeInfo shapeInfo = this.VisualizationInfo.InitialShape;
+      if (shapeInfo != null)
+        this.graphVisualization.Controller.Model.LayoutRoot = this.shapeInfoShapeMapping.GetByFirst(shapeInfo);
+      else
+        this.graphVisualization.Controller.Model.LayoutRoot = null;
+    }
+
+    private void VisualizationInfo_InitialShapeChanged(object sender, EventArgs e) {
+      this.UpdateLayoutRoot();
     }
 
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
+      this.VisualizationInfo.InitialShapeChanged += new EventHandler(VisualizationInfo_InitialShapeChanged);
       this.VisualizationInfo.ObserveableShapeInfos.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IShapeInfo>(ShapeInfos_ItemsAdded);
       this.VisualizationInfo.ObserveableShapeInfos.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IShapeInfo>(ShapeInfos_ItemsRemoved);
@@ -89,9 +114,9 @@
     protected override void DeregisterContentEvents() {
       base.DeregisterContentEvents();
+      this.VisualizationInfo.InitialShapeChanged -= new EventHandler(VisualizationInfo_InitialShapeChanged);
       this.VisualizationInfo.ObserveableShapeInfos.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IShapeInfo>(ShapeInfos_ItemsAdded);
       this.VisualizationInfo.ObserveableShapeInfos.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IShapeInfo>(ShapeInfos_ItemsRemoved);
       this.VisualizationInfo.ObserveableShapeInfos.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IShapeInfo>(ShapeInfos_CollectionReset);
     }
-
 
     private void ShapeInfos_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IShapeInfo> e) {
@@ -100,5 +125,4 @@
       foreach (IShapeInfo shapeInfo in e.Items)
         this.AddShapeInfo(shapeInfo);
-      this.graphVisualization.Invalidate();
     }
 
@@ -106,5 +130,4 @@
       foreach (IShapeInfo shapeInfo in e.Items)
         this.AddShapeInfo(shapeInfo);
-      this.graphVisualization.Invalidate();
     }
 
@@ -112,165 +135,223 @@
       foreach (IShapeInfo shapeInfo in e.Items)
         this.RemoveShapeInfo(shapeInfo);
-      this.graphVisualization.Invalidate();
     }
 
     private void AddShapeInfo(IShapeInfo shapeInfo) {
+      this.RegisterShapeInfoEvents(shapeInfo);
+
       IShape shape = shapeInfo.CreateShape();
+      shape.OnEntityChange += new EventHandler<EntityEventArgs>(shape_OnEntityChange);
+      this.shapeInfoShapeMapping.Add(shapeInfo, shape);
+
+      foreach (IConnector connector in shape.Connectors)
+        this.connectorShapeMapping.Add(connector, shape);
+
       this.graphVisualization.Controller.Model.AddShape(shape);
-      this.shapeMapping.Add(shapeInfo, shape);
-
-      shape.OnEntityChange += new EventHandler<EntityEventArgs>(shape_OnEntityChange);
-      shapeInfo.Changed += new ChangedEventHandler(shapeInfo_Changed);
+
+      foreach (KeyValuePair<string, IShapeInfo> pair in shapeInfo.Connections) {
+        if (!this.shapeInfoShapeMapping.ContainsFirst(pair.Value))
+          this.AddShapeInfo(pair.Value);
+        this.AddConnection(shapeInfo, pair.Key, pair.Value);
+      }
     }
 
     private void RemoveShapeInfo(IShapeInfo shapeInfo) {
-      IShape shape = this.shapeMapping.GetByFirst(shapeInfo);
+      this.DeregisterShapeInfoEvents(shapeInfo);
+      IShape shape = this.shapeInfoShapeMapping.GetByFirst(shapeInfo);
       shape.OnEntityChange -= new EventHandler<EntityEventArgs>(shape_OnEntityChange);
       shapeInfo.Changed -= new ChangedEventHandler(shapeInfo_Changed);
 
-      this.shapeMapping.RemoveByFirst(shapeInfo);
-      if (this.graphVisualization.Controller.Model.Shapes.Contains(shape))
+      IConnection connection;
+      foreach (IConnector connector in shape.Connectors) {
+        connection = this.GetConnection(shapeInfo, connector.Name);
+        this.RemoveConnection(connection);
+      }
+
+      this.shapeInfoShapeMapping.RemoveByFirst(shapeInfo);
+
+      if (this.graphVisualization.Controller.Model.Shapes.Contains(shape)) {
         this.graphVisualization.Controller.Model.RemoveShape(shape);
-    }
+      }
+    }
+
+    private void RegisterShapeInfoEvents(IShapeInfo shapeInfo) {
+      shapeInfo.Changed += new ChangedEventHandler(shapeInfo_Changed);
+
+      this.shapeInfoConnectionsMapping.Add(shapeInfo, shapeInfo.ObservableConnections);
+      shapeInfo.ObservableConnections.ItemsAdded += new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsAdded);
+      shapeInfo.ObservableConnections.ItemsRemoved += new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsRemoved);
+      shapeInfo.ObservableConnections.ItemsReplaced += new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsReplaced);
+      shapeInfo.ObservableConnections.CollectionReset += new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_CollectionReset);
+    }
+
+    private void DeregisterShapeInfoEvents(IShapeInfo shapeInfo) {
+      shapeInfo.Changed -= new ChangedEventHandler(shapeInfo_Changed);
+
+      this.shapeInfoConnectionsMapping.RemoveByFirst(shapeInfo);
+      shapeInfo.ObservableConnections.ItemsAdded -= new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsAdded);
+      shapeInfo.ObservableConnections.ItemsRemoved -= new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsRemoved);
+      shapeInfo.ObservableConnections.ItemsReplaced -= new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_ItemsReplaced);
+      shapeInfo.ObservableConnections.CollectionReset -= new CollectionItemsChangedEventHandler<KeyValuePair<string, IShapeInfo>>(Connections_CollectionReset);
+    }
+
+    private void Connections_CollectionReset(object sender, CollectionItemsChangedEventArgs<KeyValuePair<string, IShapeInfo>> e) {
+      IShapeInfo shapeInfo = this.shapeInfoConnectionsMapping.GetBySecond((INotifyObservableDictionaryItemsChanged<string, IShapeInfo>)sender);
+      IConnection connection;
+      foreach (KeyValuePair<string, IShapeInfo> pair in e.Items) {
+        connection = this.GetConnection(shapeInfo, pair.Key);
+        this.RemoveConnection(connection);
+      }
+      foreach (KeyValuePair<string, IShapeInfo> pair in e.Items)
+        this.AddConnection(shapeInfo, pair.Key, pair.Value);
+    }
+
+    private void Connections_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<KeyValuePair<string, IShapeInfo>> e) {
+      IShapeInfo shapeInfo = this.shapeInfoConnectionsMapping.GetBySecond((INotifyObservableDictionaryItemsChanged<string, IShapeInfo>)sender);
+      IConnection connection;
+      foreach (KeyValuePair<string, IShapeInfo> pair in e.Items) {
+        connection = this.GetConnection(shapeInfo, pair.Key);
+        this.RemoveConnection(connection);
+      }
+      foreach (KeyValuePair<string, IShapeInfo> pair in e.Items)
+        this.AddConnection(shapeInfo, pair.Key, pair.Value);
+    }
+
+    private void Connections_ItemsAdded(object sender, CollectionItemsChangedEventArgs<KeyValuePair<string, IShapeInfo>> e) {
+      IShapeInfo shapeInfo = this.shapeInfoConnectionsMapping.GetBySecond((INotifyObservableDictionaryItemsChanged<string, IShapeInfo>)sender);
+      foreach (KeyValuePair<string, IShapeInfo> pair in e.Items)
+        this.AddConnection(shapeInfo, pair.Key, pair.Value);
+    }
+
+    private void Connections_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<KeyValuePair<string, IShapeInfo>> e) {
+      IShapeInfo shapeInfo = this.shapeInfoConnectionsMapping.GetBySecond((INotifyObservableDictionaryItemsChanged<string, IShapeInfo>)sender);
+      IConnection connection;
+      foreach (KeyValuePair<string, IShapeInfo> pair in e.Items) {
+        connection = this.GetConnection(shapeInfo, pair.Key);
+        this.RemoveConnection(connection);
+      }
+    }
+
+    private void AddConnection(IShapeInfo shapeInfoFrom, string connectorName, IShapeInfo shapeInfoTo) {
+      IShape shapeFrom = this.shapeInfoShapeMapping.GetByFirst(shapeInfoFrom);
+      IShape shapeTo = this.shapeInfoShapeMapping.GetByFirst(shapeInfoTo);
+
+      IConnector connectorFrom = shapeFrom.Connectors.Where(c => c.Name == connectorName).First();
+      IConnector connectorTo = shapeTo.Connectors.Where(c => c.Name == "Predecessor").FirstOrDefault();
+
+      IConnection connection = Factory.CreateConnection(connectorFrom, connectorTo);
+      this.connectionConnectorsMapping.Add(connection, new KeyValuePair<IConnector, IConnector>(connectorFrom, connectorTo));
+      this.graphVisualization.Controller.Model.AddConnection(connection);
+      this.graphVisualization.Invalidate();
+    }
+
+    private IConnection GetConnection(IShapeInfo shapeInfoFrom, string connectorName) {
+      IShape shape = this.shapeInfoShapeMapping.GetByFirst(shapeInfoFrom);
+      IConnector connector = shape.Connectors.Where(c => c.Name == connectorName).First();
+
+      if (!this.connectionConnectorsMapping.SecondValues.Any(p => p.Key == connector))
+        return null;
+
+      KeyValuePair<IConnector, IConnector> connectorPair = this.connectionConnectorsMapping.SecondValues.Where(p => p.Key == connector).FirstOrDefault();
+      return this.connectionConnectorsMapping.GetBySecond(connectorPair);
+    }
+
+    private void ChangeConnection(IShapeInfo shapeInfoFrom, string connectorName, IShapeInfo shapeInfoTo) {
+      IConnection connection = this.GetConnection(shapeInfoFrom, connectorName);
+      IShape shapeTo = this.shapeInfoShapeMapping.GetByFirst(shapeInfoFrom);
+      IConnector connectorTo = shapeTo.Connectors.Where(c => c.Name == "Predecessor").FirstOrDefault();
+
+      connection.To.DetachFromParent();
+      connection.To.AttachTo(connectorTo);
+      this.graphVisualization.Invalidate();
+    }
+
+    private void RemoveConnection(IConnection connection) {
+      if (connection == null)
+        return;
+
+      if (connection.From.AttachedTo != null)
+        connection.From.DetachFromParent();
+      if (connection.To.AttachedTo != null)
+        connection.To.DetachFromParent();
+
+      if (this.connectionConnectorsMapping.ContainsFirst(connection))
+        this.connectionConnectorsMapping.RemoveByFirst(connection);
+      if (this.graphVisualization.Controller.Model.Connections.Contains(connection))
+        this.graphVisualization.Controller.Model.Remove(connection);
+      this.graphVisualization.Invalidate();
+    }
+
 
     private void shapeInfo_Changed(object sender, ChangedEventArgs e) {
+      if (this.causedUpdateOfShapeInfo)
+        return;
+
       IShapeInfo shapeInfo = (IShapeInfo)sender;
-      this.UpdateShape(shapeInfo);
-    }
+      IShape shape = this.shapeInfoShapeMapping.GetByFirst(shapeInfo);
+      shapeInfo.UpdateShape(shape);
+    }
+
 
     private void shape_OnEntityChange(object sender, EntityEventArgs e) {
       this.causedUpdateOfShapeInfo = true;
       IShape shape = e.Entity as IShape;
-      IShapeInfo shapeInfo = this.shapeMapping.GetBySecond(shape);
+      IShapeInfo shapeInfo = this.shapeInfoShapeMapping.GetBySecond(shape);
 
       shapeInfo.Location = shape.Location;
+      shapeInfo.Size = new Size(shape.Width, shape.Height);
+
       this.graphVisualization.Invalidate();
       this.causedUpdateOfShapeInfo = false;
     }
 
-    private void UpdateShape(IShapeInfo shapeInfo) {
-      if (!this.causedUpdateOfShapeInfo) {
-        IShape shape = this.shapeMapping.GetByFirst(shapeInfo);
-        shape.Location = shapeInfo.Location;
+    private void graphVisualization_OnEntityAdded(object sender, EntityEventArgs e) {
+      IConnection connection = e.Entity as IConnection;
+      if (connection != null && !this.connectionConnectorsMapping.ContainsFirst(connection)) {
+        if (connection.From.AttachedTo == null || connection.To.AttachedTo == null)
+          this.RemoveConnection(connection);
       }
     }
 
     private void graphVisualization_OnEntityRemoved(object sender, EntityEventArgs e) {
-      IShape shape = (IShape)e.Entity;
-      if (this.shapeMapping.ContainsSecond(shape)) {
-        IShapeInfo shapeInfo = this.shapeMapping.GetBySecond(shape);
+      IShape shape = e.Entity as IShape;
+      if (shape != null && this.shapeInfoShapeMapping.ContainsSecond(shape)) {
+        IShapeInfo shapeInfo = this.shapeInfoShapeMapping.GetBySecond(shape);
         this.VisualizationInfo.RemoveShapeInfo(shapeInfo);
       }
-    }
-
-
-
-
-    //protected override void OnContentChanged() {
-    //  base.OnContentChanged();
-    //  this.ClearGraph();
-
-    //  this.CreateGraph(null, new OperatorParameter(string.Empty, this.Content));
-    //  foreach (IShape shape in this.operatorShapeMapping.Values)
-    //    this.GraphModel.AddShape(shape);
-
-    //  foreach (IConnection connection in this.connectionMapping.Values)
-    //    this.GraphModel.AddConnection(connection);
-
-    //  if (this.Content == null)
-    //    this.graphVisualization.Controller.Model.LayoutRoot = null;
-    //  else
-    //    this.graphVisualization.Controller.Model.LayoutRoot = this.operatorShapeMapping[this.Content];
-    //  this.RelayoutOperatorGraph();
-    //}
-
-    //private void opParam_ValueChanged(object sender, EventArgs e) {
-    //  if (InvokeRequired)
-    //    Invoke(new EventHandler(opParam_ValueChanged), sender, e);
-    //  else {
-    //    this.OnContentChanged();
-    //  }
-    //}
-
-    //private void ClearGraph() {
-    //  this.GraphModel.Clear();
-    //  foreach (IValueParameter<IOperator> opParam in this.parameters)
-    //    opParam.ValueChanged -= opParam_ValueChanged;
-
-    //  this.operatorShapeMapping.Clear();
-    //  this.parameters.Clear();
-    //  this.connectionMapping.Clear();
-    //}
-
-
-
-    //private void CreateGraph(IOperator parent, IValueParameter<IOperator> op) {
-    //  if (op == null || op.Value == null)
-    //    return;
-
-    //  IShape shape;
-    //  if (!this.operatorShapeMapping.ContainsKey(op.Value)) {
-    //    //shape = GraphVisualizationInfo.CreateShape(op.Value);
-    //    //this.operatorShapeMapping[op.Value] = shape;
-
-    //    foreach (IParameter param in op.Value.Parameters) {
-    //      IValueParameter<IOperator> opParam = param as IValueParameter<IOperator>;
-    //      if (opParam != null) {
-    //        HandleOperatorParameter(opParam);
-    //        this.CreateGraph(op.Value, opParam);
-    //      }
-    //    }
-    //  }
-
-    //  if (parent != null) {
-    //    IShape from = this.operatorShapeMapping[parent];
-    //    IShape to = this.operatorShapeMapping[op.Value];
-    //    //IConnection connection = GraphVisualizationInfo.CreateConnection(from,to);
-    //    //this.connectionMapping[new KeyValuePair<IOperator, IValueParameter<IOperator>>(parent, op)] = connection;
-    //  }
-    //}
-
-    //private void DeleteGraph(IOperator parent, IValueParameter<IOperator> op) {
-
-    //}
-
-    //private void HandleOperatorParameter(IValueParameter<IOperator> opParam) {
-    //  if (opParam == null)
-    //    return;
-    //  opParam.ValueChanged += new EventHandler(opParam_ValueChanged);
-    //  parameters.Add(opParam);
-    //}
-
-    //private void Model_OnEntityRemoved(object sender, EntityEventArgs e) {
-    //  IShape shape = e.Entity as IShape;
-    //  if (shape != null) {
-    //    IOperator op = operatorShapeMapping.Where(os => os.Value == shape).First().Key;
-    //    if (op == this.Content)
-    //      this.Content = null;
-    //    else {
-    //      //clear all connections to the removed operator
-    //      IEnumerable<IValueParameter<IOperator>> parentOperator = this.connectionMapping.Where(cs => cs.Key.Value.Value == op).Select(x => x.Key.Value);
-    //      foreach (IValueParameter<IOperator> opParam in parentOperator.ToArray())
-    //        opParam.Value = null;
-
-    //      //remove connections from graph view
-    //      IEnumerable<IConnection> connections = this.connectionMapping.Where(cs => cs.Key.Value.Value == op).Select(x => x.Value);
-    //      foreach (IConnection connection in connections)
-    //        this.GraphModel.Remove(connection);
-
-    //      this.graphVisualization.Invalidate();
-    //    }
-
-
-    //  }
-    //}
+
+      IConnection connection = e.Entity as IConnection;
+      if (connection != null && this.connectionConnectorsMapping.ContainsFirst(connection)) {
+        IShape parentShape = this.connectorShapeMapping[connection.From.AttachedTo];
+        IShapeInfo shapeInfo = this.shapeInfoShapeMapping.GetBySecond(parentShape);
+        string parameterName = connection.From.AttachedTo.Name;
+
+        shapeInfo.RemoveConnection(parameterName);
+      }
+    }
 
     #region methods for toolbar items
 
+    private int layoutCount = 0;
     internal void RelayoutOperatorGraph() {
-      //if (this.operatorShapeMapping.Count > 0 && this.connectionMapping.Count > 0) { //otherwise the layout does not work
-      this.graphVisualization.Controller.RunActivity("Standard TreeLayout");
-      this.graphVisualization.Invalidate();
-      //}
+      if (this.shapeInfoShapeMapping.Count > 0 && this.connectionConnectorsMapping.Count > 0) { //otherwise the layout does not work
+
+        string layoutName = string.Empty;
+        switch (this.layoutCount % 6) {
+          case 0: { layoutName = "Random Layout"; break; }
+          case 1: { layoutName = "FruchtermanReingold Layout"; break; }
+          case 2: { layoutName = "Standard TreeLayout"; break; }
+          case 3: { layoutName = "Radial TreeLayout"; break; }
+          case 4: { layoutName = "Balloon TreeLayout"; break; }
+          case 5: { layoutName = "ForceDirected Layout"; break; }
+        }
+        this.graphVisualization.Controller.RunActivity(layoutName);
+        MessageBox.Show(layoutName);
+        this.layoutCount++;
+        this.graphVisualization.Invalidate();
+      }
+    }
+
+    internal void ActivateConnectionTool() {
+      this.graphVisualization.Controller.ActivateTool(ControllerBase.ConnectionToolName);
     }
 
@@ -309,5 +390,5 @@
       if (e.Effect != DragDropEffects.None) {
         IOperator op = e.Data.GetData("Value") as IOperator;
-        IShapeInfo shapeInfo = ShapeInfoFactory.CreateShapeInfo(op);
+        IShapeInfo shapeInfo = Factory.CreateShapeInfo(op);
         Point controlCoordinates = this.PointToClient(new Point(e.X, e.Y));
         PointF viewCoordinates = this.graphVisualization.Controller.View.DeviceToView(controlCoordinates);
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ConnectionToolBarItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ConnectionToolBarItem.cs	(revision 2861)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ConnectionToolBarItem.cs	(revision 2861)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Drawing;
+using HeuristicLab.MainForm;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Operators.Views.GraphVisualization {
+  internal class ConnectionToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, HeuristicLab.Optimizer.IOptimizerUserInterfaceItemProvider {
+    public override string Name {
+      get { return "Connection"; }
+    }
+
+    public override string ToolTipText {
+      get { return "Connection"; }
+    }
+    public override int Position {
+      get { return 140; }
+    }
+    public override Image Image {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; }
+    }
+
+    protected override void OnActiveViewChanged(object sender, System.EventArgs e) {
+      base.OnActiveViewChanged(sender, e);
+      this.ToolStripItem.Enabled = MainFormManager.MainForm.ActiveView is OperatorGraphView;
+    }
+
+    public override void Execute() {
+      OperatorGraphView view = MainFormManager.MainForm.ActiveView as OperatorGraphView;
+      if (view != null)
+        view.ActivateConnectionTool();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomInToolBarItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomInToolBarItem.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomInToolBarItem.cs	(revision 2861)
@@ -34,8 +34,8 @@
     }
     public override int Position {
-      get { return 141; }
+      get { return 151; }
     }
     public override Image Image {
-      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Sort; }
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowUp; }
     }
 
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomOutToolBarItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomOutToolBarItem.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomOutToolBarItem.cs	(revision 2861)
@@ -34,8 +34,8 @@
     }
     public override int Position {
-      get { return 142; }
+      get { return 152; }
     }
     public override Image Image {
-      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.SortUp; }
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowDown; }
     }
 
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomToolBarItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomToolBarItem.cs	(revision 2860)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/ToolBarItems/ZoomToolBarItem.cs	(revision 2861)
@@ -34,5 +34,5 @@
     }
     public override int Position {
-      get { return 140; }
+      get { return 150; }
     }
     public override Image Image {
