From 61e5e6ea2880c436de2f4faf27eca16bb0f19cb6 Mon Sep 17 00:00:00 2001 From: Matt Colyer Date: Thu, 22 Aug 2013 12:08:01 -0700 Subject: [PATCH] Fix delegation references in comments --- src/display-buffer.coffee | 6 ++--- src/edit-session.coffee | 46 +++++++++++++++++++-------------------- src/editor.coffee | 22 +++++++++---------- src/file.coffee | 2 +- src/project.coffee | 16 +++++++------- src/root-view.coffee | 4 ++-- src/selection.coffee | 4 ++-- 7 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index 48e237bd8..2a019e55e 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -335,7 +335,7 @@ class DisplayBuffer # Retrieves the grammar's token scopes for a buffer position. # - # bufferPosition - A {Point} in the {Buffer} + # bufferPosition - A {Point} in the {TextBuffer} # # Returns an {Array} of {String}s. scopesForBufferPosition: (bufferPosition) -> @@ -346,7 +346,7 @@ class DisplayBuffer # Retrieves the grammar's token for a buffer position. # - # bufferPosition - A {Point} in the {Buffer}. + # bufferPosition - A {Point} in the {TextBuffer}. # # Returns a {Token}. tokenForBufferPosition: (bufferPosition) -> @@ -444,7 +444,7 @@ class DisplayBuffer return column + 1 if /\s/.test(line[column]) return softWrapColumn - # Calculates a {Range} representing the start of the {Buffer} until the end. + # Calculates a {Range} representing the start of the {TextBuffer} until the end. # # Returns a {Range}. rangeForAllLines: -> diff --git a/src/edit-session.coffee b/src/edit-session.coffee index cc5413f69..7ed7558d6 100644 --- a/src/edit-session.coffee +++ b/src/edit-session.coffee @@ -13,7 +13,7 @@ EventEmitter = require 'event-emitter' Subscriber = require 'subscriber' TextMateScopeSelector = require('first-mate').ScopeSelector -# An `EditSession` manages the states between {Editor}s, {Buffer}s, and the project as a whole. +# An `EditSession` manages the states between {Editor}s, {TextBuffer}s, and the project as a whole. module.exports = class EditSession _.extend @prototype, EventEmitter @@ -162,7 +162,7 @@ class EditSession # # Equality is based on the condition that: # - # * the two {Buffer}s are the same + # * the two {TextBuffer}s are the same # * the two `scrollTop` and `scrollLeft` property are the same # * the two {Cursor} screen positions are the same # @@ -285,7 +285,7 @@ class EditSession # Given a line, this retrieves the indentation level. # - # line - A {String} in the current {Buffer}. + # line - A {String} in the current {TextBuffer}. # # Returns a {Number}. indentLevelForLine: (line) -> @@ -304,30 +304,30 @@ class EditSession else _.multiplyString("\t", Math.floor(number)) - # {Delegates to: Buffer.save} + # {Delegates to: TextBuffer.save} save: -> @buffer.save() - # {Delegates to: Buffer.saveAs} + # {Delegates to: TextBuffer.saveAs} saveAs: (path) -> @buffer.saveAs(path) - # {Delegates to: Buffer.getExtension} + # {Delegates to: TextBuffer.getExtension} getFileExtension: -> @buffer.getExtension() - # {Delegates to: Buffer.getPath} + # {Delegates to: TextBuffer.getPath} getPath: -> @buffer.getPath() - # {Delegates to: Buffer.getRelativePath} + # {Delegates to: TextBuffer.getRelativePath} getRelativePath: -> @buffer.getRelativePath() - # {Delegates to: Buffer.getText} + # {Delegates to: TextBuffer.getText} getText: -> @buffer.getText() - # {Delegates to: Buffer.setText} + # {Delegates to: TextBuffer.setText} setText: (text) -> @buffer.setText(text) # Retrieves the current buffer. # - # Returns a {Buffer}. + # Returns a {TextBuffer}. getBuffer: -> @buffer # Retrieves the current buffer's URI. @@ -335,7 +335,7 @@ class EditSession # Returns a {String}. getUri: -> @buffer.getUri() - # {Delegates to: Buffer.isRowBlank} + # {Delegates to: TextBuffer.isRowBlank} isBufferRowBlank: (bufferRow) -> @buffer.isRowBlank(bufferRow) # Test if an entire row is a comment @@ -346,31 +346,31 @@ class EditSession scopes = @tokenForBufferPosition([bufferRow, match.index]).scopes new TextMateScopeSelector('comment.*').matches(scopes) - # {Delegates to: Buffer.nextNonBlankRow} + # {Delegates to: TextBuffer.nextNonBlankRow} nextNonBlankBufferRow: (bufferRow) -> @buffer.nextNonBlankRow(bufferRow) - # {Delegates to: Buffer.getEofPosition} + # {Delegates to: TextBuffer.getEofPosition} getEofBufferPosition: -> @buffer.getEofPosition() - # {Delegates to: Buffer.getLastRow} + # {Delegates to: TextBuffer.getLastRow} getLastBufferRow: -> @buffer.getLastRow() - # {Delegates to: Buffer.rangeForRow} + # {Delegates to: TextBuffer.rangeForRow} bufferRangeForBufferRow: (row, options) -> @buffer.rangeForRow(row, options) - # {Delegates to: Buffer.lineForRow} + # {Delegates to: TextBuffer.lineForRow} lineForBufferRow: (row) -> @buffer.lineForRow(row) - # {Delegates to: Buffer.lineLengthForRow} + # {Delegates to: TextBuffer.lineLengthForRow} lineLengthForBufferRow: (row) -> @buffer.lineLengthForRow(row) - # {Delegates to: Buffer.scanInRange} + # {Delegates to: TextBuffer.scanInRange} scanInBufferRange: (args...) -> @buffer.scanInRange(args...) - # {Delegates to: Buffer.backwardsScanInRange} + # {Delegates to: TextBuffer.backwardsScanInRange} backwardsScanInBufferRange: (args...) -> @buffer.backwardsScanInRange(args...) - # {Delegates to: Buffer.isModified} + # {Delegates to: TextBuffer.isModified} isModified: -> @buffer.isModified() # Identifies if the modified buffer should let you know if it's closing @@ -547,11 +547,11 @@ class EditSession @insertText(text, options) - # Undos the last {Buffer} change. + # Undos the last {TextBuffer} change. undo: -> @buffer.undo(this) - # Redos the last {Buffer} change. + # Redos the last {TextBuffer} change. redo: -> @buffer.redo(this) diff --git a/src/editor.coffee b/src/editor.coffee index cc98d3820..c1a2c18aa 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -577,7 +577,7 @@ class Editor extends View @showIndentGuide = showIndentGuide @resetDisplay() - # {Delegates to: Buffer.checkoutHead} + # {Delegates to: TextBuffer.checkoutHead} checkoutHead: -> @getBuffer().checkoutHead() # {Delegates to: EditSession.setText} @@ -592,31 +592,31 @@ class Editor extends View # {Delegates to: EditSession.getRelativePath} getRelativePath: -> @activeEditSession?.getRelativePath() - # {Delegates to: Buffer.getLineCount} + # {Delegates to: TextBuffer.getLineCount} getLineCount: -> @getBuffer().getLineCount() - # {Delegates to: Buffer.getLastRow} + # {Delegates to: TextBuffer.getLastRow} getLastBufferRow: -> @getBuffer().getLastRow() - # {Delegates to: Buffer.getTextInRange} + # {Delegates to: TextBuffer.getTextInRange} getTextInRange: (range) -> @getBuffer().getTextInRange(range) - # {Delegates to: Buffer.getEofPosition} + # {Delegates to: TextBuffer.getEofPosition} getEofPosition: -> @getBuffer().getEofPosition() - # {Delegates to: Buffer.lineForRow} + # {Delegates to: TextBuffer.lineForRow} lineForBufferRow: (row) -> @getBuffer().lineForRow(row) - # {Delegates to: Buffer.lineLengthForRow} + # {Delegates to: TextBuffer.lineLengthForRow} lineLengthForBufferRow: (row) -> @getBuffer().lineLengthForRow(row) - # {Delegates to: Buffer.rangeForRow} + # {Delegates to: TextBuffer.rangeForRow} rangeForBufferRow: (row) -> @getBuffer().rangeForRow(row) - # {Delegates to: Buffer.scanInRange} + # {Delegates to: TextBuffer.scanInRange} scanInBufferRange: (args...) -> @getBuffer().scanInRange(args...) - # {Delegates to: Buffer.backwardsScanInRange} + # {Delegates to: TextBuffer.backwardsScanInRange} backwardsScanInBufferRange: (args...) -> @getBuffer().backwardsScanInRange(args...) ### Internal ### @@ -838,7 +838,7 @@ class Editor extends View # Retrieves the {EditSession}'s buffer. # - # Returns the current {Buffer}. + # Returns the current {TextBuffer}. getBuffer: -> @activeEditSession.buffer # Scrolls the editor to the bottom. diff --git a/src/file.coffee b/src/file.coffee index 59d1263c8..8d40d5ea9 100644 --- a/src/file.coffee +++ b/src/file.coffee @@ -8,7 +8,7 @@ _ = require 'underscore' # Public: Represents an individual file in the editor. # # The entry point for this class is in two locations: -# * {Buffer}, which associates text contents with a file +# * {TextBuffer}, which associates text contents with a file # * {Directory}, which associcates the children of a directory as files module.exports = class File diff --git a/src/project.coffee b/src/project.coffee index 6a61b5e65..eda496add 100644 --- a/src/project.coffee +++ b/src/project.coffee @@ -220,13 +220,13 @@ class Project removeEditSession: (editSession) -> _.remove(@editSessions, editSession) - # Retrieves all the {Buffer}s in the project; that is, the buffers for all open files. + # Retrieves all the {TextBuffer}s in the project; that is, the buffers for all open files. # - # Returns an {Array} of {Buffer}s. + # Returns an {Array} of {TextBuffer}s. getBuffers: -> new Array(@buffers...) - # Given a file path, this retrieves or creates a new {Buffer}. + # Given a file path, this retrieves or creates a new {TextBuffer}. # # If the `filePath` already has a `buffer`, that value is used instead. Otherwise, # `text` is used as the contents of the new buffer. @@ -234,7 +234,7 @@ class Project # filePath - A {String} representing a path. If `null`, an "Untitled" buffer is created. # text - The {String} text to use as a buffer, if the file doesn't have any contents # - # Returns the {Buffer}. + # Returns the {TextBuffer}. bufferForPath: (filePath, text) -> if filePath? filePath = @resolve(filePath) @@ -247,12 +247,12 @@ class Project bufferForId: (id) -> _.find @buffers, (buffer) -> buffer.id is id - # Given a file path, this sets its {Buffer}. + # Given a file path, this sets its {TextBuffer}. # # filePath - A {String} representing a path # text - The {String} text to use as a buffer # - # Returns the {Buffer}. + # Returns the {TextBuffer}. buildBuffer: (filePath, initialText) -> filePath = @resolve(filePath) if filePath? buffer = new TextBuffer({project: this, filePath, initialText}) @@ -267,9 +267,9 @@ class Project @buffers[index] = buffer @state.get('buffers').insert(index, buffer.getState()) if options.updateState ? true - # Removes a {Buffer} association from the project. + # Removes a {TextBuffer} association from the project. # - # Returns the removed {Buffer}. + # Returns the removed {TextBuffer}. removeBuffer: (buffer) -> index = @buffers.indexOf(buffer) @removeBufferAtIndex(index) unless index is -1 diff --git a/src/root-view.coffee b/src/root-view.coffee index b559b7aaf..13acb3d75 100644 --- a/src/root-view.coffee +++ b/src/root-view.coffee @@ -176,7 +176,7 @@ class RootView extends View # Retrieves all of the modified buffers that are open and unsaved. # - # Returns an {Array} of {Buffer}s. + # Returns an {Array} of {TextBuffer}s. getModifiedBuffers: -> modifiedBuffers = [] for pane in @getPanes() @@ -245,7 +245,7 @@ class RootView extends View eachEditSession: (callback) -> project.eachEditSession(callback) - # Fires a callback on each open {Buffer}. + # Fires a callback on each open {TextBuffer}. # # callback - A {Function} to call eachBuffer: (callback) -> diff --git a/src/selection.coffee b/src/selection.coffee index 514cfe7d5..f64a2c133 100644 --- a/src/selection.coffee +++ b/src/selection.coffee @@ -46,7 +46,7 @@ class Selection # Identifies if the ending position of a marker is greater than the starting position. # - # This can happen when, for example, you highlight text "up" in a {Buffer}. + # This can happen when, for example, you highlight text "up" in a {TextBuffer}. # # Returns a {Boolean}. isReversed: -> @@ -127,7 +127,7 @@ class Selection expandOverWord: -> @setBufferRange(@getBufferRange().union(@cursor.getCurrentWordBufferRange())) - # Selects an entire line in the {Buffer}. + # Selects an entire line in the {TextBuffer}. # # row - The line {Number} to select (default: the row of the cursor) selectLine: (row=@cursor.getBufferPosition().row) ->