From 7a0a808af17fc83488cf2705e0bca5cd8477aba5 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 19 Aug 2014 12:14:16 -0600 Subject: [PATCH 01/82] Change ctrl-a binding to editor:move-to-first-character-of-line Considering that the entire Atom core team has ctrl-a bound to move to the first character and it's also the the default behavior of Sublime, this seems like a more sensible and useful default option even though it deviates from text editing norms on OS X. --- keymaps/darwin.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keymaps/darwin.cson b/keymaps/darwin.cson index 9c164c9c0..34f977209 100644 --- a/keymaps/darwin.cson +++ b/keymaps/darwin.cson @@ -119,7 +119,7 @@ 'cmd-shift-right': 'editor:select-to-end-of-line' 'alt-backspace': 'editor:delete-to-beginning-of-word' 'alt-delete': 'editor:delete-to-end-of-word' - 'ctrl-a': 'editor:move-to-beginning-of-line' + 'ctrl-a': 'editor:move-to-first-character-of-line' 'ctrl-e': 'editor:move-to-end-of-line' 'ctrl-k': 'editor:cut-to-end-of-line' From 6e3c945fa29aacb549fd99b1cf071f7bc15c9b48 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 10 Sep 2014 17:26:08 -0700 Subject: [PATCH 02/82] Use event methods for theme subscriptions --- spec/atom-spec.coffee | 2 +- src/atom.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/atom-spec.coffee b/spec/atom-spec.coffee index 54a94c9a8..d1c7ef6df 100644 --- a/spec/atom-spec.coffee +++ b/spec/atom-spec.coffee @@ -520,7 +520,7 @@ describe "the `atom` global", -> reloadedHandler = jasmine.createSpy('reloadedHandler') reloadedHandler.reset() - atom.themes.on('reloaded', reloadedHandler) + atom.themes.onDidReloadAll reloadedHandler pack = atom.packages.disablePackage(packageName) diff --git a/src/atom.coffee b/src/atom.coffee index dd87eb6a4..9d0faab5d 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -373,7 +373,7 @@ class Atom extends Model @themes.load() watchThemes: -> - @themes.on 'reloaded', => + @themes.onDidReloadAll => # Only reload stylesheets from non-theme packages for pack in @packages.getActivePackages() when pack.getType() isnt 'theme' pack.reloadStylesheets?() From 7625e5352d0d469c6851732511687bf2a56998b9 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 10 Sep 2014 17:28:26 -0700 Subject: [PATCH 03/82] Use event methods in EditorComponent --- src/editor-component.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index d70cf9a14..d1ee08c9a 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -176,7 +176,8 @@ EditorComponent = React.createClass @listenForDOMEvents() @listenForCommands() - @subscribe atom.themes, 'stylesheet-added stylesheet-removed stylesheet-updated', @onStylesheetsChanged + @subscribe atom.themes.onDidAddStylesheet @onStylesheetsChanged + @subscribe atom.themes.onDidRemoveStylesheet @onStylesheetsChanged @subscribe scrollbarStyle.changes, @refreshScrollbars @domPollingIntervalId = setInterval(@pollDOM, @domPollingInterval) From 70e1d14f9664474987e06b41acf08300f06296ea Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 10 Sep 2014 17:28:47 -0700 Subject: [PATCH 04/82] Add KeymapManager::onDidLoadBundledKeymaps --- src/context-menu-manager.coffee | 2 +- src/keymap-extensions.coffee | 6 +++++- src/menu-manager.coffee | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/context-menu-manager.coffee b/src/context-menu-manager.coffee index 91cfe04db..5aa8392a6 100644 --- a/src/context-menu-manager.coffee +++ b/src/context-menu-manager.coffee @@ -24,7 +24,7 @@ class ContextMenuManager @commandOptions = x: e.pageX, y: e.pageY ] - atom.keymaps.on 'bundled-keymaps-loaded', => @loadPlatformItems() + atom.keymaps.onDidLoadBundledKeymaps => @loadPlatformItems() loadPlatformItems: -> menusDirPath = path.join(@resourcePath, 'menus') diff --git a/src/keymap-extensions.coffee b/src/keymap-extensions.coffee index a4153de92..754bd502a 100644 --- a/src/keymap-extensions.coffee +++ b/src/keymap-extensions.coffee @@ -4,9 +4,13 @@ KeymapManager = require 'atom-keymap' CSON = require 'season' {jQuery} = require 'space-pen' +KeymapManager::onDidLoadBundledKeymaps = (callback) -> + @emitter.on 'did-load-bundled-keymaps', callback + KeymapManager::loadBundledKeymaps = -> @loadKeymap(path.join(@resourcePath, 'keymaps')) - @emit('bundled-keymaps-loaded') + @emit 'bundled-keymaps-loaded' + @emitter.emit 'did-load-bundled-keymaps' KeymapManager::getUserKeymapPath = -> if userKeymapPath = CSON.resolve(path.join(@configDirPath, 'keymap')) diff --git a/src/menu-manager.coffee b/src/menu-manager.coffee index 5c7d955d0..da5ae6507 100644 --- a/src/menu-manager.coffee +++ b/src/menu-manager.coffee @@ -14,7 +14,7 @@ class MenuManager constructor: ({@resourcePath}) -> @pendingUpdateOperation = null @template = [] - atom.keymaps.on 'bundled-keymaps-loaded', => @loadPlatformItems() + atom.keymaps.onDidLoadBundledKeymaps => @loadPlatformItems() atom.packages.onDidActivateAll => @sortPackagesMenu() # Public: Adds the given items to the application menu. From c1f8065caf50746b05460325754107e391ac7077 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 10 Sep 2014 17:41:38 -0700 Subject: [PATCH 05/82] Use the new split*() methods on Pane model in WorkspaceView specs --- spec/workspace-view-spec.coffee | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/spec/workspace-view-spec.coffee b/spec/workspace-view-spec.coffee index c6aa502b3..8adbc69e5 100644 --- a/spec/workspace-view-spec.coffee +++ b/spec/workspace-view-spec.coffee @@ -42,7 +42,7 @@ describe "WorkspaceView", -> runs -> editorView1 = atom.workspaceView.getActiveView() buffer = editorView1.getEditor().getBuffer() - editorView1.splitRight() + editorView1.getPaneView().getModel().splitRight(copyActiveItem: true) expect(atom.workspaceView.getActivePaneView()).toBe atom.workspaceView.getPaneViews()[1] simulateReload() @@ -196,7 +196,8 @@ describe "WorkspaceView", -> atom.workspaceView.attachToDom() rightEditorView = atom.workspaceView.getActiveView() rightEditorView.getEditor().setText("\t \n") - leftEditorView = rightEditorView.splitLeft() + rightEditorView.getPaneView().getModel().splitLeft(copyActiveItem: true) + leftEditorView = atom.workspaceView.getActiveView() expect(rightEditorView.find(".line:first").text()).toBe " " expect(leftEditorView.find(".line:first").text()).toBe " " @@ -207,14 +208,16 @@ describe "WorkspaceView", -> expect(rightEditorView.find(".line:first").text()).toBe withInvisiblesShowing expect(leftEditorView.find(".line:first").text()).toBe withInvisiblesShowing - lowerLeftEditorView = leftEditorView.splitDown() + leftEditorView.getPaneView().getModel().splitDown(copyActiveItem: true) + lowerLeftEditorView = atom.workspaceView.getActiveView() expect(lowerLeftEditorView.find(".line:first").text()).toBe withInvisiblesShowing atom.workspaceView.trigger "window:toggle-invisibles" expect(rightEditorView.find(".line:first").text()).toBe " " expect(leftEditorView.find(".line:first").text()).toBe " " - lowerRightEditorView = rightEditorView.splitDown() + rightEditorView.getPaneView().getModel().splitDown(copyActiveItem: true) + lowerRightEditorView = atom.workspaceView.getActiveView() expect(lowerRightEditorView.find(".line:first").text()).toBe " " describe ".eachEditorView(callback)", -> @@ -241,7 +244,7 @@ describe "WorkspaceView", -> atom.workspaceView.eachEditorView(callback) count = 0 callbackEditor = null - atom.workspaceView.getActiveView().splitRight() + atom.workspaceView.getActiveView().getPaneView().getModel().splitRight(copyActiveItem: true) expect(count).toBe 1 expect(callbackEditor).toBe atom.workspaceView.getActiveView() @@ -259,10 +262,10 @@ describe "WorkspaceView", -> subscription = atom.workspaceView.eachEditorView(callback) expect(count).toBe 1 - atom.workspaceView.getActiveView().splitRight() + atom.workspaceView.getActiveView().getPaneView().getModel().splitRight(copyActiveItem: true) expect(count).toBe 2 subscription.off() - atom.workspaceView.getActiveView().splitRight() + atom.workspaceView.getActiveView().getPaneView().getModel().splitRight(copyActiveItem: true) expect(count).toBe 2 describe "core:close", -> @@ -271,7 +274,7 @@ describe "WorkspaceView", -> paneView1 = atom.workspaceView.getActivePaneView() editorView = atom.workspaceView.getActiveView() - editorView.splitRight() + editorView.getPaneView().getModel().splitRight(copyActiveItem: true) paneView2 = atom.workspaceView.getActivePaneView() expect(paneView1).not.toBe paneView2 From 667315aff5db3aed9191806cfde523d3d554bb85 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 10 Sep 2014 18:01:27 -0700 Subject: [PATCH 06/82] Add ThemeManager::onDidUpdateStylesheet --- src/editor-component.coffee | 1 + src/theme-manager.coffee | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index d1ee08c9a..b5216b2bd 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -177,6 +177,7 @@ EditorComponent = React.createClass @listenForCommands() @subscribe atom.themes.onDidAddStylesheet @onStylesheetsChanged + @subscribe atom.themes.onDidUpdateStylesheet @onStylesheetsChanged @subscribe atom.themes.onDidRemoveStylesheet @onStylesheetsChanged @subscribe scrollbarStyle.changes, @refreshScrollbars diff --git a/src/theme-manager.coffee b/src/theme-manager.coffee index ae528607d..139103346 100644 --- a/src/theme-manager.coffee +++ b/src/theme-manager.coffee @@ -50,6 +50,15 @@ class ThemeManager onDidRemoveStylesheet: (callback) -> @emitter.on 'did-remove-stylesheet', callback + # Essential: Invoke `callback` when a stylesheet has been updated. + # + # * `callback` {Function} + # * `stylesheet` {StyleSheet} the style node + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + onDidUpdateStylesheet: (callback) -> + @emitter.on 'did-update-stylesheet', callback + # Essential: Invoke `callback` when any stylesheet has been updated, added, or removed. # # * `callback` {Function} @@ -66,6 +75,8 @@ class ThemeManager deprecate 'Use ThemeManager::onDidAddStylesheet instead' when 'stylesheet-removed' deprecate 'Use ThemeManager::onDidRemoveStylesheet instead' + when 'stylesheet-updated' + deprecate 'Use ThemeManager::onDidUpdateStylesheet instead' when 'stylesheets-changed' deprecate 'Use ThemeManager::onDidChangeStylesheets instead' else From 025c6111b315f19d0f1396abbdf576451b43a7ea Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Wed, 10 Sep 2014 18:01:45 -0700 Subject: [PATCH 07/82] Move global editor stylesheet updating into the ThemeManager --- src/theme-manager.coffee | 16 +++++++++++++++- src/workspace-view.coffee | 17 +++-------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/theme-manager.coffee b/src/theme-manager.coffee index 139103346..42ad5ac02 100644 --- a/src/theme-manager.coffee +++ b/src/theme-manager.coffee @@ -84,7 +84,7 @@ class ThemeManager EmitterMixin::on.apply(this, arguments) ### - Section: Methods + Section: Instance Methods ### getAvailableNames: -> @@ -334,3 +334,17 @@ class ThemeManager @emitter.emit 'did-add-stylesheet', styleElement.sheet @emit 'stylesheets-changed' @emitter.emit 'did-change-stylesheets' + + updateGlobalEditorStyle: (property, value) -> + unless styleNode = @stylesheetElementForId('global-editor-styles') + @applyStylesheet('global-editor-styles', '.editor {}') + styleNode = @stylesheetElementForId('global-editor-styles') + + {sheet} = styleNode + editorRule = sheet.cssRules[0] + editorRule.style[property] = value + + @emit 'stylesheet-updated', sheet + @emitter.emit 'did-update-stylesheet', sheet + @emit 'stylesheets-changed' + @emitter.emit 'did-change-stylesheets' diff --git a/src/workspace-view.coffee b/src/workspace-view.coffee index 067600eb0..0398b42b4 100644 --- a/src/workspace-view.coffee +++ b/src/workspace-view.coffee @@ -373,24 +373,13 @@ class WorkspaceView extends View @model.destroy() setEditorFontSize: (fontSize) => - @setEditorStyle('font-size', fontSize + 'px') + atom.themes.updateGlobalEditorStyle('font-size', fontSize + 'px') setEditorFontFamily: (fontFamily) => - @setEditorStyle('font-family', fontFamily) + atom.themes.updateGlobalEditorStyle('font-family', fontFamily) setEditorLineHeight: (lineHeight) => - @setEditorStyle('line-height', lineHeight) - - setEditorStyle: (property, value) -> - unless styleNode = atom.themes.stylesheetElementForId('global-editor-styles') - atom.themes.applyStylesheet('global-editor-styles', '.editor {}') - styleNode = atom.themes.stylesheetElementForId('global-editor-styles') - - {sheet} = styleNode - editorRule = sheet.cssRules[0] - editorRule.style[property] = value - atom.themes.emit 'stylesheet-updated', sheet - atom.themes.emit 'stylesheets-changed' + atom.themes.updateGlobalEditorStyle('line-height', lineHeight) # Deprecated eachPane: (callback) -> From f39114a95cac785de87d9233e763ff656fe4ae67 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 10:48:03 -0700 Subject: [PATCH 08/82] Subscribe to items via event methods. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add deprecation warnings when they don’t return a disposable --- spec/pane-view-spec.coffee | 33 +++++++++++++++++++++++++++++++++ src/pane-view.coffee | 27 ++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/spec/pane-view-spec.coffee b/spec/pane-view-spec.coffee index 63c812621..8fd9838cc 100644 --- a/spec/pane-view-spec.coffee +++ b/spec/pane-view-spec.coffee @@ -1,6 +1,7 @@ PaneContainerView = require '../src/pane-container-view' PaneView = require '../src/pane-view' fs = require 'fs-plus' +{Emitter} = require 'event-kit' {$, View} = require 'atom' path = require 'path' temp = require 'temp' @@ -162,6 +163,38 @@ describe "PaneView", -> view2.trigger 'title-changed' expect(activeItemTitleChangedHandler).toHaveBeenCalled() + describe 'when there is a onDidChangeTitle method', -> + beforeEach -> + TestView::changeTitle = -> + @emitter.emit 'did-change-title', 'title' + TestView::onDidChangeTitle = (callback) -> + @emitter.on 'did-change-title', callback + + view1.emitter = new Emitter + view2.emitter = new Emitter + + view1.id = 1 + view2.id = 2 + + pane.activateItem(view2) + pane.activateItem(view1) + + fffit "emits pane:active-item-title-changed", -> + activeItemTitleChangedHandler = jasmine.createSpy("activeItemTitleChangedHandler") + pane.on 'pane:active-item-title-changed', activeItemTitleChangedHandler + + expect(pane.getActiveItem()).toBe view1 + view2.changeTitle() + expect(activeItemTitleChangedHandler).not.toHaveBeenCalled() + + view1.changeTitle() + expect(activeItemTitleChangedHandler).toHaveBeenCalled() + activeItemTitleChangedHandler.reset() + + pane.activateItem(view2) + view2.changeTitle() + expect(activeItemTitleChangedHandler).toHaveBeenCalled() + describe "when an unmodifed buffer's path is deleted", -> it "removes the pane item", -> editor = null diff --git a/src/pane-view.coffee b/src/pane-view.coffee index 0de2ca7f1..41224e2d3 100644 --- a/src/pane-view.coffee +++ b/src/pane-view.coffee @@ -147,6 +147,9 @@ class PaneView extends View @activeItem onActiveItemChanged: (item) => + @activeItemDisposables.dispose() if @activeItemDisposables? + @activeItemDisposables = new CompositeDisposable() + if @previousActiveItem?.off? @previousActiveItem.off 'title-changed', @activeItemTitleChanged @previousActiveItem.off 'modified-status-changed', @activeItemModifiedChanged @@ -154,15 +157,29 @@ class PaneView extends View return unless item? - hasFocus = @hasFocus() - if item.on? - item.on 'title-changed', @activeItemTitleChanged - item.on 'modified-status-changed', @activeItemModifiedChanged + if item.onDidChangeTitle? + disposable = item.onDidChangeTitle(@activeItemTitleChanged) + deprecate 'Please return a Disposable object from your ::onDidChangeTitle method!' unless disposable?.dispose? + @activeItemDisposables.add(disposable) if disposable?.dispose? + else if item.on? + disposable = item.on('title-changed', @activeItemTitleChanged) + deprecate 'Please return a Disposable object from your ::on method. Your ::off method will not be called soon!' unless disposable?.dispose? + @activeItemDisposables.add(disposable) if disposable?.dispose? + + if item.onDidChangeModified? + disposable = item.onDidChangeModified(@activeItemModifiedChanged) + deprecate 'Please return a Disposable object from your ::onDidChangeModified method!' unless disposable?.dispose? + @activeItemDisposables.add(disposable) if disposable?.dispose? + else if item.on? + item.on('modified-status-changed', @activeItemModifiedChanged) + deprecate 'Please return a Disposable object from your ::on method. Your ::off method will not be called soon!' unless disposable?.dispose? + @activeItemDisposables.add(disposable) if disposable?.dispose? + view = @viewForItem(item) otherView.hide() for otherView in @itemViews.children().not(view).views() @itemViews.append(view) unless view.parent().is(@itemViews) view.show() if @attached - view.focus() if hasFocus + view.focus() if @hasFocus() @trigger 'pane:active-item-changed', [item] From f38fb2a9247e3bee0d03d97d8119711965bba2a4 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 11:11:15 -0700 Subject: [PATCH 09/82] nof --- spec/pane-view-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/pane-view-spec.coffee b/spec/pane-view-spec.coffee index 8fd9838cc..01f690bfd 100644 --- a/spec/pane-view-spec.coffee +++ b/spec/pane-view-spec.coffee @@ -179,7 +179,7 @@ describe "PaneView", -> pane.activateItem(view2) pane.activateItem(view1) - fffit "emits pane:active-item-title-changed", -> + it "emits pane:active-item-title-changed", -> activeItemTitleChangedHandler = jasmine.createSpy("activeItemTitleChangedHandler") pane.on 'pane:active-item-title-changed', activeItemTitleChangedHandler From 04c08248225bf90c0b7c81219f7119ce2fe443af Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 11:28:21 -0700 Subject: [PATCH 10/82] Fix / clean up specs --- spec/pane-view-spec.coffee | 54 ++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/spec/pane-view-spec.coffee b/spec/pane-view-spec.coffee index 01f690bfd..56cb6ddc8 100644 --- a/spec/pane-view-spec.coffee +++ b/spec/pane-view-spec.coffee @@ -13,9 +13,14 @@ describe "PaneView", -> @deserialize: ({id, text}) -> new TestView({id, text}) @content: ({id, text}) -> @div class: 'test-view', id: id, tabindex: -1, text initialize: ({@id, @text}) -> + @emitter = new Emitter serialize: -> { deserializer: 'TestView', @id, @text } getUri: -> @id isEqual: (other) -> other? and @id == other.id and @text == other.text + changeTitle: -> + @emitter.emit 'did-change-title', 'title' + onDidChangeTitle: (callback) -> + @emitter.on 'did-change-title', callback beforeEach -> atom.deserializers.add(TestView) @@ -146,39 +151,32 @@ describe "PaneView", -> expect(view1.data('preservative')).toBe 1234 describe "when the title of the active item changes", -> - it "emits pane:active-item-title-changed", -> - activeItemTitleChangedHandler = jasmine.createSpy("activeItemTitleChangedHandler") - pane.on 'pane:active-item-title-changed', activeItemTitleChangedHandler - - expect(pane.getActiveItem()).toBe view1 - - view2.trigger 'title-changed' - expect(activeItemTitleChangedHandler).not.toHaveBeenCalled() - - view1.trigger 'title-changed' - expect(activeItemTitleChangedHandler).toHaveBeenCalled() - activeItemTitleChangedHandler.reset() - - pane.activateItem(view2) - view2.trigger 'title-changed' - expect(activeItemTitleChangedHandler).toHaveBeenCalled() - - describe 'when there is a onDidChangeTitle method', -> + describe 'when there is no onDidChangeTitle method', -> beforeEach -> - TestView::changeTitle = -> - @emitter.emit 'did-change-title', 'title' - TestView::onDidChangeTitle = (callback) -> - @emitter.on 'did-change-title', callback - - view1.emitter = new Emitter - view2.emitter = new Emitter - - view1.id = 1 - view2.id = 2 + view1.onDidChangeTitle = null + view2.onDidChangeTitle = null pane.activateItem(view2) pane.activateItem(view1) + it "emits pane:active-item-title-changed", -> + activeItemTitleChangedHandler = jasmine.createSpy("activeItemTitleChangedHandler") + pane.on 'pane:active-item-title-changed', activeItemTitleChangedHandler + + expect(pane.getActiveItem()).toBe view1 + + view2.trigger 'title-changed' + expect(activeItemTitleChangedHandler).not.toHaveBeenCalled() + + view1.trigger 'title-changed' + expect(activeItemTitleChangedHandler).toHaveBeenCalled() + activeItemTitleChangedHandler.reset() + + pane.activateItem(view2) + view2.trigger 'title-changed' + expect(activeItemTitleChangedHandler).toHaveBeenCalled() + + describe 'when there is a onDidChangeTitle method', -> it "emits pane:active-item-title-changed", -> activeItemTitleChangedHandler = jasmine.createSpy("activeItemTitleChangedHandler") pane.on 'pane:active-item-title-changed', activeItemTitleChangedHandler From ff308d366cf5120c8ce5d2c9fa65580d5721cad0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 13:27:17 -0700 Subject: [PATCH 11/82] Upgrade to language-ruby@0.36 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93931377e..097809a60 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "language-php": "0.15.0", "language-property-list": "0.7.0", "language-python": "0.19.0", - "language-ruby": "0.35.0", + "language-ruby": "0.36.0", "language-ruby-on-rails": "0.18.0", "language-sass": "0.21.0", "language-shellscript": "0.8.0", From 3f3284a8dbf6940bd755948681244658477e76ca Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 13:33:50 -0700 Subject: [PATCH 12/82] Move the deprecations --- src/pane-view.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pane-view.coffee b/src/pane-view.coffee index 41224e2d3..21f4c8cfa 100644 --- a/src/pane-view.coffee +++ b/src/pane-view.coffee @@ -162,8 +162,8 @@ class PaneView extends View deprecate 'Please return a Disposable object from your ::onDidChangeTitle method!' unless disposable?.dispose? @activeItemDisposables.add(disposable) if disposable?.dispose? else if item.on? + deprecate '::on methods for items are no longer supported. If you would like your item to title change behavior, please implement a ::onDidChangeTitle() method.' disposable = item.on('title-changed', @activeItemTitleChanged) - deprecate 'Please return a Disposable object from your ::on method. Your ::off method will not be called soon!' unless disposable?.dispose? @activeItemDisposables.add(disposable) if disposable?.dispose? if item.onDidChangeModified? @@ -171,8 +171,8 @@ class PaneView extends View deprecate 'Please return a Disposable object from your ::onDidChangeModified method!' unless disposable?.dispose? @activeItemDisposables.add(disposable) if disposable?.dispose? else if item.on? + deprecate '::on methods for items are no longer supported. If you would like your item to support modified behavior, please implement a ::onDidChangeModified() method.' item.on('modified-status-changed', @activeItemModifiedChanged) - deprecate 'Please return a Disposable object from your ::on method. Your ::off method will not be called soon!' unless disposable?.dispose? @activeItemDisposables.add(disposable) if disposable?.dispose? view = @viewForItem(item) From f8ba40bcfe864d2a245734ae4552a08f6d062906 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 14:00:34 -0700 Subject: [PATCH 13/82] Deprecate font-size, font-family, line-height methods on EditorView. --- src/editor-view.coffee | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/editor-view.coffee b/src/editor-view.coffee index dc0e42364..aeea1feda 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -282,41 +282,29 @@ class EditorView extends View deprecate 'Use Editor::getLastVisibleScreenRow instead. You can get the editor via editorView.getModel()' @editor.getLastVisibleScreenRow() - # Public: Gets the font family for the editor. - # - # Returns a {String} identifying the CSS `font-family`. getFontFamily: -> + deprecate 'This is going away. Use atom.config.get("editor.fontFamily") instead' @component?.getFontFamily() - # Public: Sets the font family for the editor. - # - # * `fontFamily` A {String} identifying the CSS `font-family`. setFontFamily: (fontFamily) -> + deprecate 'This is going away. Use atom.config.set("editor.fontFamily", "my-font") instead' @component?.setFontFamily(fontFamily) - # Public: Retrieves the font size for the editor. - # - # Returns a {Number} indicating the font size in pixels. getFontSize: -> + deprecate 'This is going away. Use atom.config.get("editor.fontSize") instead' @component?.getFontSize() - # Public: Sets the font size for the editor. - # - # * `fontSize` A {Number} indicating the font size in pixels. setFontSize: (fontSize) -> + deprecate 'This is going away. Use atom.config.set("editor.fontSize", 12) instead' @component?.setFontSize(fontSize) + setLineHeight: (lineHeight) -> + deprecate 'This is going away. Use atom.config.set("editor.lineHeight", 1.5) instead' + @component.setLineHeight(lineHeight) + setWidthInChars: (widthInChars) -> @component.getDOMNode().style.width = (@editor.getDefaultCharWidth() * widthInChars) + 'px' - # Public: Sets the line height of the editor. - # - # Calling this method has no effect when called on a mini editor. - # - # * `lineHeight` A {Number} without a unit suffix identifying the CSS `line-height`. - setLineHeight: (lineHeight) -> - @component.setLineHeight(lineHeight) - # Public: Sets whether you want to show the indentation guides. # # * `showIndentGuide` A {Boolean} you can set to `true` if you want to see the From 5ef31e00a20c838143cd28cf0719e4abf04b0c09 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 14:10:17 -0700 Subject: [PATCH 14/82] Deprecate EditorView::setShowIndentGuide --- src/editor-view.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/editor-view.coffee b/src/editor-view.coffee index aeea1feda..9c299a1cc 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -305,11 +305,8 @@ class EditorView extends View setWidthInChars: (widthInChars) -> @component.getDOMNode().style.width = (@editor.getDefaultCharWidth() * widthInChars) + 'px' - # Public: Sets whether you want to show the indentation guides. - # - # * `showIndentGuide` A {Boolean} you can set to `true` if you want to see the - # indentation guides. setShowIndentGuide: (showIndentGuide) -> + deprecate 'This is going away. Use atom.config.set("editor.showIndentGuide", true|false) instead' @component.setShowIndentGuide(showIndentGuide) setSoftWrap: (softWrapped) -> From 6a2c161bf21e156dbdf1b382b00c7a81a7ac76c4 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 14:10:33 -0700 Subject: [PATCH 15/82] Deprecate setShowInvisibles --- src/editor-view.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/editor-view.coffee b/src/editor-view.coffee index 9c299a1cc..7617567f6 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -313,10 +313,8 @@ class EditorView extends View deprecate 'Use Editor::setSoftWrapped instead. You can get the editor via editorView.getModel()' @editor.setSoftWrapped(softWrapped) - # Public: Set whether invisible characters are shown. - # - # * `showInvisibles` A {Boolean} which, if `true`, show invisible characters. setShowInvisibles: (showInvisibles) -> + deprecate 'This is going away. Use atom.config.set("editor.showInvisibles", true|false) instead' @component.setShowInvisibles(showInvisibles) getText: -> From aee496346b2d1b78aada1bf607daa6525ea2e9e0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 14:10:44 -0700 Subject: [PATCH 16/82] Prepare 0.128 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 097809a60..e3114f48d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.127.0", + "version": "0.128.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 54ef5acdc6f8c4bb240b05b7f2c0706de194d791 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 14:58:55 -0700 Subject: [PATCH 17/82] Upgrade first-mate with new docs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e3114f48d..ea41c4390 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "delegato": "^1", "emissary": "^1.3.1", "event-kit": "0.7.1", - "first-mate": "^2.1.0", + "first-mate": "^2.1.1", "fs-plus": "^2.2.6", "fstream": "0.1.24", "fuzzaldrin": "^2.1", From 7b1a38bf8b8baef2f945311eab5fad5c63a03f2b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 15:31:39 -0700 Subject: [PATCH 18/82] Upgrade to wrap-guide@0.22 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea41c4390..1d3858e6c 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", - "wrap-guide": "0.21.0", + "wrap-guide": "0.22.0", "language-c": "0.28.0", "language-coffee-script": "0.30.0", "language-css": "0.17.0", From 844fd29dadb13900de64cfd88fdc35ab5995fda1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 15:10:18 -0700 Subject: [PATCH 19/82] Remove unused param --- src/theme-manager.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme-manager.coffee b/src/theme-manager.coffee index 42ad5ac02..ac76e8ea0 100644 --- a/src/theme-manager.coffee +++ b/src/theme-manager.coffee @@ -107,7 +107,7 @@ class ThemeManager getLoadedThemes: -> pack for pack in @packageManager.getLoadedPackages() when pack.isTheme() - activatePackages: (themePackages) -> @activateThemes() + activatePackages: -> @activateThemes() # Get the enabled theme names from the config. # From dc5eb95a39e1d78e22917d2d8bf2d75e81721858 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 15:19:49 -0700 Subject: [PATCH 20/82] Wait for initial stylesheet load to complete Instead of measuring on each stylesheet load at startup, wait for the initial load of all the stylesheets to complete and then do the necessary measurments. --- src/editor-component.coffee | 3 +++ src/theme-manager.coffee | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index b5216b2bd..723c8f498 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -179,6 +179,8 @@ EditorComponent = React.createClass @subscribe atom.themes.onDidAddStylesheet @onStylesheetsChanged @subscribe atom.themes.onDidUpdateStylesheet @onStylesheetsChanged @subscribe atom.themes.onDidRemoveStylesheet @onStylesheetsChanged + unless atom.themes.isInitialLoadComplete() + @subscribe atom.themes.onDidReloadAll @onStylesheetsChanged @subscribe scrollbarStyle.changes, @refreshScrollbars @domPollingIntervalId = setInterval(@pollDOM, @domPollingInterval) @@ -708,6 +710,7 @@ EditorComponent = React.createClass onStylesheetsChanged: (stylesheet) -> return unless @performedInitialMeasurement + return unless atom.themes.isInitialLoadComplete() @refreshScrollbars() if @containsScrollbarSelector(stylesheet) @sampleFontStyling() diff --git a/src/theme-manager.coffee b/src/theme-manager.coffee index ac76e8ea0..23c630043 100644 --- a/src/theme-manager.coffee +++ b/src/theme-manager.coffee @@ -20,6 +20,7 @@ class ThemeManager constructor: ({@packageManager, @resourcePath, @configDirPath, @safeMode}) -> @emitter = new Emitter @lessCache = null + @initialLoadComplete = false @packageManager.registerPackageActivator(this, ['theme']) ### @@ -165,6 +166,7 @@ class ThemeManager @refreshLessCache() # Update cache again now that @getActiveThemes() is populated @loadUserStylesheet() @reloadBaseStylesheets() + @initialLoadComplete = true @emit 'reloaded' @emitter.emit 'did-reload-all' deferred.resolve() @@ -177,6 +179,8 @@ class ThemeManager @packageManager.deactivatePackage(pack.name) for pack in @getActiveThemes() null + isInitialLoadComplete: -> @initialLoadComplete + addActiveThemeClasses: -> for pack in @getActiveThemes() atom.workspaceView?[0]?.classList.add("theme-#{pack.name}") From 4a1f048d52e3593e664807790350ecb8b01e2b34 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 15:44:30 -0700 Subject: [PATCH 21/82] Refresh scrollbars when no stylesheet is specified --- src/editor-component.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 723c8f498..47aa320b0 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -712,7 +712,7 @@ EditorComponent = React.createClass return unless @performedInitialMeasurement return unless atom.themes.isInitialLoadComplete() - @refreshScrollbars() if @containsScrollbarSelector(stylesheet) + @refreshScrollbars() if not stylesheet or @containsScrollbarSelector(stylesheet) @sampleFontStyling() @sampleBackgroundColors() @remeasureCharacterWidths() From e6252546c4aba6a08450fdc870f27d641693daf7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 15:49:44 -0700 Subject: [PATCH 22/82] Set initialLoadComplete to true in specs --- spec/spec-helper.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 4bad73ee7..530367518 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -21,6 +21,7 @@ clipboard = require 'clipboard' atom.themes.loadBaseStylesheets() atom.themes.requireStylesheet '../static/jasmine' +atom.themes.initialLoadComplete = true fixturePackagesPath = path.resolve(__dirname, './fixtures/packages') atom.packages.packageDirPaths.unshift(fixturePackagesPath) From c161e93b9674dba476a5b5ed6927fdc1cc2381ae Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 16:08:04 -0700 Subject: [PATCH 23/82] :lipstick: Add ? --- src/editor-component.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 47aa320b0..e190776e7 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -712,7 +712,7 @@ EditorComponent = React.createClass return unless @performedInitialMeasurement return unless atom.themes.isInitialLoadComplete() - @refreshScrollbars() if not stylesheet or @containsScrollbarSelector(stylesheet) + @refreshScrollbars() if not stylesheet? or @containsScrollbarSelector(stylesheet) @sampleFontStyling() @sampleBackgroundColors() @remeasureCharacterWidths() From 24d1a45fd9d843936fb9f1a4782f271e0075ec39 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 16:29:34 -0700 Subject: [PATCH 24/82] Upgrade to pathwather with better doc organization --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1d3858e6c..4acaa9b13 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "nslog": "^1.0.1", "oniguruma": "^3.0.4", "optimist": "0.4.0", - "pathwatcher": "^2.1.1", + "pathwatcher": "^2.1.2", "property-accessors": "^1", "q": "^1.0.1", "random-words": "0.0.1", From 137b926f54712e25f189ed275f18e5add3d339cc Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 17:15:22 -0700 Subject: [PATCH 25/82] Upgrade to archive-view@0.37 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4acaa9b13..8b0bffb5f 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "base16-tomorrow-light-theme": "0.4.0", "solarized-dark-syntax": "0.22.0", "solarized-light-syntax": "0.12.0", - "archive-view": "0.36.0", + "archive-view": "0.37.0", "autocomplete": "0.32.0", "autoflow": "0.18.0", "autosave": "0.17.0", From 9a534f0b6dcd62a4b68ca1b62cd530cc32b2a631 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 17:35:07 -0700 Subject: [PATCH 26/82] Upgrade to tree-view@0.116 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b0bffb5f..1e7efb6e4 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.115.0", + "tree-view": "0.116.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From 8847b35931b826ffb386e16854c3073964433bf8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 18:11:16 -0700 Subject: [PATCH 27/82] Upgrade to tree-view@0.117 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e7efb6e4..4ea35c0c0 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.116.0", + "tree-view": "0.117.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From d0033b2d4037a17f5581175b1d9a4250d26c2eb6 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 18:23:12 -0700 Subject: [PATCH 28/82] Upgrade tello for bugfix --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index e77040261..422a48693 100644 --- a/build/package.json +++ b/build/package.json @@ -8,7 +8,7 @@ "dependencies": { "async": "~0.2.9", "donna": "1.0.1", - "tello": "1.0.2", + "tello": "1.0.3", "formidable": "~1.0.14", "fs-plus": "2.x", "github-releases": "~0.2.0", From 0643aa66c9ed7f0083084bfa43f5f99c751c545e Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 11 Sep 2014 18:23:31 -0700 Subject: [PATCH 29/82] Upgrade atom-keymap for new docs organization --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ea35c0c0..4079b1486 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "atomShellVersion": "0.16.2", "dependencies": { "async": "0.2.6", - "atom-keymap": "^2.1.0", + "atom-keymap": "^2.1.1", "bootstrap": "git+https://github.com/atom/bootstrap.git#6af81906189f1747fd6c93479e3d998ebe041372", "clear-cut": "0.4.0", "coffee-script": "1.7.0", From 8cffb8006a327f0242823d07841868b9915ffc87 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 11 Sep 2014 21:41:15 -0700 Subject: [PATCH 30/82] Upgrade to language-gfm@0.49 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4079b1486..a38a24d82 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "language-c": "0.28.0", "language-coffee-script": "0.30.0", "language-css": "0.17.0", - "language-gfm": "0.48.0", + "language-gfm": "0.49.0", "language-git": "0.9.0", "language-go": "0.17.0", "language-html": "0.26.0", From 901ba725578fb0fb30dcd0758084db8779e2f02e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 12 Sep 2014 21:43:01 +0800 Subject: [PATCH 31/82] Show the open dialog as child window on Windows and Linux. On Mac the open dialog is still showed as independent dialog, this matches most native apps' behavior. Fixes #3401. --- src/browser/atom-application.coffee | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 1011a660b..7460952a1 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -484,6 +484,14 @@ class AtomApplication when 'all' then ['openFile', 'openDirectory'] else throw new Error("#{type} is an invalid type for promptForPath") + # Show the open dialog as child window on Windows and Linux, and as + # independent dialog on OS X. This matches most native apps. + parentWindow = + if process.platform is 'darwin' + null + else + BrowserWindow.getFocusedWindow() + dialog = require 'dialog' - dialog.showOpenDialog title: 'Open', properties: properties.concat(['multiSelections', 'createDirectory']), (pathsToOpen) => + dialog.showOpenDialog parentWindow, title: 'Open', properties: properties.concat(['multiSelections', 'createDirectory']), (pathsToOpen) => @openPaths({pathsToOpen, devMode, safeMode, window}) From 61e01c39848dc03f12a1e179832ba0d400e094c6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 09:11:42 -0700 Subject: [PATCH 32/82] Upgrade to language-ruby@0.37 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a38a24d82..c153de4cb 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "language-php": "0.15.0", "language-property-list": "0.7.0", "language-python": "0.19.0", - "language-ruby": "0.36.0", + "language-ruby": "0.37.0", "language-ruby-on-rails": "0.18.0", "language-sass": "0.21.0", "language-shellscript": "0.8.0", From ceb48b7f4fc0126cad881ace597d140c4d48189a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 09:51:01 -0700 Subject: [PATCH 33/82] Upgrade to tree-view@0.118 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c153de4cb..a8fcb0607 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.117.0", + "tree-view": "0.118.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From ee8b01e46a2b41de5d4e71d69920599da960b760 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 10:10:04 -0700 Subject: [PATCH 34/82] Upgrade to find-and-replace@0.135 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8fcb0607..b95694c34 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "dev-live-reload": "0.34.0", "exception-reporting": "0.20.0", "feedback": "0.33.0", - "find-and-replace": "0.134.0", + "find-and-replace": "0.135.0", "fuzzy-finder": "0.58.0", "git-diff": "0.39.0", "go-to-line": "0.25.0", From 050a79e5b9dba35f09146fd4013439e62f04e30c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 10:29:01 -0700 Subject: [PATCH 35/82] Upgrade to find-and-replace@0.136 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b95694c34..3357d9d95 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "dev-live-reload": "0.34.0", "exception-reporting": "0.20.0", "feedback": "0.33.0", - "find-and-replace": "0.135.0", + "find-and-replace": "0.136.0", "fuzzy-finder": "0.58.0", "git-diff": "0.39.0", "go-to-line": "0.25.0", From c24bf5bd0cbe5b73b1b660d8a90ae969b83936c4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 10:34:59 -0700 Subject: [PATCH 36/82] Upgrade to find-and-replace@0.137 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3357d9d95..d20b25bf9 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "dev-live-reload": "0.34.0", "exception-reporting": "0.20.0", "feedback": "0.33.0", - "find-and-replace": "0.136.0", + "find-and-replace": "0.137.0", "fuzzy-finder": "0.58.0", "git-diff": "0.39.0", "go-to-line": "0.25.0", From 591d9068d8b4bea2fafbaa8e914354904c92eeb3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 10:43:15 -0700 Subject: [PATCH 37/82] Upgrade to tree-view@0.119 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d20b25bf9..453ffea85 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.118.0", + "tree-view": "0.119.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From 7c1cab77895850df7ca5e93423fc5288ad797235 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 12 Sep 2014 10:49:45 -0700 Subject: [PATCH 38/82] =?UTF-8?q?Don=E2=80=99t=20recurse=20into=20dependen?= =?UTF-8?q?cies=20of=20dependencies.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We always want the top level module! --- build/tasks/docs-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/docs-task.coffee b/build/tasks/docs-task.coffee index 605269933..75e21de8a 100644 --- a/build/tasks/docs-task.coffee +++ b/build/tasks/docs-task.coffee @@ -11,6 +11,7 @@ module.exports = (grunt) -> modulesPath = path.resolve(__dirname, '..', '..', 'node_modules') classes = {} fs.traverseTreeSync modulesPath, (modulePath) -> + return false if modulePath.match(/node_modules/g).length > 1 # dont need the dependencies of the dependencies return true unless path.basename(modulePath) is 'package.json' return true unless fs.isFileSync(modulePath) From 1c57a8b0cd1d4c90a30566d63cd8b117fb810a47 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 12 Sep 2014 11:19:37 -0700 Subject: [PATCH 39/82] Update event-kit with better organization in docs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 453ffea85..67e0a5e4f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "coffeestack": "0.7.0", "delegato": "^1", "emissary": "^1.3.1", - "event-kit": "0.7.1", + "event-kit": "0.7.2", "first-mate": "^2.1.1", "fs-plus": "^2.2.6", "fstream": "0.1.24", From a060eff478ffd8a0d0784501eecb33a49846089c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:22:55 -0700 Subject: [PATCH 40/82] Use skinny arrows --- src/workspace-view.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/workspace-view.coffee b/src/workspace-view.coffee index 0398b42b4..458d6d311 100644 --- a/src/workspace-view.coffee +++ b/src/workspace-view.coffee @@ -372,13 +372,13 @@ class WorkspaceView extends View beforeRemove: -> @model.destroy() - setEditorFontSize: (fontSize) => + setEditorFontSize: (fontSize) -> atom.themes.updateGlobalEditorStyle('font-size', fontSize + 'px') - setEditorFontFamily: (fontFamily) => + setEditorFontFamily: (fontFamily) -> atom.themes.updateGlobalEditorStyle('font-family', fontFamily) - setEditorLineHeight: (lineHeight) => + setEditorLineHeight: (lineHeight) -> atom.themes.updateGlobalEditorStyle('line-height', lineHeight) # Deprecated From f14ad9955837aea8b9cb87962e57559dab361bb5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 3 Sep 2014 15:23:23 -0700 Subject: [PATCH 41/82] Remove linux check --- script/cibuild | 3 --- 1 file changed, 3 deletions(-) diff --git a/script/cibuild b/script/cibuild index 6e76d8831..6134f6a9b 100755 --- a/script/cibuild +++ b/script/cibuild @@ -5,9 +5,6 @@ var path = require('path'); process.chdir(path.dirname(__dirname)); -if (process.platform == 'linux') - throw new Error('cibuild can not run on linux yet!'); - var homeDir = process.platform == 'win32' ? process.env.USERPROFILE : process.env.HOME; function loadEnvironmentVariables(filePath) { From 04cc11fa8193d6c8e0897aebadb30fd7fb207984 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 3 Sep 2014 15:23:52 -0700 Subject: [PATCH 42/82] Don't read env var files on Linux --- script/cibuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/cibuild b/script/cibuild index 6134f6a9b..863478ec1 100755 --- a/script/cibuild +++ b/script/cibuild @@ -24,7 +24,7 @@ function loadEnvironmentVariables(filePath) { function readEnvironmentVariables() { if (process.platform === 'win32') loadEnvironmentVariables(path.resolve('/jenkins/config/atomcredentials')); - else { + else if (process.platform === 'darwin') { loadEnvironmentVariables('/var/lib/jenkins/config/atomcredentials'); loadEnvironmentVariables('/var/lib/jenkins/config/xcodekeychain'); } From c72ce458202fb8f967353452c554db1bf25ea162 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 3 Sep 2014 15:50:16 -0700 Subject: [PATCH 43/82] Log installed node version --- script/utils/verify-requirements.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/utils/verify-requirements.js b/script/utils/verify-requirements.js index fa65a339e..554c27dd0 100644 --- a/script/utils/verify-requirements.js +++ b/script/utils/verify-requirements.js @@ -31,7 +31,7 @@ function verifyNode(cb) { var nodeMajorVersion = +versionArray[0]; var nodeMinorVersion = +versionArray[1]; if (nodeMajorVersion === 0 && nodeMinorVersion < 10) { - error = "node v0.10 is required to build Atom."; + error = "node v0.10 is required to build Atom, node " + nodeVersion + " is installed."; cb(error); } else { From 68e11fed111b2367d36da5dad47b840fa378d290 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 4 Sep 2014 12:57:33 -0700 Subject: [PATCH 44/82] Add .node-version file with 0.10.21 --- .node-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .node-version diff --git a/.node-version b/.node-version new file mode 100644 index 000000000..4e9918e86 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +v0.10.21 From e060d0b5620ebdf340b73502d3e64255c4959e30 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 4 Sep 2014 13:25:28 -0700 Subject: [PATCH 45/82] Add initial Linux CI build script --- script/cibuild-atom-linux | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 script/cibuild-atom-linux diff --git a/script/cibuild-atom-linux b/script/cibuild-atom-linux new file mode 100755 index 000000000..6d5277eac --- /dev/null +++ b/script/cibuild-atom-linux @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +if [ -d /usr/local/share/nodenv ]; then + export NODENV_ROOT=/usr/local/share/nodenv + export PATH=/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:$PATH + export NODENV_VERSION="v0.10.21" +fi + +script/cibuild From 735d1a912e3f1b14f6e6277a534e4f5b0d528ce3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 4 Sep 2014 13:26:34 -0700 Subject: [PATCH 46/82] Log debug output --- script/cibuild-atom-linux | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/cibuild-atom-linux b/script/cibuild-atom-linux index 6d5277eac..0bc37e2de 100755 --- a/script/cibuild-atom-linux +++ b/script/cibuild-atom-linux @@ -2,6 +2,8 @@ set -e +echo "HERE?" + if [ -d /usr/local/share/nodenv ]; then export NODENV_ROOT=/usr/local/share/nodenv export PATH=/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:$PATH From a1e177c7dcb4432a178125f7e8b03bf977fc9a1b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:01:23 -0700 Subject: [PATCH 47/82] Set ATOM_ACCESS_TOKEN --- script/cibuild-atom-linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/cibuild-atom-linux b/script/cibuild-atom-linux index 0bc37e2de..c4e957189 100755 --- a/script/cibuild-atom-linux +++ b/script/cibuild-atom-linux @@ -2,7 +2,7 @@ set -e -echo "HERE?" +export ATOM_ACCESS_TOKEN=$BUILD_ATOM_LINUX_ACCESS_TOKEN if [ -d /usr/local/share/nodenv ]; then export NODENV_ROOT=/usr/local/share/nodenv From 24206d45a7461ac68a884bb46a4fafe4a0a2ed4a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:04:37 -0700 Subject: [PATCH 48/82] Run mkdeb task on Linux CI --- build/Gruntfile.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index a014dc3c9..00fd904c7 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -230,6 +230,7 @@ module.exports = (grunt) -> ciTasks = ['output-disk-space', 'download-atom-shell', 'build'] ciTasks.push('dump-symbols') unless process.platform is 'win32' + ciTasks.push('mkdeb') if process.platform is 'linux' ciTasks.push('set-version', 'check-licenses', 'lint', 'test', 'codesign', 'publish-build') grunt.registerTask('ci', ciTasks) From 9717d973a78b50724326bbc010f6720f842f3f90 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:12:10 -0700 Subject: [PATCH 49/82] Upload .deb asset during publish --- build/tasks/publish-build-task.coffee | 29 +++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index 69ba1b20b..7e9803605 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -20,7 +20,7 @@ module.exports = (gruntObject) -> {cp} = require('./task-helpers')(grunt) grunt.registerTask 'publish-build', 'Publish the built app', -> - return if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH isnt 'master' + return if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH isnt 'ks-add-debian-asset' tasks = ['upload-assets'] tasks.unshift('build-docs', 'prepare-docs') if process.platform is 'darwin' grunt.task.run(tasks) @@ -45,16 +45,23 @@ module.exports = (gruntObject) -> uploadAssets(release, buildDir, assets, done) getAssets = -> - if process.platform is 'darwin' - [ - {assetName: 'atom-mac.zip', sourcePath: 'Atom.app'} - {assetName: 'atom-mac-symbols.zip', sourcePath: 'Atom.breakpad.syms'} - {assetName: 'atom-api.json', sourcePath: 'atom-api.json'} - ] - else - [ - {assetName: 'atom-windows.zip', sourcePath: 'Atom'} - ] + switch process.platform + when 'darwin' + [ + {assetName: 'atom-mac.zip', sourcePath: 'Atom.app'} + {assetName: 'atom-mac-symbols.zip', sourcePath: 'Atom.breakpad.syms'} + {assetName: 'atom-api.json', sourcePath: 'atom-api.json'} + ] + when 'win32' + [ + {assetName: 'atom-windows.zip', sourcePath: 'Atom'} + ] + when 'linux' + buildDir = grunt.config.get('atom.buildDir') + debAsset = fs.listSync(buildDir, '.deb')[0] + [ + {assetName: path.basename(debAsset), sourcePath: debAsset} + ] logError = (message, error, details) -> grunt.log.error(message) From dc0bdef36c117ed744b845dfba7f344ec5a85a0c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:14:08 -0700 Subject: [PATCH 50/82] Don't run specs on Linux CI for now --- build/Gruntfile.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 00fd904c7..c1ba7a2d7 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -227,11 +227,12 @@ module.exports = (grunt) -> grunt.registerTask('test', ['shell:kill-atom', 'run-specs']) grunt.registerTask('docs', ['markdown:guides', 'build-docs']) - ciTasks = ['output-disk-space', 'download-atom-shell', 'build'] - ciTasks.push('dump-symbols') unless process.platform is 'win32' + ciTasks.push('dump-symbols') if process.platform isnt 'win32' ciTasks.push('mkdeb') if process.platform is 'linux' ciTasks.push('set-version', 'check-licenses', 'lint', 'test', 'codesign', 'publish-build') + ciTasks.push('test') if process.platform isnt 'linux' + ciTasks.push('codesign', 'publish-build') grunt.registerTask('ci', ciTasks) defaultTasks = ['download-atom-shell', 'build', 'set-version'] From 38eda4ca14a4dc44b703739253b3d4694bb213ef Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:24:44 -0700 Subject: [PATCH 51/82] Remove duplidate tasks in CI tasks array --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index c1ba7a2d7..7e70d9753 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -230,7 +230,7 @@ module.exports = (grunt) -> ciTasks = ['output-disk-space', 'download-atom-shell', 'build'] ciTasks.push('dump-symbols') if process.platform isnt 'win32' ciTasks.push('mkdeb') if process.platform is 'linux' - ciTasks.push('set-version', 'check-licenses', 'lint', 'test', 'codesign', 'publish-build') + ciTasks.push('set-version', 'check-licenses', 'lint') ciTasks.push('test') if process.platform isnt 'linux' ciTasks.push('codesign', 'publish-build') grunt.registerTask('ci', ciTasks) From e00ff30cd74f9d04d49512b39fe4b5963b139bcb Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:40:33 -0700 Subject: [PATCH 52/82] Extensions should be an array --- build/tasks/publish-build-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index 7e9803605..85a5ee3c6 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -58,7 +58,7 @@ getAssets = -> ] when 'linux' buildDir = grunt.config.get('atom.buildDir') - debAsset = fs.listSync(buildDir, '.deb')[0] + debAsset = fs.listSync(buildDir, ['.deb'])[0] [ {assetName: path.basename(debAsset), sourcePath: debAsset} ] From 3a2c155afc84d8bdcf2a90e2eede5908ef0ab7f1 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 11:45:08 -0700 Subject: [PATCH 53/82] Log token --- script/cibuild-atom-linux | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/cibuild-atom-linux b/script/cibuild-atom-linux index c4e957189..4d33f3d8d 100755 --- a/script/cibuild-atom-linux +++ b/script/cibuild-atom-linux @@ -2,6 +2,10 @@ set -e +echo "the" +echo $BUILD_ATOM_LINUX_ACCESS_TOKEN +echo "token" + export ATOM_ACCESS_TOKEN=$BUILD_ATOM_LINUX_ACCESS_TOKEN if [ -d /usr/local/share/nodenv ]; then From 8dcd45440124cc3fdd67015c60581d610647a1fa Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 12:02:23 -0700 Subject: [PATCH 54/82] Remove token logging --- script/cibuild-atom-linux | 4 ---- 1 file changed, 4 deletions(-) diff --git a/script/cibuild-atom-linux b/script/cibuild-atom-linux index 4d33f3d8d..c4e957189 100755 --- a/script/cibuild-atom-linux +++ b/script/cibuild-atom-linux @@ -2,10 +2,6 @@ set -e -echo "the" -echo $BUILD_ATOM_LINUX_ACCESS_TOKEN -echo "token" - export ATOM_ACCESS_TOKEN=$BUILD_ATOM_LINUX_ACCESS_TOKEN if [ -d /usr/local/share/nodenv ]; then From bf76a3f1e785c43dcf4ebbcd9a28d639db3d5e3a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 12:07:30 -0700 Subject: [PATCH 55/82] Only publish on Linux for now --- build/tasks/publish-build-task.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index 85a5ee3c6..077588621 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -20,6 +20,7 @@ module.exports = (gruntObject) -> {cp} = require('./task-helpers')(grunt) grunt.registerTask 'publish-build', 'Publish the built app', -> + return unless process.platform is 'linux' return if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH isnt 'ks-add-debian-asset' tasks = ['upload-assets'] tasks.unshift('build-docs', 'prepare-docs') if process.platform is 'darwin' From b1a6772105dc97e80f64912919b30e9aab521a32 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 12:34:51 -0700 Subject: [PATCH 56/82] Don't include version in .deb asset name --- build/tasks/publish-build-task.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index 077588621..9660e797d 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -59,9 +59,13 @@ getAssets = -> ] when 'linux' buildDir = grunt.config.get('atom.buildDir') + if process.arch is 'ia32' + arch = 'i386' + else + arch = 'amd64' debAsset = fs.listSync(buildDir, ['.deb'])[0] [ - {assetName: path.basename(debAsset), sourcePath: debAsset} + {assetName: "atom-#{arch}.deb", sourcePath: debAsset} ] logError = (message, error, details) -> From 1bfda1fc6123d2ba438c2e896364117ee3c325a7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 12:52:36 -0700 Subject: [PATCH 57/82] Copy .deb file to proper upload path --- build/tasks/publish-build-task.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index 9660e797d..d5f1284c0 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -29,7 +29,7 @@ module.exports = (gruntObject) -> grunt.registerTask 'prepare-docs', 'Move api.json to atom-api.json', -> docsOutputDir = grunt.config.get('docsOutputDir') buildDir = grunt.config.get('atom.buildDir') - cp path.join(docsOutputDir, 'api.json'), path.join(buildDir, 'atom-api.json') + cp path.join(docsOutputDir, 'api.json'), path.join(buildDir, 'atom-api.json') grunt.registerTask 'upload-assets', 'Upload the assets to a GitHub release', -> done = @async() @@ -59,13 +59,15 @@ getAssets = -> ] when 'linux' buildDir = grunt.config.get('atom.buildDir') + sourcePath = fs.listSync(buildDir, ['.deb'])[0] if process.arch is 'ia32' arch = 'i386' else arch = 'amd64' - debAsset = fs.listSync(buildDir, ['.deb'])[0] + assetName = "atom-#{arch}.deb" + cp sourcePath, path.join(buildDir, assetName) [ - {assetName: "atom-#{arch}.deb", sourcePath: debAsset} + {assetName, sourcePath} ] logError = (message, error, details) -> From 97e7d24f43997c5f5b5c7ceac8eddf5d0f0a6aa8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 13:21:11 -0700 Subject: [PATCH 58/82] Add missing task helpers require --- build/tasks/publish-build-task.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index d5f1284c0..db7e95c98 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -60,12 +60,15 @@ getAssets = -> when 'linux' buildDir = grunt.config.get('atom.buildDir') sourcePath = fs.listSync(buildDir, ['.deb'])[0] - if process.arch is 'ia32' + if process.arch is 'ia32g' arch = 'i386' else arch = 'amd64' assetName = "atom-#{arch}.deb" + + {cp} = require('./task-helpers')(grunt) cp sourcePath, path.join(buildDir, assetName) + [ {assetName, sourcePath} ] From 6d1d6de8ffb4ae8503f8abb737c2f19f9f39dd7d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 13:28:10 -0700 Subject: [PATCH 59/82] Restore only uploading from master --- build/tasks/publish-build-task.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index db7e95c98..b1d8a5802 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -20,8 +20,7 @@ module.exports = (gruntObject) -> {cp} = require('./task-helpers')(grunt) grunt.registerTask 'publish-build', 'Publish the built app', -> - return unless process.platform is 'linux' - return if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH isnt 'ks-add-debian-asset' + return if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH isnt 'master' tasks = ['upload-assets'] tasks.unshift('build-docs', 'prepare-docs') if process.platform is 'darwin' grunt.task.run(tasks) From 54c1dd5225ccf37be1b0af03c76218440091d08e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 12 Sep 2014 15:10:04 -0700 Subject: [PATCH 60/82] Upgrade to language-php@0.16 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 67e0a5e4f..2cbfc8ecf 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "language-mustache": "0.10.0", "language-objective-c": "0.11.0", "language-perl": "0.9.0", - "language-php": "0.15.0", + "language-php": "0.16.0", "language-property-list": "0.7.0", "language-python": "0.19.0", "language-ruby": "0.37.0", From ca8153b56b72dfa59542856939514707ad2358c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bengt=20L=C3=BCers?= Date: Sun, 14 Sep 2014 15:15:52 +0200 Subject: [PATCH 61/82] Elaborate getting a current working copy. The `git checkout` step from #3098 got removed by some merge, so here it is again. --- docs/build-instructions/linux.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/build-instructions/linux.md b/docs/build-instructions/linux.md index e5d54069e..a2715184c 100644 --- a/docs/build-instructions/linux.md +++ b/docs/build-instructions/linux.md @@ -33,8 +33,28 @@ Ubuntu LTS 12.04 64-bit is the recommended platform. If you have problems with permissions don't forget to prefix with `sudo` -From the cloned repository directory: + 0. Get a current working copy: + If you have not done so before, clone the repository to a local directory. + + ```sh + git clone https://github.com/atom/atom + cd atom + ``` + + If you cloned the repository before, update your clone to the remote. + + ```sh + cd atom + git fetch + ``` + + In any case, check out the latest tag: + + ```sh + git checkout $(git describe --tags `git rev-list --tags --max-count=1`) + ``` + 1. Build: ```sh From f872583c81a422a639d140ef8a75c8e503d6c54c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Sun, 14 Sep 2014 09:37:26 -0700 Subject: [PATCH 62/82] Upgrade to tree-view@0.120 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2cbfc8ecf..abe1dcde7 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.119.0", + "tree-view": "0.120.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From 10762d6440614f66634129ab0e64a9a6f2eb82c0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 08:21:19 -0700 Subject: [PATCH 63/82] Upgrade to language-gfm@0.50 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index abe1dcde7..5a0df9a59 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "language-c": "0.28.0", "language-coffee-script": "0.30.0", "language-css": "0.17.0", - "language-gfm": "0.49.0", + "language-gfm": "0.50.0", "language-git": "0.9.0", "language-go": "0.17.0", "language-html": "0.26.0", From 8c2bcf39431133da43f365df46c4ddd4099f0e40 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 08:34:21 -0700 Subject: [PATCH 64/82] Catch and log deactivate errors Closes #3538 --- spec/atom-spec.coffee | 12 +++++++++++- .../package-that-throws-on-deactivate/index.coffee | 4 ++++ src/package.coffee | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 spec/fixtures/packages/package-that-throws-on-deactivate/index.coffee diff --git a/spec/atom-spec.coffee b/spec/atom-spec.coffee index d1c7ef6df..7b1ae1618 100644 --- a/spec/atom-spec.coffee +++ b/spec/atom-spec.coffee @@ -350,7 +350,7 @@ describe "the `atom` global", -> atom.packages.deactivatePackage("package-that-throws-on-activate") expect(badPack.mainModule.serialize).not.toHaveBeenCalled() - it "absorbs exceptions that are thrown by the package module's serialize methods", -> + it "absorbs exceptions that are thrown by the package module's serialize method", -> spyOn(console, 'error') waitsForPromise -> @@ -365,6 +365,16 @@ describe "the `atom` global", -> expect(atom.packages.packageStates['package-with-serialization']).toEqual someNumber: 1 expect(console.error).toHaveBeenCalled() + it "absorbs exceptions that are thrown by the package module's deactivate method", -> + spyOn(console, 'error') + + waitsForPromise -> + atom.packages.activatePackage("package-that-throws-on-deactivate") + + runs -> + expect(-> atom.packages.deactivatePackage("package-that-throws-on-deactivate")).not.toThrow() + expect(console.error).toHaveBeenCalled() + it "removes the package's grammars", -> waitsForPromise -> atom.packages.activatePackage('package-with-grammars') diff --git a/spec/fixtures/packages/package-that-throws-on-deactivate/index.coffee b/spec/fixtures/packages/package-that-throws-on-deactivate/index.coffee new file mode 100644 index 000000000..5def0ed2d --- /dev/null +++ b/spec/fixtures/packages/package-that-throws-on-deactivate/index.coffee @@ -0,0 +1,4 @@ +module.exports = + activate: -> + deactivate: -> throw new Error('Top that') + serialize: -> diff --git a/src/package.coffee b/src/package.coffee index 6a104eccb..c005ae664 100644 --- a/src/package.coffee +++ b/src/package.coffee @@ -273,7 +273,11 @@ class Package @unsubscribeFromActivationEvents() @deactivateResources() @deactivateConfig() - @mainModule?.deactivate?() if @mainActivated + if @mainActivated + try + @mainModule?.deactivate?() + catch e + console.error "Error deactivating package '#{@name}'", e.stack @emit 'deactivated' @emitter.emit 'did-deactivate' From cea7d89129034f42f47c1e23379d1957168f2a83 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 08:50:16 -0700 Subject: [PATCH 65/82] :memo: :penguin: Tweak Linux instructions --- docs/build-instructions/linux.md | 35 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/docs/build-instructions/linux.md b/docs/build-instructions/linux.md index a2715184c..7380d2a1d 100644 --- a/docs/build-instructions/linux.md +++ b/docs/build-instructions/linux.md @@ -33,46 +33,41 @@ Ubuntu LTS 12.04 64-bit is the recommended platform. If you have problems with permissions don't forget to prefix with `sudo` - 0. Get a current working copy: + 1. Clone the Atom repository: - If you have not done so before, clone the repository to a local directory. - ```sh git clone https://github.com/atom/atom cd atom ``` - - If you cloned the repository before, update your clone to the remote. - + + 2. Checkout the latest Atom release: + ```sh - cd atom git fetch - ``` - - In any case, check out the latest tag: - - ```sh git checkout $(git describe --tags `git rev-list --tags --max-count=1`) ``` - - 1. Build: + + 3. Build Atom: ```sh - $ script/build + script/build ``` + This will create the atom application at `$TMPDIR/atom-build/Atom`. - 2. Install the `atom` and `apm` commands to `/usr/local/bin` by executing: + + 4. Install the `atom` and `apm` commands to `/usr/local/bin` by executing: ```sh - $ sudo script/grunt install + sudo script/grunt install ``` - 3. *Optionally*, you may generate a `.deb` package at `$TMPDIR/atom-build`: + + 5. *Optionally*, you may generate a `.deb` package at `$TMPDIR/atom-build`: ```sh - $ script/grunt mkdeb + script/grunt mkdeb ``` -Use the newly installed atom by restarting any running atom instances. +Use the newly installed Atom by fully quitting Atom and then reopening. ## Advanced Options From 863362ffeddf681ce2058acd556a5993da4d2fc8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 08:51:10 -0700 Subject: [PATCH 66/82] :memo: Outdent ordered list --- docs/build-instructions/linux.md | 46 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/build-instructions/linux.md b/docs/build-instructions/linux.md index 7380d2a1d..6230f9b96 100644 --- a/docs/build-instructions/linux.md +++ b/docs/build-instructions/linux.md @@ -33,39 +33,39 @@ Ubuntu LTS 12.04 64-bit is the recommended platform. If you have problems with permissions don't forget to prefix with `sudo` - 1. Clone the Atom repository: +1. Clone the Atom repository: - ```sh - git clone https://github.com/atom/atom - cd atom - ``` + ```sh + git clone https://github.com/atom/atom + cd atom + ``` - 2. Checkout the latest Atom release: +2. Checkout the latest Atom release: - ```sh - git fetch - git checkout $(git describe --tags `git rev-list --tags --max-count=1`) - ``` + ```sh + git fetch + git checkout $(git describe --tags `git rev-list --tags --max-count=1`) + ``` - 3. Build Atom: +3. Build Atom: - ```sh - script/build - ``` + ```sh + script/build + ``` - This will create the atom application at `$TMPDIR/atom-build/Atom`. + This will create the atom application at `$TMPDIR/atom-build/Atom`. - 4. Install the `atom` and `apm` commands to `/usr/local/bin` by executing: +4. Install the `atom` and `apm` commands to `/usr/local/bin` by executing: - ```sh - sudo script/grunt install - ``` + ```sh + sudo script/grunt install + ``` - 5. *Optionally*, you may generate a `.deb` package at `$TMPDIR/atom-build`: +5. *Optionally*, you may generate a `.deb` package at `$TMPDIR/atom-build`: - ```sh - script/grunt mkdeb - ``` + ```sh + script/grunt mkdeb + ``` Use the newly installed Atom by fully quitting Atom and then reopening. From 6ee82d493724dd8aa67d32a4af58f5e1872b5f85 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 10:56:01 -0700 Subject: [PATCH 67/82] Upgrade to tree-view@0.121 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a0df9a59..748841dc7 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.120.0", + "tree-view": "0.121.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From 5e5235767432946aa6daa36c2036f3835e2dba78 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 11:05:39 -0700 Subject: [PATCH 68/82] Upgrade to markdown-preview@0.102 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 748841dc7..70ecd6dc0 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "incompatible-packages": "0.9.0", "keybinding-resolver": "0.19.0", "link": "0.25.0", - "markdown-preview": "0.101.0", + "markdown-preview": "0.102.0", "metrics": "0.34.0", "open-on-github": "0.30.0", "package-generator": "0.31.0", From 7d61330b9f21318a2a7deeed76512ee0ac89e54f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 11:07:49 -0700 Subject: [PATCH 69/82] Upgrade to tree-view@0.122 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70ecd6dc0..1698bed25 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.121.0", + "tree-view": "0.122.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From 17a62564838b181320b1bd3dedc64334f162d97f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 11:10:35 -0700 Subject: [PATCH 70/82] Upgrade to find-and-replace@0.138 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1698bed25..3c02d8685 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "dev-live-reload": "0.34.0", "exception-reporting": "0.20.0", "feedback": "0.33.0", - "find-and-replace": "0.137.0", + "find-and-replace": "0.138.0", "fuzzy-finder": "0.58.0", "git-diff": "0.39.0", "go-to-line": "0.25.0", From 274a36e2636a676af77b9a682128c75f40dfc3bb Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 15 Sep 2014 11:18:51 -0700 Subject: [PATCH 71/82] Upgrade UI themes to fix tabs --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3c02d8685..1ac4fb703 100644 --- a/package.json +++ b/package.json @@ -64,9 +64,9 @@ }, "packageDependencies": { "atom-dark-syntax": "0.19.0", - "atom-dark-ui": "0.34.0", + "atom-dark-ui": "0.35.0", "atom-light-syntax": "0.20.0", - "atom-light-ui": "0.29.0", + "atom-light-ui": "0.30.0", "base16-tomorrow-dark-theme": "0.21.0", "base16-tomorrow-light-theme": "0.4.0", "solarized-dark-syntax": "0.22.0", From 804f290cd3e2b65b809076afb9fe7546e081d135 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 12:57:53 -0700 Subject: [PATCH 72/82] Memoize comment scope selector --- src/editor.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor.coffee b/src/editor.coffee index 92af3ed11..9084a5b06 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -1365,7 +1365,8 @@ class Editor extends Model isBufferRowCommented: (bufferRow) -> if match = @lineTextForBufferRow(bufferRow).match(/\S/) scopes = @tokenForBufferPosition([bufferRow, match.index]).scopes - new TextMateScopeSelector('comment.*').matches(scopes) + @commentScopeSelector ?= new TextMateScopeSelector('comment.*') + @commentScopeSelector.matches(scopes) # Public: Toggle line comments for rows intersecting selections. # From 69480385e683eb39f1f376066a058a5014f8d393 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 13:02:21 -0700 Subject: [PATCH 73/82] Upgrade to tree-view@0.123 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1ac4fb703..4c0620b35 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.122.0", + "tree-view": "0.123.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0", From a0edb92e16270db4aeddd27d1dd84e21859cb793 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 15 Sep 2014 14:33:11 -0600 Subject: [PATCH 74/82] Rename editor.softWrapped config option back to editor.softWrap --- docs/customizing-atom.md | 2 +- spec/editor-spec.coffee | 6 +++--- src/display-buffer.coffee | 2 +- src/editor-view.coffee | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/customizing-atom.md b/docs/customizing-atom.md index 0b86298d6..d83e960be 100644 --- a/docs/customizing-atom.md +++ b/docs/customizing-atom.md @@ -123,7 +123,7 @@ You can open this file in an editor from the _Atom > Open Your Config_ menu. - `showInvisibles`: Whether to render placeholders for invisible characters (defaults to `false`) - `showIndentGuide`: Show/hide indent indicators within the editor - `showLineNumbers`: Show/hide line numbers within the gutter - - `softWrapped`: Enable/disable soft wrapping of text within the editor + - `softWrap`: Enable/disable soft wrapping of text within the editor - `softWrapAtPreferredLineLength`: Enable/disable soft line wrapping at `preferredLineLength` - `tabLength`: Number of spaces within a tab (defaults to `2`) - `fuzzyFinder` diff --git a/spec/editor-spec.coffee b/spec/editor-spec.coffee index d54ff5598..6ff0aa304 100644 --- a/spec/editor-spec.coffee +++ b/spec/editor-spec.coffee @@ -98,11 +98,11 @@ describe "Editor", -> expect(editor2.isFoldedAtBufferRow(4)).not.toBe editor.isFoldedAtBufferRow(4) describe "config defaults", -> - it "uses the `editor.tabLength`, `editor.softWrapped`, and `editor.softTabs` config values", -> + it "uses the `editor.tabLength`, `editor.softWrap`, and `editor.softTabs` config values", -> editor1 = null editor2 = null atom.config.set('editor.tabLength', 4) - atom.config.set('editor.softWrapped', true) + atom.config.set('editor.softWrap', true) atom.config.set('editor.softTabs', false) waitsForPromise -> @@ -114,7 +114,7 @@ describe "Editor", -> expect(editor1.getSoftTabs()).toBe false atom.config.set('editor.tabLength', 100) - atom.config.set('editor.softWrapped', false) + atom.config.set('editor.softWrap', false) atom.config.set('editor.softTabs', true) waitsForPromise -> diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index a2c9817a3..c86324b35 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -45,7 +45,7 @@ class DisplayBuffer extends Model @emitter = new Emitter - @softWrapped ?= atom.config.get('editor.softWrapped') ? false + @softWrapped ?= atom.config.get('editor.softWrap') ? false @tokenizedBuffer ?= new TokenizedBuffer({tabLength, buffer, @invisibles}) @buffer = @tokenizedBuffer.buffer @charWidthsByScope = {} diff --git a/src/editor-view.coffee b/src/editor-view.coffee index 7617567f6..e91d69caa 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -47,7 +47,7 @@ class EditorView extends View nonWordCharacters: "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-" preferredLineLength: 80 tabLength: 2 - softWrapped: false + softWrap: false softTabs: true softWrapAtPreferredLineLength: false scrollSensitivity: 40 From 3faf566a48daf05754fdae60e85c2867fa225ef7 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 15 Sep 2014 14:34:22 -0600 Subject: [PATCH 75/82] Rename editor:toggle-soft-wrapped back to editor:toggle-soft-wrap --- menus/darwin.cson | 2 +- menus/linux.cson | 2 +- menus/win32.cson | 2 +- src/editor-component.coffee | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/menus/darwin.cson b/menus/darwin.cson index 6e079ad0d..b892c56cc 100644 --- a/menus/darwin.cson +++ b/menus/darwin.cson @@ -166,7 +166,7 @@ ] } { type: 'separator' } - { label: 'Toggle Soft Wrap', command: 'editor:toggle-soft-wrapped' } + { label: 'Toggle Soft Wrap', command: 'editor:toggle-soft-wrap' } ] } diff --git a/menus/linux.cson b/menus/linux.cson index f0320fd23..ba87732dd 100644 --- a/menus/linux.cson +++ b/menus/linux.cson @@ -104,7 +104,7 @@ ] } { type: 'separator' } - { label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrapped' } + { label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrap' } ] } diff --git a/menus/win32.cson b/menus/win32.cson index f428acf4c..d002c2428 100644 --- a/menus/win32.cson +++ b/menus/win32.cson @@ -122,7 +122,7 @@ ] } { type: 'separator' } - { label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrapped' } + { label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrap' } ] } diff --git a/src/editor-component.coffee b/src/editor-component.coffee index e190776e7..7714665da 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -478,7 +478,7 @@ EditorComponent = React.createClass 'editor:add-selection-above': -> editor.addSelectionAbove() 'editor:split-selections-into-lines': -> editor.splitSelectionsIntoLines() 'editor:toggle-soft-tabs': -> editor.toggleSoftTabs() - 'editor:toggle-soft-wrapped': -> editor.toggleSoftWrapped() + 'editor:toggle-soft-wrap': -> editor.toggleSoftWrapped() 'editor:fold-all': -> editor.foldAll() 'editor:unfold-all': -> editor.unfoldAll() 'editor:fold-current-row': -> editor.foldCurrentRow() From 647f6c5b24c0620bd1627cb030521af9cc10119c Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 15 Sep 2014 15:44:17 -0600 Subject: [PATCH 76/82] Upgrade keybinding resolver to fix deprecation warnings in specs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c0620b35..8bd9610b3 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "grammar-selector": "0.29.0", "image-view": "0.36.0", "incompatible-packages": "0.9.0", - "keybinding-resolver": "0.19.0", + "keybinding-resolver": "0.20.0", "link": "0.25.0", "markdown-preview": "0.102.0", "metrics": "0.34.0", From ebe116d724f25cd03f28b75b31ba0fdc2f43f059 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 15 Sep 2014 16:03:36 -0600 Subject: [PATCH 77/82] Update parent view `is-focused` and `mini` classes on editor mount Fixes #3526 --- src/editor-component.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 7714665da..646ff690c 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -184,6 +184,8 @@ EditorComponent = React.createClass @subscribe scrollbarStyle.changes, @refreshScrollbars @domPollingIntervalId = setInterval(@pollDOM, @domPollingInterval) + @updateParentViewFocusedClassIfNeeded({}) + @updateParentViewMiniClassIfNeeded({}) @checkForVisibilityChange() componentWillUnmount: -> From 94e285611c60a5e94f14b8ce2e5700145d4fc256 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 16:30:50 -0700 Subject: [PATCH 78/82] getActiveItem -> getActivePaneItem --- src/workspace.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workspace.coffee b/src/workspace.coffee index 47d0cbe17..6515609ab 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -362,7 +362,7 @@ class Workspace extends Model # Returns an {Editor} or `undefined` if the current active item is not an # {Editor}. getActiveTextEditor: -> - activeItem = @getActiveItem() + activeItem = @getActivePaneItem() activeItem if activeItem instanceof Editor # Deprecated: From 82a906cce5f1e5e427b752b3dd66f5d08997fb8f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 16:39:53 -0700 Subject: [PATCH 79/82] Add Workspace::onDidChangeActivePaneItem Closes #3546 --- src/workspace.coffee | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/workspace.coffee b/src/workspace.coffee index 6515609ab..3862b91e0 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -113,7 +113,7 @@ class Workspace extends Model # Extended: Invoke the given callback when a pane item is added to the # workspace. # - # * `callback` {Function} to be called panes are added. + # * `callback` {Function} to be called when panes are added. # * `event` {Object} with the following keys: # * `item` The added pane item. # * `pane` {Pane} containing the added item. @@ -122,6 +122,15 @@ class Workspace extends Model # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. onDidAddPaneItem: (callback) -> @paneContainer.onDidAddPaneItem(callback) + # Extended: Invoke the given callback when the active pane item changes. + # + # * `callback` {Function} to be called when the active pane item changes. + # * `event` {Object} with the following keys: + # * `activeItem` The active pane item. + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + onDidChangeActivePaneItem: (callback) -> @paneContainer.onDidChangeActivePaneItem(callback) + # Extended: Invoke the given callback with all current and future panes items in # the workspace. # From 5c77b06d2ae7fd491a2ab8c9f997db3341d21d27 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Sep 2014 18:25:29 -0700 Subject: [PATCH 80/82] Add Editor:onDidSave --- src/editor.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/editor.coffee b/src/editor.coffee index 9084a5b06..e66110d8e 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -257,6 +257,16 @@ class Editor extends Model onDidInsertText: (callback) -> @emitter.on 'did-insert-text', callback + # Public: Invoke the given callback after the buffer is saved to disk. + # + # * `callback` {Function} to be called after the buffer is saved. + # * `event` {Object} with the following keys: + # * `path` The path to which the buffer was saved. + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + onDidSave: (callback) -> + @getBuffer().onDidSave(callback) + # Extended: Calls your `callback` when a {Cursor} is added to the editor. # Immediately calls your callback for each existing cursor. # From 33ad0a9b931fbdb0844bc5cb0920f57e11423ebe Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 16 Sep 2014 09:19:07 -0600 Subject: [PATCH 81/82] Delegate ::onDidChangeActivePane and ::observeActivePane --- src/workspace.coffee | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/workspace.coffee b/src/workspace.coffee index 3862b91e0..64ea6404b 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -110,6 +110,24 @@ class Workspace extends Model # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. observePanes: (callback) -> @paneContainer.observePanes(callback) + # Extended: Invoke the given callback when the active pane changes. + # + # * `callback` {Function} to be called when the active pane changes. + # * `pane` A {Pane} that is the current return value of {::getActivePane}. + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + onDidChangeActivePane: (callback) -> @paneContainer.onDidChangeActivePane(callback) + + # Extended: Invoke the given callback with the current active pane and when + # the active pane changes. + # + # * `callback` {Function} to be called with the current and future active# + # panes. + # * `pane` A {Pane} that is the current return value of {::getActivePane}. + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + observeActivePane: (callback) -> @paneContainer.observeActivePane(callback) + # Extended: Invoke the given callback when a pane item is added to the # workspace. # From dc88f080a3bb49dead6b28601277357e4472678a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 16 Sep 2014 09:00:17 -0700 Subject: [PATCH 82/82] Upgrade to tree-view@0.124 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8bd9610b3..18f6f97e3 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "symbols-view": "0.63.0", "tabs": "0.50.0", "timecop": "0.22.0", - "tree-view": "0.123.0", + "tree-view": "0.124.0", "update-package-dependencies": "0.6.0", "welcome": "0.18.0", "whitespace": "0.25.0",