Index: /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.Designer.cs
===================================================================
--- /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.Designer.cs	(revision 1381)
+++ /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.Designer.cs	(revision 1382)
@@ -24,11 +24,68 @@
     /// </summary>
     private void InitializeComponent() {
+      System.Windows.Forms.TabPage nullFormatterConfig;
       System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("Bli");
       System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("Bla");
       System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("Blo");
+      this.dataGridView1 = new System.Windows.Forms.DataGridView();
+      this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+      this.Column2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+      this.Column3 = new System.Windows.Forms.DataGridViewComboBoxColumn();
       this.decomposerList = new System.Windows.Forms.ListView();
       this.DecomposersColumn = new System.Windows.Forms.ColumnHeader();
+      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+      this.splitContainer2 = new System.Windows.Forms.SplitContainer();
       this.checkbox = new System.Windows.Forms.CheckedListBox();
+      this.formatterTabs = new System.Windows.Forms.TabControl();
+      nullFormatterConfig = new System.Windows.Forms.TabPage();
+      nullFormatterConfig.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+      this.splitContainer1.Panel1.SuspendLayout();
+      this.splitContainer1.Panel2.SuspendLayout();
+      this.splitContainer1.SuspendLayout();
+      this.splitContainer2.Panel1.SuspendLayout();
+      this.splitContainer2.Panel2.SuspendLayout();
+      this.splitContainer2.SuspendLayout();
+      this.formatterTabs.SuspendLayout();
       this.SuspendLayout();
+      // 
+      // nullFormatterConfig
+      // 
+      nullFormatterConfig.Controls.Add(this.dataGridView1);
+      nullFormatterConfig.Location = new System.Drawing.Point(4, 22);
+      nullFormatterConfig.Name = "nullFormatterConfig";
+      nullFormatterConfig.Size = new System.Drawing.Size(386, 554);
+      nullFormatterConfig.TabIndex = 0;
+      nullFormatterConfig.Text = "EmptyFormatterConfig";
+      nullFormatterConfig.UseVisualStyleBackColor = true;
+      // 
+      // dataGridView1
+      // 
+      this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+      this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column1,
+            this.Column2,
+            this.Column3});
+      this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.dataGridView1.Location = new System.Drawing.Point(0, 0);
+      this.dataGridView1.Name = "dataGridView1";
+      this.dataGridView1.Size = new System.Drawing.Size(386, 554);
+      this.dataGridView1.TabIndex = 0;
+      // 
+      // Column1
+      // 
+      this.Column1.HeaderText = "Column1";
+      this.Column1.Name = "Column1";
+      // 
+      // Column2
+      // 
+      this.Column2.HeaderText = "Column2";
+      this.Column2.Name = "Column2";
+      // 
+      // Column3
+      // 
+      this.Column3.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox;
+      this.Column3.HeaderText = "Column3";
+      this.Column3.Name = "Column3";
       // 
       // decomposerList
@@ -39,4 +96,5 @@
       this.decomposerList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
             this.DecomposersColumn});
+      this.decomposerList.Dock = System.Windows.Forms.DockStyle.Fill;
       this.decomposerList.FullRowSelect = true;
       this.decomposerList.GridLines = true;
@@ -53,8 +111,8 @@
             listViewItem2,
             listViewItem3});
-      this.decomposerList.Location = new System.Drawing.Point(25, 12);
+      this.decomposerList.Location = new System.Drawing.Point(0, 0);
       this.decomposerList.Name = "decomposerList";
       this.decomposerList.ShowGroups = false;
-      this.decomposerList.Size = new System.Drawing.Size(194, 278);
+      this.decomposerList.Size = new System.Drawing.Size(199, 290);
       this.decomposerList.TabIndex = 0;
       this.decomposerList.UseCompatibleStateImageBehavior = false;
@@ -71,12 +129,58 @@
       this.DecomposersColumn.Width = 190;
       // 
+      // splitContainer1
+      // 
+      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer1.Name = "splitContainer1";
+      // 
+      // splitContainer1.Panel1
+      // 
+      this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
+      // 
+      // splitContainer1.Panel2
+      // 
+      this.splitContainer1.Panel2.Controls.Add(this.formatterTabs);
+      this.splitContainer1.Size = new System.Drawing.Size(597, 580);
+      this.splitContainer1.SplitterDistance = 199;
+      this.splitContainer1.TabIndex = 2;
+      // 
+      // splitContainer2
+      // 
+      this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer2.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer2.Name = "splitContainer2";
+      this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // splitContainer2.Panel1
+      // 
+      this.splitContainer2.Panel1.Controls.Add(this.decomposerList);
+      // 
+      // splitContainer2.Panel2
+      // 
+      this.splitContainer2.Panel2.Controls.Add(this.checkbox);
+      this.splitContainer2.Size = new System.Drawing.Size(199, 580);
+      this.splitContainer2.SplitterDistance = 290;
+      this.splitContainer2.TabIndex = 1;
+      // 
       // checkbox
       // 
