-{View} = require 'atom'
+{View, Range} = require 'atom'
 
 module.exports =
 class DecorationExampleView extends View


  createHighlight: (color, range) ->
    editor = @getEditor()

    # create a marker that never invalidates that folows the user's selection range
    marker = editor.markBufferRange(range, invalidate: 'never')
    marker.bufferMarker.setProperties('addy-highlight': color)

      @destroyMarker(marker) if marker.getProperties()['addy-highlight']

  createDecorationFromCurrentSelection: (editor, type) ->

    # cereal = '[{"color":"red","range":[[0,0],[58,0]]}, {"color": "blue", "range":[[61,3],[66,3]]}]'
    # @deserialize_markers(JSON.parse(cereal))

    color = @getRandomColor()

    # Get the user's selection from the editor
