Commit Graph

2356 Commits

Author SHA1 Message Date
Cheng Zhao
b5be1c378a Replace Task's implementation with ProcessTask. 2013-03-27 12:25:54 +08:00
Cheng Zhao
142824ec01 Add test for ProcessTask. 2013-03-27 12:25:54 +08:00
Nathan Sobo
d3fa24be57 Remove scoped-properties when deactivating a TextMate package 2013-03-26 17:35:45 -06:00
Nathan Sobo
6a5ca3805e Spec loading of scoped properties when activating TextMate packages 2013-03-26 17:35:44 -06:00
Nathan Sobo
eef13e7db8 Test that deferred packages don't require their main module
As opposed to asserting that the main module isn't present, which
might not be true if a previous spec required it.
2013-03-26 17:35:44 -06:00
Nathan Sobo
e32d7b1ff1 Remove unused test.tmbundle 2013-03-26 17:35:44 -06:00
Nathan Sobo
1f74b5ccb4 Rename textmate package w/ invalid snippets 2013-03-26 17:35:44 -06:00
Nathan Sobo
a07cd87c2c Move testing of deferred deserializers to atom-spec 2013-03-26 17:35:44 -06:00
Nathan Sobo
2fe057bd9b Move deferred activation specs to atom-spec 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
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
368e10a9f5 Move spec for scoped property loading to atom-spec 2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo
3c561ef208 💄 2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo
c8b9622bf4 Move specs for loading config defaults to atom-spec 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
5410e9368f Add ability to add/remove keymaps by name 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
c1954d869a Add tests for TextMateGrammar@loadSync 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo
d37fbd43f1 Test that atom packages load their grammars 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo
de7d9bfcb1 Get deactivatePackage specs passing w/ new fixture data 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
b846a4db98 wip: cleanup package lifecycle specs 2013-03-26 17:35:43 -06:00
Corey Johnson
da016114b6 Add specs for activating and deactivating TextMate packages 2013-03-26 17:35:43 -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
Nathan Sobo
58ef6c6582 Use atom.activatePackage directly in specs 2013-03-26 17:35:42 -06:00
probablycorey
187263173b Only exit specs on exceptions when exitWhenDone is true 2013-03-26 14:57:03 -07:00
probablycorey
60189c0135 exit(1) when spec-bootstrap throws an error 2013-03-26 14:20:03 -07:00
Kevin Sawicki
6d2805d782 Drop extension from requireStylesheet() 2013-03-26 00:15:32 -04:00
Kevin Sawicki
fab5842651 Support requiring stylesheets without an extension
Stylesheets will attempt to be resolved with both css
and less extensions if no extension is included in the
path specified to requireStylesheet().
2013-03-26 00:11:11 -04:00
Kevin Sawicki
513ed3b4b1 Show symlink file icon in tree view 2013-03-25 16:51:39 -04:00
Corey Johnson
ec4bb162c3 Add editor.showLineNumbers config option
Also adds toggle-line-numbers command. Closes #377
2013-03-25 10:38:06 -07:00
Kevin Sawicki
7756f8e86d Show ignored icon in status bar 2013-03-25 12:00:11 -04:00
Kevin Sawicki
0080e09065 Only check for back references in end patterns
Back references can occur in match values but should not
be treated differently when present there since they refer
to groups inside the match.

Close #370
2013-03-24 23:25:00 -04:00
Nathan Sobo
a05405370c Serialize the syntax object's grammar overrides with window state 2013-03-22 17:35:35 -06:00
Corey Johnson & Nathan Sobo
db4420e068 Move grammar overrides to syntax (no serialization yet) 2013-03-22 17:35:35 -06:00
Corey Johnson & Nathan Sobo
dacb00ed67 Simplify grammar selection and its specs 2013-03-22 17:35:34 -06:00
Nathan Sobo
a2f72882d7 Rename grammarForFilePath to selectGrammar
The old name was misleading because it the decision is based on the
file contents in some circumstances.
2013-03-22 17:35:27 -06:00
Nathan Sobo
ab934cfbfb Replace LoadTextMatePackagesTask with async grammar loading 2013-03-22 15:29:07 -06:00
Nathan Sobo
d3ead2a0d1 Update fs.list to use readdirSync and filterExtensions helper 2013-03-22 15:29:07 -06:00
Nathan Sobo
a5dcd71548 Add fs.listAsync 2013-03-22 15:29:07 -06:00
Kevin Sawicki & Nathan Sobo
e23edd02fd Use flexbox to position editor's gutter and scroll view
This removes the need to compute the width of the gutter based
on the line count in the editor and also removes the need to
set the scroll view's left position manually.
2013-03-22 12:47:56 -07:00
Corey Johnson & Nathan Sobo
84fe0a384d Pop grammar rules that result in infinite loops 2013-03-22 11:42:47 -07: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