Commit Graph

277 Commits

Author SHA1 Message Date
Kevin Sawicki
75da205b0a Terminate worker when all snippets have been loaded 2013-01-27 22:26:45 -08:00
Kevin Sawicki
a89e1fae11 Use interpolated string when evaluating 2013-01-27 20:12:36 -08:00
Kevin Sawicki
90054d8553 Pop from split array to get last index 2013-01-27 20:09:23 -08:00
Kevin Sawicki
15a06cbdb3 DRY up how cache file path is generated 2013-01-27 18:11:07 -08:00
Kevin Sawicki & Nathan Sobo
aeb2ddac50 HACK: attempt 2nd CoffeeScript.compile when evaluating fails
Temporary workaround for CEF/CoffeeScript timing issue where
compiler generates invalid JavaScript.
2013-01-27 18:33:09 -07:00
Nathan Sobo
0726987896 Give Task an RPC-style interaction with its Worker
This commit makes all interactions between Task and Worker look
like method calls. The worker now has a global `callTaskMethod`
function that it can use to call methods on the Task object. And the
Task can use `callWorkerMethod` to call methods on a global `handler`
object in the worker. The worker's initial `handler` actually contains
the `start` method, which the Task initially calls to kick things off.
Then the global `handler` gets replaced with whatever `handlerPath`
is specified by the Task. The worker then calls `workerStarted` on its
parent Task object.

This commit also gets rid of the `onProgress` method with the reply
semantics, favoring a more explicit interaction. When `snippetsLoaded`
finishes adding the snippet data, we call `loadNextPackageSnippets`
explicitly rather than returning a reply message.
2013-01-24 17:22:50 -08:00
Kevin Sawicki
69c9ed3feb Use self instead of hacky eval 2013-01-24 17:22:50 -08:00
Kevin Sawicki
3dd11c6c0f Set type to log for console.log forwarding 2013-01-24 17:22:50 -08:00
Kevin Sawicki
2393bd0e9e Create task shell that bootstraps worker 2013-01-24 17:22:50 -08:00
Kevin Sawicki
9ab730b3d0 Load snippets in a web worker
A single web worker is now used to load
snippets one bundle at a time.
2013-01-24 17:22:50 -08:00
Corey Johnson & Nathan Sobo
d4b5c8beac Don't make OnigScanner and OnigRegExp be window globals 2013-01-24 17:22:49 -08:00
Corey Johnson & Nathan Sobo
e5c96c7077 Convert OnigScanner to a context binding 2013-01-24 17:22:49 -08:00
Nathan Sobo
2946ba7b9a Convert OnigRegExp from a v8 extension to a window binding 2013-01-24 17:22:49 -08:00
Corey Johnson & Nathan Sobo
74d7d48dcc Don't make GitRepository a window global 2013-01-24 17:22:49 -08:00
Corey Johnson & Nathan Sobo
1e6e6c4411 Convert git v8 extension to a context binding 2013-01-24 17:22:49 -08:00
Jon Rohan
5969e79ebc allow leading dot in extension names in fs resolve 2013-01-22 12:41:33 -08:00
Kevin Sawicki
43d0c8a2a1 Perform extension test once
This does not need to be computed on each path since
file isn't changing between paths visited
2013-01-18 09:14:17 -08:00
Kevin Sawicki
a7f03f4aeb Use __moduleExists from require 2013-01-18 09:08:34 -08:00
Kevin Sawicki
f29c3a0836 Check if module path is already loaded before doing fs operations
resolve now checks the existence of a module already loaded at the
given path before checking if the file exists on disk.

This removes the need for many redundant fs.exists and fs.isFile
calls for already loaded modules.

This speeds up package loading since most packages have a common
set of requires that were doing needless fs operations for each
searched path when the module was already in the cache at that
path.
2013-01-18 08:54:59 -08:00
Kevin Sawicki
78d855e05e Add .tiff to image extensions 2013-01-16 09:11:40 -08:00
Kevin Sawicki
28d4c3749f Use octicon for command panel prompt 2013-01-14 09:32:04 -08:00
Kevin Sawicki & Nathan Sobo
ac3c059246 Extract _.setValueForKeyPath to underscore extensions 2013-01-10 18:02:55 -07:00
Kevin Sawicki & Nathan Sobo
3af97c4e38 Add Event.currentTargetView() and Event.targetView() 2013-01-10 11:41:07 -08:00
Nathan Sobo
2c4da1b8dd Merge branch 'snippets' into dev
Conflicts:
	src/app/package.coffee
	src/packages/snippets/src/snippets.coffee
