mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
making plugins unique to windows and 'classy'.
This checkin breaks everything BTW.
This commit is contained in:
@@ -9,12 +9,13 @@ class App
|
||||
|
||||
@activeWindow: null
|
||||
|
||||
@setup: ->
|
||||
@start: ->
|
||||
@setActiveWindow new Window
|
||||
controller : WindowController
|
||||
path : localStorage.lastOpenedPath
|
||||
|
||||
@activeWindow.loadPlugins()
|
||||
_.map File.list("~/.atomicity/"), (path) ->
|
||||
require path
|
||||
|
||||
@setActiveWindow: (window) ->
|
||||
@activeWindow = window
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# yay!
|
||||
App = require 'app'
|
||||
App.setup()
|
||||
App.start()
|
||||
|
||||
@@ -30,6 +30,8 @@ class Window
|
||||
bindKey @, shortcut, method
|
||||
|
||||
@nswindow = @controller?.window
|
||||
@loadPlugins()
|
||||
@document.ace._emit "loaded"
|
||||
|
||||
loadPlugins: ->
|
||||
Editor = require 'editor'
|
||||
@@ -37,14 +39,12 @@ class Window
|
||||
|
||||
@open @path if @path?
|
||||
|
||||
@plugins = []
|
||||
App = require 'app'
|
||||
_.map File.list(App.root + "/plugins"), (plugin) ->
|
||||
require plugin
|
||||
|
||||
_.map File.list("~/.atomicity/"), (path) ->
|
||||
require path
|
||||
|
||||
@document.ace._emit "loaded"
|
||||
for pluginPath in File.list(App.root + "/plugins")
|
||||
if File.isDirectory pluginPath
|
||||
plugin = require pluginPath
|
||||
@plugins.push new plugin(@)
|
||||
|
||||
addPane: ({position, html}) ->
|
||||
verticalDiv = $('#app-vertical')
|
||||
|
||||
Reference in New Issue
Block a user