Commit Graph

63 Commits

Author SHA1 Message Date
Garen Torikian
2357f46761 Fix block comments in src 2013-05-01 16:58:43 -07:00
Nathan Sobo
8980a97895 Add atom.activatePackageConfig, which is called in config windows
This calls an optional `activateConfig` method on the package's main
module, which allows it to add a configuration interface to the
`configView`.
2013-04-26 15:32:47 -07:00
Kevin Sawicki
1c8509b873 Look for .json extension first 2013-04-24 10:12:30 -07:00
Kevin Sawicki
044396d41a Remove unneeded empty array fallback 2013-04-24 10:12:30 -07:00
Kevin Sawicki
41229f50f7 Look for .json extension first 2013-04-24 10:12:29 -07:00
Garen Torikian
5ee388cede Get it to a proper 80% 2013-04-18 18:50:22 -07:00
Nathan Sobo
39f920165d Report errors with no stack when loading packages 2013-04-15 20:45:55 -06:00
Nathan Sobo
2ac3af193b Clean up deferred package activation
- Eliminate @deferActivation ivar
- Remove activation event listeners when deactivating unactivated packages
2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo
81d4b764b8 Remove a package's scoped-properties when it is deactivated
Also: don't add the properties until `activate` is called. Previously
we were still adding the properties in the `load` method, which was
wrong.
2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo
5d822b7305 Remove a package's stylesheets when it is deactivated 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo
1e51750b6c Remove a package's keymaps when it is deactivated 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo
772787121c Remove atom package grammars on deactivate 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo
8c1f5658be Allow packages to have stylesheet manifests 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo
c8804359c9 Rename fs -> fsUtils in atom-package 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo
643a5c6d0e 💄 2013-03-26 17:35:43 -06:00
Nathan Sobo
f5774972e9 Add atom.deactivatePackage(id)
It serializes the package state to the atom.packageStates hash when
the package is deactivated, which means we will be able to test 
package serialization independent of the overall window lifecycle by
just deactivating and re-activating the package.
2013-03-26 17:35:42 -06:00
Nathan Sobo
054626a9a2 Add 'immediate' option to atom.activatePackage to suppress deferral 2013-03-26 17:35:42 -06:00
Nathan Sobo
d3099cb682 Don't add grammars for atom packages until activate is called 2013-03-26 17:35:41 -06:00
Nathan Sobo
bf7e586e6a Don't apply stylesheets until active is called for atom packages 2013-03-26 17:35:41 -06:00
Nathan Sobo
af06575aad Don't add AtomPackage keymaps until activate is called 2013-03-26 17:35:41 -06:00
Nathan Sobo
d3ead2a0d1 Update fs.list to use readdirSync and filterExtensions helper 2013-03-22 15:29:07 -06:00
Corey Johnson & Nathan Sobo
2f3b4b9e5f Move scoped properties out of the grammar file and into a directory
Closes #435
2013-03-21 14:07:32 -07:00
Corey Johnson & Nathan Sobo
0b719bfecf Atom packages can load cson grammars and TextMate packages can't 2013-03-21 13:26:56 -07:00
Kevin Sawicki & Nathan Sobo
501dc9b76c Merge remote-tracking branch 'origin/master' into cefode
Conflicts:
	native/v8_extensions/native.mm
	spec/app/config-spec.coffee
	spec/app/window-spec.coffee
	spec/spec-helper.coffee
	spec/stdlib/fs-utils-spec.coffee
	src/app/atom-package.coffee
	src/app/config.coffee
	src/app/window.coffee
	src/packages/fuzzy-finder/lib/load-paths-handler.coffee
	src/packages/markdown-preview/lib/markdown-preview-view.coffee
	src/packages/tree-view/spec/tree-view-spec.coffee
	src/stdlib/require.coffee
