mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 07:58:04 +03:00
Replace {StringMarker} references with {Marker} in API docs
This commit is contained in:
parent
8d4ae33134
commit
25cc37bc86
@ -6,7 +6,7 @@ _ = require 'underscore-plus'
|
||||
# where text can be inserted.
|
||||
#
|
||||
# Cursors belong to {Editor}s and have some metadata attached in the form
|
||||
# of a {StringMarker}.
|
||||
# of a {Marker}.
|
||||
module.exports =
|
||||
class Cursor
|
||||
Emitter.includeInto(this)
|
||||
|
@ -42,7 +42,7 @@ class DisplayBufferMarker
|
||||
# Modifies the screen range of the display marker.
|
||||
#
|
||||
# screenRange - The new {Range} to use
|
||||
# options - A hash of options matching those found in {StringMarker.setRange}
|
||||
# options - A hash of options matching those found in {Marker.setRange}
|
||||
setScreenRange: (screenRange, options) ->
|
||||
@setBufferRange(@displayBuffer.bufferRangeForScreenRange(screenRange), options)
|
||||
|
||||
@ -55,7 +55,7 @@ class DisplayBufferMarker
|
||||
# Modifies the buffer range of the display marker.
|
||||
#
|
||||
# screenRange - The new {Range} to use
|
||||
# options - A hash of options matching those found in {StringMarker.setRange}
|
||||
# options - A hash of options matching those found in {Marker.setRange}
|
||||
setBufferRange: (bufferRange, options) ->
|
||||
@bufferMarker.setRange(bufferRange, options)
|
||||
|
||||
@ -140,7 +140,7 @@ class DisplayBufferMarker
|
||||
# Returns a {Boolean} indicating whether the marker has been destroyed. A marker
|
||||
# can be invalid without being destroyed, in which case undoing the invalidating
|
||||
# operation would restore the marker. Once a marker is destroyed by calling
|
||||
# {StringMarker.destroy}, no undo/redo operation can ever bring it back.
|
||||
# {Marker.destroy}, no undo/redo operation can ever bring it back.
|
||||
isDestroyed: ->
|
||||
@bufferMarker.isDestroyed()
|
||||
|
||||
@ -151,7 +151,7 @@ class DisplayBufferMarker
|
||||
@bufferMarker.setAttributes(attributes)
|
||||
|
||||
matchesAttributes: (attributes) ->
|
||||
attributes = @displayBuffer.translateToStringMarkerAttributes(attributes)
|
||||
attributes = @displayBuffer.translateToBufferMarkerAttributes(attributes)
|
||||
@bufferMarker.matchesAttributes(attributes)
|
||||
|
||||
# Destroys the marker
|
||||
|
@ -469,7 +469,7 @@ class DisplayBuffer extends Model
|
||||
# Constructs a new marker at the given screen range.
|
||||
#
|
||||
# range - The marker {Range} (representing the distance between the head and tail)
|
||||
# options - Options to pass to the {StringMarker} constructor
|
||||
# options - Options to pass to the {Marker} constructor
|
||||
#
|
||||
# Returns a {Number} representing the new marker's ID.
|
||||
markScreenRange: (args...) ->
|
||||
@ -479,7 +479,7 @@ class DisplayBuffer extends Model
|
||||
# Constructs a new marker at the given buffer range.
|
||||
#
|
||||
# range - The marker {Range} (representing the distance between the head and tail)
|
||||
# options - Options to pass to the {StringMarker} constructor
|
||||
# options - Options to pass to the {Marker} constructor
|
||||
#
|
||||
# Returns a {Number} representing the new marker's ID.
|
||||
markBufferRange: (args...) ->
|
||||
@ -488,7 +488,7 @@ class DisplayBuffer extends Model
|
||||
# Constructs a new marker at the given screen position.
|
||||
#
|
||||
# range - The marker {Range} (representing the distance between the head and tail)
|
||||
# options - Options to pass to the {StringMarker} constructor
|
||||
# options - Options to pass to the {Marker} constructor
|
||||
#
|
||||
# Returns a {Number} representing the new marker's ID.
|
||||
markScreenPosition: (screenPosition, options) ->
|
||||
@ -497,7 +497,7 @@ class DisplayBuffer extends Model
|
||||
# Constructs a new marker at the given buffer position.
|
||||
#
|
||||
# range - The marker {Range} (representing the distance between the head and tail)
|
||||
# options - Options to pass to the {StringMarker} constructor
|
||||
# options - Options to pass to the {Marker} constructor
|
||||
#
|
||||
# Returns a {Number} representing the new marker's ID.
|
||||
markBufferPosition: (bufferPosition, options) ->
|
||||
@ -527,10 +527,10 @@ class DisplayBuffer extends Model
|
||||
#
|
||||
# Returns an {Array} of {DisplayBufferMarker}s
|
||||
findMarkers: (attributes) ->
|
||||
attributes = @translateToStringMarkerAttributes(attributes)
|
||||
attributes = @translateToBufferMarkerAttributes(attributes)
|
||||
@buffer.findMarkers(attributes).map (stringMarker) => @getMarker(stringMarker.id)
|
||||
|
||||
translateToStringMarkerAttributes: (attributes) ->
|
||||
translateToBufferMarkerAttributes: (attributes) ->
|
||||
stringMarkerAttributes = {}
|
||||
for key, value of attributes
|
||||
switch key
|
||||
|
@ -458,10 +458,10 @@ class TextBuffer extends TextBufferCore
|
||||
# Returns a {Boolean}.
|
||||
isEmpty: -> super
|
||||
|
||||
# Returns all valid {StringMarker}s on the buffer.
|
||||
# Returns all valid {Marker}s on the buffer.
|
||||
getMarkers: -> super
|
||||
|
||||
# Returns the {StringMarker} with the given id.
|
||||
# Returns the {Marker} with the given id.
|
||||
getMarker: (id) -> super
|
||||
|
||||
destroyMarker: (id) ->
|
||||
@ -479,7 +479,7 @@ class TextBuffer extends TextBufferCore
|
||||
# startRow - The row at which the marker starts
|
||||
# endRow - The row at which the marker ends
|
||||
#
|
||||
# Returns an {Array} of {StringMarker}s
|
||||
# Returns an {Array} of {Marker}s
|
||||
findMarkers: (attributes) -> super
|
||||
|
||||
# Retrieves the quantity of markers in a buffer.
|
||||
@ -504,7 +504,7 @@ class TextBuffer extends TextBufferCore
|
||||
# Constructs a new marker at a given position.
|
||||
#
|
||||
# position - The marker {Point}; there won't be a tail
|
||||
# options - Options to pass to the {StringMarker} constructor
|
||||
# options - Options to pass to the {Marker} constructor
|
||||
#
|
||||
# Returns a {Number} representing the new marker's ID.
|
||||
markPosition: (position, options) -> super
|
||||
|
Loading…
Reference in New Issue
Block a user