Skip to content

Instantly share code, notes, and snippets.

@laurentpetit
Created December 11, 2014 15:31
Show Gist options
  • Select an option

  • Save laurentpetit/b93f3800fd5c45ba221b to your computer and use it in GitHub Desktop.

Select an option

Save laurentpetit/b93f3800fd5c45ba221b to your computer and use it in GitHub Desktop.
Eclipse Markers contribution does not dynamically react to Registry Extension additions, here's how to circumvent this:
;; the markers definitions are cached in the cache field of the MarkerManager instance
;; the MarkerTypeDefinitionCache constructor gets the marker extensions from the registry
(let [mm (.getMarkerManager (e/workspace))
cache-field (.getDeclaredField org.eclipse.core.internal.resources.MarkerManager "cache")
new-cache (org.eclipse.core.internal.resources.MarkerTypeDefinitionCache.)]
(.setAccessible cache-field true)
(.set cache-field mm new-cache))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment