mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Kind of starting from scratch.
Recreated the project as an xcode 4 project. Key Bindings are working and reloading. Got rid of everything that wasn't being used right now.
This commit is contained in:
@@ -14,9 +14,9 @@ class KeyBinder
|
||||
|
||||
@load: (path) ->
|
||||
try
|
||||
Watcher.watch path, ->
|
||||
Watcher.watch path, =>
|
||||
# Should we keep track of which file bindings are associated with? That
|
||||
# way we could clear bindings when the file is changed or deleted. I
|
||||
# way we could clear bindings when the file is changed or deleted. I
|
||||
# think the answer is yes, but I don't want to do this right now.
|
||||
console.log "#{@name}: Reloading #{path}"
|
||||
@load path
|
||||
@@ -25,12 +25,12 @@ class KeyBinder
|
||||
for scopeName, bindings of json
|
||||
@create scopeName, binding, method for binding, method of bindings
|
||||
catch error
|
||||
console.error "#{@class}: Could not load key bindings at `#{path}`. #{error}"
|
||||
console.error "#{@name}: Could not load key bindings at `#{path}`. #{error}"
|
||||
|
||||
@create: (scope, binding, method) ->
|
||||
if typeof scope is "string"
|
||||
throw "#{@name}: Unknown scope `#{scope}`" unless @scopes[scope]
|
||||
scope = @scopes[scope]
|
||||
scope = @scopes[scope]
|
||||
|
||||
callback = if _.isFunction method
|
||||
-> method scope
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
resourcePath = OSX.NSBundle.mainBundle.resourcePath
|
||||
|
||||
paths = [
|
||||
"/Users/chris/Code/Atomicity/src"
|
||||
"/Users/chris/Code/Atomicity/plugins"
|
||||
"/Users/chris/Code/Atomicity/test"
|
||||
|
||||
"/Users/corey/code/mine/Atomicity/src"
|
||||
"/Users/corey/code/mine/Atomicity/plugins"
|
||||
"/Users/corey/code/mine/Atomicity/test"
|
||||
"/Users/corey/code/mine/Atomicity/vendor"
|
||||
|
||||
"#{resourcePath}/src"
|
||||
"#{resourcePath}/plugins"
|
||||
"#{resourcePath}/vendor"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#module.exports =
|
||||
module.exports =
|
||||
class Watcher
|
||||
@watchedPaths: {}
|
||||
|
||||
@@ -44,7 +44,3 @@ class Watcher
|
||||
# Just ignore this
|
||||
else
|
||||
console.error "I HAVE NO IDEA WHEN #{notification} IS TRIGGERED"
|
||||
|
||||
Watcher.watch "~/tmp/what.txt", ->
|
||||
OSX.NSLog "HI"
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
File = require 'fs'
|
||||
KeyBinder = require 'key-binder'
|
||||
|
||||
# This file is a weirdo. We don't create a Window class, we just add stuff to
|
||||
# the DOM window.
|
||||
windowAdditions =
|
||||
extensions: []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user