Index: trunk/sources/HeuristicLab.MainForm.Test/3.2/EditorView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.Test/3.2/EditorView.cs	(revision 2465)
+++ trunk/sources/HeuristicLab.MainForm.Test/3.2/EditorView.cs	(revision 2466)
@@ -11,8 +11,13 @@
 
 namespace HeuristicLab.MainForm.Test {
-  [DefaultViewAttribute]
-  public partial class EditorView : ViewBase, IView<ArrayList> {
-    public EditorView() {
+  [Content(typeof(ArrayList),IsDefaultView=true)]
+  public partial class EditorView : ViewBase {
+    public EditorView()
+      : base() {
       InitializeComponent();
+    }
+
+    public EditorView(ArrayList list)
+      : this() {
     }
 
@@ -22,14 +27,10 @@
       IEnumerable<Type> views1 = MainFormManager.GetViewTypes(typeof(IList));
       views1.ToString();
-      //IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(object));
-      //views2.ToString();
-      Type def2 = MainFormManager.GetDefaultViewType(typeof(IList));
-      def2.ToString();
-      Type def1 = MainFormManager.GetDefaultViewType(typeof(ArrayList));
-      def1.ToString();
-      //Type def3 = MainFormManager.GetDefaultViewType(typeof(object));
-      //def3.ToString();
+      IEnumerable<Type> views2 = MainFormManager.GetViewTypes(typeof(IEnumerable));
+      views2.ToString();
 
-      MainFormManager.MainForm.HideView(this);
+      ArrayList list = new ArrayList();
+      IView defaultView = MainFormManager.CreateDefaultView(list);
+      MainFormManager.MainForm.ShowView(defaultView);
       this.OnChanged();
     }
@@ -45,16 +46,4 @@
       }
     }
-
-    #region IView<ArrayList> Members
-
-    public void View(ArrayList item) {
-      throw new NotImplementedException();
-    }
-
-    public ArrayList Item {
-      get { throw new NotImplementedException(); }
-    }
-
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView.cs	(revision 2465)
+++ trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView.cs	(revision 2466)
@@ -11,22 +11,9 @@
 
 namespace HeuristicLab.MainForm.Test {
-  [DefaultViewAttribute]
-  public partial class FormView1 : ViewBase,IView<ICollection> {
-    private int[] array;
+  [Content(typeof(IList),true)]
+  public partial class FormView1 : FormView2 {
     public FormView1() {
       InitializeComponent();
     }
-
-    #region IView<ICollection> Members
-
-    public void View(ICollection item) {
-      throw new NotImplementedException();
-    }
-
-    public ICollection Item {
-      get { throw new NotImplementedException(); }
-    }
-
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView2.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView2.cs	(revision 2465)
+++ trunk/sources/HeuristicLab.MainForm.Test/3.2/FormView2.cs	(revision 2466)
@@ -10,21 +10,9 @@
 
 namespace HeuristicLab.MainForm.Test {
-  public partial class FormView2 : ViewBase, IView<IEnumerable> {
-    private int[] array;
+  [Content(typeof(IEnumerable))]
+  public partial class FormView2 : ViewBase {
     public FormView2() {
       InitializeComponent();
     }
-
-    #region IView<IEnumerable> Members
-
-    public void View(IEnumerable item) {
-      throw new NotImplementedException();
-    }
-
-    public IEnumerable Item {
-      get { throw new NotImplementedException(); }
-    }
-
-    #endregion
   }
 }
Index: trunk/sources/HeuristicLab.MainForm/3.2/ContentAttribute.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/ContentAttribute.cs	(revision 2466)
+++ trunk/sources/HeuristicLab.MainForm/3.2/ContentAttribute.cs	(revision 2466)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
+  public class ContentAttribute : Attribute {
+    private Type type;
+    public ContentAttribute(Type type) {
+      this.type = type;
+    }
+
+    public ContentAttribute(Type type, bool isDefaultView)
+      : this(type) {
+      this.isDefaultView = isDefaultView;
+    }
+
+    private bool isDefaultView;
+    public bool IsDefaultView {
+      get { return this.isDefaultView; }
+      set { this.isDefaultView = value; }
+    }
+
+    public static bool HasContentAttribute(Type viewType) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), true);
+      return attributes.Length != 0;
+    }
+
+    public static bool CanViewType(Type viewType, Type content) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), false);
+      return attributes.Any(a => a.type.IsAssignableFrom(content));
+    }
+
+    public static bool IsDefaultViewForType(Type viewType, Type content) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), false);
+      return attributes.Any(a => a.isDefaultView && a.type == content);
+    }
+
+    public static IEnumerable<Type> GetTypesWhereViewTypeIsDefaultView(Type viewType) {
+      ContentAttribute[] attributes = (ContentAttribute[])viewType.GetCustomAttributes(typeof(ContentAttribute), true);
+      return from a in attributes
+             where a.isDefaultView
+             select a.type;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.MainForm/3.2/DefaultViewAttribute.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/DefaultViewAttribute.cs	(revision 2465)
+++ 	(revision )
@@ -1,37 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace HeuristicLab.MainForm {
-  [AttributeUsage(AttributeTargets.Class)]
-  public class DefaultViewAttribute : Attribute {
-    public DefaultViewAttribute() {
-    }
-
-    public static bool IsDefaultView(Type t) {
-      object[] attributes = t.GetCustomAttributes(typeof(DefaultViewAttribute), false);
-      return attributes != null && attributes.Length > 0;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 2465)
+++ trunk/sources/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 2466)
@@ -92,5 +92,5 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="UserInterfaceItemBase.cs" />
-    <Compile Include="DefaultViewAttribute.cs" />
+    <Compile Include="ContentAttribute.cs" />
   </ItemGroup>
   <ItemGroup>
Index: trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IView.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IView.cs	(revision 2465)
+++ trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IView.cs	(revision 2466)
@@ -33,8 +33,3 @@
     void OnClosed(object sender, EventArgs e);
   }
-
-  public interface IView<T> : IView {
-    void View(T item);
-    T Item { get; }
-  }
 }
