Commit Graph

192 Commits

Author SHA1 Message Date
Cheng Zhao
e0865e8c38 Use node-pathwatcher. 2013-04-07 16:35:35 +08:00
Nathan Sobo
f03b6207de Make all requires of 'fs-utils' assign to fsUtils var instead of fs 2013-04-03 12:01:37 -06:00
Kevin Sawicki
9a8fd062c4 Throw error instead of string 2013-04-02 14:40:55 -07:00
Corey Johnson & Nathan Sobo
c8ec73d2f0 Allow scoped-properties to be added/removed by name
Also:
  - remove "global" properties
  - clear scoped properties between specs
2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo
8437f3ff7f Only load TextMate packages as needed in specs
Also: when a TextMate package is deactivated, remove its grammars
2013-03-26 17:35:42 -06:00
Nathan Sobo
a41e3c1ebb Don't clear loaded packages between specs 2013-03-26 17:35:42 -06:00
Nathan Sobo
bb8b3782b9 Serialize package states independently of RootView
Previously, package specs needed to deactivate the root view to test
their package serialization. Now, specs can just deactivate and then
reactivate the package, relying on serialization infrastructure that's
independent of the lifecycle of the RootView.
2013-03-26 17:35:42 -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
e3ddc3f29b Kill window.loadPackage spec helper. We use built-in methods now. 2013-03-26 17:35:42 -06:00
Kevin Sawicki
6d2805d782 Drop extension from requireStylesheet() 2013-03-26 00:15:32 -04:00
Corey Johnson & Nathan Sobo
db4420e068 Move grammar overrides to syntax (no serialization yet) 2013-03-22 17:35:35 -06:00
Nathan Sobo
ab934cfbfb Replace LoadTextMatePackagesTask with async grammar loading 2013-03-22 15:29:07 -06:00
Kevin Sawicki
712ba2c3fa Clear all syntax subscriptions after spec runs
The global syntax object is reused between specs so
each spec should start off with a clean listener list.
2013-03-21 18:46:08 -07:00
Corey Johnson & Nathan Sobo
1ad5327c99 Ensure we never load saved window in specs 2013-03-21 18:51:32 -06:00
Corey Johnson & Nathan Sobo
f4d339ccac Unify root view state with window state 2013-03-21 18:24:21 -06: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
Corey Johnson
3ec74f3211 Move toExistOnDisk matcher to spec helper 2013-03-12 16:55:28 -07:00
Kevin Sawicki
96a949983c Use fs.resolveOnLoadPath() instead of require.resolve() 2013-03-12 13:33:25 -07:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1 Use node's require instead of internal require 2013-03-12 10:38:05 -07:00
Corey Johnson
06b63c24dc Merge remote-tracking branch 'origin/dev' into md-preview-redux
Conflicts:
	src/packages/markdown-preview/stylesheets/markdown-preview.css
	static/atom.css
	static/command-panel.css
2013-03-11 17:02:36 -07: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
probablycorey
9acd401b9e Use fixture files to requireStylesheet 2013-03-11 10:02:19 -07:00
Justin Palmer
0624ba6d3f rename remaining static css files to less 2013-03-11 10:02:19 -07:00
Justin Palmer
2b66b033e0 add less parsing helper to spec helper 2013-03-11 10:02:19 -07:00
Corey Johnson & Nathan Sobo
ff50bc2e6f Add toBeInstanceOf and toHaveLength jasmine matchers 2013-03-07 14:32:10 -08:00
Nathan Sobo
96fefe94f0 Fix broken specs after rebase 2013-03-07 09:30:29 -08:00
Nathan Sobo
f0398f2331 Ensure modal dialogs are presented in a coherent order
Modal dialogs can be presented while other modal dialogs are already
being displayed. Previously, dialogs were always displayed in the order
they were requested. But say you have two untitled buffers in a
pane and you close all items… You'll display prompt dialogs for both
buffers asking the user if they want to save. If the user answers yes
to the first dialog, they should see the path selection dialog before
they see the save prompt for the second buffer.