+      this.checkbox.Dock = System.Windows.Forms.DockStyle.Fill;
       this.checkbox.FormattingEnabled = true;
-      this.checkbox.Location = new System.Drawing.Point(314, 103);
+      this.checkbox.Location = new System.Drawing.Point(0, 0);
       this.checkbox.Name = "checkbox";
-      this.checkbox.Size = new System.Drawing.Size(180, 154);
+      this.checkbox.Size = new System.Drawing.Size(199, 274);
       this.checkbox.TabIndex = 1;
       this.checkbox.ThreeDCheckBoxes = true;
+      // 
+      // formatterTabs
+      // 
+      this.formatterTabs.Controls.Add(nullFormatterConfig);
+      this.formatterTabs.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.formatterTabs.Location = new System.Drawing.Point(0, 0);
+      this.formatterTabs.Name = "formatterTabs";
+      this.formatterTabs.SelectedIndex = 0;
+      this.formatterTabs.Size = new System.Drawing.Size(394, 580);
+      this.formatterTabs.TabIndex = 0;
       // 
       // PersistenceConfigurationForm
@@ -85,8 +189,16 @@
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.ClientSize = new System.Drawing.Size(597, 580);
-      this.Controls.Add(this.checkbox);
-      this.Controls.Add(this.decomposerList);
+      this.Controls.Add(this.splitContainer1);
       this.Name = "PersistenceConfigurationForm";
       this.Text = "PersistenceConfigurationForm";
+      nullFormatterConfig.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+      this.splitContainer1.Panel1.ResumeLayout(false);
+      this.splitContainer1.Panel2.ResumeLayout(false);
+      this.splitContainer1.ResumeLayout(false);
+      this.splitContainer2.Panel1.ResumeLayout(false);
+      this.splitContainer2.Panel2.ResumeLayout(false);
+      this.splitContainer2.ResumeLayout(false);
+      this.formatterTabs.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -97,5 +209,12 @@
     private System.Windows.Forms.ListView decomposerList;
     private System.Windows.Forms.ColumnHeader DecomposersColumn;
+    private System.Windows.Forms.SplitContainer splitContainer1;
     private System.Windows.Forms.CheckedListBox checkbox;
+    private System.Windows.Forms.SplitContainer splitContainer2;
+    private System.Windows.Forms.TabControl formatterTabs;
+    private System.Windows.Forms.DataGridView dataGridView1;
+    private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+    private System.Windows.Forms.DataGridViewCheckBoxColumn Column2;
+    private System.Windows.Forms.DataGridViewComboBoxColumn Column3;
   }
 }
Index: /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.cs
===================================================================
--- /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.cs	(revision 1381)
+++ /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.cs	(revision 1382)
@@ -1,14 +1,13 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Persistence.Default.Xml;
 using HeuristicLab.Persistence.Interfaces;
+using System.Text;
 
 namespace HeuristicLab.Persistence.GUI {
+
   public partial class PersistenceConfigurationForm : Form {    
     public PersistenceConfigurationForm() {
@@ -19,6 +18,58 @@
         item.Checked = true;
         item.Tag = decomposer;
-      }      
+      }
+      
+      foreach ( var formats in ConfigurationService.Instance.AllFormatters ) {
+        TabPage page = new TabPage(formats.Key.Name);
+        formatterTabs.TabPages.Add(page);
+        DataGridView gridView = new DataGridView {
+          Dock = DockStyle.Fill,
+          EditMode = DataGridViewEditMode.EditOnEnter,
+          AllowUserToAddRows = false,
+          AllowUserToDeleteRows = false,
+          AllowUserToResizeRows = false,                                        
+        };
+        //gridView.CellValueChanged += gridView_CellValueChanged;
+        //gridView.DataError += gridView_DataError;
+        //gridView.CellFormatting += gridView_CellFormatting;
+        page.Controls.Add(gridView);
+        gridView.Columns.Add(new DataGridViewTextBoxColumn {
+          Name = "Type", ReadOnly = true,
+          AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
+        });
+        gridView.Columns.Add(new DataGridViewCheckBoxColumn
+          { AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells });
+        gridView.Columns.Add(new DataGridViewComboBoxColumn
+          { AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill });                
+        var formatterMap = new Dictionary<Type, List<IFormatter>>();
+        foreach (var formatter in formats.Value) {
+          if (!formatterMap.ContainsKey(formatter.Type))
+            formatterMap.Add(formatter.Type, new List<IFormatter>());
+          formatterMap[formatter.Type].Add(formatter);
+        }
+        foreach ( var formatterMapping in formatterMap ) {
+          var row = gridView.Rows[gridView.Rows.Add()];
+          row.Cells[0].Value = formatterMapping.Key.SimpleFullName();
+          row.Cells[0].ToolTipText = formatterMapping.Key.AssemblyQualifiedName;
+          row.Cells[1].Value = true;
+          var comboBoxCell = (DataGridViewComboBoxCell) row.Cells[2];
+          //comboBoxCell.ValueType = typeof(IFormatter);          
+          foreach ( var formatter in formatterMapping.Value ) {            
+            comboBoxCell.Items.Add(formatter.GetType().Name);
+          }          
+          comboBoxCell.Value = comboBoxCell.Items[0];          
+          comboBoxCell.ToolTipText = comboBoxCell.Items[0].ToString();
+          if (comboBoxCell.Items.Count == 1) {
+            comboBoxCell.ReadOnly = true;
+            comboBoxCell.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
+          }     
+        }      
+      }
     }
