Index: branches/GBT/HeuristicLab.Core.Views/3.3/TypeSelector.Designer.cs
===================================================================
--- branches/GBT/HeuristicLab.Core.Views/3.3/TypeSelector.Designer.cs	(revision 12329)
+++ branches/GBT/HeuristicLab.Core.Views/3.3/TypeSelector.Designer.cs	(revision 12495)
@@ -42,4 +42,10 @@
       this.searchLabel = new System.Windows.Forms.Label();
       this.searchTextBox = new System.Windows.Forms.TextBox();
+      this.clearSearchButton = new System.Windows.Forms.Button();
+      this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
+      this.expandToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.expandAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.collapseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+      this.collapseAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
       this.typeParametersGroupBox = new System.Windows.Forms.GroupBox();
       this.setTypeParameterButton = new System.Windows.Forms.Button();
@@ -56,4 +62,5 @@
       this.typeParametersSplitContainer.SuspendLayout();
       this.typeParametersGroupBox.SuspendLayout();
+      this.contextMenuStrip.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -75,4 +82,5 @@
       this.typesTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.typesTreeView_AfterSelect);
       this.typesTreeView.VisibleChanged += new System.EventHandler(this.typesTreeView_VisibleChanged);
+      this.typesTreeView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.typesTreeView_MouseDown);
       // 
       // imageList
@@ -146,10 +154,32 @@
       this.searchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
+      this.searchTextBox.Controls.Add(this.clearSearchButton);
       this.searchTextBox.Location = new System.Drawing.Point(29, 3);
       this.searchTextBox.Name = "searchTextBox";
       this.searchTextBox.Size = new System.Drawing.Size(193, 20);
       this.searchTextBox.TabIndex = 1;
-      this.toolTip.SetToolTip(this.searchTextBox, "Enter string to search for types");
+      this.toolTip.SetToolTip(this.searchTextBox, "Filters the available Types.\r\nThe search term is tokenized by space and a name ha" +
+        "s to contain all tokens to be displayed.\r\n(E.g. \"Sym Reg\" matches \"SymbolicRegr" +
+        "ession\")");
       this.searchTextBox.TextChanged += new System.EventHandler(this.searchTextBox_TextChanged);
+      this.searchTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.searchTextBox_KeyDown);
+      // 
+      // clearSearchButton
+      // 
+      this.clearSearchButton.BackColor = System.Drawing.Color.Transparent;
+      this.clearSearchButton.Cursor = System.Windows.Forms.Cursors.Default;
+      this.clearSearchButton.Dock = System.Windows.Forms.DockStyle.Right;
+      this.clearSearchButton.FlatAppearance.BorderSize = 0;
+      this.clearSearchButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+      this.clearSearchButton.ForeColor = System.Drawing.Color.Transparent;
+      this.clearSearchButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Delete;
+      this.clearSearchButton.Location = new System.Drawing.Point(543, 0);
+      this.clearSearchButton.Margin = new System.Windows.Forms.Padding(0);
+      this.clearSearchButton.Name = "clearSearchButton";
+      this.clearSearchButton.Size = new System.Drawing.Size(15, 16);
+      this.clearSearchButton.TabIndex = 0;
+      this.clearSearchButton.TabStop = false;
+      this.clearSearchButton.UseVisualStyleBackColor = false;
+      this.clearSearchButton.Click += new System.EventHandler(this.clearSearchButton_Click);
       // 
       // typeParametersGroupBox
@@ -213,4 +243,42 @@
       this.descriptionTextBox.Size = new System.Drawing.Size(219, 114);
       this.descriptionTextBox.TabIndex = 0;
+      // 
+      // contextMenuStrip
+      // 
+      this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.expandToolStripMenuItem,
+            this.expandAllToolStripMenuItem,
+            this.collapseToolStripMenuItem,
+            this.collapseAllToolStripMenuItem});
+      this.contextMenuStrip.Name = "contextMenuStrip";
+      this.contextMenuStrip.Size = new System.Drawing.Size(137, 92);
+      // 
+      // expandToolStripMenuItem
+      // 
+      this.expandToolStripMenuItem.Name = "expandToolStripMenuItem";
+      this.expandToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
+      this.expandToolStripMenuItem.Text = "Expand";
+      this.expandToolStripMenuItem.Click += new System.EventHandler(this.expandToolStripMenuItem_Click);
+      // 
+      // expandAllToolStripMenuItem
+      // 
+      this.expandAllToolStripMenuItem.Name = "expandAllToolStripMenuItem";
+      this.expandAllToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
+      this.expandAllToolStripMenuItem.Text = "Expand All";
+      this.expandAllToolStripMenuItem.Click += new System.EventHandler(this.expandAllToolStripMenuItem_Click);
+      // 
+      // collapseToolStripMenuItem
+      // 
+      this.collapseToolStripMenuItem.Name = "collapseToolStripMenuItem";
+      this.collapseToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
+      this.collapseToolStripMenuItem.Text = "Collapse";
+      this.collapseToolStripMenuItem.Click += new System.EventHandler(this.collapseToolStripMenuItem_Click);
+      // 
+      // collapseAllToolStripMenuItem
+      // 
+      this.collapseAllToolStripMenuItem.Name = "collapseAllToolStripMenuItem";
+      this.collapseAllToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
+      this.collapseAllToolStripMenuItem.Text = "Collapse All";
+      this.collapseAllToolStripMenuItem.Click += new System.EventHandler(this.collapseAllToolStripMenuItem_Click);
       // 
       // TypeSelector
