 (defmethod get-table :conexp.gui.editors.util/table-control
   [x] x)
 
-
-(defn-swing do-mk-context-editor-widget
-  "Creates a control for editing contexts.
-
-  Parameters:
-     & setup     _an optional number of vectors that may contain additional
-                  tweaks that are called after widget creation"
-  [& setup]
-  (let [ self (promise)
-         root (JRootPane.)
-         table (make-table-control
-                 [set-row-count 10]
-                 [set-column-count 10])
-
-         toolbar (make-toolbar-control :vert
-                   [add-button 
-                     (make-button "Copy" 
-                       (get-ui-icon "OptionPane.informationIcon")
-                       [set-handler (fn [] (copy-to-clipboard table))] )]
-                   [add-button
-                     (make-button "Paste" 
-                       (get-ui-icon "OptionPane.informationIcon")
-                       [set-handler (fn [] (paste-from-clipboard table))] ) ])
-
-                   
-         widget {:managed-by-conexp-gui-editors-util "context-editor-widget"
-
-         :widget root
-         :table table
-         :control (get-control table)
-         :context (ref nil)
-
-         :associate-context
-         (fn-doc "Associates a context with the widget object and implicitly
-  updates the control
-
-  Parameters:
-    ectx      _editable context"
-           [ectx]
-           (let [ ctx (if (editable-context? ectx) ectx 
-                       (make-editable-context ectx))
-                  ctx-ref (@self :context)
-                  old-ctx @ctx-ref]
-             (do
-               (dosync-wait (ref-set ctx-ref nil))
-               (if (not (nil? old-ctx)) (!! old-ctx :remove-widget- @self))
-               (!! ctx :add-widget- @self))
-               (dosync-wait (ref-set ctx-ref ctx))))
-
-
-         }
-
-         defaults []]
-    (do
-      (deliver self widget)
-      (.. root getContentPane 
-        (add (get-widget toolbar) BorderLayout/LINE_START))
-      (.. root getContentPane
-        (add (get-widget table)))
-      (doseq [x defaults] (unroll-parameters-fn-map widget x))
-      (doseq [x setup] (unroll-parameters-fn-map widget x))
-      widget )))
 
 (declare change-attribute-name change-object-name change-incidence-cross)
 

    (set-hook table "cell-value" 
      (fn [r c s] (ectx-cell-value-hook e-ctx r c s)))))

                   
(declare change-attribute-name change-object-name change-incidence-cross)


                          given 0 new-name)))))
          new-name)))))

(def ctx (conexp.fca/make-context ["a" "b" "c"] [1 2 3] [["a" 1] ["c" 3]]))
(def ctx2 (make-context #{"Apfel" "Birne" "Möhre" "Gurke"} 
            #{"lecker" "geht so" "iieh"} 