2013-03-20 10:46:50 -06:00
Kevin Sawicki & Nathan Sobo
051decc08c Use fs.resolveOnLoadPath() instead of require.resolve() 2013-03-12 14:42:24 -07:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1 Use node's require instead of internal require 2013-03-12 10:38:05 -07:00
Kevin Sawicki
115b960ce7 Handle reading and writing in cson.coffee
Moves helpers from fs.coffee to cson.coffee
2013-03-11 22:40:00 -07:00
Nathan Sobo
194ac13f43 💄 2013-03-11 16:05:20 -06:00
Nathan Sobo
bf7fc39434 Rename AtomPackage.packageMain to .mainModule 2013-03-11 16:04:38 -06:00
Nathan Sobo
10d0fdf2d7 Require a deferred package early if needed when deserializing panes
The requiring of a package's main module is now decoupled from package
activation. Non-deferred packages will always be required before the
panes are deserialized. This allows the package to register any
deserializers for objects displayed in the panes.

Deferred packages can contain a 'deferredDeserializers' array in their
package.cson. If we attempt to deserialize an object with a deserializer
in the list, the package's main module will be required first so it has
a chance to register the deserializer. But the package still won't be
activated until an activation event occurs.

We may want to add an additional optional hook called 'load' which is
called at require time. We would not guarantee that the rootView
global would exist, but we could give the package a chance to register
deserializers etc. For now, registering deserializers is a side-effect
of requiring the package.
2013-03-11 15:08:19 -06:00
Kevin Sawicki
2212222c47 Use underscore node module 2013-03-11 11:22:36 -07:00
Nathan Sobo
9cd6fda3e1 💄 add trailing newlines 2013-02-19 10:02:09 -07:00
Corey Johnson & Kevin Sawicki
4619e1847f Manage package lifecycle in Atom instead of in RootView 2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
c27489f608 Remove name parameter from RootView.activatePackage 2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
8434bdfe91 Load package's configDefaults in AtomPackage
This was previously loaded in RootView.
2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
b93f404fa1 Store packages instead of package modules in RootView 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
0fddc08fe3 💄 2013-02-08 17:28:07 -08:00
Corey Johnson
6726303cb5 💄 2013-02-08 17:28:07 -08:00
Corey Johnson
14cfa22d22 Only require packages that have a main module 2013-02-08 17:28:07 -08:00
Kevin Sawicki
e04ecf836f Remove autoloadStylesheets ivar
This is no longer used now that the deferred package
has been deleted.
2013-02-08 17:28:07 -08:00
Kevin Sawicki
823db4cb22 💄 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
2d80d27ca7 Modernize command-panel package with package.cson 2013-02-08 17:28:07 -08:00
Corey Johnson & Kevin Sawicki
833321fa23 Modernize fuzzy-finder package to use package.cson 2013-02-08 17:28:05 -08:00
Kevin Sawicki
cdf29691d7 Use same noop function for all disabled handlers 2013-02-08 17:28:04 -08:00
Kevin Sawicki & Nathan Sobo
641a0d43cc Retrigger event after package module is activated
The event that triggers the package module to be activated is
now retriggered after the package module is initialized but without
any previously registered handlers. Instead only the handlers registered
by the package module will be triggered.  The prior event handlers are then
restored after the event is retriggered.

This allows package modules to bind event handlers during initialization
that will be triggered by the same event that caused the package module
intialization to occur.  This simplifies the common case of having the same
event cause a package module to initialize and attach.
2013-02-08 17:28:04 -08:00
Kevin Sawicki
ed0de80af3 💄 2013-02-08 17:28:04 -08:00
Kevin Sawicki
7c41b15e00 Support activation events in package manifest
These events will load the package's main module
when first triggered.  The go-to-line package has been
migrated to use this new option.
2013-02-08 17:28:04 -08:00
Kevin Sawicki
d884bf58e8 Support specifying main module in package.cson
Migrated strip-trailing-whitespace package to include
a package.cson with a main being a file in the lib directory
instead of the index.coffee at the root of the package.
2013-02-08 17:28:04 -08:00
Kevin Sawicki
856b378f54 Set metadata to empty hash when missing 2013-02-08 17:28:04 -08:00
Corey Johnson & Kevin Sawicki
3b4f07701b Build packages using paths instead of filenames 2013-02-08 17:28:04 -08:00