@@ -231,4 +299,5 @@
       this.typeParametersSplitContainer.ResumeLayout(false);
       this.typeParametersGroupBox.ResumeLayout(false);
+      this.contextMenuStrip.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -244,5 +313,11 @@
     protected System.Windows.Forms.Label searchLabel;
     protected System.Windows.Forms.TextBox searchTextBox;
+    protected System.Windows.Forms.Button clearSearchButton;
     protected System.Windows.Forms.ToolTip toolTip;
+    protected System.Windows.Forms.ContextMenuStrip contextMenuStrip;
+    protected System.Windows.Forms.ToolStripMenuItem expandToolStripMenuItem;
+    protected System.Windows.Forms.ToolStripMenuItem expandAllToolStripMenuItem;
+    protected System.Windows.Forms.ToolStripMenuItem collapseToolStripMenuItem;
+    protected System.Windows.Forms.ToolStripMenuItem collapseAllToolStripMenuItem;
     protected System.Windows.Forms.SplitContainer typeParametersSplitContainer;
     protected System.Windows.Forms.GroupBox typeParametersGroupBox;
@@ -250,5 +325,4 @@
     protected System.Windows.Forms.Button setTypeParameterButton;
     protected System.Windows.Forms.ColumnHeader columnHeader1;
-
   }
 }
Index: branches/GBT/HeuristicLab.Core.Views/3.3/TypeSelector.cs
===================================================================
--- branches/GBT/HeuristicLab.Core.Views/3.3/TypeSelector.cs	(revision 12329)
+++ branches/GBT/HeuristicLab.Core.Views/3.3/TypeSelector.cs	(revision 12495)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
 using System.Reflection;
@@ -177,44 +178,36 @@
       else {
         searchString = searchString.ToLower();
+        TreeNode selectedNode = typesTreeView.SelectedNode;
 
         if (!searchString.Contains(currentSearchString)) {
           typesTreeView.BeginUpdate();
           // expand search -> restore all tree nodes
-          TreeNode selectedNode = typesTreeView.SelectedNode;
           typesTreeView.Nodes.Clear();
           foreach (TreeNode node in treeNodes)
             typesTreeView.Nodes.Add((TreeNode)node.Clone());
-          RestoreSelectedNode(selectedNode);
           typesTreeView.EndUpdate();
         }
-
 
         // remove nodes
         typesTreeView.BeginUpdate();
+        var searchTokens = searchString.Split(' ');
         int i = 0;
         while (i < typesTreeView.Nodes.Count) {
-          int j = 0;
-          while (j < typesTreeView.Nodes[i].Nodes.Count) {
-            if (!typesTreeView.Nodes[i].Nodes[j].Text.ToLower().Contains(searchString)) {
-              if ((typesTreeView.Nodes[i].Nodes[j].Tag as Type).Equals(selectedType))
-                SelectedType = null;
-              typesTreeView.Nodes[i].Nodes[j].Remove();
-            } else
-              j++;
-          }
-          if (typesTreeView.Nodes[i].Nodes.Count == 0)
-            typesTreeView.Nodes[i].Remove();
-          else
-            i++;
+          var node = typesTreeView.Nodes[i];
+          bool remove = FilterNode(node, searchTokens);
+          if (remove)
+            typesTreeView.Nodes.RemoveAt(i);
+          else i++;
         }
         typesTreeView.EndUpdate();
         currentSearchString = searchString;
 
-        // if there is just one type node left, select by default
-        if (typesTreeView.Nodes.Count == 1) {
-          if (typesTreeView.Nodes[0].Nodes.Count == 1) {
-            typesTreeView.SelectedNode = typesTreeView.Nodes[0].Nodes[0];
-          }
-        }
+        // select first item
+        typesTreeView.BeginUpdate();
+        var firstNode = typesTreeView.Nodes.Count > 0 ? typesTreeView.Nodes[0] : null;
+        while (firstNode != null && !(firstNode.Tag is Type))
+          firstNode = firstNode.NextVisibleNode;
+        if (firstNode != null)
+          typesTreeView.SelectedNode = firstNode;
 
         if (typesTreeView.Nodes.Count == 0) {
@@ -225,6 +218,34 @@
           typesTreeView.Enabled = true;
         }
+        typesTreeView.EndUpdate();
+
+        RestoreSelectedNode(selectedNode);
         UpdateDescription();
       }
