 (declare make-editable-context editable-context?)
 (declare-multimethod add-widget)
 (declare-multimethod get-context)
+(declare-multimethod set-context)
+(declare-multimethod get-ectx)
+
+(defn- add-ctx-map-btn
+  "Helper that will create the according button vector"
+  [f ref-to-ectx txt icon]
+  (vec (list add-button 
+         (make-button txt icon 
+           [set-handler 
+             (fn [] 
+               (let [ ectx (deref ref-to-ectx)
+                      ctx (get-context ectx) ]
+                 (set-context ectx (f ctx))))]))))
 
 (defn-swing make-context-editor-widget
   "Creates a control for editing contexts.

                   [add-button
                     (make-button "Paste" 
                       (get-ui-icon "OptionPane.informationIcon")
                       [set-handler (fn [] (paste-from-clipboard table))] ) ])
         ectx (ref (make-editable-context))
         e-ctx @ectx
         widget (context-editor-widget. root table toolbar ectx) ]
    (.. root getContentPane 

  [ & setup]
  (let [ root (JRootPane.)
         table (make-table-control [set-row-count 1] [set-column-count 1])
         ectx (ref (make-editable-context))
         toolbar (make-toolbar-control :vert
                   [add-button 
                     (make-button "Copy" 
