     # This allows you to change the class on the decoration
     decoration.update(newDecorationParams)
 
-  destroyDecorationMarker: (decoration) ->
-    # Destory the decoration's marker because we will no longer need it.
+  destroyMarker: (marker) ->
+    # Destroy the decoration's marker because we will no longer need it.
     # This will destroy the decoration as well. Destroying the marker is the
     # recommended way to destory the decorations.
-    decoration.getMarker().destroy()
+    marker.destroy()
+
+  getMarkersAtCursor: () ->
+    editor = @getEditor()
+    buffer = editor.buffer
+    point = editor.getCursor().getBufferPosition()
+    markers = buffer.findMarkers(containsPoint: point)
+    JSON.stringify(markers)
 
   ## Button handling methods
+
+  createDecorationForCurrentSelection: ->
+    @createDecorationFromCurrentSelection(@getEditor(), 'highlight')
 
   toggleDecorationForCurrentSelection: (type) ->
     return unless editor = @getEditor()


    # create a marker that never invalidates that folows the user's selection range
    marker = editor.markBufferRange(range, invalidate: 'never')

    # create a decoration that follows the marker. A Decoration object is returned which can be updated
    decoration = editor.decorateMarker(marker, type: type, class: "#{type}-#{@getRandomColor()}")

  # Tear down any state and detach
  destroy: ->
    @detach()

  get_all_markers: ->
    editor = atom.workspace.getActiveEditor()
    buffer = editor.buffer
    markers = buffer.getMarkers()

  getAddyMarkers: ->
    markers = atom.workspace.getActiveEditor()
    addy_markers = editor.buffer.getMarkers().filter (x) ->
      x.getProperties()['addy-highlight']



### !@#$%>haightlighter infos
highlight all my favorite words ['cheese', 'bread']
###