+    }
+
+    private bool FilterNode(TreeNode node, string[] searchTokens) {
+      if (node.Tag is IPluginDescription) { // Plugin node
+        int i = 0;
+        while (i < node.Nodes.Count) {
+          bool remove = FilterNode(node.Nodes[i], searchTokens);
+          if (remove)
+            node.Nodes.RemoveAt(i);
+          else i++;
+        }
+        return node.Nodes.Count == 0;
+      } if (node.Tag is Type) { // Type node
+        var text = node.Text;
+        if (searchTokens.Any(searchToken => !text.ToLower().Contains(searchToken))) {
+          var typeTag = (Type)node.Tag;
+          if (typeTag == SelectedType) {
+            SelectedType = null;
+            typesTreeView.SelectedNode = null;
+          }
+          return true;
+        }
+        return false;
+      }
+      throw new InvalidOperationException("Encountered neither a plugin nor a type node during tree traversal.");
     }
 
@@ -355,4 +376,76 @@
       SetTypeParameter();
     }
+    private void searchTextBox_KeyDown(object sender, KeyEventArgs e) {
+      if (typesTreeView.Nodes.Count == 0)
+        return;
+
+      if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down) {
+        var selectedNode = typesTreeView.SelectedNode;
+
+        if (selectedNode == null) { // nothing selected => select first
+          if (e.KeyCode == Keys.Down) typesTreeView.SelectedNode = typesTreeView.Nodes.Count > 0 ? typesTreeView.Nodes[0] : null;
+        } else {
+          if (e.KeyCode == Keys.Down && selectedNode.NextVisibleNode != null)
+            typesTreeView.SelectedNode = selectedNode.NextVisibleNode;
+          if (e.KeyCode == Keys.Up && selectedNode.PrevVisibleNode != null)
+            typesTreeView.SelectedNode = selectedNode.PrevVisibleNode;
+        }
+        e.Handled = true;
+      }
+    }
+    private void clearSearchButton_Click(object sender, EventArgs e) {
+      searchTextBox.Text = string.Empty;
+      searchTextBox.Focus();
+    }
+
+    private TreeNode toolStripMenuNode = null;
+    private void typesTreeView_MouseDown(object sender, MouseEventArgs e) {
+      if (e.Button == MouseButtons.Right) {
+        Point coordinates = typesTreeView.PointToClient(Cursor.Position);
+        toolStripMenuNode = typesTreeView.GetNodeAt(coordinates);
+
+        if (toolStripMenuNode != null && coordinates.X >= toolStripMenuNode.Bounds.Left &&
+            coordinates.X <= toolStripMenuNode.Bounds.Right) {
+          typesTreeView.SelectedNode = toolStripMenuNode;
+
+          expandToolStripMenuItem.Enabled =
+            expandToolStripMenuItem.Visible = !toolStripMenuNode.IsExpanded && toolStripMenuNode.Nodes.Count > 0;
+          collapseToolStripMenuItem.Enabled = collapseToolStripMenuItem.Visible = toolStripMenuNode.IsExpanded;
+        } else {
+          expandToolStripMenuItem.Enabled = expandToolStripMenuItem.Visible = false;
+          collapseToolStripMenuItem.Enabled = collapseToolStripMenuItem.Visible = false;
+        }
+        expandAllToolStripMenuItem.Enabled =
+          expandAllToolStripMenuItem.Visible =
+            !typesTreeView.Nodes.OfType<TreeNode>().All(x => TreeNodeIsFullyExpanded(x));
+        collapseAllToolStripMenuItem.Enabled =
+          collapseAllToolStripMenuItem.Visible = typesTreeView.Nodes.OfType<TreeNode>().Any(x => x.IsExpanded);
+        if (contextMenuStrip.Items.Cast<ToolStripMenuItem>().Any(item => item.Enabled))
+          contextMenuStrip.Show(Cursor.Position);
+      }
+    }
+    private bool TreeNodeIsFullyExpanded(TreeNode node) {
+      return (node.Nodes.Count == 0) || (node.IsExpanded && node.Nodes.OfType<TreeNode>().All(x => TreeNodeIsFullyExpanded(x)));
+    }
+    private void expandToolStripMenuItem_Click(object sender, EventArgs e) {
+      typesTreeView.BeginUpdate();
+      if (toolStripMenuNode != null) toolStripMenuNode.ExpandAll();
+      typesTreeView.EndUpdate();
+    }
+    private void expandAllToolStripMenuItem_Click(object sender, EventArgs e) {
+      typesTreeView.BeginUpdate();
+      typesTreeView.ExpandAll();
+      typesTreeView.EndUpdate();
+    }
+    private void collapseToolStripMenuItem_Click(object sender, EventArgs e) {
+      typesTreeView.BeginUpdate();
+      if (toolStripMenuNode != null) toolStripMenuNode.Collapse();
+      typesTreeView.EndUpdate();
+    }
+    private void collapseAllToolStripMenuItem_Click(object sender, EventArgs e) {
+      typesTreeView.BeginUpdate();
+      typesTreeView.CollapseAll();
+      typesTreeView.EndUpdate();
+    }
     #endregion
 
