From 53fb36d0e23ffb8a93489bc98c56e748a0ae9336 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 19 Feb 2014 17:23:47 -0700 Subject: [PATCH] Switch all documentation links to match CoffeeScript literal notation Foo::bar for instance methods Foo.bar for class methods --- src/clipboard.coffee | 4 ++-- src/cursor.coffee | 8 ++++---- src/display-buffer-marker.coffee | 14 +++++++------- src/display-buffer.coffee | 2 +- src/editor-view.coffee | 4 ++-- src/editor.coffee | 22 +++++++++++----------- src/git.coffee | 4 ++-- src/select-list-view.coffee | 20 ++++++++++---------- src/selection.coffee | 8 ++++---- src/task.coffee | 2 +- 10 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/clipboard.coffee b/src/clipboard.coffee index 82d75d2d4..c717350ae 100644 --- a/src/clipboard.coffee +++ b/src/clipboard.coffee @@ -20,7 +20,7 @@ class Clipboard # Public: Write the given text to the clipboard. # # The metadata associated with the text is available by calling - # {.readWithMetadata}. + # {::readWithMetadata}. # # text - The {String} to store. # metadata - The additional info to associate with the text. @@ -40,7 +40,7 @@ class Clipboard # # Returns an {Object} with the following keys: # :text - The {String} clipboard text. - # :metadata - The metadata stored by an earlier call to {.write}. + # :metadata - The metadata stored by an earlier call to {::write}. readWithMetadata: -> text = @read() if @signatureForMetadata is @md5(text) diff --git a/src/cursor.coffee b/src/cursor.coffee index 6b3747479..e946a3523 100644 --- a/src/cursor.coffee +++ b/src/cursor.coffee @@ -311,7 +311,7 @@ class Cursor # # options - An {Object} with the following keys: # :wordRegex - A {RegExp} indicating what constitutes a "word" - # (default: {.wordRegExp}). + # (default: {::wordRegExp}). # :includeNonWordCharacters - A {Boolean} indicating whether to include # non-word characters in the default word regex. # Has no effect if wordRegex is set. @@ -379,7 +379,7 @@ class Cursor # # options - An {Object} with the following keys: # :wordRegex - A {RegExp} indicating what constitutes a "word" - # (default: {.wordRegExp}) + # (default: {::wordRegExp}) # :includeNonWordCharacters - A Boolean indicating whether to include # non-word characters in the default word regex. # Has no effect if wordRegex is set. @@ -403,7 +403,7 @@ class Cursor # # options - # :wordRegex - A {RegExp} indicating what constitutes a "word" - # (default: {.wordRegExp}). + # (default: {::wordRegExp}). # # Returns a {Range}. getBeginningOfNextWordBufferPosition: (options = {}) -> @@ -422,7 +422,7 @@ class Cursor # # options - # :wordRegex - A {RegExp} indicating what constitutes a "word" - # (default: {.wordRegExp}). + # (default: {::wordRegExp}). getCurrentWordBufferRange: (options={}) -> startOptions = _.extend(_.clone(options), allowPrevious: false) endOptions = _.extend(_.clone(options), allowNext: false) diff --git a/src/display-buffer-marker.coffee b/src/display-buffer-marker.coffee index 184162622..6369d8cb5 100644 --- a/src/display-buffer-marker.coffee +++ b/src/display-buffer-marker.coffee @@ -37,7 +37,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 {Marker.setRange} + # options - A hash of options matching those found in {Marker::setRange} setScreenRange: (screenRange, options) -> @setBufferRange(@displayBuffer.bufferRangeForScreenRange(screenRange), options) @@ -50,7 +50,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 {Marker.setRange} + # options - A hash of options matching those found in {Marker::setRange} setBufferRange: (bufferRange, options) -> @bufferMarker.setRange(bufferRange, options) @@ -63,7 +63,7 @@ class DisplayBufferMarker # Sets the screen position of the marker's head. # # screenRange - The new {Point} to use - # options - A hash of options matching those found in {DisplayBuffer.bufferPositionForScreenPosition} + # options - A hash of options matching those found in {DisplayBuffer::bufferPositionForScreenPosition} setHeadScreenPosition: (screenPosition, options) -> screenPosition = @displayBuffer.clipScreenPosition(screenPosition, options) @setHeadBufferPosition(@displayBuffer.bufferPositionForScreenPosition(screenPosition, options)) @@ -77,7 +77,7 @@ class DisplayBufferMarker # Sets the buffer position of the marker's head. # # screenRange - The new {Point} to use - # options - A hash of options matching those found in {DisplayBuffer.bufferPositionForScreenPosition} + # options - A hash of options matching those found in {DisplayBuffer::bufferPositionForScreenPosition} setHeadBufferPosition: (bufferPosition) -> @bufferMarker.setHeadPosition(bufferPosition) @@ -90,7 +90,7 @@ class DisplayBufferMarker # Sets the screen position of the marker's tail. # # screenRange - The new {Point} to use - # options - A hash of options matching those found in {DisplayBuffer.bufferPositionForScreenPosition} + # options - A hash of options matching those found in {DisplayBuffer::bufferPositionForScreenPosition} setTailScreenPosition: (screenPosition, options) -> screenPosition = @displayBuffer.clipScreenPosition(screenPosition, options) @setTailBufferPosition(@displayBuffer.bufferPositionForScreenPosition(screenPosition, options)) @@ -104,7 +104,7 @@ class DisplayBufferMarker # Sets the buffer position of the marker's tail. # # screenRange - The new {Point} to use - # options - A hash of options matching those found in {DisplayBuffer.bufferPositionForScreenPosition} + # options - A hash of options matching those found in {DisplayBuffer::bufferPositionForScreenPosition} setTailBufferPosition: (bufferPosition) -> @bufferMarker.setTailPosition(bufferPosition) @@ -135,7 +135,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 - # {Marker.destroy}, no undo/redo operation can ever bring it back. + # {Marker::destroy}, no undo/redo operation can ever bring it back. isDestroyed: -> @bufferMarker.isDestroyed() diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index b5063a280..fc5a0af5a 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -509,7 +509,7 @@ class DisplayBuffer extends Model # Finds the first marker satisfying the given attributes # - # Refer to {DisplayBuffer.findMarkers} for details. + # Refer to {DisplayBuffer::findMarkers} for details. # # Returns a {DisplayBufferMarker} or null findMarker: (attributes) -> diff --git a/src/editor-view.coffee b/src/editor-view.coffee index 4aa277192..27e190070 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -609,7 +609,7 @@ class EditorView extends View # # bufferPosition - An object that represents a buffer position. It can be either # an {Object} (`{row, column}`), {Array} (`[row, column]`), or {Point} - # options - A hash matching the options available to {.scrollToPixelPosition} + # options - A hash matching the options available to {::scrollToPixelPosition} scrollToBufferPosition: (bufferPosition, options) -> @scrollToPixelPosition(@pixelPositionForBufferPosition(bufferPosition), options) @@ -617,7 +617,7 @@ class EditorView extends View # # screenPosition - An object that represents a buffer position. It can be either # an {Object} (`{row, column}`), {Array} (`[row, column]`), or {Point} - # options - A hash matching the options available to {.scrollToPixelPosition} + # options - A hash matching the options available to {::scrollToPixelPosition} scrollToScreenPosition: (screenPosition, options) -> @scrollToPixelPosition(@pixelPositionForScreenPosition(screenPosition), options) diff --git a/src/editor.coffee b/src/editor.coffee index 633604e54..a8fe6e646 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -222,7 +222,7 @@ class Editor extends Model # Public: Returns that String used to indicate a tab. # - # If soft tabs are enabled, this is a space (`" "`) times the {.getTabLength} value. + # If soft tabs are enabled, this is a space (`" "`) times the {::getTabLength} value. # Otherwise, it's a tab (`\t`). getTabText: -> @buildIndentString(1) @@ -427,7 +427,7 @@ class Editor extends Model # Public: Inserts text at the current cursor positions # # text - A {String} representing the text to insert. - # options - A set of options equivalent to {Selection.insertText}. + # options - A set of options equivalent to {Selection::insertText}. insertText: (text, options={}) -> options.autoIndentNewline ?= @shouldAutoIndent() options.autoDecreaseIndent ?= @shouldAutoIndent() @@ -454,7 +454,7 @@ class Editor extends Model # Public: Indents the current line. # - # options - A set of options equivalent to {Selection.indent}. + # options - A set of options equivalent to {Selection::indent}. indent: (options={})-> options.autoIndent ?= @shouldAutoIndent() @mutateSelectedText (selection) -> selection.indent(options) @@ -513,7 +513,7 @@ class Editor extends Model autoIndentSelectedRows: -> @mutateSelectedText (selection) -> selection.autoIndentSelectedRows() - # Public: Converts all indents to the current {.getTabText} given a {Range}. + # Public: Converts all indents to the current {::getTabText} given a {Range}. normalizeTabsInBufferRange: (bufferRange) -> return unless @getSoftTabs() @scanInBufferRange /\t/, bufferRange, ({replace}) => replace(@getTabText()) @@ -542,7 +542,7 @@ class Editor extends Model # Public: Pastes the text in the clipboard. # - # options - A set of options equivalent to {Selection.insertText}. + # options - A set of options equivalent to {Selection::insertText}. pasteText: (options={}) -> {text, metadata} = atom.clipboard.readWithMetadata() @@ -867,7 +867,7 @@ class Editor extends Model # Public: Given a buffer range, this adds a new selection for it. # # bufferRange - A {Range} in the buffer. - # options - An options {Object} for {.markBufferRange}. + # options - An options {Object} for {::markBufferRange}. # # Returns the new {Selection}. addSelectionForBufferRange: (bufferRange, options={}) -> @@ -878,7 +878,7 @@ class Editor extends Model # creates a new selection for it. # # bufferRange - A {Range} in the buffer. - # options - An options {Object} for {.setSelectedBufferRanges}. + # options - An options {Object} for {::setSelectedBufferRanges}. setSelectedBufferRange: (bufferRange, options) -> @setSelectedBufferRanges([bufferRange], options) @@ -886,7 +886,7 @@ class Editor extends Model # selections and creates new selections for them. # # bufferRange - A {Range} in the buffer. - # options - An options {Object} for {.setSelectedBufferRanges}. + # options - An options {Object} for {::setSelectedBufferRanges}. setSelectedBufferRanges: (bufferRanges, options={}) -> throw new Error("Passed an empty array to setSelectedBufferRanges") unless bufferRanges.length @@ -961,7 +961,7 @@ class Editor extends Model # Public: Moves every local cursor to a given screen position. # # position - An {Array} of two numbers: the screen row, and the screen column. - # options - An {Object} with properties based on {Cursor.setScreenPosition}. + # options - An {Object} with properties based on {Cursor::setScreenPosition}. setCursorScreenPosition: (position, options) -> @moveCursors (cursor) -> cursor.setScreenPosition(position, options) @@ -981,7 +981,7 @@ class Editor extends Model # Public: Moves every cursor to a given buffer position. # # position - An {Array} of two numbers: the buffer row, and the buffer column. - # options - An object with properties based on {Cursor.setBufferPosition}. + # options - An object with properties based on {Cursor::setBufferPosition}. setCursorBufferPosition: (position, options) -> @moveCursors (cursor) -> cursor.setBufferPosition(position, options) @@ -1025,7 +1025,7 @@ class Editor extends Model # Public: Returns the word under the most recently added local {Cursor}. # # options - An object with properties based on - # {Cursor.getBeginningOfCurrentWordBufferPosition}. + # {Cursor::getBeginningOfCurrentWordBufferPosition}. getWordUnderCursor: (options) -> @getTextInBufferRange(@getCursor().getCurrentWordBufferRange(options)) diff --git a/src/git.coffee b/src/git.coffee index 7143b4e69..1e5c9fb5b 100644 --- a/src/git.coffee +++ b/src/git.coffee @@ -110,7 +110,7 @@ class Git # path - A {String} repository-relative path. # # Returns a {Number} representing the status. This value can be passed to - # {.isStatusModified} or {.isStatusNew} to get more information. + # {::isStatusModified} or {::isStatusNew} to get more information. getPathStatus: (path) -> currentPathStatus = @statuses[path] ? 0 pathStatus = @getRepo().getStatus(@relativize(path)) ? 0 @@ -208,7 +208,7 @@ class Git # path - The {String} path to check. # # Returns a {Number} representing the status. This value can be passed to - # {.isStatusModified} or {.isStatusNew} to get more information. + # {::isStatusModified} or {::isStatusNew} to get more information. getDirectoryStatus: (directoryPath) -> {sep} = require 'path' directoryPath = "#{directoryPath}#{sep}" diff --git a/src/select-list-view.coffee b/src/select-list-view.coffee index 0536bff57..c97daa52e 100644 --- a/src/select-list-view.coffee +++ b/src/select-list-view.coffee @@ -8,8 +8,8 @@ fuzzyFilter = require('fuzzaldrin').filter # # Subclasses must implement the following methods: # -# * {.viewForItem} -# * {.confirmed} +# * {::viewForItem} +# * {::confirmed} # # ## Requiring in packages # @@ -88,7 +88,7 @@ class SelectListView extends View # Public: Set the array of items to display in the list. # - # This should be model items not actual views. {.viewForItem} will be + # This should be model items not actual views. {::viewForItem} will be # called to render the item when it is being appended to the list view. # # items - The {Array} of model items to display in the list (default: []). @@ -130,7 +130,7 @@ class SelectListView extends View @filterEditorView.getEditor().getText() # Public: Populate the list view with the model items previously set by - # calling {.setItems}. + # calling {::setItems}. # # Subclasses may override this method but should always call `super`. populateList: -> @@ -160,7 +160,7 @@ class SelectListView extends View # # Subclasses may override this method to customize the message. # - # itemCount - The {Number} of items in the array specified to {.setItems} + # itemCount - The {Number} of items in the array specified to {::setItems} # filteredItemCount - The {Number} of items that pass the fuzzy filter test. # # Returns a {String} message (default: 'No matches found'). @@ -220,7 +220,7 @@ class SelectListView extends View # This is called when the item is about to appended to the list view. # # item - The model item being rendered. This will always be one of the items - # previously passed to {.setItems}. + # previously passed to {::setItems}. # # Returns a String of HTML, DOM element, jQuery object, or View. viewForItem: (item) -> @@ -231,7 +231,7 @@ class SelectListView extends View # This method must be overridden by subclasses. # # item - The selected model item. This will always be one of the items - # previously passed to {.setItems}. + # previously passed to {::setItems}. # # Returns a DOM element, jQuery object, or {View}. confirmed: (item) -> @@ -242,7 +242,7 @@ class SelectListView extends View # This method may be overridden by classes to allow fuzzy filtering based # on a specific property of the item objects. # - # For example if the objects you pass to {.setItems} are of the type + # For example if the objects you pass to {::setItems} are of the type # `{"id": 3, "name": "Atom"}` then you would return `"name"` from this method # to fuzzy filter by that property when text is entered into this view's # editor. @@ -255,7 +255,7 @@ class SelectListView extends View @filterEditorView.focus() # Public: Store the currently focused element. This element will be given - # back focus when {.cancel} is called. + # back focus when {::cancel} is called. storeFocusedElement: -> @previouslyFocusedElement = $(':focus') @@ -272,7 +272,7 @@ class SelectListView extends View # Public: Cancel and close this select list view. # # This restores focus to the previously focused element if - # {.storeFocusedElement} was called prior to this view being attached. + # {::storeFocusedElement} was called prior to this view being attached. cancel: -> @list.empty() @cancelling = true diff --git a/src/selection.coffee b/src/selection.coffee index 6f5e50788..a1e11990a 100644 --- a/src/selection.coffee +++ b/src/selection.coffee @@ -56,7 +56,7 @@ class Selection # Public: Modifies the screen range for the selection. # # screenRange - The new {Range} to use. - # options - A hash of options matching those found in {.setBufferRange}. + # options - A hash of options matching those found in {::setBufferRange}. setScreenRange: (screenRange, options) -> @setBufferRange(@editor.bufferRangeForScreenRange(screenRange), options) @@ -338,7 +338,7 @@ class Selection # # options - A {Object} with the keys: # :autoIndent - If `true`, the indentation is performed appropriately. - # Otherwise, {Editor.getTabText} is used. + # Otherwise, {Editor::getTabText} is used. indent: ({ autoIndent }={})-> { row, column } = @cursor.getBufferPosition() @@ -543,7 +543,7 @@ class Selection # the given selection. # # otherSelection - A {Selection} to merge with. - # options - A hash of options matching those found in {.setBufferRange}. + # options - A hash of options matching those found in {::setBufferRange}. merge: (otherSelection, options) -> myGoalBufferRange = @getGoalBufferRange() otherGoalBufferRange = otherSelection.getGoalBufferRange() @@ -557,7 +557,7 @@ class Selection # Public: Compare this selection's buffer range to another selection's buffer # range. # - # See {Range.compare} for more details. + # See {Range::compare} for more details. # # otherSelection - A {Selection} to compare against. compare: (otherSelection) -> diff --git a/src/task.coffee b/src/task.coffee index 8e2b57277..b0c8b3623 100644 --- a/src/task.coffee +++ b/src/task.coffee @@ -37,7 +37,7 @@ class Task # # It receives the same arguments that were passed to the task. # - # If subclassed, this is intended to be overridden. However if {.start} + # If subclassed, this is intended to be overridden. However if {::start} # receives a completion callback, this is overridden. callback: null