Index: /branches/GpPluginsRefactoringBranch/HeuristicLab.GP/FunctionView.Designer.cs
===================================================================
--- /branches/GpPluginsRefactoringBranch/HeuristicLab.GP/FunctionView.Designer.cs	(revision 654)
+++ /branches/GpPluginsRefactoringBranch/HeuristicLab.GP/FunctionView.Designer.cs	(revision 655)
@@ -51,5 +51,4 @@
       this.components = new System.ComponentModel.Container();
       this.funTreeView = new System.Windows.Forms.TreeView();
-      this.representationContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
       this.splitContainer = new System.Windows.Forms.SplitContainer();
       this.variablesGroupBox = new System.Windows.Forms.GroupBox();
@@ -59,5 +58,5 @@
       this.templateTextBox = new System.Windows.Forms.TextBox();
       this.editButton = new System.Windows.Forms.Button();
-      this.treeNodeContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+      this.treeNodeContextMenu = new System.Windows.Forms.ContextMenu();
       this.splitContainer.Panel1.SuspendLayout();
       this.splitContainer.Panel2.SuspendLayout();
@@ -70,5 +69,4 @@
       // funTreeView
       // 
-      this.funTreeView.ContextMenuStrip = this.representationContextMenu;
       this.funTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
       this.funTreeView.HideSelection = false;
@@ -79,9 +77,4 @@
       this.funTreeView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.funTreeView_MouseUp);
       this.funTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.functionTreeView_AfterSelect);
-      // 
-      // representationContextMenu
-      // 
-      this.representationContextMenu.Name = "representationContextMenu";
-      this.representationContextMenu.Size = new System.Drawing.Size(61, 4);
       // 
       // splitContainer
@@ -172,5 +165,4 @@
       // 
       this.treeNodeContextMenu.Name = "treeNodeContextMenu";
-      this.treeNodeContextMenu.Size = new System.Drawing.Size(61, 4);
       // 
       // FunctionTreeView
@@ -202,7 +194,5 @@
     private System.Windows.Forms.ListBox variablesListBox;
     private System.Windows.Forms.Label label1;
-    private System.Windows.Forms.ContextMenuStrip treeNodeContextMenu;
-    private System.Windows.Forms.ContextMenuStrip representationContextMenu;
-
+    private System.Windows.Forms.ContextMenu treeNodeContextMenu;
   }
 }
Index: /branches/GpPluginsRefactoringBranch/HeuristicLab.GP/FunctionView.cs
===================================================================
--- /branches/GpPluginsRefactoringBranch/HeuristicLab.GP/FunctionView.cs	(revision 654)
+++ /branches/GpPluginsRefactoringBranch/HeuristicLab.GP/FunctionView.cs	(revision 655)
@@ -40,4 +40,5 @@
     private IFunctionTreeNameGenerator nameGenerator;
     private IFunctionTreeNameGenerator[] allNameGenerators;
+    private MenuItem representationsMenu;
 
     public FunctionTreeView() {
@@ -47,16 +48,20 @@
       DiscoveryService discoveryService = new DiscoveryService();
       allNameGenerators = discoveryService.GetInstances<IFunctionTreeNameGenerator>();
-
+      representationsMenu = new MenuItem();
+      representationsMenu.Text = "Tree representation";
+      representationsMenu.Name = "Tree representation";
       foreach(IFunctionTreeNameGenerator generator in allNameGenerators) {
-        ToolStripButton button = new ToolStripButton(generator.Name, null,
+        MenuItem mi = new MenuItem(generator.Name, 
           delegate(object source, EventArgs args) {
-            this.nameGenerator = generator;
-            foreach(ToolStripButton otherButton in representationContextMenu.Items) otherButton.Checked = false;
-            ((ToolStripButton)source).Checked = true;
+            IFunctionTreeNameGenerator g = (IFunctionTreeNameGenerator)((MenuItem)source).Tag;
+            this.nameGenerator = g;
+            foreach(MenuItem otherMenuItem in representationsMenu.MenuItems) otherMenuItem.Checked = false;
+            ((MenuItem)source).Checked = true;
             UpdateControls();
-          });
-        if(generator is DefaultFunctionTreeNameGenerator) button.Checked = true;
-        else button.Checked = false;
-        representationContextMenu.Items.Add(button);
+          }, Shortcut.None);
+        if(generator is DefaultFunctionTreeNameGenerator) mi.Checked = true;
+        else mi.Checked = false;
+        mi.Tag = generator;
+        representationsMenu.MenuItems.Add(mi);
       }
     }
@@ -74,18 +79,17 @@
       rootNode.Text = nameGenerator.GetName(functionTree);
       rootNode.Tag = functionTree;
-      treeNodeContextMenu.Items.Clear();
+      treeNodeContextMenu.MenuItems.Clear();
+      treeNodeContextMenu.MenuItems.Add(representationsMenu);
       DiscoveryService discoveryService = new DiscoveryService();
       IFunctionTreeExporter[] exporters = discoveryService.GetInstances<IFunctionTreeExporter>();
-      if(exporters.Length>0)
-        treeNodeContextMenu.Items.Add(new ToolStripSeparator());
       foreach(IFunctionTreeExporter exporter in exporters) {
         string result;
         // register a menu item for the exporter
-        ToolStripItem item = new ToolStripButton("Copy to clip-board (" + exporter.Name + ")", null,
+        MenuItem item = new MenuItem("Copy to clip-board (" + exporter.Name + ")", 
           delegate(object source, EventArgs args) {
             TreeNode node = funTreeView.SelectedNode;
             if(node == null || node.Tag == null) return;
             Clipboard.SetText(exporter.Export((IFunctionTree)node.Tag));
-          });
+          }, Shortcut.None);
         // try to export the whole tree 
         if(exporter.TryExport(functionTree, out result)) {
@@ -95,7 +99,7 @@
           item.Enabled = false;
         }
-        treeNodeContextMenu.Items.Add(item);
+        treeNodeContextMenu.MenuItems.Add(item);
       }
-      rootNode.ContextMenuStrip = treeNodeContextMenu;
+      rootNode.ContextMenu = treeNodeContextMenu;
       funTreeView.Nodes.Add(rootNode);
 
@@ -111,5 +115,5 @@
       node.Text = nameGenerator.GetName(functionTree);
       node.Tag = functionTree;
-      node.ContextMenuStrip = treeNodeContextMenu;
+      node.ContextMenu = treeNodeContextMenu;
       rootNode.Nodes.Add(node);
       foreach(IFunctionTree subTree in functionTree.SubTrees) {
