   {:error   IMarker/SEVERITY_ERROR
    :warning IMarker/SEVERITY_WARNING
    :info    IMarker/SEVERITY_INFO})
+
+(def severity-invert
+  "eclipse severity code to keywords"
+  (set/map-invert severity))
 
 (def keyword-to-attr-key
   "Standard marker attributes recoginzed by Eclipse.

      :char-start 0 :char-end 1
      :message \"Dynamically created, how cool is that?\"})"
  [resource marker-map]
  (let [type-id (eclipse-type-id (:type-id marker-map))
        attrs (java.util.HashMap.)]
     (doseq [[k v] (dissoc marker-map :type-id)]
       (let [f (keyword-to-attr-key k)]
         (f attrs v)))
     (MarkerUtilities/createMarker
       (e/resource resource)
       attrs
       type-id)))

(defn delete-markers!
  "Delete markers for the resource.

   - https://www.eclipse.org/articles/Article-Mark%20My%20Words/mark-my-words.html"
  (:require [ccw.eclipse :as e]
            [ccw.bundle :as b]
            [ccw.core.trace :as t]
            [clojure.set :as set])
  (:import [org.eclipse.ui.texteditor MarkerUtilities]
           [org.eclipse.core.resources IMarker IResource]))