2013-01-09 13:10:11 -07:00
Nathan Sobo
e33f93b40c Load snippets from TextMate bundles
There's still a bunch of holes in this. TextMate snippets have features
that we don't support yet. But the basic ones should now work.
2013-01-09 11:43:11 -07:00
Kevin Sawicki
fee1e7bc8b Escape ext in RegExp from fs.base 2013-01-08 13:31:37 -08:00
Kevin Sawicki
594813be34 Escape path in RegExp from fs.directory() 2013-01-08 13:30:41 -08:00
Kevin Sawicki
f78adfa060 Add command and invocation counts to header 2013-01-04 16:39:13 -08:00
Kevin Sawicki
b2ec05a2f2 Remove old bundles directory from include paths 2013-01-04 08:18:52 -08:00
Kevin Sawicki
4078046ac6 Vendor textmate bundles as submodules 2013-01-04 08:18:52 -08:00
Nathan Sobo
a9bb4ea163 When loading a package, honor the 'keymaps' manifest in package.json
Also, add a spec to cover the loading of keymaps in `atom-spec` and
reset the `keymap`'s internal data after each spec gets run to prevent
test pollution with keymaps.
2013-01-03 15:17:09 -07:00
Kevin Sawicki & Nathan Sobo
bcde77dd0e Load keymaps from cson
All existing .coffee keymaps are now .cson and package
keymaps are now located in a keymaps folder at the root of
the package.
2013-01-02 16:10:46 -08:00
Kevin Sawicki
183a6d8e8b Add helper for markdown extension to fs 2012-12-31 13:49:40 -08:00
Nathan Sobo
fa7bcfe51b Bundle a themes directory so we don't depend on ~/.atom/themes
We'll look first in the user themes directory, then in the built-in
themes directory. This allows us to default to 'IR_Black' and not crash
if the user doesn't setup their `~/.atom/themes` directory.
2012-12-31 12:08:36 -06:00
Nathan Sobo
9c7c2ab800 Store TM bundle start/end comment strings in scoped properties
Previously, we had a custom method on the `TextMateBundle` class for
retrieving these variables from the bundle. Now we're using Atom's
`syntax.getProperty` mechanism. The idea is to map TextMate concepts
to their Atom equivalent, rather than building everything directly
around TextMate.
2012-12-28 13:27:54 -06:00
Corey Johnson
d77fc88ff4 Merge remote-tracking branch 'origin/master' into config 2012-12-27 10:38:24 -08:00
Kevin Sawicki
ae6039e74d Add octicons to fuzzy-finder
Also place file base name first followed by
directory path in darker color
2012-12-26 20:13:53 -08:00
Nathan Sobo
886995364f Start on syntax global. Use it to replace scoped config settings.
We'll store all syntax-related global state in the `syntax` global. For
now, this means that all scoped properties will be stored here, as well
as all grammars.
2012-12-23 12:50:58 -07:00
Nathan Sobo
8d63805072 Pull out ConfigObserver & Subscriber mixins; Add unobserveConfig 2012-12-19 17:32:04 -07:00
Nathan Sobo
acc0503684 Merge remote-tracking branch 'origin/master' into config
Conflicts:
	src/app/keymap.coffee
	src/extensions/outline-view/src/keymap.coffee
	src/extensions/outline-view/src/tag-reader.coffee
	src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee
	src/packages/fuzzy-finder/src/fuzzy-finder.coffee
2012-12-18 20:32:05 -07:00
Nathan Sobo
4ce8583cb2 Rename extensions to packages
We now look at the `core.disabledPackages` config key. Rename the `src/extensions` directory to `src/packages`. The config object now talks about loading packages instead of extensions.
2012-12-18 20:03:21 -07:00
Corey Johnson & Nathan Sobo
e6362af711 Rename subscription.destroy to subscription.cancel 2012-12-14 16:38:04 -08:00
Corey Johnson & Nathan Sobo
b822cd7779 View#subscribe subscribes to an event emitter 2012-12-14 14:40:51 -08:00
Corey Johnson & Nathan Sobo
528fae9466 Cleanup all subscriptions when a view is removed from the DOM 2012-12-14 14:29:20 -08:00
Corey Johnson & Nathan Sobo
55dc3e1cdf Merge branch 'master' into config
Conflicts:
	spec/app/project-spec.coffee
	src/extensions/wrap-guide/src/wrap-guide.coffee
2012-12-14 14:14:50 -08:00
Kevin Sawicki & Nathan Sobo
b91c353d2b Add View#observeConfig as a space-pen extension 2012-12-14 14:08:57 -08:00
Corey Johnson & Kevin Sawicki
a6a05b6ff4 Remove directories from fuzzy-finder 2012-12-12 17:25:45 -08:00
Corey Johnson & Kevin Sawicki
404f637101 Populate fuzzy-finder asynchronously 2012-12-12 12:26:39 -08:00
Nathan Sobo
98ef054438 💄 2012-11-29 12:01:16 -07:00
Nathan Sobo
a6e928d85a Use MessageChannel-based nextTick to schedule Editor display update
This is the fastest way I've found to get the nextTick behavior, which allows us to aggregate multiple requests for display update (from selection changes, cursor movement, line changes) etc into a single call at the end of processing an event.
2012-11-14 13:57:27 -07:00