+
+    void gridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) {
+      e.Value = e.Value.ToString();
+      e.FormattingApplied = true;
+    }    
 
     private void decomposerList_ItemDrag(object sender, ItemDragEventArgs e) {
@@ -36,34 +87,21 @@
         return;
       }
-      //Returns the location of the mouse pointer in the ListView control.
-      Point cp = decomposerList.PointToClient(new Point(e.X, e.Y));
-      //Obtain the item that is located at the specified location of the mouse pointer.
-      ListViewItem dragToItem = decomposerList.GetItemAt(cp.X, cp.Y);
-      if (dragToItem == null) {
-        return;
-      }
-      //Obtain the index of the item at the mouse pointer.
-      int dragIndex = dragToItem.Index;
-      ListViewItem[] sel = new ListViewItem[decomposerList.SelectedItems.Count];
-      for (int i = 0; i <= decomposerList.SelectedItems.Count - 1; i++) {
-        sel[i] = decomposerList.SelectedItems[i];
-      }
-      for (int i = 0; i < sel.GetLength(0); i++) {
-        //Obtain the ListViewItem to be dragged to the target location.
-        ListViewItem dragItem = sel[i];
-        int itemIndex = dragIndex;
-        if (itemIndex == dragItem.Index) {
+      Point cp = decomposerList.PointToClient(new Point(e.X, e.Y));      
+      ListViewItem targetItem = decomposerList.GetItemAt(cp.X, cp.Y);      
+      if (targetItem == null)
+        return;            
+      int targetIndex = targetItem.Index;      
+      var selectedItems = new List<ListViewItem>(decomposerList.SelectedItems.Cast<ListViewItem>());
+      int i = 0;
+      foreach ( ListViewItem dragItem in selectedItems ) {                
+        if (targetIndex == dragItem.Index)
           return;
-        }
-        if (dragItem.Index < itemIndex)
-          itemIndex++;
-        else
-          itemIndex = dragIndex + i;
-        //Insert the item at the mouse pointer.
-        ListViewItem insertItem = (ListViewItem) dragItem.Clone();
-        decomposerList.Items.Insert(itemIndex, insertItem);
-        //Removes the item from the initial location while 
-        //the item is moved to the new location.
+        if (dragItem.Index < targetIndex) {
+          decomposerList.Items.Insert(targetIndex + 1, (ListViewItem) dragItem.Clone());
+        } else {
+          decomposerList.Items.Insert(targetIndex + i, (ListViewItem)dragItem.Clone());          
+        }        
         decomposerList.Items.Remove(dragItem);
+        i++;
       }
       Update();
@@ -92,5 +130,57 @@
       Update();
     }
+    
+  }
+
+  public class FakeBoolean2XmlFormatter : IFormatter {    
+
+    public Type Type { get { return typeof (Boolean); } }
+
+    public IFormat Format { get { return XmlFormat.Instance; } }
+
+    public object DoFormat(object o) {
+      return null;
+    }
+
+    public object Parse(object o) {
+      return null;
+    }
+    
+  }
+
+  public class FormatterWrapper {
+    public IFormatter Formatter;
+    public FormatterWrapper(IFormatter f) {
+      Formatter = f;
+    }
+    public override string ToString() {
+      return Formatter.GetType().Name;
+    }
+  }
+
+  public static class TypeFormatter {
+
+    public static string SimpleFullName(this Type type) {
+      StringBuilder sb = new StringBuilder();
+      SimpleFullName(type, sb);
+      return sb.ToString();
+    }
+
+    private static void SimpleFullName(Type type, StringBuilder sb) {      
+      if (type.IsGenericType) {
+        sb.Append(type.Name, 0, type.Name.LastIndexOf('`'));      
+        sb.Append("<");
+        foreach (Type t in type.GetGenericArguments()) {
+          SimpleFullName(t, sb);          
+          sb.Append(", ");
+        }
+        sb.Remove(sb.Length - 2, 2);
+        sb.Append(">");
+      } else {
+        sb.Append(type.Name);
+      }
+    }
 
   }
+
 }
Index: /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.resx
===================================================================
--- /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.resx	(revision 1381)
+++ /branches/New Persistence Exploration/Persistence/HeuristicLab.Persistence.GUI/PersistenceConfigurationForm.resx	(revision 1382)
@@ -118,3 +118,15 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="nullFormatterConfig.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+  <metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>