Index: trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs
===================================================================
--- trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2465)
+++ trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2466)
@@ -29,10 +29,10 @@
     private static object locker;
     private static IMainForm mainform;
-    private static Dictionary<Type, List<Type>> views;
+    private static HashSet<Type> views;
     private static Dictionary<Type, Type> defaultViews;
 
     static MainFormManager() {
       locker = new object();
-      views = new Dictionary<Type, List<Type>>();
+      views = new HashSet<Type>();
       defaultViews = new Dictionary<Type, Type>();
     }
@@ -46,37 +46,18 @@
           IEnumerable<Type> types =
             from t in ds.GetTypes(typeof(IView))
-            where !t.IsAbstract && !t.IsInterface && !t.IsGenericType
+            where !t.IsAbstract && !t.IsInterface && !t.IsGenericType && ContentAttribute.HasContentAttribute(t)
             select t;
 
-          foreach (Type t in types) {
-            foreach (Type viewableType in GetViewableType(t)) {
-              if (viewableType != null) {
-                if (!views.ContainsKey(viewableType))
-                  views[viewableType] = new List<Type>();
-                views[viewableType].Add(t);
-
-                if (DefaultViewAttribute.IsDefaultView(t)) {
-                  if (defaultViews.ContainsKey(viewableType))
-                    throw new ArgumentException("DefaultView for type " + viewableType + " is " + defaultViews[viewableType] +
-                      ". Can't register additional DefaultView " + t + ".");
-                  defaultViews[viewableType] = t;
-                }
-              }
+          foreach (Type viewType in types) {
+            views.Add(viewType);
+            foreach (Type contentType in ContentAttribute.GetTypesWhereViewTypeIsDefaultView(viewType)) {
+              if (defaultViews.ContainsKey(contentType))
+                throw new ArgumentException("DefaultView for type " + contentType + " is " + defaultViews[contentType] +
+                  ". Can't register additional DefaultView " + viewType + ".");
+              defaultViews[contentType] = viewType;
             }
           }
         } else
           throw new ArgumentException("A mainform was already associated with the mainform manager.");
-      }
-    }
-
-    private static IEnumerable<Type> GetViewableType(Type t) {
-      IEnumerable<Type> interfaceTypes =
-       from type in t.GetInterfaces()
-       where type.Namespace == "HeuristicLab.MainForm" && type.Name.StartsWith("IView") &&
-             type.IsGenericType && !type.IsGenericTypeDefinition
-       select type;
-
-      foreach (Type interfaceType in interfaceTypes) {
-        yield return interfaceType.GetGenericArguments()[0];
       }
     }
@@ -90,24 +71,21 @@
     }
 
-    public static IEnumerable<Type> GetViewTypes(Type viewableType) {
-      List<Type> viewsForType = new List<Type>();
-      foreach (KeyValuePair<Type, List<Type>> v in views) {
-        if (v.Key.IsAssignableFrom(viewableType))
-          viewsForType.AddRange(v.Value);
-      }
-      return viewsForType.Distinct();
+    public static IEnumerable<Type> GetViewTypes(Type contentType) {
+      return from v in views
+             where ContentAttribute.CanViewType(v, contentType)
+             select v;
     }
 
     public static bool ViewCanViewObject(IView view, object o) {
-      return GetViewTypes(o.GetType()).Contains(view.GetType());
+      return ContentAttribute.CanViewType(view.GetType(), o.GetType());
     }
 
-    public static Type GetDefaultViewType(Type viewableType) {
+    public static Type GetDefaultViewType(Type contentType) {
       //check if viewableType has a default view
-      if (defaultViews.ContainsKey(viewableType))
-        return defaultViews[viewableType];
+      if (defaultViews.ContainsKey(contentType))
+        return defaultViews[contentType];
 
       //check base classes for default view
-      Type type = viewableType;
+      Type type = contentType;
       while (type.BaseType != null && !defaultViews.ContainsKey(type)) {
         type = type.BaseType;
@@ -118,5 +96,5 @@
       //check if exact one implemented interface has a default view
       List<Type> temp = (from t in defaultViews.Keys
-                         where t.IsAssignableFrom(viewableType) && t.IsInterface
+                         where t.IsAssignableFrom(contentType) && t.IsInterface
                          select t).ToList();
       if (temp.Count == 1)
@@ -124,14 +102,14 @@
       //more than one default view for implemented interfaces are found
       if (temp.Count > 1)
-        throw new Exception("Could not determine which is the default view for type " + viewableType.ToString() + ". Because more than one implemented interfaces have a default view.");
+        throw new Exception("Could not determine which is the default view for type " + contentType.ToString() + ". Because more than one implemented interfaces have a default view.");
       return null;
     }
 
-    public static IView<T> CreateDefaultView<T>(T objectToView) {
+    public static IView CreateDefaultView(object objectToView) {
       Type t = GetDefaultViewType(objectToView.GetType());
       if (t == null)
         return null;
       else
-        return (IView<T>)Activator.CreateInstance(t);
+        return (IView)Activator.CreateInstance(t, objectToView);
     }
   }