This commit uses a stack of queues to store deferred dialogs and allow
dialogs presented by the dismissal of another dialog to take precedence
over other pending dialogs.
2013-03-07 09:30:28 -08:00
Nathan Sobo
54fc9efdcb Eliminate fixturesProject global. Use project global instead. 2013-03-07 09:30:27 -08:00
Kevin Sawicki & Nathan Sobo
d6b85cf7e8 Base title updates on pane:active-item-changed events 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo
161ed69ef0 When a pane is removed, focus/activate the next pane 2013-03-07 09:30:22 -08:00
Kevin Sawicki
2ec4d558ba Make project's Git repository a window global
This allows it to operate independently of the
project and mirror the availability of the root view
and project.
2013-03-04 21:43:33 -08:00
probablycorey
30d4cb81b8 Use Courier as the default font for specs
Fixes #323
2013-03-04 16:40:02 -08:00
Corey Johnson
4db982f9e5 Use a 5 second timeout for specs
Hopefully this is temporary.
2013-02-20 16:28:05 -08:00
Corey Johnson & Nathan Sobo
c03b3fa691 💄 2013-02-20 11:44:50 -08:00
Corey Johnson & Nathan Sobo
5c1fb99037 Requiring window no longer has no side-effects
Call window.setUpEnvironment instead.
2013-02-20 11:44:39 -08:00
Corey Johnson & Nathan Sobo
2123fabae6 Window is only shutdown if a rootView and project exist
Keeping the shutdown state as a local var in window.coffee causes spec failures because window.shutdown can only be called once in the entire spec suite
2013-02-20 11:31:36 -08:00
Corey Johnson & Nathan Sobo
f5ecaf436e Move core:close into handleWindowEvents 2013-02-20 09:58:34 -08:00
Corey Johnson & Nathan Sobo
cb1e48bfef Make toggle-dev-tools command work in spec window 2013-02-20 09:58:00 -08:00
Corey Johnson & Nathan Sobo
9e8831f710 RootView.initialize no longer assigns window.rootView or calls open 2013-02-19 18:26:50 -07:00
Nathan Sobo
7f2747ead0 Make project a global and refactor startup process 2013-02-19 18:26:50 -07:00
Nathan Sobo
7bdd51b456 Rename deserializeView to deserialize
In additional, rename `registerViewClass(es)` to `registerDeserializer(s)`.
This moves us to a situation where any kind of object may want to be
deserialized, not just views.
2013-02-19 09:48:40 -07:00
Nathan Sobo
d3c2623b61 Make deserializeView a global method
…along with `registerViewClass(es)`
2013-02-18 18:08:18 -07:00
Kevin Sawicki
eb179af0d4 Merge pull request #271 from github/super-command-panel
Super command panel
2013-02-14 10:13:40 -08:00
Kevin Sawicki
1922034df5 Disable jquery fx in specs 2013-02-13 17:13:15 -08:00
Corey Johnson
958bc2bfab Moved atom.loadPackage to a spec-only helper function 2013-02-13 16:37:59 -08:00
Kevin Sawicki
1ee1fa02ba Merge pull request #255 from github/rearrange-tabs
Drag and drop tabs
2013-02-12 08:38:52 -08:00
Kevin Sawicki
a61b0ab9da Toggle dev tools in spec helper when no root view
Previously the keybinding for toggling the dev tools
would not function correctly after the root view had
been destroyed.
2013-02-11 10:22:19 -08:00
Justin Palmer
b2ce4ca6d5 merge dev, fix conflicts from package rewrite 2013-02-09 20:17:29 -08:00
Corey Johnson & Kevin Sawicki
4619e1847f Manage package lifecycle in Atom instead of in RootView 2013-02-08 17:28:08 -08:00