From 932a7922893820181a7cc2f7a647e6e1e2b43db1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 6 Feb 2014 10:02:53 -0800 Subject: [PATCH] Remove Private: prefix --- src/atom.coffee | 22 +++++++++++----------- src/browser/application-menu.coffee | 14 +++++++------- src/browser/atom-application.coffee | 20 ++++++++++---------- src/browser/atom-protocol-handler.coffee | 4 ++-- src/browser/context-menu.coffee | 2 +- src/buffered-process.coffee | 2 +- src/config.coffee | 2 +- src/context-menu-manager.coffee | 10 +++++----- src/cursor.coffee | 2 +- src/deserializer-manager.coffee | 2 +- src/directory.coffee | 2 +- src/editor.coffee | 8 ++++---- src/file.coffee | 6 +++--- src/fold.coffee | 2 +- src/gutter-view.coffee | 4 ++-- src/language-mode.coffee | 6 +++--- src/less-compile-cache.coffee | 2 +- src/menu-manager.coffee | 6 +++--- src/package-manager.coffee | 12 ++++++------ src/pane-container-view.coffee | 2 +- src/pane-container.coffee | 2 +- src/pane.coffee | 16 ++++++++-------- src/project.coffee | 16 ++++++++-------- src/row-map.coffee | 2 +- src/selection.coffee | 2 +- src/task.coffee | 2 +- src/text-buffer.coffee | 6 +++--- src/theme-manager.coffee | 2 +- src/token.coffee | 2 +- src/window-event-handler.coffee | 4 ++-- src/workspace-view.coffee | 6 +++--- src/workspace.coffee | 12 ++++++------ 32 files changed, 101 insertions(+), 101 deletions(-) diff --git a/src/atom.coffee b/src/atom.coffee index 86f164626..f1ec88d1e 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -43,11 +43,11 @@ class Atom extends Model @loadOrCreate: (mode) -> @deserialize(@loadState(mode)) ? new this({mode, version: @getVersion()}) - # Private: Deserializes the Atom environment from a state object + # Deserializes the Atom environment from a state object @deserialize: (state) -> new this(state) if state?.version is @getVersion() - # Private: Loads and returns the serialized state corresponding to this window + # Loads and returns the serialized state corresponding to this window # if it exists; otherwise returns undefined. @loadState: (mode) -> statePath = @getStatePath(mode) @@ -65,7 +65,7 @@ class Atom extends Model catch error console.warn "Error parsing window state: #{statePath} #{error.stack}", error - # Private: Returns the path where the state for the current window will be + # Returns the path where the state for the current window will be # located if it exists. @getStatePath: (mode) -> switch mode @@ -82,19 +82,19 @@ class Atom extends Model else null - # Private: Get the directory path to Atom's configuration area. + # Get the directory path to Atom's configuration area. # # Returns the absolute path to ~/.atom @getConfigDirPath: -> @configDirPath ?= fs.absolute('~/.atom') - # Private: Get the path to Atom's storage directory. + # Get the path to Atom's storage directory. # # Returns the absolute path to ~/.atom/storage @getStorageDirPath: -> @storageDirPath ?= path.join(@getConfigDirPath(), 'storage') - # Private: Returns the load settings hash associated with the current window. + # Returns the load settings hash associated with the current window. @getLoadSettings: -> @loadSettings ?= JSON.parse(decodeURIComponent(location.search.substr(14))) cloned = _.deepClone(@loadSettings) @@ -109,17 +109,17 @@ class Atom extends Model @getCurrentWindow: -> remote.getCurrentWindow() - # Private: Get the version of the Atom application. + # Get the version of the Atom application. @getVersion: -> @version ?= @getLoadSettings().appVersion - # Private: Determine whether the current version is an official release. + # Determine whether the current version is an official release. @isReleasedVersion: -> not /\w{7}/.test(@getVersion()) # Check if the release is a 7-character SHA prefix workspaceViewParentSelector: 'body' - # Private: Call .loadOrCreate instead + # Call .loadOrCreate instead constructor: (@state) -> {@mode} = @state DeserializerManager = require './deserializer-manager' @@ -254,7 +254,7 @@ class Atom extends Model @deserializeProject() @deserializeWorkspaceView() - # Private: Call this method when establishing a real application window. + # Call this method when establishing a real application window. startEditorWindow: -> CommandInstaller = require './command-installer' resourcePath = atom.getLoadSettings().resourcePath @@ -409,7 +409,7 @@ class Atom extends Model center: -> ipc.sendChannel('call-window-method', 'center') - # Private: Schedule the window to be shown and focused on the next tick. + # Schedule the window to be shown and focused on the next tick. # # This is done in a next tick to prevent a white flicker from occurring # if called synchronously. diff --git a/src/browser/application-menu.coffee b/src/browser/application-menu.coffee index d87b44c20..905655ac8 100644 --- a/src/browser/application-menu.coffee +++ b/src/browser/application-menu.coffee @@ -3,7 +3,7 @@ ipc = require 'ipc' Menu = require 'menu' _ = require 'underscore-plus' -# Private: Used to manage the global application menu. +# Used to manage the global application menu. # # It's created by {AtomApplication} upon instantiation and used to add, remove # and maintain the state of all menu items. @@ -29,7 +29,7 @@ class ApplicationMenu @menu = Menu.buildFromTemplate(template) Menu.setApplicationMenu(@menu) - # Private: Flattens the given menu and submenu items into an single Array. + # Flattens the given menu and submenu items into an single Array. # # * menu: # A complete menu configuration object for atom-shell's menu API. @@ -42,7 +42,7 @@ class ApplicationMenu items = items.concat(@flattenMenuItems(item.submenu)) if item.submenu items - # Private: Flattens the given menu template into an single Array. + # Flattens the given menu template into an single Array. # # * template: # An object describing the menu item. @@ -64,7 +64,7 @@ class ApplicationMenu for item in @flattenMenuItems(@menu) item.enabled = enable if item.metadata?['windowSpecific'] - # Private: Replaces VERSION with the current version. + # Replaces VERSION with the current version. substituteVersion: (template) -> if (item = _.find(@flattenMenuTemplate(template), (i) -> i.label == 'VERSION')) item.label = "Version #{@version}" @@ -79,7 +79,7 @@ class ApplicationMenu if (item = _.find(@flattenMenuItems(@menu), (i) -> i.label == 'Check for Update')) item.visible = visible - # Private: Default list of menu items. + # Default list of menu items. # # Returns an Array of menu item Objects. getDefaultTemplate: -> @@ -93,7 +93,7 @@ class ApplicationMenu ] ] - # Private: Combines a menu template with the appropriate keystroke. + # Combines a menu template with the appropriate keystroke. # # * template: # An Object conforming to atom-shell's menu api but lacking accelerator and @@ -113,7 +113,7 @@ class ApplicationMenu @translateTemplate(item.submenu, keystrokesByCommand) if item.submenu template - # Private: Determine the accelerator for a given command. + # Determine the accelerator for a given command. # # * command: # The name of the command. diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 4a528fdaf..7966b7cc3 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -22,7 +22,7 @@ socketPath = else path.join(os.tmpdir(), 'atom.sock') -# Private: The application's singleton class. +# The application's singleton class. # # It's the entry point into the Atom application and maintains the global state # of the application. @@ -77,7 +77,7 @@ class AtomApplication @openWithOptions(options) - # Private: Opens a new window based on the options provided. + # Opens a new window based on the options provided. openWithOptions: ({pathsToOpen, urlsToOpen, test, pidToKillWhenClosed, devMode, newWindow, specDirectory, logFile}) -> if test @runSpecs({exitWhenDone: true, @resourcePath, specDirectory, logFile}) @@ -98,7 +98,7 @@ class AtomApplication @windows.push window @applicationMenu?.enableWindowSpecificItems(true) - # Private: Creates server to listen for additional atom application launches. + # Creates server to listen for additional atom application launches. # # You can run the atom command multiple times, but after the first launch # the other launches will just pass their information to this server and then @@ -113,11 +113,11 @@ class AtomApplication server.listen socketPath server.on 'error', (error) -> console.error 'Application server failed', error - # Private: Configures required javascript environment flags. + # Configures required javascript environment flags. setupJavaScriptArguments: -> app.commandLine.appendSwitch 'js-flags', '--harmony_collections --harmony-proxies' - # Private: Enable updates unless running from a local build of Atom. + # Enable updates unless running from a local build of Atom. setupAutoUpdater: -> autoUpdater.setFeedUrl "https://atom.io/api/updates?version=#{@version}" @@ -165,7 +165,7 @@ class AtomApplication autoUpdater.checkForUpdates() - # Private: Registers basic application commands, non-idempotent. + # Registers basic application commands, non-idempotent. handleEvents: -> @on 'application:about', -> Menu.sendActionToFirstResponder('orderFrontStandardAboutPanel:') @on 'application:run-all-specs', -> @runSpecs(exitWhenDone: false, resourcePath: global.devResourcePath) @@ -262,7 +262,7 @@ class AtomApplication else @openPath({pathToOpen}) - # Private: Returns the {AtomWindow} for the given path. + # Returns the {AtomWindow} for the given path. windowForPath: (pathToOpen) -> for atomWindow in @windows return atomWindow if atomWindow.containsPath(pathToOpen) @@ -350,7 +350,7 @@ class AtomApplication console.log("Killing process #{pid} failed: #{error.code}") delete @pidsToOpenWindows[pid] - # Private: Open an atom:// url. + # Open an atom:// url. # # The host of the URL being opened is assumed to be the package name # responsible for opening the URL. A new window will be created with @@ -382,7 +382,7 @@ class AtomApplication else console.log "Opening unknown url: #{urlToOpen}" - # Private: Opens up a new {AtomWindow} to run specs within. + # Opens up a new {AtomWindow} to run specs within. # # * options # + exitWhenDone: @@ -413,7 +413,7 @@ class AtomApplication isSpec = true new AtomWindow({bootstrapScript, @resourcePath, isSpec}) - # Private: Opens a native dialog to prompt the user for a path. + # Opens a native dialog to prompt the user for a path. # # Once paths are selected, they're opened in a new or existing {AtomWindow}s. # diff --git a/src/browser/atom-protocol-handler.coffee b/src/browser/atom-protocol-handler.coffee index 247a67dcc..786d50243 100644 --- a/src/browser/atom-protocol-handler.coffee +++ b/src/browser/atom-protocol-handler.coffee @@ -3,7 +3,7 @@ fs = require 'fs-plus' path = require 'path' protocol = require 'protocol' -# Private: Handles requests with 'atom' protocol. +# Handles requests with 'atom' protocol. # # It's created by {AtomApplication} upon instantiation, and is used to create a # custom resource loader by adding the 'atom' custom protocol. @@ -18,7 +18,7 @@ class AtomProtocolHandler @registerAtomProtocol() - # Private: Creates the 'atom' custom protocol handler. + # Creates the 'atom' custom protocol handler. registerAtomProtocol: -> protocol.registerProtocol 'atom', (request) => relativePath = path.normalize(request.url.substr(7)) diff --git a/src/browser/context-menu.coffee b/src/browser/context-menu.coffee index 85d3b0426..92843f8cc 100644 --- a/src/browser/context-menu.coffee +++ b/src/browser/context-menu.coffee @@ -8,7 +8,7 @@ class ContextMenu menu = Menu.buildFromTemplate(template) menu.popup(browserWindow) - # Private: It's necessary to build the event handlers in this process, otherwise + # It's necessary to build the event handlers in this process, otherwise # closures are drug across processes and failed to be garbage collected # appropriately. createClickHandlers: (template) -> diff --git a/src/buffered-process.coffee b/src/buffered-process.coffee index b27c315be..7fd604f59 100644 --- a/src/buffered-process.coffee +++ b/src/buffered-process.coffee @@ -68,7 +68,7 @@ class BufferedProcess processExited = true triggerExitCallback() - # Private: Helper method to pass data line by line. + # Helper method to pass data line by line. # # * stream: # The Stream to read from. diff --git a/src/config.coffee b/src/config.coffee index e4449c899..3f45bac8d 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -30,7 +30,7 @@ class Config settings: null configFileHasErrors: null - # Private: Created during initialization, available as `global.config` + # Created during initialization, available as `global.config` constructor: ({@configDirPath, @resourcePath}={}) -> @defaultSettings = {} @settings = {} diff --git a/src/context-menu-manager.coffee b/src/context-menu-manager.coffee index 2236a1ca0..f51ca227b 100644 --- a/src/context-menu-manager.coffee +++ b/src/context-menu-manager.coffee @@ -37,7 +37,7 @@ class ContextMenuManager for label, command of items @addBySelector(selector, {label, command}, {devMode}) - # Private: Registers a command to be displayed when the relevant item is right + # Registers a command to be displayed when the relevant item is right # clicked. # # * selector: The css selector for the active element which should include @@ -50,7 +50,7 @@ class ContextMenuManager definitions = if devMode then @devModeDefinitions else @definitions (definitions[selector] ?= []).push(definition) - # Private: Returns definitions which match the element and devMode. + # Returns definitions which match the element and devMode. definitionsForElement: (element, {devMode}={}) -> definitions = if devMode then @devModeDefinitions else @definitions matchedDefinitions = [] @@ -59,7 +59,7 @@ class ContextMenuManager matchedDefinitions - # Private: Used to generate the context menu for a specific element and it's + # Used to generate the context menu for a specific element and it's # parents. # # The menu items are sorted such that menu items that match closest to the @@ -74,7 +74,7 @@ class ContextMenuManager else menuTemplate - # Private: Returns a menu template for both normal entries as well as + # Returns a menu template for both normal entries as well as # development mode entries. combinedMenuTemplateForElement: (element) -> normalItems = @menuTemplateForMostSpecificElement(element) @@ -84,7 +84,7 @@ class ContextMenuManager menuTemplate.push({ type: 'separator' }) if normalItems.length > 0 and devItems.length > 0 menuTemplate.concat(devItems) - # Private: Executes `executeAtBuild` if defined for each menu item with + # Executes `executeAtBuild` if defined for each menu item with # the provided event and then removes the `executeAtBuild` property from # the menu item. # diff --git a/src/cursor.coffee b/src/cursor.coffee index daf91e4dc..63845b87b 100644 --- a/src/cursor.coffee +++ b/src/cursor.coffee @@ -17,7 +17,7 @@ class Cursor visible: true needsAutoscroll: null - # Private: Instantiated by an {Editor} + # Instantiated by an {Editor} constructor: ({@editor, @marker}) -> @updateVisibility() @marker.on 'changed', (e) => diff --git a/src/deserializer-manager.coffee b/src/deserializer-manager.coffee index 1c431679f..f97d9ef37 100644 --- a/src/deserializer-manager.coffee +++ b/src/deserializer-manager.coffee @@ -41,7 +41,7 @@ class DeserializerManager else console.warn "No deserializer found for", state - # Private: Get the deserializer for the state. + # Get the deserializer for the state. get: (state) -> return unless state? diff --git a/src/directory.coffee b/src/directory.coffee index 6404dc5ba..cb0f8906b 100644 --- a/src/directory.coffee +++ b/src/directory.coffee @@ -146,6 +146,6 @@ class Directory @watchSubscription.close() @watchSubscription = null - # Private: Does given full path start with the given prefix? + # Does given full path start with the given prefix? isPathPrefixOf: (prefix, fullPath) -> fullPath.indexOf(prefix) is 0 and fullPath[prefix.length] is path.sep diff --git a/src/editor.coffee b/src/editor.coffee index 288e51c55..f7a19f74b 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -132,7 +132,7 @@ class Editor extends Model @languageMode.destroy() atom.project?.removeEditor(this) - # Private: Creates an {Editor} with the same initial state + # Creates an {Editor} with the same initial state copy: -> tabLength = @getTabLength() displayBuffer = @displayBuffer.copy() @@ -295,7 +295,7 @@ class Editor extends Model else 0 - # Private: Constructs the string used for tabs. + # Constructs the string used for tabs. buildIndentString: (number) -> if @getSoftTabs() _.multiplyString(" ", number * @getTabLength()) @@ -326,7 +326,7 @@ class Editor extends Model # Public: Returns a {Number} representing the number of lines in the editor. getLineCount: -> @buffer.getLineCount() - # Private: Retrieves the current {TextBuffer}. + # Retrieves the current {TextBuffer}. getBuffer: -> @buffer # Public: Retrieves the current buffer's URI. @@ -1291,7 +1291,7 @@ class Editor extends Model finalizeSelections: -> selection.finalize() for selection in @getSelections() - # Private: Merges intersecting selections. If passed a function, it executes + # Merges intersecting selections. If passed a function, it executes # the function with merging suppressed, then merges intersecting selections # afterward. mergeIntersectingSelections: (args...) -> diff --git a/src/file.coffee b/src/file.coffee index bb09cc4f2..8290010a4 100644 --- a/src/file.coffee +++ b/src/file.coffee @@ -34,7 +34,7 @@ class File @handleEventSubscriptions() - # Private: Subscribes to file system notifications when necessary. + # Subscribes to file system notifications when necessary. handleEventSubscriptions: -> eventNames = ['contents-changed', 'moved', 'removed'] @@ -49,7 +49,7 @@ class File subscriptionsEmpty = _.every eventNames, (eventName) => @getSubscriptionCount(eventName) is 0 @unsubscribeFromNativeChangeEvents() if subscriptionsEmpty - # Private: Sets the path for the file. + # Sets the path for the file. setPath: (@path) -> # Public: Returns the path for the file. @@ -66,7 +66,7 @@ class File fs.writeFileSync(@getPath(), text) @subscribeToNativeChangeEvents() if not previouslyExisted and @hasSubscriptions() - # Private: Deprecated + # Deprecated readSync: (flushCache) -> if not @exists() @cachedContents = null diff --git a/src/fold.coffee b/src/fold.coffee index 32de3f988..f6be421a6 100644 --- a/src/fold.coffee +++ b/src/fold.coffee @@ -1,6 +1,6 @@ {Point, Range} = require 'text-buffer' -# Private: Represents a fold that collapses multiple buffer lines into a single +# Represents a fold that collapses multiple buffer lines into a single # line on the screen. # # Their creation is managed by the {DisplayBuffer}. diff --git a/src/gutter-view.coffee b/src/gutter-view.coffee index cae0d51c0..b97116f86 100644 --- a/src/gutter-view.coffee +++ b/src/gutter-view.coffee @@ -2,7 +2,7 @@ {Range} = require 'text-buffer' _ = require 'underscore-plus' -# Private: Represents the portion of the {EditorView} containing row numbers. +# Represents the portion of the {EditorView} containing row numbers. # # The gutter also indicates if rows are folded. module.exports = @@ -223,7 +223,7 @@ class GutterView extends View html - # Private: Called to update the 'foldable' class of line numbers when there's + # Called to update the 'foldable' class of line numbers when there's # a change to the display buffer that doesn't regenerate all the line numbers # anyway. updateFoldableClasses: (changes) -> diff --git a/src/language-mode.coffee b/src/language-mode.coffee index da539e08e..da2791275 100644 --- a/src/language-mode.coffee +++ b/src/language-mode.coffee @@ -187,7 +187,7 @@ class LanguageMode isFoldableAtBufferRow: (bufferRow) -> @isFoldableCodeAtBufferRow(bufferRow) or @isFoldableCommentAtBufferRow(bufferRow) - # Private: Returns a {Boolean} indicating whether the given buffer row starts + # Returns a {Boolean} indicating whether the given buffer row starts # a a foldable row range due to the code's indentation patterns. isFoldableCodeAtBufferRow: (bufferRow) -> return false if @editor.isBufferRowBlank(bufferRow) or @isLineCommentedAtBufferRow(bufferRow) @@ -195,14 +195,14 @@ class LanguageMode return false unless nextNonEmptyRow? @editor.indentationForBufferRow(nextNonEmptyRow) > @editor.indentationForBufferRow(bufferRow) - # Private: Returns a {Boolean} indicating whether the given buffer row starts + # Returns a {Boolean} indicating whether the given buffer row starts # a foldable row range due to being the start of a multi-line comment. isFoldableCommentAtBufferRow: (bufferRow) -> @isLineCommentedAtBufferRow(bufferRow) and @isLineCommentedAtBufferRow(bufferRow + 1) and not @isLineCommentedAtBufferRow(bufferRow - 1) - # Private: Returns a {Boolean} indicating whether the line at the given buffer + # Returns a {Boolean} indicating whether the line at the given buffer # row is a comment. isLineCommentedAtBufferRow: (bufferRow) -> return false unless 0 <= bufferRow <= @editor.getLastBufferRow() diff --git a/src/less-compile-cache.coffee b/src/less-compile-cache.coffee index ad9024faa..feccbac4a 100644 --- a/src/less-compile-cache.coffee +++ b/src/less-compile-cache.coffee @@ -5,7 +5,7 @@ LessCache = require 'less-cache' tmpDir = if process.platform is 'win32' then os.tmpdir() else '/tmp' -# Private: {LessCache} wrapper used by {ThemeManager} to read stylesheets. +# {LessCache} wrapper used by {ThemeManager} to read stylesheets. module.exports = class LessCompileCache Subscriber.includeInto(this) diff --git a/src/menu-manager.coffee b/src/menu-manager.coffee index 2f7ded8e0..aa5470a9b 100644 --- a/src/menu-manager.coffee +++ b/src/menu-manager.coffee @@ -29,7 +29,7 @@ class MenuManager @merge(@template, item) for item in items @update() - # Private: Should the binding for the given selector be included in the menu + # Should the binding for the given selector be included in the menu # commands. # # * selector: A String selector to check. @@ -66,7 +66,7 @@ class MenuManager {menu} = CSON.readFileSync(platformMenuPath) @add(menu) - # Private: Merges an item in a submenu aware way such that new items are always + # Merges an item in a submenu aware way such that new items are always # appended to the bottom of existing menus where possible. merge: (menu, item) -> item = _.deepClone(item) @@ -76,7 +76,7 @@ class MenuManager else menu.push(item) unless _.find(menu, (i) => @normalizeLabel(i.label) == @normalizeLabel(item.label)) - # Private: OSX can't handle displaying accelerators for multiple keystrokes. + # OSX can't handle displaying accelerators for multiple keystrokes. # If they are sent across, it will stop processing accelerators for the rest # of the menu items. filterMultipleKeystroke: (keystrokesByCommand) -> diff --git a/src/package-manager.coffee b/src/package-manager.coffee index 85b598009..669a1bdde 100644 --- a/src/package-manager.coffee +++ b/src/package-manager.coffee @@ -67,14 +67,14 @@ class PackageManager pack?.disable() pack - # Private: Activate all the packages that should be activated. + # Activate all the packages that should be activated. activate: -> for [activator, types] in @packageActivators packages = @getLoadedPackagesForTypes(types) activator.activatePackages(packages) @emit 'activated' - # Private: another type of package manager can handle other package types. + # another type of package manager can handle other package types. # See ThemeManager registerPackageActivator: (activator, types) -> @packageActivators.push([activator, types]) @@ -84,7 +84,7 @@ class PackageManager @activatePackage(pack.name) for pack in packages @observeDisabledPackages() - # Private: Activate a single package by name + # Activate a single package by name activatePackage: (name, options) -> return pack if pack = @getActivePackage(name) if pack = @loadPackage(name, options) @@ -92,12 +92,12 @@ class PackageManager pack.activate(options) pack - # Private: Deactivate all packages + # Deactivate all packages deactivatePackages: -> @deactivatePackage(pack.name) for pack in @getActivePackages() @unobserveDisabledPackages() - # Private: Deactivate the package with the given name + # Deactivate the package with the given name deactivatePackage: (name) -> if pack = @getActivePackage(name) @setPackageState(pack.name, state) if state = pack.serialize?() @@ -189,7 +189,7 @@ class PackageManager getLoadedPackages: -> _.values(@loadedPackages) - # Private: Get packages for a certain package type + # Get packages for a certain package type # # * types: an {Array} of {String}s like ['atom', 'textmate'] getLoadedPackagesForTypes: (types) -> diff --git a/src/pane-container-view.coffee b/src/pane-container-view.coffee index c80cbf9ba..92aa77ef4 100644 --- a/src/pane-container-view.coffee +++ b/src/pane-container-view.coffee @@ -3,7 +3,7 @@ Delegator = require 'delegato' PaneView = require './pane-view' PaneContainer = require './pane-container' -# Private: Manages the list of panes within a {WorkspaceView} +# Manages the list of panes within a {WorkspaceView} module.exports = class PaneContainerView extends View Delegator.includeInto(this) diff --git a/src/pane-container.coffee b/src/pane-container.coffee index de339c8a9..a02afed9e 100644 --- a/src/pane-container.coffee +++ b/src/pane-container.coffee @@ -86,6 +86,6 @@ class PaneContainer extends Model itemDestroyed: (item) -> @emit 'item-destroyed', item - # Private: Called by Model superclass when destroyed + # Called by Model superclass when destroyed destroyed: -> pane.destroy() for pane in @getPanes() diff --git a/src/pane.coffee b/src/pane.coffee index 932bf4cb7..e70b0c74b 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -43,31 +43,31 @@ class Pane extends Model @activate() if params?.active - # Private: Called by the Serializable mixin during serialization. + # Called by the Serializable mixin during serialization. serializeParams: -> items: compact(@items.map((item) -> item.serialize?())) activeItemUri: @activeItem?.getUri?() focused: @focused active: @active - # Private: Called by the Serializable mixin during deserialization. + # Called by the Serializable mixin during deserialization. deserializeParams: (params) -> {items, activeItemUri} = params params.items = compact(items.map (itemState) -> atom.deserializers.deserialize(itemState)) params.activeItem = find params.items, (item) -> item.getUri?() is activeItemUri params - # Private: Called by the view layer to construct a view for this model. + # Called by the view layer to construct a view for this model. getViewClass: -> PaneView ?= require './pane-view' isActive: -> @active - # Private: Called by the view layer to indicate that the pane has gained focus. + # Called by the view layer to indicate that the pane has gained focus. focus: -> @focused = true @activate() unless @isActive() - # Private: Called by the view layer to indicate that the pane has lost focus. + # Called by the view layer to indicate that the pane has lost focus. blur: -> @focused = false true # if this is called from an event handler, don't cancel it @@ -209,7 +209,7 @@ class Pane extends Model destroy: -> super unless @container?.isAlive() and @container?.getPanes().length is 1 - # Private: Called by model superclass. + # Called by model superclass. destroyed: -> @container.activateNextPane() if @isActive() item.destroy?() for item in @items.slice() @@ -335,7 +335,7 @@ class Pane extends Model newPane.activate() newPane - # Private: If the parent is a horizontal axis, returns its first child; + # If the parent is a horizontal axis, returns its first child; # otherwise this pane. findLeftmostSibling: -> if @parent.orientation is 'horizontal' @@ -343,7 +343,7 @@ class Pane extends Model else this - # Private: If the parent is a horizontal axis, returns its last child; + # If the parent is a horizontal axis, returns its last child; # otherwise returns a new pane created by splitting this pane rightward. findOrCreateRightmostSibling: -> if @parent.orientation is 'horizontal' diff --git a/src/project.coffee b/src/project.coffee index 510e41cb2..bf740b53d 100644 --- a/src/project.coffee +++ b/src/project.coffee @@ -153,7 +153,7 @@ class Project extends Model @bufferForPath(filePath).then (buffer) => @buildEditorForBuffer(buffer, options) - # Private: Only be used in specs + # Only be used in specs openSync: (filePath, options={}) -> filePath = @resolve(filePath) for opener in @openers @@ -176,14 +176,14 @@ class Project extends Model removeEditor: (editor) -> _.remove(@editors, editor) - # Private: Retrieves all the {TextBuffer}s in the project; that is, the + # Retrieves all the {TextBuffer}s in the project; that is, the # buffers for all open files. # # Returns an {Array} of {TextBuffer}s. getBuffers: -> @buffers.slice() - # Private: Is the buffer for the given path modified? + # Is the buffer for the given path modified? isPathModified: (filePath) -> @findBufferForPath(@resolve(filePath))?.isModified() @@ -191,13 +191,13 @@ class Project extends Model findBufferForPath: (filePath) -> _.find @buffers, (buffer) -> buffer.getPath() == filePath - # Private: Only to be used in specs + # Only to be used in specs bufferForPathSync: (filePath) -> absoluteFilePath = @resolve(filePath) existingBuffer = @findBufferForPath(absoluteFilePath) if filePath existingBuffer ? @buildBufferSync(absoluteFilePath) - # Private: Given a file path, this retrieves or creates a new {TextBuffer}. + # 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. @@ -214,14 +214,14 @@ class Project extends Model bufferForId: (id) -> _.find @buffers, (buffer) -> buffer.id is id - # Private: DEPRECATED + # DEPRECATED buildBufferSync: (absoluteFilePath) -> buffer = new TextBuffer({filePath: absoluteFilePath}) @addBuffer(buffer) buffer.loadSync() buffer - # Private: Given a file path, this sets its {TextBuffer}. + # Given a file path, this sets its {TextBuffer}. # # absoluteFilePath - A {String} representing a path # text - The {String} text to use as a buffer @@ -246,7 +246,7 @@ class Project extends Model @emit 'buffer-created', buffer buffer - # Private: Removes a {TextBuffer} association from the project. + # Removes a {TextBuffer} association from the project. # # Returns the removed {TextBuffer}. removeBuffer: (buffer) -> diff --git a/src/row-map.coffee b/src/row-map.coffee index 2e633472a..efb9343af 100644 --- a/src/row-map.coffee +++ b/src/row-map.coffee @@ -1,4 +1,4 @@ -# Private: Maintains the canonical map between screen and buffer positions. +# Maintains the canonical map between screen and buffer positions. # # Facilitates the mapping of screen rows to buffer rows and vice versa. All row # ranges dealt with by this class are end-row exclusive. For example, a fold of diff --git a/src/selection.coffee b/src/selection.coffee index 7aceb8a79..b416883b1 100644 --- a/src/selection.coffee +++ b/src/selection.coffee @@ -547,7 +547,7 @@ class Selection fn() @retainSelection = false - # Private: Sets the marker's tail to the same position as the marker's head. + # Sets the marker's tail to the same position as the marker's head. # # This only works if there isn't already a tail position. # diff --git a/src/task.coffee b/src/task.coffee index 94b7d6d3d..e4f9597d3 100644 --- a/src/task.coffee +++ b/src/task.coffee @@ -73,7 +73,7 @@ class Task @handleEvents() - # Private: Routes messages from the child to the appropriate event. + # Routes messages from the child to the appropriate event. handleEvents: -> @childProcess.removeAllListeners() @childProcess.on 'message', ({event, args}) => diff --git a/src/text-buffer.coffee b/src/text-buffer.coffee index 19ea180b9..d1bc51f00 100644 --- a/src/text-buffer.coffee +++ b/src/text-buffer.coffee @@ -8,7 +8,7 @@ TextBufferCore = require 'text-buffer' File = require './file' -# Private: Represents the contents of a file. +# Represents the contents of a file. # # The `TextBuffer` is often associated with a {File}. However, this is not always # the case, as a `TextBuffer` could be an unsaved chunk of text. @@ -145,11 +145,11 @@ class TextBuffer extends TextBufferCore @emitModifiedStatusChanged(false) @emit 'reloaded' - # Private: Rereads the contents of the file, and stores them in the cache. + # Rereads the contents of the file, and stores them in the cache. updateCachedDiskContentsSync: -> @cachedDiskContents = @file?.readSync() ? "" - # Private: Rereads the contents of the file, and stores them in the cache. + # Rereads the contents of the file, and stores them in the cache. updateCachedDiskContents: -> Q(@file?.read() ? "").then (contents) => @cachedDiskContents = contents diff --git a/src/theme-manager.coffee b/src/theme-manager.coffee index b6eb0c590..0525d3cc1 100644 --- a/src/theme-manager.coffee +++ b/src/theme-manager.coffee @@ -41,7 +41,7 @@ class ThemeManager activatePackages: (themePackages) -> @activateThemes() - # Private: Get the enabled theme names from the config. + # Get the enabled theme names from the config. # # Returns an array of theme names in the order that they should be activated. getEnabledThemeNames: -> diff --git a/src/token.coffee b/src/token.coffee index 058f73fb5..86f32ec3c 100644 --- a/src/token.coffee +++ b/src/token.coffee @@ -12,7 +12,7 @@ WhitespaceRegex = /\S/ MaxTokenLength = 20000 -# Private: Represents a single unit of text as selected by a grammar. +# Represents a single unit of text as selected by a grammar. module.exports = class Token value: null diff --git a/src/window-event-handler.coffee b/src/window-event-handler.coffee index 751c7ca19..8cf637cc6 100644 --- a/src/window-event-handler.coffee +++ b/src/window-event-handler.coffee @@ -5,7 +5,7 @@ shell = require 'shell' {Subscriber} = require 'emissary' fs = require 'fs-plus' -# Private: Handles low-level events related to the window. +# Handles low-level events related to the window. module.exports = class WindowEventHandler Subscriber.includeInto(this) @@ -75,7 +75,7 @@ class WindowEventHandler @handleNativeKeybindings() - # Private: Wire commands that should be handled by the native menu + # Wire commands that should be handled by the native menu # for elements with the `.native-key-bindings` class. handleNativeKeybindings: -> menu = null diff --git a/src/workspace-view.coffee b/src/workspace-view.coffee index 88f63044a..2ba1f6bfe 100644 --- a/src/workspace-view.coffee +++ b/src/workspace-view.coffee @@ -195,7 +195,7 @@ class WorkspaceView extends View setTitle: (title) -> document.title = title - # Private: Returns an Array of all of the application's {EditorView}s. + # Returns an Array of all of the application's {EditorView}s. getEditorViews: -> @panes.find('.pane > .item-views > .editor').map(-> $(this).view()).toArray() @@ -285,11 +285,11 @@ class WorkspaceView extends View @on('editor:attached', attachedCallback) off: => @off('editor:attached', attachedCallback) - # Private: Called by SpacePen + # Called by SpacePen beforeRemove: -> @model.destroy() - # Private: Destroys everything. + # Destroys everything. remove: -> editorView.remove() for editorView in @getEditorViews() super diff --git a/src/workspace.coffee b/src/workspace.coffee index 68ce0f7f2..4b1c2efae 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -37,12 +37,12 @@ class Workspace extends Model when 'atom://.atom/config' @open(atom.config.getUserConfigPath()) - # Private: Called by the Serializable mixin during deserialization + # Called by the Serializable mixin during deserialization deserializeParams: (params) -> params.paneContainer = PaneContainer.deserialize(params.paneContainer) params - # Private: Called by the Serializable mixin during serialization. + # Called by the Serializable mixin during serialization. serializeParams: -> paneContainer: @paneContainer.serialize() fullScreen: atom.isFullScreen() @@ -77,7 +77,7 @@ class Workspace extends Model .catch (error) -> console.error(error.stack ? error) - # Private: Only used in specs + # Only used in specs openSync: (uri, options={}) -> {initialLine} = options # TODO: Remove deprecated changeFocus option @@ -146,16 +146,16 @@ class Workspace extends Model fontSize = atom.config.get("editor.fontSize") atom.config.set("editor.fontSize", fontSize - 1) if fontSize > 1 - # Private: Removes the item's uri from the list of potential items to reopen. + # Removes the item's uri from the list of potential items to reopen. itemOpened: (item) -> if uri = item.getUri?() remove(@destroyedItemUris, uri) - # Private: Adds the destroyed item's uri to the list of items to reopen. + # Adds the destroyed item's uri to the list of items to reopen. onPaneItemDestroyed: (item) => if uri = item.getUri?() @destroyedItemUris.push(uri) - # Private: Called by Model superclass when destroyed + # Called by Model superclass when destroyed destroyed: -> @paneContainer.destroy()