Comparar commits

...

2238 Commits

Autor SHA1 Mensagem Data
Kevin Sawicki e3f4a72ab3 Add empty changelog to get this deploy out 2013-10-29 18:28:49 -07:00
Kevin Sawicki ee3b7cee76 Upgrade to emissary@0.9.0 2013-10-29 17:57:36 -07:00
Kevin Sawicki 5a357a54dc Prepare 33.0.0 release 2013-10-29 16:20:05 -07:00
probablycorey d07bf338c8 Consolidate pane item destruction 2013-10-29 15:55:07 -07:00
Kevin Sawicki 516ddec854 Upgrade to dev-live-reload@0.12.0 2013-10-29 15:45:05 -07:00
Kevin Sawicki 0ab2b89c1a Upgrade to collaboration@0.34.0 2013-10-29 15:24:16 -07:00
Kevin Sawicki 2c2c7e67d7 Upgrade to release-notes@0.11.0 2013-10-29 15:20:06 -07:00
probablycorey e1f8b042ed Update autosave 2013-10-29 15:18:07 -07:00
Kevin Sawicki f7ce6a015d Upgrade to release-notes@0.10.0 2013-10-29 15:12:58 -07:00
Kevin Sawicki 4775783ba3 Add missing path require 2013-10-29 15:02:05 -07:00
Kevin Sawicki d0bf4c1d2e Upgrade to emissary@0.8.0 2013-10-29 14:54:54 -07:00
Kevin Sawicki 4f1d862bc0 Merge pull request #1040 from atom/ks-speed-up-load
Speed up start time
2013-10-29 13:47:11 -07:00
Kevin Sawicki 059671c454 🐎 Load packages by path
Previously the package paths were converted to names and then
re-resolved to paths.

Now we just load the paths directly reducing the number of stat calls
and saving ~50ms in PackageManager::loadPackages

Also now internal packages are loaded by parsing the package.json
file for packageDependencies instead of loading the metadata for all
packages in node_modules and checking the engines field.
2013-10-29 13:31:42 -07:00
Kevin Sawicki 1f16cd3912 Upgrade to season@0.14.0 2013-10-29 13:31:42 -07:00
Kevin Sawicki 2d16fc33a3 Use Date.now() 2013-10-29 13:31:42 -07:00
Kevin Sawicki 6ad8062d45 Upgrade to timecop@0.9.0 2013-10-29 13:31:42 -07:00
Kevin Sawicki 8f0c0362e8 Upgrade to timecop@0.8.0 2013-10-29 13:31:42 -07:00
Kevin Sawicki 91436bec25 Add config.unshiftAtKeyPath helper 2013-10-29 13:31:42 -07:00
Kevin Sawicki e93d83dcdf Guard against null core.themes 2013-10-29 13:31:41 -07:00
Kevin Sawicki 62f44e64f4 Unshift into array instead of creating new one 2013-10-29 13:31:41 -07:00
Kevin Sawicki c571d6a9d4 Only reload non-theme packages on reload of themes 2013-10-29 13:31:41 -07:00
Kevin Sawicki bdd4ac63f4 Watch themes after activation instead of loading 2013-10-29 13:31:41 -07:00
Corey Johnson 0c77712a77 Merge pull request #1041 from atom/cj-move-autosave-to-package
Move autosave to package
2013-10-29 13:27:50 -07:00
Ben Ogle a00db81765 Only call itemAdded when there is a container
Sometimes in the tests, rootView.open is called. Sometimes by the time 
the promise is fired and callback to add the pane is called, the 
rootView and container no longer exists. See the find-and-replace tests 
that create a ResultsPaneView.
2013-10-29 12:44:11 -07:00
probablycorey c91bca44cb Update settings view
Fixes #1022
2013-10-29 11:50:01 -07:00
probablycorey dbf4ba099b Merge remote-tracking branch 'origin/master' into cj-move-autosave-to-package 2013-10-29 11:05:26 -07:00
probablycorey e67324dcc9 Upgrade autosave 2013-10-29 09:57:49 -07:00
Kevin Sawicki 1528d6ea49 Upgrade to tree-view@0.22.0 2013-10-29 09:23:53 -07:00
Matt Colyer a49fd569e3 Merge pull request #1035 from atom/win-bootstrap-native-modules
Windows Support
2013-10-29 09:15:59 -07:00
Kevin Sawicki 44213aff96 Upgrade apm for windows fixes 2013-10-29 08:38:42 -07:00
Kevin Sawicki 22589bf2dd Require nslog on non-windows machines 2013-10-29 08:27:37 -07:00
Kevin Sawicki 28a2b48688 Bootstrap is no longer vendored 2013-10-28 18:23:40 -07:00
Kevin Sawicki 668ef0b3a1 Don't copy resources/mac on windows 2013-10-28 17:49:24 -07:00
Kevin Sawicki 9a4db9d95d Only run set-development-version on mac 2013-10-28 17:46:42 -07:00
probablycorey e457600f38 Add autosave package 2013-10-28 17:34:21 -07:00
Kevin Sawicki 2f62123a75 Merge branch 'master' into win-bootstrap-native-modules 2013-10-28 17:33:39 -07:00
probablycorey e7e28b568b Purge autosave from Atom source 2013-10-28 17:27:44 -07:00
Kevin Sawicki b70df78041 Remove duplicate extend call 2013-10-28 16:46:59 -07:00
Kevin Sawicki c4b24fe738 Use Date.now() 2013-10-28 15:47:23 -07:00
probablycorey b1f5d1e276 Emit pane:before-item-destroyed event 2013-10-28 15:40:28 -07:00
Kevin Sawicki cd9d6ca6ee Update variable name 2013-10-28 15:25:18 -07:00
Kevin Sawicki d6159a38d4 Make project.resolve work on Windows 2013-10-28 15:21:08 -07:00
Corey Johnson a828f389f4 Merge pull request #1038 from atom/cj-add-user-keymap-file
Use `~/.atom/keymap.cson` file instead of `~/atom/keymaps` directory
2013-10-28 15:13:45 -07:00
probablycorey 91c8371752 Update collaboration from 0.30.0 to 0.33.0 2013-10-28 15:09:31 -07:00
probablycorey 05c70aceec Revert "Update changelog"
This reverts commit d5b960f32b.
2013-10-28 15:01:43 -07:00
Kevin Sawicki 002fc570e7 Detect resolving absolute paths on windows 2013-10-28 14:37:57 -07:00
Kevin Sawicki f81c64f068 Don't use Contents directory on windows 2013-10-28 14:27:01 -07:00
Kevin Sawicki e9bcb4637e Only run copy-info-plist on darwin 2013-10-28 14:27:01 -07:00
Matt Colyer e21f1c1394 Comment out nslog for now 2013-10-28 14:18:41 -07:00
Kevin Sawicki eae5a25872 Upgrade to first-mate@0.5.0 2013-10-28 14:11:44 -07:00
Kevin Sawicki 6364589630 Check for existence before copying 2013-10-28 13:53:51 -07:00
Kevin Sawicki 41f6d6b0dd Remove trailing slash 2013-10-28 13:50:56 -07:00
probablycorey c581135029 Remove changelog file
Changelog entries are not entered via https://github.com/atom/atom/releases/
2013-10-28 13:49:13 -07:00
Kevin Sawicki af92c96a73 Wrap walkdir in try/catch 2013-10-28 13:47:37 -07:00
Kevin Sawicki cdd4c9669a Handle walkdir error events 2013-10-28 13:45:32 -07:00
Matt Colyer 1368b60f16 Merge branch 'win-bootstrap-native-modules' of https://github.com/atom/atom into win-bootstrap-native-modules 2013-10-28 13:42:29 -07:00
Matt Colyer cc42db3bff Log to a file on windows, for now 2013-10-28 13:42:18 -07:00
Kevin Sawicki cc3a2ab2d5 Remove duplicate shell app dir cp 2013-10-28 13:41:17 -07:00
Kevin Sawicki f9837aadaa Split out win32 variable values 2013-10-28 13:38:33 -07:00
Kevin Sawicki 20c7f298a9 Install to program files on windows 2013-10-28 12:12:46 -07:00
Matt Colyer 86506752a7 Atom.app doesn't exist in windows releases 2013-10-28 12:10:42 -07:00
Kevin Sawicki 83206ac3a7 Upgrade to bootstrap@3.0.0 2013-10-28 11:39:48 -07:00
probablycorey dc54ebf416 Merge remote-tracking branch 'origin/master' into cj-add-user-keymap-file 2013-10-28 10:04:48 -07:00
probablycorey d5b960f32b Update changelog 2013-10-28 10:04:29 -07:00
Kevin Sawicki ffaaa21b37 Upgrade to collaboration@0.33.0 2013-10-28 10:03:03 -07:00
Corey Johnson ef2a322229 Merge pull request #1037 from atom/cj-buffer-serialization
When opening a window, only use serialized buffer text if the contents on disk have not changed.
2013-10-28 09:48:43 -07:00
Kevin Sawicki 1931cb6dff Upgrade to release-notes@0.9.0 2013-10-28 09:36:12 -07:00
Kevin Sawicki 6040221d26 Upgrade to scandal@0.6.0 2013-10-28 09:27:43 -07:00
probablycorey 7c70c43c1c Update keymap documentation 2013-10-28 09:23:18 -07:00
probablycorey cde0fae1f3 Rename Keymap::loadUserKeymaps to Keymap::loadUserKeymap 2013-10-28 09:19:23 -07:00
probablycorey 95107052d0 User keymap can be cson or json 2013-10-28 09:18:29 -07:00
Kevin Sawicki 650915724b Upgrade to pathwatcher@0.8.0 2013-10-28 09:16:24 -07:00
Kevin Sawicki ad67abc2a2 Upgrade to atom-shell@0.6.6 2013-10-28 09:12:57 -07:00
Kevin Sawicki 50d2d5b1cd Upgrade to git-utils@0.28.0 2013-10-28 09:12:36 -07:00
Cheng Zhao 010905db0b Fix the "'true' is not found" error. 2013-10-28 09:23:57 +08:00
Kevin Sawicki 232bc8be8e Merge pull request #1032 from atom/ks-comment-corruption
Fix commenting on hard tab lines
2013-10-26 15:26:31 -07:00
Kevin Sawicki 57577966e7 Add assert for .5 indent level 2013-10-26 15:21:02 -07:00
Kevin Sawicki 08d5231d28 Add assert for unindented line 2013-10-26 15:21:02 -07:00
Kevin Sawicki 05c3d89381 Measure indent prefix on each line being commented
Previously a single indent string was used to replace all lines
which could corrupt lines using hard tabs since the indent string
used for replacement was two spaces causing the first character
of the line to be deleted.

Closes atom/language-c#1
2013-10-26 15:21:02 -07:00
Kevin Sawicki 7a3dc2c3b8 Merge pull request #1039 from atom/ks-dont-async-before-bootstrapping
Bootstrap before requiring async
2013-10-26 15:20:25 -07:00
Kevin Sawicki 8eecc56d08 💄 Fix typo in variable name 2013-10-26 15:12:13 -07:00
Kevin Sawicki e009ff6c59 Add missing parens 2013-10-26 15:07:20 -07:00
Kevin Sawicki f500e2e9fc Add semicolon 2013-10-26 15:03:21 -07:00
Kevin Sawicki 2a98ccec8d Don't require async before bootstrapping
async won't be available on the very first run of script/build
until it runs script/bootstrap for the first time so defer requiring
it until script/bootstrap completes.
2013-10-26 15:01:19 -07:00
Kevin Sawicki 8742f6c06c Run apm from node_modules 2013-10-26 14:54:23 -07:00
Cheng Zhao 9605da9d56 Update apm for the check of vs express. 2013-10-26 20:40:52 +08:00
Cheng Zhao 1cdb87fdce Update to atom-shell v0.6.5. 2013-10-26 20:40:34 +08:00
probablycorey 330bb1df4b Add keymap.cson file to dot-atom 2013-10-25 16:39:06 -07:00
Kevin Sawicki 45ceb3f9f9 Merge pull request #1028 from atom/ks-less-one-point-five
Upgrade to less 1.5.0
2013-10-25 16:21:36 -07:00
Matt Colyer 3fa7c8fb48 Handle the difference between atom-shell binaries 2013-10-25 16:20:30 -07:00
probablycorey 97c183d6df Update docs 2013-10-25 16:19:55 -07:00
probablycorey 42362e6ce9 Load user-keymap.cson instead of keymaps dir 2013-10-25 16:19:38 -07:00
Kevin Sawicki 2266ea25e8 Upgrade to less-cache@0.9.0 2013-10-25 16:05:01 -07:00
Kevin Sawicki 970d7654cb Upgrade to grunt-contrib-less@0.8.0 2013-10-25 16:05:01 -07:00
Kevin Sawicki 82cbfb3829 Upgrade to less@1.5.0 2013-10-25 16:05:00 -07:00
probablycorey c2c6b5f868 Update coffee-script to 1.6.3 2013-10-25 16:02:23 -07:00
probablycorey 0dd0c39918 Update comment 2013-10-25 15:29:52 -07:00
probablycorey 7002b4e5f6 Factor out common buffer loading code 2013-10-25 15:26:56 -07:00
Corey Johnson 78f1865bcf Merge pull request #1033 from atom/cj-search-modified-buffers
Search modified buffers
2013-10-25 15:19:53 -07:00
probablycorey bb281ce5af 💄 2013-10-25 15:19:20 -07:00
Matt Colyer b02d906cfb Rebuild modules on Windows in grunt update-atom-shell 2013-10-25 15:06:42 -07:00
probablycorey b5b07c1052 Emit modified-status-changed event when using serialized text 2013-10-25 14:40:53 -07:00
probablycorey c77b44d5ef Move variable assignment 2013-10-25 14:29:59 -07:00
Kevin Sawicki eba1e474f8 Upgrade to spell-check@0.9.0 2013-10-25 14:27:51 -07:00
Kevin Sawicki 6fa580f543 Upgrade to symbols-view@0.15.0 2013-10-25 14:24:07 -07:00
probablycorey feed72b68e Change @loadFromDisk to @useSerializedText 2013-10-25 14:21:39 -07:00
probablycorey 5cee47c207 Fix replication spec
Don't rely on serialization to handle modifications after documents are
connected.
2013-10-25 14:21:23 -07:00
Kevin Sawicki 1d1a14b8e9 Upgrade to gists@0.6.0 2013-10-25 14:16:23 -07:00
Kevin Sawicki 18421465c0 Upgrade to github-sign-in@0.9.0 2013-10-25 14:15:20 -07:00
Matt Colyer ea9930db70 Disable broken packages, for now 2013-10-25 14:06:05 -07:00
probablycorey 2d40cb09d1 Remove focused spec 2013-10-25 14:03:27 -07:00
probablycorey 8956881192 Only load serialized content if the disk content's have not changed. 2013-10-25 13:50:16 -07:00
probablycorey 32bc8a6258 Remove initialText option from TextBuffer constructor 2013-10-25 13:50:06 -07:00
Matt Colyer 30c1124e5e Bump apm for visual studio fixes 2013-10-25 12:15:20 -07:00
Kevin Sawicki 63cb53b169 Upgrade to language-xml@0.2.0 2013-10-25 12:09:27 -07:00
Kevin Sawicki 17ebb079eb Upgrade to language-text@0.2.0 2013-10-25 12:08:34 -07:00
Kevin Sawicki 9f4f3d26e5 Upgrade to language-sql@0.2.0 2013-10-25 12:07:52 -07:00
Kevin Sawicki 8bc9c9aba3 Upgrade to language-source@0.2.0 2013-10-25 12:07:14 -07:00
Kevin Sawicki 2e20c7696e Upgrade to language-shellscript@0.2.0 2013-10-25 11:53:51 -07:00
Kevin Sawicki 78bb8b473b Upgrade to language-sass@0.3.0 2013-10-25 11:53:11 -07:00
Kevin Sawicki a0fb4333d5 Upgrade to language-ruby@0.4.0 2013-10-25 11:52:10 -07:00
Kevin Sawicki 197291e453 Upgrade to language-ruby-on-rails@0.3.0 2013-10-25 11:52:03 -07:00
Kevin Sawicki bafea9b95b 💄 Sort language packages 2013-10-25 11:49:37 -07:00
Kevin Sawicki 23b635db1e Upgrade to language-python@0.2.0 2013-10-25 11:48:35 -07:00
Kevin Sawicki 7aa57c44f8 Upgrade to language-puppet@0.2.0 2013-10-25 11:45:20 -07:00
Kevin Sawicki ece0ea2a54 Upgrade to language-php@0.2.0 2013-10-25 11:44:24 -07:00
Kevin Sawicki f22732b109 Upgrade to language-perl@0.2.0 2013-10-25 11:43:32 -07:00
Kevin Sawicki 71b9188ece Upgrade to language-object-c@0.2.0 2013-10-25 11:42:38 -07:00
Kevin Sawicki a2017628bc Upgrade to language-json@0.2.0 2013-10-25 11:39:33 -07:00
Kevin Sawicki cf025639bd Upgrade to language-javascript@0.3.0 2013-10-25 11:39:02 -07:00
Kevin Sawicki df6ebddc69 Upgrade to language-java@0.2.0 2013-10-25 11:38:14 -07:00
Kevin Sawicki aa2734f3bf Upgrade to language-hyperlink@0.3.0 2013-10-25 11:37:37 -07:00
Kevin Sawicki b9e3a8bd40 Upgrade to language-html@0.2.0 2013-10-25 11:36:28 -07:00
Kevin Sawicki 2a3a38a5f8 Upgrade to language-git@0.2.0 2013-10-25 11:35:35 -07:00
Kevin Sawicki 0254812446 Upgrade to language-css@0.2.0 2013-10-25 11:29:13 -07:00
Kevin Sawicki 11186f627e Upgrade to language-c@0.2.0 2013-10-25 11:23:21 -07:00
Kevin Sawicki db44df040e Upgrade apm for windows fix 2013-10-25 10:14:59 -07:00
Kevin Sawicki cdf439b556 Upgrade apm for windows fix 2013-10-25 10:14:04 -07:00
Kevin Sawicki e4fc15deec Remove cmake check since it is no longer required 2013-10-25 10:01:43 -07:00
Kevin Sawicki 53547b5a8d Trigger commands on rootView when body is active element 2013-10-25 09:20:47 -07:00
Kevin Sawicki 6460cbe288 Upgrade to command-palette@0.6.0 2013-10-25 08:36:32 -07:00
Kevin Sawicki 29646cdff8 💄 Use Date.now 2013-10-24 18:58:43 -07:00
Kevin Sawicki feff67457d 🚱 Include namespace when canceling subscription
Emissary does not clear our namespace listeners when calling off
with only the event name and the handler.
2013-10-24 18:45:00 -07:00
probablycorey 1f30231d5c Project.scan scans buffer if the file is modified
Closes #487
2013-10-24 15:32:32 -07:00
Ben Ogle 3e584f29b1 Upgrade to find-and-replace@0.32.0 2013-10-24 15:17:29 -07:00
probablycorey c424f7bafa Remove console.log 2013-10-24 15:04:38 -07:00
probablycorey 48fbdc69fb Update collaboration version 2013-10-24 14:43:05 -07:00
probablycorey c1b0ba2773 Check for cmake dependency before building Atom 2013-10-24 14:40:03 -07:00
Matt Colyer d4949c872b Merge pull request #1019 from atom/api-docs
More detailed pass at API documentation
2013-10-24 13:54:03 -07:00
Matt Colyer a8a28c8635 Merge remote-tracking branch 'origin/master' into win-bootstrap-native-modules 2013-10-24 13:47:09 -07:00
Kevin Sawicki 6f47010a72 Upgrade to language-javascript@0.2.0 2013-10-24 09:52:51 -07:00
Adam Roben 0a3f64a3df Merge pull request #1029 from atom/aroben-patch-1
Get rid of ANSI escape sequences in Constructicon output
2013-10-24 09:21:57 -07:00
Adam Roben f21e8e3aa4 Get rid of ANSI escape sequences in Constructicon output
Passing --no-color to grunt should get rid of these.
2013-10-24 08:48:05 -04:00
Paul Betts 39fb929af6 Bump pathwatcher and git-utils to Windows friendly ones 2013-10-23 16:47:11 -07:00
Kevin Sawicki ca26d53db1 Upgrade to collaboration@0.29.0 2013-10-23 16:31:24 -07:00
Matt Colyer 1b8f8cd914 📝 Clarify git-utils.coffee 2013-10-23 16:16:30 -07:00
Kevin Sawicki 2d30ec84bb Upgrade to tree-view@0.21.0 2013-10-23 16:12:25 -07:00
Kevin Sawicki 378a7135b7 Add missing at sign before getFocusedWindowSize
Closes atom/collaboration#22
2013-10-23 15:53:52 -07:00
Matt Colyer b288a5c68f 📝 Provide detailed docs on fsUtils 2013-10-23 14:52:27 -07:00
Corey Johnson 265e4ff43c Merge pull request #1020 from atom/cj-add-flash-error
Add visual cues for errors and beeps
2013-10-23 14:30:41 -07:00
probablycorey 4ad38eed87 Use @config instead of config 2013-10-23 14:26:48 -07:00
Kevin Sawicki 427a26c99b Upgrade apm for a couple tweaks 2013-10-23 14:25:13 -07:00
probablycorey 069e0bed9a Merge remote-tracking branch 'origin/master' into cj-add-flash-error 2013-10-23 14:21:37 -07:00
probablycorey f7dfd60014 Remove unused $$ 2013-10-23 14:14:47 -07:00
probablycorey d5f92ef59d Move all beep code into Atom class 2013-10-23 14:09:00 -07:00
Kevin Sawicki 76b68ae1f8 Upgrade to settings-view@0.33.0 2013-10-23 12:41:55 -07:00
Matt Colyer b79068ea65 Merge branch 'master' into api-docs 2013-10-23 12:29:43 -07:00
Matt Colyer 9ae078f405 Prepare for v32.0.0 release 2013-10-23 12:19:28 -07:00
Kevin Sawicki 2dd1b161cf Upgrade apm for available fix 2013-10-23 12:14:15 -07:00
Matt Colyer e6e7d389cd Upgrade symbols-view@0.14.0 2013-10-23 12:09:37 -07:00
Matt Colyer 6aa6706d86 Move window:reload from cmd-r => ctrl-alt-cmd-r 2013-10-23 12:05:48 -07:00
Matt Colyer 2b2677ae18 Upgrade apm to work with latest atom.io API 2013-10-23 12:01:19 -07:00
probablycorey 42e269a7ce Update visual bell to v0.3.0 2013-10-23 11:57:21 -07:00
Ben Ogle 0c6c2e2d84 Upgrade to find-and-replace#0.31.0 2013-10-23 11:48:26 -07:00
probablycorey c513c55f7a Update visual-beep package name to visual-bell 2013-10-23 11:38:19 -07:00
Kevin Sawicki e873a0977c Revert "Set path to node directly"
This reverts commit 8bcf40111d.
2013-10-23 11:29:14 -07:00
Kevin Sawicki 8bcf40111d Set path to node directly 2013-10-23 11:18:49 -07:00
probablycorey 224bc56d4e Require $$ via space-pen-extensions 2013-10-23 11:16:12 -07:00
probablycorey 5d35f52174 Add Visual Beep to default packages 2013-10-23 11:12:27 -07:00
Matt Colyer afb2ec86b7 Merge branch 'master' into api-docs 2013-10-23 11:02:38 -07:00
Ben Ogle 8f870544b9 Upgrade to find-and-replace@0.30.0 2013-10-23 10:58:33 -07:00
Ben Ogle 29f6833807 upgrade to settings-view@0.32.0 2013-10-23 10:53:37 -07:00
probablycorey ffcd948362 Move beep method to rootView 2013-10-23 10:42:13 -07:00
probablycorey 3b525302b0 Merge remote-tracking branch 'origin/master' into cj-add-flash-error 2013-10-23 10:27:49 -07:00
Ben Ogle 3ae5213ebf Update theme docs 2013-10-22 18:26:21 -07:00
Ben Ogle d2f33dcf39 Upgrade to settings-view@0.31.1 2013-10-22 18:09:38 -07:00
Ben Ogle 80f4e7eb7f Add ThemeManager.setEnabledThemes 2013-10-22 18:09:21 -07:00
Kevin Sawicki cbb82b1dcc Use background-color-selected for active pill
This prevents the bright blue pill color in dark-ui and instead
mirrors the active tab color.
2013-10-22 17:07:44 -07:00
probablycorey 7a81a84393 Update markdown preview package to 0.12.0 2013-10-22 16:29:33 -07:00
Matt Colyer f2f915c0d0 Merge branch 'master' into api-docs 2013-10-22 16:19:18 -07:00
Matt Colyer 72bd408722 Merge pull request #1000 from atom/sublime-keybindings
Sublime keybindings
2013-10-22 16:14:07 -07:00
Matt Colyer e38f7259e5 Upgrade symbols-view@0.13.0 2013-10-22 16:12:15 -07:00
Matt Colyer 48335bd4ac Upgrade exception-report@0.5.0 2013-10-22 16:08:05 -07:00
Kevin Sawicki cdebc2306c Upgrade apm for install version fix 2013-10-22 16:06:28 -07:00
Ben Ogle a37b029ad9 Prepend newly enabled themes, not append 2013-10-22 16:04:55 -07:00
Matt Colyer ba9be0c07a Add Movements menu 2013-10-22 16:00:32 -07:00
Ben Ogle 4a48e1a228 Upgrade to package-generator@0.14.0 2013-10-22 15:59:49 -07:00
Kevin Sawicki 43dae4e9eb Add helper to get apm path 2013-10-22 15:52:04 -07:00
Matt Colyer 8503a53fec 📝 Update documentation for file.coffee 2013-10-22 15:46:21 -07:00
Matt Colyer d0ed2a87cd 📝 Remove curly braces for core objects 2013-10-22 15:46:04 -07:00
Kevin Sawicki fa36ab1a5c Add apm to public API 2013-10-22 15:45:22 -07:00
Ben Ogle 141da61301 Commands for moving in buffer more consistent with sublime 2013-10-22 15:27:27 -07:00
Kevin Sawicki 59ef210624 Stub out Find, Collaboration, and Packages in base menu 2013-10-22 15:26:57 -07:00
Matt Colyer 2ddcfb60cf Allow f2 and tab keybindings
This is possible now that we're on atom-shell@0.6.4
2013-10-22 15:17:12 -07:00
Matt Colyer e003b478f3 Sublime accepts both meta-Z and meta-y 2013-10-22 15:17:11 -07:00
Matt Colyer de69446e1e Remap join lines to meta-j 2013-10-22 15:17:11 -07:00
Matt Colyer 5e253378e2 Update restricted key bindings for atom-shell@0.6.3 2013-10-22 15:17:11 -07:00
Matt Colyer 9da395c0aa Add a Selection menu 2013-10-22 15:17:11 -07:00
Matt Colyer fd0bed4248 Fill out the rest of the Edit menu 2013-10-22 15:17:11 -07:00
Matt Colyer 1f86c62dc9 Remove accidental logging 2013-10-22 15:17:11 -07:00
Matt Colyer 161a87b8e1 Change delete-line accelerator to ctrl-K 2013-10-22 15:17:11 -07:00
Matt Colyer 74cb91a6a1 Add Edit > Lines submenu 2013-10-22 15:17:11 -07:00
Matt Colyer 3eab78bc23 Set undo keybinding to meta-y 2013-10-22 15:17:11 -07:00
Ben Ogle 2574e4b6ee Merge pull request #994 from atom/bo-improve-theme-load-api
Add an API for activating themes without having to touch config.themes
2013-10-22 15:14:50 -07:00
Kevin Sawicki fd177d7171 Look for token in keychain 2013-10-22 15:13:35 -07:00
Matt Colyer eeb24e1d5c Mt erge branch 'master' into api-docs 2013-10-22 15:12:43 -07:00
Ben Ogle b13c633775 Upgrade to dev-live-reload@0.11.0 2013-10-22 15:09:58 -07:00
Matt Colyer b14ca90362 Upgrade tree-view@0.20.0 2013-10-22 15:08:09 -07:00
Ben Ogle 997891f298 Fixup specs 2013-10-22 15:07:09 -07:00
Ben Ogle 967c04fb19 Clean up theme check in PackageManager with PackageActivators
You can now call `PackageManager.registerPackageActivator` for specific
package types. On `PackageManager.activate` it will call your
`PackageActivator.activatePackages(packages)` with the proper packages.
2013-10-22 15:07:09 -07:00
Ben Ogle 2a7908a196 Upgrade to settings-view@0.31.0 2013-10-22 15:07:08 -07:00
Ben Ogle ecbb7cad23 fix test from config 2013-10-22 15:06:54 -07:00
Ben Ogle 8ac84359b1 Fix docs 2013-10-22 15:06:54 -07:00
Ben Ogle 71a24ec49b Fix config tests 2013-10-22 15:06:54 -07:00
Ben Ogle c614519529 Clean up the tests; add tests for disablePackage() 2013-10-22 15:06:54 -07:00
Ben Ogle 2624cf6e75 oops, don't deactivate all the packages! 2013-10-22 15:06:54 -07:00
Ben Ogle f2c1ea9b5a Remove log lines 2013-10-22 15:06:54 -07:00
Ben Ogle 7b1b73e8eb Watch the core.disabledPackages config option 2013-10-22 15:06:54 -07:00
Ben Ogle e8b50755cb Add config.unobserve() 2013-10-22 15:06:54 -07:00
Ben Ogle dd3b20f7de Pass previous value to the callback in config.observe() 2013-10-22 15:06:54 -07:00
Ben Ogle 73c1fb23da Use more concise method for @metadata settings 2013-10-22 15:06:54 -07:00
Ben Ogle d5b07088cd Remove loadStylesheets from non-theme pckage activate() 2013-10-22 15:06:53 -07:00
Ben Ogle d2864f1d0c Upgrade to dev-live-reload@0.10.0 2013-10-22 15:06:53 -07:00
Ben Ogle b330ce6722 Add atom.inSpecMode() 2013-10-22 15:06:53 -07:00
Ben Ogle 81e6150fde Return package if its already loaded 2013-10-22 15:06:53 -07:00
Ben Ogle 16128b0d90 upgrade to settings-view@0.30.0 2013-10-22 15:06:53 -07:00
Ben Ogle 0788905eb5 Upgrade to dev-live-reload@0.9.0 2013-10-22 15:06:26 -07:00
Ben Ogle abe36765b5 Fix test for both local and janky 2013-10-22 15:06:25 -07:00
Ben Ogle eaea8753f5 nof 2013-10-22 15:06:25 -07:00
Ben Ogle 0b74dfc67a Remove unnecessary lines 2013-10-22 15:06:25 -07:00
Ben Ogle 9f753cd3b9 💄 2013-10-22 15:06:25 -07:00
Ben Ogle 4440210d9a Fix tests 2013-10-22 15:06:25 -07:00
Ben Ogle 56832b11fc Refactor pkg and themeManager -- all themes stored in the pkg manager 2013-10-22 15:06:25 -07:00
Kevin Sawicki 23cc82e0ef Upgrade apm for install fixes 2013-10-22 15:05:17 -07:00
Ben Ogle 077cb9ddb7 Add an enableTheme() function to ThemeManager
And use it in the activatePackage() function in PackageManager
2013-10-22 15:04:55 -07:00
Matt Colyer b416116e0c Merge pull request #1023 from atom/remove-next-tick
Remove `_.nextTick` from atom exports
2013-10-22 14:54:10 -07:00
Matt Colyer 9cc52e7882 Remove _.nextTick from exports 2013-10-22 13:53:56 -07:00
Kevin Sawicki 79e90b313f Merge pull request #1021 from atom/ks-remove-bundle-shim
Update packages to use new language-* package naming scheme
2013-10-22 13:52:41 -07:00
Matt Colyer 9093690511 Upgrade timecop@0.7.0 2013-10-22 13:51:39 -07:00
Matt Colyer c8a45b7b74 Upgrade terminal@0.14.0 2013-10-22 13:49:16 -07:00
Matt Colyer f1e862252b Update git-diff@0.12.0 2013-10-22 13:47:09 -07:00
Kevin Sawicki c3b79778ba Upgrade to autocomplete@0.11.0 2013-10-22 13:44:54 -07:00
Kevin Sawicki 37fec2e2bf Upgrade to grammar-selector@0.8.0 2013-10-22 13:39:49 -07:00
Matt Colyer d805b6f6ac tMerge branch 'master' into api-docs 2013-10-22 13:35:56 -07:00
Kevin Sawicki f88e7e99ee Upgrade to markdown-preview@0.11.0 2013-10-22 13:34:04 -07:00
Kevin Sawicki 3c1734c8f3 Upgrade to link@0.7.0 2013-10-22 13:23:36 -07:00
Kevin Sawicki efdcf5a40f Upgrade to snippets@0.11.0 2013-10-22 13:20:29 -07:00
Kevin Sawicki 06960f5c10 Upgrade to spell-check@0.8.0 2013-10-22 13:19:20 -07:00
Kevin Sawicki 047b875ce9 Upgrade to status-bar@0.15.0 2013-10-22 13:16:58 -07:00
Kevin Sawicki 2b266da3e3 Upgrade to markdown-preview@0.10.0 2013-10-22 13:10:32 -07:00
Kevin Sawicki d430aafb7c Remove bundle rename shim 2013-10-22 13:03:27 -07:00
Kevin Sawicki 4132cddb8a Merge pull request #1012 from atom/ks-atom-dot-io
Install packages from atom.io
2013-10-22 13:02:07 -07:00
probablycorey d38067ec1a Fix lint errors 2013-10-22 13:00:14 -07:00
Kevin Sawicki beda703001 Upgrade to latest apm master 2013-10-22 12:56:30 -07:00
probablycorey 71ede6b97f Add core.audioBeep and core.visualBeep to core settings
Closes #996
2013-10-22 12:43:41 -07:00
Kevin Sawicki fa5f88cf05 Upgrade apm for atom.io integration 2013-10-22 12:40:46 -07:00
probablycorey 069ae17f9d Atom::beep triggers visual and audio beep 2013-10-22 12:32:06 -07:00
Kevin Sawicki 1e4041d7cf Upgrade apm for create fixes 2013-10-22 12:31:44 -07:00
Kevin Sawicki a7d2c14364 Expect 201 when creating package/version 2013-10-22 12:31:12 -07:00
Kevin Sawicki abf570ebf5 Upgrade to collaboration@0.28.0 2013-10-22 12:27:33 -07:00
probablycorey 3c08ae2de6 Add Atom::visualBeep method 2013-10-22 12:18:22 -07:00
Kevin Sawicki c1fae082b4 Add shim for hyperlink bundle rename 2013-10-22 12:04:39 -07:00
Kevin Sawicki 40ab5938f2 Convert old bundle names until specs are updated 2013-10-22 11:54:19 -07:00
Kevin Sawicki b2dae8be6c Update package for new name 2013-10-22 11:38:10 -07:00
probablycorey c71e9cf618 Add flashError css 2013-10-22 11:36:37 -07:00
Kevin Sawicki 931ac5d029 Upgrade apm to error passthrough fix 2013-10-22 11:35:42 -07:00
Kevin Sawicki 620b939a46 Upgrade apm for install check 2013-10-22 11:31:12 -07:00
Kevin Sawicki 73f0f2930f Ensure package basename is used 2013-10-22 11:19:47 -07:00
Kevin Sawicki c66b478c63 Upgrade apm for progress tweak 2013-10-22 11:19:41 -07:00
Kevin Sawicki 2254a6e33b Set environment variables before bootstrapping
The environment variables are required by bootstrap now for
installing packages via atom.io
2013-10-22 10:34:34 -07:00
Kevin Sawicki bb19821c5c Upgrade apm 2013-10-22 10:15:54 -07:00
Kevin Sawicki 0aae15e4c1 Upgrade apm for class renames 2013-10-22 09:01:31 -07:00
Kevin Sawicki 4d035b148d 💄 2013-10-22 09:01:31 -07:00
Kevin Sawicki 7bee816c19 Upgrade apm for install fix 2013-10-22 09:01:31 -07:00
Kevin Sawicki 927279cd9d Require language suffix to be non-empty 2013-10-22 09:01:31 -07:00
Kevin Sawicki 91f33de04e Upgrade apm for another clean fix 2013-10-22 09:01:31 -07:00
Kevin Sawicki 351035e540 Upgrade apm for clean command fix 2013-10-22 09:01:31 -07:00
Kevin Sawicki 656bee7f56 Upgrade apm for ATOM_ACCESS_TOKEN fix 2013-10-22 09:01:31 -07:00
Kevin Sawicki e7fc879a57 Upgrade apm for new atom.io installation 2013-10-22 09:01:31 -07:00
Kevin Sawicki 575a13957b Upgrade to language-todo@0.2.0 2013-10-22 09:01:31 -07:00
Kevin Sawicki ee2e5bb2b0 Upgrade to language-sass@0.2.0 2013-10-22 09:01:31 -07:00
Kevin Sawicki efbddc7339 Upgrade to language-ruby@0.2.0 2013-10-22 09:01:31 -07:00
Kevin Sawicki 1c16f4fb73 Upgrade to language-ruby-on-rails@0.2.0 2013-10-22 09:01:30 -07:00
Kevin Sawicki 23158261b2 Upgrade to language-property-list@0.2.0 2013-10-22 09:01:30 -07:00
Kevin Sawicki dd51a08d54 Upgrade to language-hyperlink@0.2.0 2013-10-22 09:01:30 -07:00
Kevin Sawicki 03f6461dec Reset language packages versions 2013-10-22 09:01:30 -07:00
Kevin Sawicki 4fae98d049 Use atom.io URL 2013-10-22 09:01:30 -07:00
Kevin Sawicki eeebaba350 Add language- prefix to package name regex 2013-10-22 09:01:30 -07:00
Kevin Sawicki 3b05b40d66 Update package names for new language- prefix 2013-10-22 09:01:30 -07:00
Kevin Sawicki f01d006e25 Add task to publish packages 2013-10-22 09:01:30 -07:00
Kevin Sawicki d765880f74 Upgrade core themes for versions with a README 2013-10-22 09:01:30 -07:00
Kevin Sawicki ceffb23431 Put clojure with the other c packages 2013-10-22 09:01:30 -07:00
Kevin Sawicki 755abaf2b7 Break out package dependencies into separate section 2013-10-22 09:01:30 -07:00
probablycorey 35ff4b8677 Remove unnecessary "if" condition
Hat tip briandoll
2013-10-21 20:14:25 -07:00
Cheng Zhao d16fb6fc8f Update to atom-shell v0.6.4. 2013-10-22 10:39:00 +08:00
Cheng Zhao 5d701d899e Merge pull request #1011 from atom/no-root-tmp
Do not always use "/tmp" to represent system temporary directory
2013-10-21 17:37:04 -07:00
Cheng Zhao 12ca6f86ef Merge pull request #1003 from atom/bash-scripts-to-js
Convert bash scripts to node.js
2013-10-21 17:36:32 -07:00
Matt Colyer 58ef0f4176 📝 Refine Directory's documentation 2013-10-21 16:54:52 -07:00
probablycorey 4dada919ba Revert "Remove window.measure and window.profile"
This reverts commit 9b318c1317.
2013-10-21 16:49:00 -07:00
probablycorey 9b318c1317 Remove window.measure and window.profile 2013-10-21 16:46:19 -07:00
Matt Colyer 6ed3bb48f2 Remove 'fs' require and use 'fsUtils' instead 2013-10-21 16:35:59 -07:00
Matt Colyer 814ab4e980 📝 Throughly document BufferedProcess. 2013-10-21 16:32:10 -07:00
Matt Colyer ffbce2020e Note that stderr is optional 2013-10-21 16:31:15 -07:00
Matt Colyer 0fc2f70dc5 📝 Throughly document BufferedNodeProcess 2013-10-21 16:26:18 -07:00
probablycorey 5277277683 Only modify pathToOpen if initialLine option is present.
Closes #1007
2013-10-21 16:05:45 -07:00
Matt Colyer 3ec33de3b7 Upgrade release-notes@0.8.0 2013-10-21 15:57:47 -07:00
Corey Johnson 0d49f2a3d0 Merge pull request #1001 from atom/cj-render-long-lines
Render long lines (without crashing or long pauses)
2013-10-21 15:38:13 -07:00
probablycorey d21a5a6836 Use string concatenation instead of array concatenation 2013-10-21 15:17:41 -07:00
probablycorey 5e3d52927a Use cachedCharWidth instead of cachedVal 2013-10-21 11:10:44 -07:00
probablycorey 0bc470c6d9 💄 2013-10-21 11:10:17 -07:00
Kevin Sawicki 2aa3a7c332 Merge pull request #1004 from atom/ks-multi-byte-onig-fix
Upgrade oniguruma for multi-byte scanning fix
2013-10-21 08:29:51 -07:00
Kevin Sawicki 948a2a47a3 Add spec for JSON tokenizing with Unicode characters 2013-10-21 08:25:15 -07:00
Kevin Sawicki df2727d926 Upgrade to oniguruma@0.21.0
Closes #980
2013-10-21 08:25:15 -07:00
Cheng Zhao 1129ff7436 doc: Mention we should be ware of platform differences. 2013-10-21 22:41:41 +08:00
Cheng Zhao 89f72c36f8 💄 Do not use "path" as file path's variabla name. 2013-10-21 22:36:40 +08:00
Cheng Zhao 017c3315d2 💄 Fix typos in specs. 2013-10-21 22:23:22 +08:00
Cheng Zhao 0a561643a9 Home directory is process.env.USERPROFILE on Windows. 2013-10-21 22:04:51 +08:00
Cheng Zhao 640b6feb49 💄 The atom object is no accessable in browser process. 2013-10-21 21:59:03 +08:00
Cheng Zhao 94f441e123 💄 Add missing ")". 2013-10-21 21:49:55 +08:00
Cheng Zhao 459309aa78 Do not use "/tmp" in scripts. 2013-10-21 21:42:55 +08:00
Cheng Zhao 558778b4d4 Add atom.getTempDirPath to return the path of "system temporary directory". 2013-10-21 21:39:52 +08:00
Cheng Zhao 05550717e2 Use temp.dir to replace '/tmp' in specs. 2013-10-21 21:36:08 +08:00
Cheng Zhao a92e5c00ea Update atom-shell to v0.6.3. 2013-10-21 16:59:49 +08:00
Cheng Zhao dbd1438cf7 Add script/bootstrap.cmd. 2013-10-19 22:32:26 +08:00
Cheng Zhao 082686bba8 Fix bootstrap script on Windows. 2013-10-19 22:11:03 +08:00
probablycorey f6fee9d04f Optimize measuring long lines 2013-10-18 15:36:39 -07:00
probablycorey 02dd79feeb Use module variable naming conventions 2013-10-18 15:36:25 -07:00
probablycorey ff5ee45dc7 Fix return value for getValueAsHTML 2013-10-18 13:53:11 -07:00
Matt Colyer 702eaea483 Merge pull request #991 from atom/menu-improvements
Improve menus for discoverablity
2013-10-18 13:04:37 -07:00
Matt Colyer fc6b6d9760 Upgrade release-notes@0.6.0 2013-10-18 12:05:32 -07:00
Matt Colyer 3e5f204f08 Add a Help menu 2013-10-18 12:02:03 -07:00
probablycorey eced0a3208 Don't cache entire line length on lines > 160 chars 2013-10-18 11:58:36 -07:00
Matt Colyer f3aec0dfee Add copy path menu item 2013-10-18 11:51:56 -07:00
probablycorey fd062a7c4f Split long spans into multiple spans
If a span has more than 2^16 chars and has the style `white-space: pre` Chrome
won't render it.
2013-10-18 11:44:56 -07:00
Matt Colyer d9c946cafa Upgrade tree-view@0.19.0 2013-10-18 11:44:18 -07:00
Matt Colyer 2502d48544 Upgrade to-the-hubs@0.8.0 2013-10-18 11:38:58 -07:00
Matt Colyer 9ea2bfa920 Clear menu template to avoid separator duplication 2013-10-18 11:34:19 -07:00
Matt Colyer 2ec6d578f6 Add menu item for soft-wrap 2013-10-18 11:33:22 -07:00
Matt Colyer ff22046f54 Upgrade timecop@0.6.0 2013-10-18 11:33:07 -07:00
Matt Colyer 5541875965 Don't append duplicate menu items
Fixes #995
2013-10-18 10:20:03 -07:00
Matt Colyer 9c877c7f0b Correct and add File menu items 2013-10-18 10:09:47 -07:00
Matt Colyer 4061011609 Upgrade terminal@0.13.0 2013-10-18 09:57:40 -07:00
Kevin Sawicki e8b5bf5402 Use clear-cut library for specificity 2013-10-18 09:33:57 -07:00
Kevin Sawicki 069208975c Add proper invisibles in empty lines with indent guide
This fixes a regression where multiple end of line invisibles were
displayed on empty lines when the indent guide was also enabled.

The invisibles array used to be shifted and not it isn't but the
entire array was still being iterated over causing extra invisibles
to be added to the line.
2013-10-17 18:31:59 -07:00
Kevin Sawicki 60dcef26b0 Join with empty string instead of comma 2013-10-17 17:25:28 -07:00
Matt Colyer 217f182579 Upgrade symbols-view@0.12.0 2013-10-17 17:12:50 -07:00
Kevin Sawicki ccdd17c0d8 Don't modify passed in item
Perform a deep clone before iterating over to add items and submenus.
2013-10-17 16:57:49 -07:00
Kevin Sawicki d6452c37d8 Clear menu template after each spec run
This is needed since packages don't destroy menus when deactivated
so the template currently grows larger each time a package is activated.
2013-10-17 16:31:15 -07:00
Matt Colyer c9ab78ee53 Upgrade styleguide@0.9.0 2013-10-17 16:29:55 -07:00
Matt Colyer 5a1e72cd81 Upgrade snippets@0.10.0 2013-10-17 16:29:34 -07:00
Matt Colyer bd674764e8 Upgrade release-notes@0.5.0 2013-10-17 16:19:53 -07:00
Matt Colyer 3cce3c5202 Upgrade package-generator@0.13.0 2013-10-17 16:12:57 -07:00
Matt Colyer c809df6762 Upgrade markdown-preview@0.9.0 2013-10-17 16:12:24 -07:00
Matt Colyer 9c3a8e5c7a Upgrade grammar-selector@0.7.0 2013-10-17 16:01:35 -07:00
Matt Colyer 9f0064f903 Upgrade to go-to-line@0.8.0 2013-10-17 15:57:06 -07:00
Matt Colyer 35399d93a9 Upgrade github-sign-in@0.8.0 2013-10-17 15:46:32 -07:00
Kevin Sawicki 5619f81c89 Log error before exiting 2013-10-17 15:38:47 -07:00
Matt Colyer 26d9d7a8fd Merge branch 'master' into menu-improvements
Conflicts:
	package.json
2013-10-17 15:28:22 -07:00
Matt Colyer 590a03b8e3 Upgrade gists@0.5.0 2013-10-17 15:09:22 -07:00
Matt Colyer 9c9e1164b1 Upgrade to fuzzy-finder@0.15.0 2013-10-17 14:59:44 -07:00
probablycorey 708d3fb08f Show Preference opens a new window (when none are already open)
Closed #990
2013-10-17 14:45:01 -07:00
probablycorey e07fb89ec7 💄 2013-10-17 14:45:01 -07:00
Matt Colyer 3c13f41b7c Upgrade find-and-replace@0.29.0 2013-10-17 14:44:03 -07:00
Matt Colyer 49756e6846 Upgrade editor-stats@0.5.0 2013-10-17 14:33:00 -07:00
Matt Colyer 142f5cf754 Add "Run Package Specs" menu item 2013-10-17 14:30:35 -07:00
Matt Colyer acbb521532 Upgrade dev-live-reload@0.8.0 2013-10-17 14:25:25 -07:00
Matt Colyer 1e6302b060 Upgrade command-logger@0.6.0 2013-10-17 14:17:30 -07:00
Kevin Sawicki c7afa8d682 Upgrade to go-to-line@0.7.0 2013-10-17 14:17:18 -07:00
Kevin Sawicki 30e20884d9 Upgrade to collaboration@0.26.0 2013-10-17 14:13:37 -07:00
Matt Colyer 3e71e8a2be Upgrade to collaboration@0.25.0 2013-10-17 14:11:13 -07:00
probablycorey 0e601737e7 Update find and replace 2013-10-17 13:58:29 -07:00
Matt Colyer 0653eed275 Upgrade to bookmarks@0.8.0 2013-10-17 13:56:27 -07:00
Matt Colyer 0d131e7253 Upgrade to autoflow@0.5.0 2013-10-17 13:49:45 -07:00
Ben Ogle a0c5e38cdd Merge pull request #988 from atom/bo-package-doc-update
Doc update for themes
2013-10-17 13:43:56 -07:00
Ben Ogle b1d474fd5c Remove slow 2013-10-17 13:42:25 -07:00
Matt Colyer 0dc6302c38 Update base menus to match proposal 2013-10-17 13:42:14 -07:00
Ben Ogle 89ea353d99 Fix based on matts suggestions 2013-10-17 13:41:40 -07:00
Corey Johnson 766634c428 Merge pull request #989 from atom/cj-text-buffer-cleanup
Text Buffer cleanup
2013-10-17 11:52:25 -07:00
probablycorey 1262073853 Wait for buffer to load in git spec 2013-10-17 11:48:22 -07:00
probablycorey 686b88fe60 Use fsUtils.statSyncNoException 2013-10-17 11:35:20 -07:00
probablycorey 875dfa61cb Merge remote-tracking branch 'origin/master' into cj-text-buffer-cleanup 2013-10-17 10:48:11 -07:00
probablycorey 2000e43053 Don't allow Atom to open files larger than 1MB
Temporary measure until we can get this working with telepath.
2013-10-17 10:41:17 -07:00
probablycorey 450eba0d54 Make content change events use async reads 2013-10-17 10:40:41 -07:00
probablycorey 5be444c4ed Rearrange require order 2013-10-17 10:40:14 -07:00
probablycorey 238399adb6 spec 💄 2013-10-17 10:39:42 -07:00
probablycorey 747b79cced Actually store the cached contents of a file.
Big Beautiful Arrows
2013-10-17 10:39:23 -07:00
probablycorey 6e93c37ce1 Rename File::read to File::readSync 2013-10-17 10:38:45 -07:00
Matt Colyer b3b3e5fa3c Upgrade autocomplete to 0.10.0 2013-10-17 10:24:41 -07:00
Kevin Sawicki 3251362400 Merge pull request #987 from atom/ks-fuzzaldrin
Extract string score and fuzzy filter
2013-10-17 09:55:28 -07:00
Kevin Sawicki 9b84271fee Upgrade to settings-view@0.29.0 2013-10-17 09:46:10 -07:00
Kevin Sawicki 5e5375528b Replace stringscore/fuzzy-filter with fuzzaldrin 2013-10-17 09:46:10 -07:00
Cheng Zhao 514ca3a9c2 Update to atom-shell v0.6.2. 2013-10-17 10:32:50 +08:00
Ben Ogle 436ffd90d4 Small changes to the pkg docs 2013-10-16 17:34:05 -07:00
Ben Ogle 201677eb1d Add notes about creating a UI theme 2013-10-16 17:18:32 -07:00
Ben Ogle 887dadd589 fix theme docs 2013-10-16 17:05:26 -07:00
Kevin Sawicki 538f66d9cf Merge pull request #977 from atom/ks-space-pen-from-jquery
Use jquery through space-pen
2013-10-16 15:27:33 -07:00
Ben Ogle 53b0ac22cc Update theme docs 2013-10-16 15:11:20 -07:00
Kevin Sawicki 84dc0df925 Update lastPixelPosition when changing
Also remove unused changedPosition variable
2013-10-16 15:02:48 -07:00
probablycorey d49e419191 Rename updateCachedDiskContents and updateCachedDiskContentsAsync 2013-10-16 14:47:08 -07:00
probablycorey d33e3e4071 TextBuffers::isModified returns false until it is fully loaded 2013-10-16 14:46:30 -07:00
Kevin Sawicki 02b9e79888 Upgrade to fuzzy-finder@0.14.0 2013-10-16 14:44:43 -07:00
Kevin Sawicki 820b870f82 Use triggerHandler for window focus/blur in specs 2013-10-16 14:41:38 -07:00
Kevin Sawicki 6171e357c1 Upgrade to autocomplete@0.9.0 2013-10-16 14:22:52 -07:00
Kevin Sawicki b07b024602 Upgrade to package-generator@0.12.0 2013-10-16 14:15:25 -07:00
Kevin Sawicki c37d5124d9 Upgrade to tree-view@0.18.0 2013-10-16 14:08:57 -07:00
Kevin Sawicki caadec6e62 jquery 2.0 can't be required in tasks 2013-10-16 13:35:12 -07:00
Kevin Sawicki 7b9ff7d0f7 Trigger focusout event on hidden input 2013-10-16 13:35:12 -07:00
Kevin Sawicki 08e5c42f0c Explicitly make pane active
Previously it relied on focus firing an event which will not occur
when not on the DOM.
2013-10-16 13:35:12 -07:00
Kevin Sawicki 2d9c2ec939 Make pane active in a beforeEach 2013-10-16 13:35:12 -07:00
Kevin Sawicki ee6b2b0776 Trigger complete beforeunload event
jquery 2.0 fails to trigger this event using just
$(window).trigger('beforeunload')
2013-10-16 13:35:12 -07:00
Kevin Sawicki 607ed972c1 Listen to window focusin/focusout instead of focus/blur
This appears to be needed by jquery 2.0+ so the specs
can correctly simulate these events using trigger.
2013-10-16 13:35:11 -07:00
Kevin Sawicki 7149ade43c Attach to DOM for focus specs 2013-10-16 13:35:11 -07:00
Kevin Sawicki d989aeb592 Focus body when root view has no focusable children
This is required now that root view has a tab index
2013-10-16 13:35:11 -07:00
Kevin Sawicki cded70c48a Set tabindex on RootView so it can be focused directly 2013-10-16 13:35:11 -07:00
Kevin Sawicki ede64f65c8 Attach to DOM for focus specs 2013-10-16 13:35:11 -07:00
Kevin Sawicki 80a3e0c9c9 Check that display isn't none for visibility 2013-10-16 13:35:11 -07:00
Kevin Sawicki 5883dd4f16 Add tab index to pane
This is required in jquery 2.0 in order for the
focus event to be received.
2013-10-16 13:35:11 -07:00
Kevin Sawicki 0254e64762 Remove window handling in catch block
The catch block in index.html takes care of this
2013-10-16 13:35:11 -07:00
Kevin Sawicki d0f6e83726 Reference correct attached variable 2013-10-16 13:34:41 -07:00
Kevin Sawicki 9d51d1a143 Use jquery provided by space-pen 2013-10-16 13:34:41 -07:00
probablycorey 565f5fb304 Sort package.json dependencies 2013-10-16 12:39:44 -07:00
Corey Johnson 835088676d Merge pull request #974 from atom/cj-make-packages-async
Add 'sync' to the end of synchronous open methods
2013-10-16 12:32:58 -07:00
probablycorey 43c54a93e5 Merge remote-tracking branch 'origin/master' into cj-make-packages-async
Conflicts:
	package.json
2013-10-16 12:28:36 -07:00
probablycorey 8bd87ac4f2 Update status bar version 2013-10-16 12:20:16 -07:00
Ben Ogle 76c152b97d Add dev-live-reload to the default install 2013-10-16 12:17:37 -07:00
Ben Ogle aa57414547 Add inDevMode() function 2013-10-16 12:17:37 -07:00
probablycorey 0ee4956109 Merge remote-tracking branch 'origin/master' into cj-make-packages-async
Conflicts:
	package.json
2013-10-16 12:11:35 -07:00
Matt Colyer 28a45c0fcd Merge pull request #965 from atom/document-themes
Theme Documentation
2013-10-16 12:10:34 -07:00
probablycorey 719616aa3a Update package versions 2013-10-16 12:10:17 -07:00
Matt Colyer dbef7a26ce 📝 Describe apm linking when creating a theme 2013-10-16 12:09:27 -07:00
Matt Colyer f7a30845f8 Update keybinding 2013-10-16 12:08:53 -07:00
Matt Colyer 492d7bc69a 📝 Give package styling recommendations 2013-10-16 11:52:00 -07:00
Ben Ogle 60aca173ce Upgrade to styleguide@0.8.0 2013-10-16 11:33:09 -07:00
probablycorey 9a839045e5 Merge remote-tracking branch 'origin/master' into cj-make-packages-async 2013-10-16 10:51:34 -07:00
Kevin Sawicki ee495575a2 Use underscore-plus from browser process classes 2013-10-15 18:47:50 -07:00
Kevin Sawicki 8ce72bedea Swap activation order for new _.max behavior 2013-10-15 18:09:14 -07:00
Kevin Sawicki 5c36a98bb0 Unfocus TextMateGrammar specs 2013-10-15 17:56:14 -07:00
Matt Colyer 3f8eb361c0 📝 Cleanup/Correct Creating a package guide 2013-10-15 17:34:19 -07:00
Matt Colyer 26039653b2 Mark core.ignoredNames as complete 2013-10-15 16:50:15 -07:00
Matt Colyer fc4750bcd5 📝 Clarify a few points about themes 2013-10-15 15:20:33 -07:00
Matt Colyer 541d25787b 📝 Clean up the getting started guide 2013-10-15 15:13:38 -07:00
Kevin Sawicki 697c96921f Merge pull request #973 from atom/ks-underscore-plus
Extract underscore extensions
2013-10-15 14:48:18 -07:00
Kevin Sawicki 913f20333d Update grammar selection for _.max change
Somewhere between underscore 1.4.4 and 1.5.2 max() was changed to return
the first element with the maximum value instead of the last.

The specs were relying on that ordering when selecting a specific grammar
by path.
2013-10-15 14:26:19 -07:00
Kevin Sawicki e2ecff22c2 Use underscore-plus instead of underscore 2013-10-15 13:57:34 -07:00
Kevin Sawicki 71f7e20eeb 💄 2013-10-15 13:50:16 -07:00
Kevin Sawicki 6a3638c7d3 Use setImmediate instead of process.nextTick 2013-10-15 13:50:16 -07:00
Kevin Sawicki 5b6e8a1b20 Use process.nextTick instead of MessageChannel 2013-10-15 13:50:16 -07:00
Kevin Sawicki 216a5e61fd Update underscore-extensions requires 2013-10-15 13:50:16 -07:00
Kevin Sawicki 8dbc0259c1 Upgrade to underscore-plus@0.2.0 2013-10-15 13:50:16 -07:00
Kevin Sawicki 4d4551987f Use underscore-plus in Grunt tasks 2013-10-15 13:50:16 -07:00
Kevin Sawicki 4fa15d3fce Replace underscore-extensions with underscore-plus 2013-10-15 13:50:16 -07:00
Kevin Sawicki f066887fd8 Upgrade apm for clean fix 2013-10-15 13:42:59 -07:00
probablycorey e3250d73a8 Fix Text Buffer spec 2013-10-15 10:58:42 -07:00
probablycorey 72a89231f8 Fix Project spec 2013-10-15 10:58:33 -07:00
probablycorey 57d9aa6019 Rename TextBuffer::load to TextBuffer::loadSync 2013-10-15 10:39:50 -07:00
probablycorey af8ecef30d Add 'Sync' to end of Project's synchronous open methods
Remove 'Async' from Project's asynchronous open methods
2013-10-15 09:45:43 -07:00
Kevin Sawicki 7b3101778b Use path.join for benchmark fixtures path 2013-10-14 21:44:57 -07:00
Kevin Sawicki d292579376 Merge pull request #968 from atom/ks-emissary
Use emissary
2013-10-14 17:51:51 -07:00
Kevin Sawicki 2c8854ce8b Stop exporting Emitter and Subscriber 2013-10-14 17:45:01 -07:00
Kevin Sawicki 03964ff568 Unsubscribe from buffer when destroyed 2013-10-14 17:28:28 -07:00
Kevin Sawicki 1c357f9b65 Use TODO instead of FIXME for consistency 2013-10-14 17:28:28 -07:00
Kevin Sawicki 6e313dc0e4 Use unless instead of if for subscription check 2013-10-14 17:28:28 -07:00
Kevin Sawicki bf1457e557 Upgrade to git-diff@0.10.0 2013-10-14 17:28:28 -07:00
Kevin Sawicki 3d9bb68007 Upgrade to find-and-replace@0.26.0 2013-10-14 17:28:28 -07:00
Kevin Sawicki eaed08a5cc Use skinny arrows in Emitter shims 2013-10-14 17:28:27 -07:00
Kevin Sawicki f05bba6a6f Upgrade to emissary@0.24.0 2013-10-14 17:28:27 -07:00
Kevin Sawicki 07f370df2a Shim one to once 2013-10-14 17:28:27 -07:00
Kevin Sawicki 672fb8ecaf Shim Emitter at top of Atom class 2013-10-14 17:28:27 -07:00
Kevin Sawicki f47ad4f16b Upgrade to settings-view@0.28.0 2013-10-14 17:28:27 -07:00
Kevin Sawicki b8597ab384 Upgrade to snippets@0.8.0 2013-10-14 17:28:27 -07:00
Kevin Sawicki d10bc2c06c Upgrade to terminal@0.11.0 2013-10-14 17:28:27 -07:00
Kevin Sawicki 0db962b94f Add shims in bootstrap script 2013-10-14 17:28:27 -07:00
Kevin Sawicki 667e0929b6 Shim subscriptionCount to getSubscriptionCount 2013-10-14 17:28:27 -07:00
Kevin Sawicki ff30a8e14b Shim trigger to emit 2013-10-14 17:28:27 -07:00
Kevin Sawicki 11dbcfecaf Only watch path once 2013-10-14 17:28:27 -07:00
Kevin Sawicki 6318571fed Export Emitter instead of EventEmitter 2013-10-14 17:28:27 -07:00
Kevin Sawicki 7f1f2bccd5 Only subscribe when file exists 2013-10-14 17:28:27 -07:00
Kevin Sawicki c797995597 Migrate path watching to new subscription added/removed events 2013-10-14 17:28:26 -07:00
Kevin Sawicki 6030edcf0a Upgrade to emissary@0.6.0 2013-10-14 17:28:26 -07:00
Kevin Sawicki 9fe32954dc Update classes for emissary API 2013-10-14 17:28:26 -07:00
Kevin Sawicki 320b4a49b4 Use Subscriber.includeInto 2013-10-14 17:28:26 -07:00
Kevin Sawicki e5ac73e0db Use includeInto instead of _.extend 2013-10-14 17:28:26 -07:00
Kevin Sawicki 0b0c3229d3 EventEmitter is exported as Emitter 2013-10-14 17:28:26 -07:00
Kevin Sawicki a0486bc9b0 Use emit instead of trigger 2013-10-14 17:28:26 -07:00
Kevin Sawicki f9a0e038a5 Use emissary for EventEmitter and Subscriber 2013-10-14 17:28:26 -07:00
Kevin Sawicki ffa83e6356 Upgrade to tree-view@0.16.0 2013-10-14 17:18:42 -07:00
Matt Colyer 4b566d1ce3 📝 Cleanup markdown 2013-10-14 17:00:16 -07:00
probablycorey 09e7a5af6b Trigger uri-opened from RootView 2013-10-14 16:41:45 -07:00
probablycorey a31862a32d Allow RootView::open to not change focus 2013-10-14 16:41:33 -07:00
probablycorey c44b04e47a Merge remote-tracking branch 'origin/master' into cj-make-packages-async 2013-10-14 15:54:22 -07:00
Matt Colyer 3589fcc107 📝 Update customizing atom guide 2013-10-14 14:40:18 -07:00
Matt Colyer 30ea10cfb8 📝 Elaborate on how to create a theme 2013-10-14 12:30:08 -07:00
Kevin Sawicki d062cdda84 Merge pull request #953 from atom/ks-apm-test
Use APM test to run package specs
2013-10-14 11:49:39 -07:00
Kevin Sawicki ea93c21a92 Lint after compiling
The compile error output is better than the lint compile error output.
2013-10-14 11:43:37 -07:00
Kevin Sawicki c0cc002134 Log empty line after specs complete 2013-10-14 11:39:29 -07:00
Kevin Sawicki 417ea030ef Upgrade to archive-view@0.10.0 2013-10-14 11:34:54 -07:00
Kevin Sawicki 3145e9b53b Upgrade to tree-view@0.15.0 2013-10-14 11:34:34 -07:00
Kevin Sawicki a7bd04de36 Remove package fixtures from core fixtures dir 2013-10-14 11:25:35 -07:00
Kevin Sawicki ec37b8abd9 💄 Add helper to set spec field on all specs 2013-10-14 11:22:34 -07:00
Kevin Sawicki 0b22d99fad Store spec directory on required specs
This allows the project to be configured based on the spec being
run.
2013-10-14 11:15:40 -07:00
Kevin Sawicki f60ead03d2 Upgrade to git-diff@0.9.0 2013-10-14 11:09:46 -07:00
Kevin Sawicki cd3ec7d156 Upgrade to fuzzy-finder@0.12.0 2013-10-14 10:35:10 -07:00
Kevin Sawicki eadee9f15c Upgrade to fuzzy-finder@0.11.0 2013-10-14 10:34:55 -07:00
Kevin Sawicki 8001942283 Upgrade to status-bar@0.12.0 2013-10-14 10:34:39 -07:00
Kevin Sawicki f506130d3b Round the logged spec time 2013-10-14 10:34:20 -07:00
Kevin Sawicki 4549ea2058 Log total spec time when done 2013-10-14 10:34:20 -07:00
Kevin Sawicki 01380c307e Upgrade to git-diff@0.8.0 2013-10-14 10:34:20 -07:00
Kevin Sawicki 024785fa4f Upgrade to git-diff@0.7.0 2013-10-14 10:34:19 -07:00
Kevin Sawicki afa03b6379 Bump queue concurrency when core specs finish 2013-10-14 10:34:08 -07:00
Kevin Sawicki a55847b03b Add dir/b.txt to working-dir fixture repo 2013-10-14 10:34:08 -07:00
Kevin Sawicki 57769f4328 Upgrade to tree-view@0.14.0 2013-10-14 10:34:08 -07:00
Kevin Sawicki 538b938a71 Upgrade to status-bar@0.11.0 2013-10-14 10:34:08 -07:00
Kevin Sawicki 714a1327ce Add a.txt to working-dir fixtures 2013-10-14 10:33:38 -07:00
Kevin Sawicki 3ff0b3cfe2 Fail build when either set of specs fail 2013-10-14 10:33:38 -07:00
Kevin Sawicki 69a247294c Remove reference to non-existent run-core-specs task 2013-10-14 10:33:38 -07:00
Kevin Sawicki b73798bd03 Rename test-task to spec-task 2013-10-14 10:33:37 -07:00
Kevin Sawicki 8ecc353999 Run core and package specs in parallel 2013-10-14 10:33:37 -07:00
Kevin Sawicki 118625f002 Increase concurrency to 2 2013-10-14 10:33:37 -07:00
Kevin Sawicki c50632bd82 Upgrade apm for test path fix 2013-10-14 10:33:37 -07:00
Kevin Sawicki 1e6cca0969 Extract isAtomPackage task helper 2013-10-14 10:33:37 -07:00
Kevin Sawicki 64c5732e51 Add missing underscore require 2013-10-14 10:33:37 -07:00
Kevin Sawicki e8c399428c Set ATOM_PATH env var when launching specs 2013-10-14 10:33:37 -07:00
Kevin Sawicki 5b239938a9 Resolve atom.sh and apm relative to app dir 2013-10-14 10:33:37 -07:00
Kevin Sawicki c1f8b1e941 💄 Use long opts for clarity 2013-10-14 10:33:37 -07:00
Kevin Sawicki aed15766fb 💄 Resolve apm path once 2013-10-14 10:33:37 -07:00
Kevin Sawicki 0f1c1715dd Add all specs to queue 2013-10-14 10:33:37 -07:00
Kevin Sawicki 091189ee79 Log what specs are running 2013-10-14 10:33:37 -07:00
Kevin Sawicki a79f36cbf2 💄 Resolve atom.sh once 2013-10-14 10:33:36 -07:00
Kevin Sawicki 483f63ab05 Add test task that runs packages specs from queue 2013-10-14 10:33:36 -07:00
Kevin Sawicki 1ed01c5155 Upgrade to archive-view@0.9.0 2013-10-14 10:33:36 -07:00
Kevin Sawicki 87408f689f Upgrade apm for path flag to test command 2013-10-14 10:33:36 -07:00
Kevin Sawicki 5d1b88493e Upgrade to jasmine-focused@0.15.0 2013-10-14 10:33:36 -07:00
Matt Colyer 551bb72756 Update bookmarks@0.6.0 2013-10-14 10:33:36 -07:00
Kevin Sawicki a0fd9098ad Upgrade to go-to-line@0.5.0 2013-10-14 10:33:36 -07:00
Matt Colyer b6a0763419 Upgrade to autocomplete@0.7.0 2013-10-14 10:33:36 -07:00
Kevin Sawicki 9994cbbd6e Upgrade to image-view@0.7.0 2013-10-14 10:33:36 -07:00
Kevin Sawicki b05a3fa4b6 Upgrade to link@0.5.0 2013-10-14 10:33:36 -07:00
Kevin Sawicki fd51392a2d Upgrade to first-mate@0.4.0 2013-10-14 10:33:35 -07:00
Kevin Sawicki 83e7c59aba Upgrade to first-mate@0.3.0 2013-10-14 10:33:35 -07:00
Kevin Sawicki 8d6ffe9daa Upgrade to markdown-preview@0.7.0 2013-10-14 10:33:35 -07:00
Kevin Sawicki bb99a8e586 Upgrade to snippets@0.7.0 2013-10-14 10:33:35 -07:00
Kevin Sawicki 63f39d84a3 Load package relative to the package's spec directory 2013-10-14 10:33:21 -07:00
Kevin Sawicki d31fe2ee91 Upgrade to tabs@0.6.0 2013-10-14 10:33:21 -07:00
Kevin Sawicki 83581bc6d2 Ignore specs that take less than 1ms 2013-10-14 10:32:26 -07:00
Kevin Sawicki 47cf00751f Upgrade to whitespace@0.6.0 2013-10-14 10:32:26 -07:00
Kevin Sawicki 002e3898fa Merge pull request #959 from atom/ks-q-continuum
Switch to q from $.Deferred
2013-10-14 10:00:38 -07:00
Kevin Sawicki 38f50d60f5 Upgrade to find-and-replace@0.25.0 2013-10-14 09:53:26 -07:00
Kevin Sawicki 7be57deef6 Upgrade to collaboration@0.23.0 2013-10-14 09:53:26 -07:00
Kevin Sawicki d0decbb7e5 Upgrade to symbols-view@0.10.0 2013-10-14 09:53:26 -07:00
Kevin Sawicki 68c7b2dab0 Use Q for promise in Project::scan 2013-10-14 09:53:26 -07:00
Kevin Sawicki 8e73258168 Remove unused Project::getFilePaths 2013-10-14 09:53:26 -07:00
Cheng Zhao 53b4b1c349 💄 Remove unsed variable. 2013-10-14 16:59:31 +08:00
Cheng Zhao fae1f500eb Rewrite script/test in js. 2013-10-14 16:52:52 +08:00
Cheng Zhao 4308e428d3 Rewrite script/cibuild in js. 2013-10-14 16:47:29 +08:00
Cheng Zhao 1d343dd483 Make the safeSpawn function a util module. 2013-10-14 15:14:03 +08:00
Cheng Zhao e17c9ced57 Rewrite script/build in js. 2013-10-14 14:37:16 +08:00
Cheng Zhao 8edd6ad5d5 Rewrite bootstrap script in js. 2013-10-14 14:18:04 +08:00
Cheng Zhao fba1d486e3 Update to atom-shell v0.6.1. 2013-10-14 12:10:11 +08:00
Paul Betts cdfad1218b Merge pull request #870 from atom/some-files-are-just-too-evil
Some files are just too evil
2013-10-11 15:34:54 -07:00
Matt Colyer 4d415d3ca9 Generate evil file fixtures depending on platform 2013-10-11 14:09:17 -07:00
Matt Colyer 6a37f9dad4 Merge branch 'master' into some-files-are-just-too-evil 2013-10-11 13:43:12 -07:00
Matt Colyer 0255faded1 Merge pull request #956 from atom/mc-bad-package
Make package loading more robust
2013-10-11 12:55:53 -07:00
Matt Colyer 12b42bf459 Initialize AtomPackage attributes earlier
This should make our package loading process a bit more robust.
2013-10-11 12:49:31 -07:00
Matt Colyer abd8bd1253 Handle errors in package.json gracefully 2013-10-11 12:49:31 -07:00
Kevin Sawicki cd633ede92 Remove logging from spec 2013-10-11 11:37:13 -07:00
Matt Colyer e4c87b2d0b Merge pull request #954 from atom/docs-about-docs
Docs about Docs
2013-10-11 11:20:52 -07:00
Matt Colyer c1c46cfb94 Merge pull request #955 from atom/mc-fix-952
Dynamically replace Atom version in application menu
2013-10-11 11:20:38 -07:00
Matt Colyer 942695d582 Dynamically replace Atom version in application menu 2013-10-11 11:11:10 -07:00
Matt Colyer 8682bad958 Revert "Dynamically replace Atom version in application menu"
This reverts commit 9b7bc34d44.
2013-10-11 11:10:04 -07:00
Matt Colyer 3d9598a99a Fix spelling 2013-10-11 11:06:04 -07:00
Matt Colyer 0221f7d263 Merge branch 'master' into docs-about-docs 2013-10-11 11:05:47 -07:00
probablycorey 92c6ad66eb Rename Project::open to Project::openSync
…and Project::openAsync to Project::open
2013-10-11 10:57:09 -07:00
probablycorey 894cae7c9c Rename rootView.openAsync to rootView.open 2013-10-11 10:56:58 -07:00
probablycorey b0e9b4b81f Rename RootView.open to RootView.openSync 2013-10-11 10:55:10 -07:00
Matt Colyer 9b7bc34d44 Dynamically replace Atom version in application menu
Fixes #952
2013-10-11 10:46:26 -07:00
Kevin Sawicki ff8577b7d6 Merge pull request #945 from atom/browser-folder
Separate classes that run in the browser process
2013-10-11 08:56:19 -07:00
Kevin Sawicki 317365e41f 💉 BrowserWindow instance into ContextMenu 2013-10-11 08:50:09 -07:00
Kevin Sawicki e4219cae45 Remove unused require 2013-10-11 08:50:09 -07:00
Kevin Sawicki ed3bb509fa Remove outdated comment about NODE_PATH tweaking 2013-10-11 08:50:09 -07:00
Kevin Sawicki 8d27369afc Add extra .. for benchmark/spec bootstrap paths 2013-10-11 08:50:09 -07:00
Matt Colyer 63fb5b1fe5 Move ContextMenu into the browser folder 2013-10-11 08:50:09 -07:00
Kevin Sawicki 891200d658 Remove src/ from global paths in browser process 2013-10-11 08:50:09 -07:00
Kevin Sawicki d815147df6 Log uncaught exceptions in browser process 2013-10-11 08:50:09 -07:00
Matt Colyer d7836f6082 Fix resourcePath in main.coffee 2013-10-11 08:50:09 -07:00
Matt Colyer 1538afee05 Relative openUrl requires in AtomApplication 2013-10-11 08:50:09 -07:00
Matt Colyer db64e8c0b3 Correct resolve to window-bootstrap 2013-10-11 08:50:09 -07:00
Matt Colyer 31c1241ce8 Use relative paths for browser files 2013-10-11 08:50:09 -07:00
Matt Colyer 7875386498 Separate classes that run in the browser process 2013-10-11 08:50:08 -07:00
Kevin Sawicki c766ddf5e6 Upgrade to fuzzy-finder@0.10.0 2013-10-10 17:59:21 -07:00
Kevin Sawicki 940df94081 Load core menu items after bundled keymaps load
Closes #948
2013-10-10 17:50:39 -07:00
Ben Ogle 018ee0deb0 Merge pull request #947 from atom/bo-multiple-editors
Use multiple editors rather than one per pane
2013-10-10 17:12:17 -07:00
Ben Ogle dafa1ab0a8 UPgrade status bar 2013-10-10 17:03:30 -07:00
Ben Ogle 730cd8680e Upgrade git-diff for fixing 2013-10-10 17:03:30 -07:00
Ben Ogle 338eb5a871 Upgrade fnr 2013-10-10 17:03:30 -07:00
Ben Ogle 142654b77c Upgrade to fnr@0.24.1 2013-10-10 17:03:30 -07:00
Ben Ogle 7db7234fb1 fix rootView spec 2013-10-10 17:03:29 -07:00
Ben Ogle 78f600a7f6 Upgrade to fuzzy-finder@0.9.0 2013-10-10 17:03:29 -07:00
Ben Ogle 187895a893 I'm not entirely sure why I need this now.
It seems there is no editor unless I show the first editSession
2013-10-10 17:03:29 -07:00
Ben Ogle 1120a14351 Fix removal of editors 2013-10-10 17:03:29 -07:00
Ben Ogle 192df9c496 Make each tab have its own editor.
Remove the viewsByClassName from the pane. Pane specs are broken.
2013-10-10 17:03:29 -07:00
Matt Colyer 45ae59b1fb Merge branch 'master' into docs-about-docs 2013-10-10 16:21:44 -07:00
Kevin Sawicki 0ac683284d Revert "Remove fixture file"
This reverts commit 818fc10ba5.

Bring back this file until archive-view is published with
fixtures included locally.
2013-10-10 15:48:24 -07:00
Kevin Sawicki 23af63b76c Ignore indentation lint
The new promises chaining causes lint errors that are false positives.
2013-10-10 15:05:58 -07:00
Matt Colyer 080b52de8d 📝 the atom documentation format 2013-10-10 14:33:49 -07:00
probablycorey 53773274df Add newline between themes and packages 2013-10-10 13:03:52 -07:00
probablycorey 3ed0f7bde4 Project::openAsync always resolves the filePath 2013-10-10 12:01:49 -07:00
probablycorey 5b214bdfd7 💄 2013-10-10 12:01:01 -07:00
probablycorey d883834626 Comment 💄 2013-10-10 11:57:32 -07:00
probablycorey 818fc10ba5 Remove fixture file
The Archive View apm maintains nested.tar in its fixtures directory
2013-10-10 11:57:13 -07:00
probablycorey b95b3148c9 Note the synchronous loading of Tokenized Buffer 2013-10-10 11:26:05 -07:00
probablycorey 29a9a9d2ed Merge remote-tracking branch 'origin/master' into cj-async-file-open
Conflicts:
	package.json
2013-10-10 11:15:20 -07:00
probablycorey 22411b3c87 Remove deprecation log message 2013-10-10 10:34:17 -07:00
probablycorey 7c6f9b1a81 Make test more consistent 2013-10-10 10:34:02 -07:00
Ben Ogle 4f8bb00af2 Merge pull request #946 from atom/bo-fix-hidden-input
Fix hidden input placement
2013-10-10 10:33:26 -07:00
probablycorey 6abb5a2390 Files in src should not use the atom export 2013-10-10 10:15:54 -07:00
probablycorey 6d29d8de48 Remove progress log 2013-10-10 10:15:08 -07:00
probablycorey 23620e158b The initialLine parameter is sent as an option 2013-10-10 09:49:06 -07:00
probablycorey 0c811ec703 Reword specs
Items are shown 'in' a pane instead of 'on' the pane
2013-10-10 09:45:18 -07:00
probablycorey b114545dd2 💄
4 kev ❤️
2013-10-10 09:45:10 -07:00
Cheng Zhao 2e71043657 Merge pull request #949 from atom/atom-shell-v0.6.0
Update to atom-shell v0.6.0
2013-10-10 08:52:25 -07:00
Cheng Zhao c614ec6beb Fix "Missing or invalid User Agent string." error. 2013-10-10 15:18:52 +08:00
Cheng Zhao 7a1874d1b9 Update atom-shell to v0.6.0. 2013-10-10 15:09:26 +08:00
Cheng Zhao 14a7202df2 "MacCtrl" is discarded in latest atom-shell. 2013-10-10 15:08:00 +08:00
Ben Ogle b7e7b83bdf Remove bringHiddenInputIntoView call from editor focus() 2013-10-09 17:48:22 -07:00
Ben Ogle 5fc14e0c37 Turns out neither of them need the 'px' 2013-10-09 17:46:06 -07:00
Kevin Sawicki d004d94f3f Upgrade to status-bar@0.9.0 2013-10-09 16:56:52 -07:00
Ben Ogle 6faef08592 Use scrollLeft so the editor is not scrolled to the left on focus in/out 2013-10-09 16:44:05 -07:00
Ben Ogle 017030fd60 Fix the tests
The test calls hiddenInput.focus(), but in reality, nothing external to
the editor can trigger this. I'd rather just have 
bringHiddenInputIntoView() called in one place, but this is insurance.
2013-10-09 16:43:26 -07:00
Ben Ogle 1b38118cc3 Place hidden input on the underlayer.
Also brings the input into view when the input is focused so we
dont scroll the scrollView and blank the editor
2013-10-09 16:18:34 -07:00
Ben Ogle 2c2661da11 Fix hiddenInput offset calculation
Regression from the speedup stuff
2013-10-09 16:18:34 -07:00
Ben Ogle b17c8ced84 Fix selectAll on buffers longer than the rendered lines 2013-10-09 16:16:19 -07:00
Kevin Sawicki 02f13d6a06 Merge pull request #941 from atom/ks-maximazing
Use current window size for new window size
2013-10-09 09:33:18 -07:00
Kevin Sawicki 8061101bbd Add initial size to window options when opening urls 2013-10-09 09:25:54 -07:00
Kevin Sawicki 662262ab82 Use deep clone for load settings
The new initialSize load setting has a nested object which should be
cloned as well.
2013-10-09 09:25:53 -07:00
Kevin Sawicki 349ba86b92 Create new windows with same size as focused window 2013-10-09 09:25:53 -07:00
Kevin Sawicki d93633a837 Maximize window by default
Use the available height and width as the default window size
when no window state exists for the dimensions.
2013-10-09 09:25:53 -07:00
Matt Colyer 93742f933b Revert "Bump tree-view to include a menu"
This reverts commit 4b70147b3b.
2013-10-08 17:39:59 -07:00
Matt Colyer 4b70147b3b Bump tree-view to include a menu 2013-10-08 16:32:57 -07:00
Matt Colyer 0be5d1f3fd Merge pull request #927 from atom/menu-api
Allow packages to append to the application menus
2013-10-08 16:30:15 -07:00
Matt Colyer ffdfe63a4e Add specs 2013-10-08 16:23:34 -07:00
Kevin Sawicki adc8618823 Upgrade to fuzzy-finder@0.8.0 2013-10-08 16:15:18 -07:00
Ben Ogle 2f2a634c2a Merge pull request #940 from atom/bo-gutter-render-perf
Partially render the gutter when possible
2013-10-08 16:10:27 -07:00
Ben Ogle 36c58e9132 💄 2013-10-08 16:03:25 -07:00
Matt Colyer 33cf5dda15 Merge branch 'master' into menu-api
Conflicts:
	src/atom.coffee
	src/config.coffee
2013-10-08 15:49:55 -07:00
Kevin Sawicki 5acf1150a4 Merge pull request #931 from atom/add-branch-selector
Add new helper functions from git-utils@0.26.0
2013-10-08 09:39:22 -07:00
Kevin Sawicki 4c9059d445 Default branch to null instead of empty object 2013-10-08 09:31:02 -07:00
Kevin Sawicki ff1ab93652 💄 Add space before and 2013-10-08 09:30:05 -07:00
Kevin Sawicki 43d5c3f66d 📝 Remove extra newline 2013-10-08 09:27:23 -07:00
Garen Torikian 250af9191a Trigger statuses-changed for branches, too
There don't seem to be any tests for this
2013-10-08 09:26:23 -07:00
Garen Torikian 7365be7d88 Add new helper functions from git-utils@0.26.0 2013-10-08 09:25:55 -07:00
Kevin Sawicki 6d15fbb114 Upgrade to tree-view@0.10.0 2013-10-08 09:00:05 -07:00
Kevin Sawicki 37ec1abc25 Add Git::isProjectAtRoot helper 2013-10-07 19:43:12 -07:00
Kevin Sawicki 41cfa2892b Guard against false result 2013-10-07 18:22:24 -07:00
Ben Ogle caae18c552 Partially render the gutter when possible. 2013-10-07 18:14:27 -07:00
Kevin Sawicki 380bad2129 Upgrade to tree-view@0.9.0 2013-10-07 18:09:51 -07:00
Kevin Sawicki 8e60db65a3 🐎 Use fs.statSyncNoException() in AtomWindow 2013-10-07 17:55:41 -07:00
Kevin Sawicki 8caed2081b Don't reuse window when opening a subfolder
Windows will only be reused when they match the initial path or
are paths to a new or existing file.

Closes #934
2013-10-07 17:23:56 -07:00
Kevin Sawicki 1ed6733ab5 Only parse line number when path to open is set
Previously if atom was launched with no path to open then '/'
was being opened as the project and a file named 'undefined' was
initially open.  This was because path.basename() returns the string
'undefined' when called with an undefined path.

This restores the previous behavior of launching a new untitled editor
with no project.

Closes #936
2013-10-07 17:09:52 -07:00
Kevin Sawicki d2d77012c5 Upgrade to collaboration@0.21.0 2013-10-07 16:21:21 -07:00
Kevin Sawicki 6c55fc102d Merge pull request #938 from atom/ks-url-api
Add API to open urls
2013-10-07 16:19:21 -07:00
probablycorey 9a61c545f4 Update comments in project 2013-10-07 16:12:44 -07:00
Kevin Sawicki 2029895f0b Pass urlToOpen to AtomWindow constructor 2013-10-07 16:12:00 -07:00
Kevin Sawicki 7f0150c6b8 💄 Inline parsed url 2013-10-07 16:12:00 -07:00
Kevin Sawicki 124b1ebd33 💄 Reorganize option param 2013-10-07 16:12:00 -07:00
Kevin Sawicki d3e2d9b5f9 📝 Update AtomApplication.openUrl() comment 2013-10-07 16:12:00 -07:00
Kevin Sawicki f8e61f5c48 Add missing @ before configDirPath 2013-10-07 16:12:00 -07:00
Kevin Sawicki e95e8a22c3 💄 Remove extra newline 2013-10-07 16:12:00 -07:00
Kevin Sawicki 0033c9659f 💉 directory dependencies into Config 2013-10-07 16:12:00 -07:00
Kevin Sawicki 9db3f9b5d9 Remove logging of found package 2013-10-07 16:12:00 -07:00
Kevin Sawicki 55b71405c9 Remove uneeded curlies and parens 2013-10-07 16:11:59 -07:00
Kevin Sawicki db47d02c3c Add fixture packages to atom.packages.packageDirPaths 2013-10-07 16:11:59 -07:00
Kevin Sawicki ad577d6315 Add url to open to load settings 2013-10-07 16:11:59 -07:00
Kevin Sawicki 19a8626c21 Add extension point for opening urls
If packages specify a urlMain in their package.json then that file
will be used as the bootstrap script new windows when a URL is opened
to that package.
2013-10-07 16:11:59 -07:00
Kevin Sawicki 87bfcf5683 💉 dependencies into AtomPackage
Removes use of resourcePath and config globals
2013-10-07 16:11:59 -07:00
Kevin Sawicki 722be2267d Add getter for config directory path 2013-10-07 16:11:59 -07:00
Kevin Sawicki a3559d1289 Call methods through this instead of atom global 2013-10-07 16:11:59 -07:00
probablycorey b4fb526d75 Simplify early return statement 2013-10-07 16:10:38 -07:00
probablycorey 122b209ad7 💄 2013-10-07 16:07:13 -07:00
Ben Ogle 53da1db3d8 Merge pull request #935 from atom/bo-improve-gutter-api
Add a simple gutter api for adding/removing classes
2013-10-07 15:35:18 -07:00
probablycorey 34d7913505 Log RootView::openAsync read progress 2013-10-07 15:22:16 -07:00
Ben Ogle 0c54f6254d Upgrade to new versions of git-diff and bookmarks 2013-10-07 15:15:30 -07:00
Ben Ogle 9c6353977f Rework the api using native methods. This is 🐎
editor.300-line-file.gutter-api.getLineNumberElementsForClass.DOM: 3 / 20000 = 0.00015ms
editor.300-line-file.gutter-api.getLineNumberElement.DOM: 8 / 20000 = 0.0004ms
editor.300-line-file.gutter-api.toggle-class: 17 / 2000 = 0.0085ms
editor.300-line-file.gutter-api.find-then-unset.single-class: 3 / 200 = 0.015ms
editor.300-line-file.gutter-api.find-then-unset.multiple-class: 9 / 200 = 0.045ms
2013-10-07 14:57:45 -07:00
Ben Ogle 2cee400547 More benchmarks 2013-10-07 14:56:29 -07:00
Matt Colyer ba8707dfd9 Bump exception-reporting to include the user agent 2013-10-07 14:35:15 -07:00
Matt Colyer 64e8c978e4 Return proper return code from atom.sh
Also improve the test failure message returned by apm.
2013-10-07 14:28:13 -07:00
Ben Ogle 1ff97fc21a Add getLineNumbersForClass()
Also clean up and use klass
2013-10-07 13:57:00 -07:00
Ben Ogle 964e88f131 Add benchmark for the gutter api fns 2013-10-07 13:55:04 -07:00
probablycorey f5c9dc7362 Added progress stats to reading files 2013-10-07 13:47:20 -07:00
Ben Ogle 32329070c2 Add a simple gutter api for adding/removing classes 2013-10-07 13:31:31 -07:00
Kevin Sawicki 9f7b430c02 Show window in benchmark bootstrap 2013-10-07 13:30:07 -07:00
Matt Colyer 26ab49306e Bump release notes version 2013-10-07 11:48:20 -07:00
probablycorey 13232de4b9 Chain promises better 2013-10-07 11:46:03 -07:00
probablycorey f9250e3dd1 Add File::readAsync 2013-10-07 11:39:41 -07:00
Ben Ogle a878d9e3da Merge pull request #901 from atom/bo-scroll-perf
Improve scrolling performance.
2013-10-07 10:36:38 -07:00
Ben Ogle 3aae7bb77e 💄 2013-10-07 10:29:02 -07:00
Ben Ogle 8825be937e TextNodeFielter -> TextNodeFilter 2013-10-07 10:29:02 -07:00
Ben Ogle b3324b49b0 Skinny arrows 💄 2013-10-07 10:29:02 -07:00
Ben Ogle 785c71daf8 💄 2013-10-07 10:29:02 -07:00
Ben Ogle 7f9ce094c7 Add only window import so the benchmarks run 2013-10-07 10:29:01 -07:00
Ben Ogle 89b0e4d159 Fix issue when there are no client rects 2013-10-07 10:29:01 -07:00
Ben Ogle 98928dd99f Upgrade to bracket-matcher@0.6.0 2013-10-07 10:29:01 -07:00
Ben Ogle 4df546a19e Remove shoulds 2013-10-07 10:28:13 -07:00
Ben Ogle 04cdad680b Remove ability to pass clearDirtyRanges and fillDirtyRanges extra vars
We don't need them anymore in the gutter.
2013-10-07 10:28:12 -07:00
Ben Ogle 87687036cb Add benchmark for empty() vs innerHTML = '' 2013-10-07 10:28:12 -07:00
Ben Ogle 4f1bdee2d7 shift() multiple little arrays. Avoid. 2013-10-07 10:28:12 -07:00
Ben Ogle 5942f2997f Remove array joins in buildEmptyLineHtml 2013-10-07 10:28:12 -07:00
Ben Ogle 26a3a77fed Rename ALL_CAPS vars to CapCamelCase 2013-10-07 10:28:12 -07:00
Ben Ogle a50e948a90 Remove log lines 2013-10-07 10:28:12 -07:00
Ben Ogle bd8c14355c Move regexes out into variables 2013-10-07 10:28:12 -07:00
Ben Ogle 1a6884ff71 Remove the ALL_CAPS vars replace with CapCamelCase 2013-10-07 10:28:11 -07:00
Ben Ogle 156b6a9490 Make wrapCharacters -> escapeString. Use a regex.
The `htmlForScreenRows` benchmark went from ~3.5 ms to ~2.9ms for a 
call to htmlForScreenRows over the entire screen range.

🐎
2013-10-07 10:28:11 -07:00
Ben Ogle 407ccc4819 Get a few benchmarks in there 2013-10-07 10:28:11 -07:00
Ben Ogle 5516dadffe Remove selective gutter rendering.
It is faster but incorrect in the case of newlines. It will have to be 
rethought. It can be a different unit of work
2013-10-07 10:28:11 -07:00
Ben Ogle f1cf8496f8 Fix test, use bufferRowsFOrScreenRowsProperly 2013-10-07 10:28:11 -07:00
Ben Ogle b4afc24ee8 Most of the tests work 2013-10-07 10:28:11 -07:00
Ben Ogle d0be7fbf8e Add a character width cache based on scopes.
This is slower than the position cache in the best case, but faster
in the worst and average case. With this, you can search for a space
in find and replace, and still scroll the buffer.

In editor.coffee, there are 10,500 spaces. To highlight all of them, 
the previous cache method took 7 seconds, this takes 2 when the cache 
is empty, and about 10ms when the entire file is cached.
2013-10-07 10:28:11 -07:00
Ben Ogle 8463c759b5 Use global range. Faster! Less garbage! 2013-10-07 10:28:11 -07:00
Ben Ogle 5a772d7078 Move back to the node walker and Range()
This is slower than the span compute, but rendering lines without 
tons of spans is much faster than with
2013-10-07 10:28:11 -07:00
Ben Ogle 8ab8201020 More benchmarks for text rendering 2013-10-07 10:28:10 -07:00
Ben Ogle 6eb72ac2a1 Use getElementsByClassName rather than jQuery 2013-10-07 10:28:10 -07:00
Ben Ogle 8a3f137519 Speed up token html generation. 20ms -> 6ms
Character replace was most of it. Removing regex creation, array 
creation and joins seems to reduce the GC pressure. Calling 500 times, 
GC spent 100ms less time.
2013-10-07 10:28:10 -07:00
Ben Ogle a57c86f4ea Shortcut out of isHidden when we can.
Checking computed style is an order of magnitude more expensive than 
checking the style property.
2013-10-07 10:28:10 -07:00
Ben Ogle 8cd04b5178 Override isHidden for the Editor
We know it's visible if it is on the dom and doesn't have
display == none set. This is an order of magnitude faster than the
default implementation which calls getComputedStyle()
2013-10-07 10:28:10 -07:00
Ben Ogle d351938702 Speed up setting the hidden input at the same place as the cursor.
Order of magnitude speedup
2013-10-07 10:28:10 -07:00
Ben Ogle c2bb5a998b Override isHidden for the CursorView
We know it's visible if it is on the dom and doesn't have 
display == none set. This is an order of magnitude faster than the 
default implementation which calls getComputedStyle()
2013-10-07 10:28:10 -07:00
Ben Ogle 303124f1dd Add benchmarks for text rendering 2013-10-07 10:28:10 -07:00
Ben Ogle 875f0ca1e5 Get benchmarks running again: Fix imports. 2013-10-07 10:28:09 -07:00
Ben Ogle 6a494f65a5 💄 2013-10-07 10:28:09 -07:00
Ben Ogle aa404a316d Don't allow NaNs 2013-10-07 10:28:09 -07:00
Ben Ogle 45d3fea3d0 Update only the changed line numbers 2013-10-07 10:28:09 -07:00
Ben Ogle 0ab382133b Back to display == none for $.fn.isHidden() 2013-10-07 10:28:09 -07:00
Ben Ogle 98a3bb475b Fix for non-extant lines 2013-10-07 10:28:09 -07:00
Ben Ogle 2394f25b92 Add the leftPixel cache back in 2013-10-07 10:28:09 -07:00
Ben Ogle 914288ab86 Wrap each char in a span; compute left position by measuring each span.
This is is faster and simpler than the old method. Running each function
20,000 times yielded these results:

Old: 3750ms
This method: 1523ms
By looking up each char's width in a dict: 29ms
2013-10-07 10:28:08 -07:00
Ben Ogle aba5eb5b41 Add a cache to positionLeftForLineAndColumn()
This is the slowest function of all.
2013-10-07 10:28:08 -07:00
Ben Ogle 5c46bff4c1 Use isVisible() 2013-10-07 10:28:08 -07:00
Ben Ogle 8f68d62420 Only re render the cursors/selections when in rendered range 2013-10-07 10:28:08 -07:00
probablycorey a8c008767f Add TextBuffer::updateCachedDiskContentsAsync 2013-10-07 09:53:53 -07:00
probablycorey 64e4cd3db1 💄 2013-10-07 09:53:13 -07:00
Matt Colyer bde0a3dff0 Use atom rather than global 2013-10-04 14:39:11 -07:00
Matt Colyer 66635a19d1 Allow updates to the application menu 2013-10-04 14:38:50 -07:00
Matt Colyer 1deba49722 Move Keymap init above MenuManager init 2013-10-04 14:38:43 -07:00
Matt Colyer 0b3a00056f Handles nested submenus 2013-10-04 14:26:09 -07:00
Kevin Sawicki 2f46db29b5 Prepare 31.0.0 release 2013-10-04 14:10:47 -07:00
Kevin Sawicki 501b6e0890 Upgrade to to-the-hubs@0.6.0 2013-10-04 14:08:37 -07:00
Matt Colyer 7b7c9abdeb Load menus from packages 2013-10-04 13:39:35 -07:00
Matt Colyer 141c4f48bf Move menu building to the proper place 2013-10-04 13:15:09 -07:00
Kevin Sawicki 1930ad5003 Prepare 30.0.0 release 2013-10-04 13:14:54 -07:00
Kevin Sawicki dcba2bcc64 Upgrade to to-the-hubs@0.5.0 2013-10-04 13:08:27 -07:00
Kevin Sawicki 668bb9ffc3 Upgrade to collaboration@0.20.0 2013-10-04 13:04:56 -07:00
Kevin Sawicki 80a9cebbef Don't parse empty strings as JSON
windowState can be an empty string which should not be attempted to be
parsed.
2013-10-04 13:01:44 -07:00
Matt Colyer 73796a27e5 📝 Access config via atom.config not global.config 2013-10-04 12:28:42 -07:00
Matt Colyer 32101c57bf Load core menus from a file 2013-10-04 12:28:19 -07:00
Matt Colyer b63a33c7bb Fix lint errors in MenuManager 2013-10-04 11:40:59 -07:00
Matt Colyer d8e857efc9 Create MenuManager class
A minimal implementation that takes over the responsiblities of managing
the application menu within the render process.
2013-10-04 11:33:28 -07:00
Matt Colyer c0b8b0a443 Remove unused devMenu 2013-10-04 10:51:08 -07:00
Matt Colyer 791d288175 Merge pull request #890 from atom/atom-shell-with-releases-api
Uses GitHub Releases API to download atom-shell.
2013-10-04 10:04:53 -07:00
Kevin Sawicki 8f2770d084 Prevent overriding coffee cache once registered
Previously this was done afterwards in index.html and task.coffee
but should really be handled by the cache itself so any module
require a different version of coffee-script are not reregistering
a different require extension handler.
2013-10-04 09:25:31 -07:00
Matt Colyer 15a62eab63 Parse multipart response from AWS S3 2013-10-04 09:24:19 -07:00
Kevin Sawicki 8be254c878 Export a register method from coffee-cache
This allows it to be required without having any side effects which
is needed for the clean task that just wanted to remove the cache
directory.
2013-10-04 09:20:46 -07:00
Kevin Sawicki d973e96846 Prepare 29.0.0 release 2013-10-04 09:04:00 -07:00
Cheng Zhao d39797fdca Import atomcredentials in cibuild. 2013-10-04 13:39:53 +08:00
Kevin Sawicki fafaa444c7 Upgrade to exception-reporting@0.3.0 2013-10-03 19:01:53 -07:00
Kevin Sawicki 46a250d4a3 Upgrade to metrics@0.8.0 2013-10-03 18:48:36 -07:00
Kevin Sawicki a47b3273dd Send events to browser window even when not focused
The window:open-path event regressed and was not being sent to Atom
which prevented windows from being opened with specific file(s) in
the editor.

Also this allows context menus to work even when the dev tools are open.
2013-10-03 18:14:01 -07:00
Kevin Sawicki 573ddc288f Upgrade to find-and-replace@0.24.0 2013-10-03 17:38:51 -07:00
probablycorey 6cf41eea0a Add TextBuffer::updateCachedDiskContentsAsync 2013-10-03 17:12:00 -07:00
probablycorey b468a6f375 Get text buffer loading to work with multi-stage load 2013-10-03 16:58:11 -07:00
Matt Colyer de285fdec2 Bump settings-view 2013-10-03 16:40:20 -07:00
Matt Colyer 951d2615bd Bump apm version 2013-10-03 15:32:50 -07:00
Matt Colyer 9e82dba4b3 Merge branch 'master' into atom-shell-with-releases-api 2013-10-03 15:09:50 -07:00
Kevin Sawicki cbd612cb2c Upgrade to find-and-replace@0.23.0 2013-10-03 14:35:33 -07:00
Kevin Sawicki 33af695acb Upgrade to scandal@0.5.0 2013-10-03 14:35:33 -07:00
probablycorey 6e17755c1a Remove unused method 2013-10-03 13:38:24 -07:00
probablycorey b921dc3a1d Remove console.logs 2013-10-03 13:27:54 -07:00
probablycorey cc68925ab7 Make Project::resolve handle null file names 2013-10-03 13:23:27 -07:00
probablycorey 9147419ed3 Use temp module when creating temp files 2013-10-03 13:22:05 -07:00
Matt Colyer a929251d7f Merge pull request #923 from atom/test-with-open-window
Always launch Atom as a separate process (when just running specs)
2013-10-03 11:47:29 -07:00
Matt Colyer f74ad104d7 Rename openBasedOnOptions to openWithOptions 2013-10-03 11:39:20 -07:00
Matt Colyer 41ec544643 Update apm to include apm test 2013-10-03 11:33:09 -07:00
Matt Colyer 0f4b36b54a Run test processes separately 2013-10-03 11:30:43 -07:00
Matt Colyer c04ba75cc1 Remove initialization repetition from a second atom process 2013-10-03 11:29:34 -07:00
Kevin Sawicki 958d100d8f Upgrade to tree-view@0.8.0 2013-10-03 11:03:43 -07:00
Matt Colyer d8b173b86e Merge pull request #919 from atom/test-without-window
Test without window
2013-10-03 10:57:40 -07:00
probablycorey ed09e4e33f Remove unused method 2013-10-03 10:28:12 -07:00
probablycorey e9fd6f0c32 Reorder text buffer's requires 2013-10-03 10:28:12 -07:00
probablycorey b315e62a43 Add Project::openAsync and Project::bufferForPathAsync 2013-10-03 10:28:12 -07:00
probablycorey 716fe8cfe7 Add more specs for RootView::openAsync 2013-10-03 10:28:12 -07:00
probablycorey c825b1d9bb Simplify RootView::openAsync 2013-10-03 10:28:12 -07:00
probablycorey a1c39c9f38 Add RootView::openAsync 2013-10-03 10:28:11 -07:00
probablycorey dc245184c1 Add q npm 2013-10-03 10:28:11 -07:00
probablycorey b92b6e689d Rearrange command line option string
I apologize, but I could not resist rearranging the command line 
options to spell "WTF VHS"
2013-10-03 10:27:26 -07:00
Kevin Sawicki e3c7ebe45d Merge pull request #921 from atom/ks-set-editor-styles-directly
Set font size and family directly on editor
2013-10-03 09:46:43 -07:00
Kevin Sawicki 2d55c3e1e9 Set textContent when reporting progress 2013-10-03 09:38:42 -07:00
Kevin Sawicki e2fb2fdae5 Set font size and family directly on editor element
Previously this was set via a style tag which ate up a lot of spec
time and seemed to be functionally equivalent to just setting the
style directly on the element instead of finding and adding/removing
style tags.
2013-10-03 09:38:42 -07:00
Kevin Sawicki 6a5151ccbb Update stylesheetsActivated when resources are deactivated 2013-10-03 09:38:25 -07:00
Cheng Zhao a6b71f07e0 Focus on webview in specs window on startup.
When specs window is hidden it would not get a chance to focus on the webview.
2013-10-03 10:28:00 +08:00
Kevin Sawicki ea2779b029 Activate stylesheets from deferred deserializer 2013-10-02 19:10:53 -07:00
Cheng Zhao 14c338619a Update to atom-shell v0.5.4. 2013-10-03 10:05:38 +08:00
Kevin Sawicki e4b55c4210 🐎 Only reload active package stylesheets
Previously all package stylesheets were loaded twice during startup,
once when the themes were loaded and once when the packages were
activated.
2013-10-02 18:49:26 -07:00
Kevin Sawicki 80e4e5f2cd 🐎 Use fs.statSyncNoException in coffee-cache 2013-10-02 18:18:01 -07:00
Kevin Sawicki 80b4572190 Update root view title when initializing
Previously the title would not be updated when opening Atom with
serialized editors.

Also consolidate event listeners to rely on the
pane-container:active-pane-item-changed event to update the title.
2013-10-02 18:05:48 -07:00
Kevin Sawicki 523efd5e1a Use fs-utils for directory check 2013-10-02 17:45:27 -07:00
Kevin Sawicki 3ca361709c Upgrade to settings-view@0.26.0 2013-10-02 17:42:40 -07:00
Kevin Sawicki 5895da3d6f Store dimensions when spec window is unloaded
Refs #918
2013-10-02 17:16:19 -07:00
Kevin Sawicki 0bfc4a3a1b 📝 capitalize Function 2013-10-02 17:01:08 -07:00
Matt Colyer de9ab2d163 Prevent showing the window via spec-bootstrap.coffee 2013-10-02 16:47:27 -07:00
Kevin Sawicki e700e6ebe8 📝 doc measure and profile functions 2013-10-02 16:38:45 -07:00
Kevin Sawicki 8129e6c632 fs.statSyncNoException returns false or an object 2013-10-02 16:19:37 -07:00
Kevin Sawicki f6447a83f3 🐎 Use statSyncNoException in fs-utils 2013-10-02 16:09:02 -07:00
Kevin Sawicki 3bb01c3ebc Guard against global project being null 2013-10-02 16:07:03 -07:00
Kevin Sawicki 80cfcb799e Destroy rootView/project on both window and atom globals 2013-10-02 15:51:11 -07:00
Kevin Sawicki 3d5f1c6c90 Show dev tools when error is thrown bootstrapping specs 2013-10-02 15:48:58 -07:00
Kevin Sawicki a6803a266a Call add instead of registerDeserializer 2013-10-02 15:47:41 -07:00
Kevin Sawicki 7633a2a7d7 Call get instead of getDeserializer 2013-10-02 15:38:21 -07:00
Kevin Sawicki 08177feb67 Simplify method names on DeserializerManager 2013-10-02 15:30:32 -07:00
Kevin Sawicki ca137974c9 Store site on atom global 2013-10-02 15:23:06 -07:00
Kevin Sawicki a9735bfa13 Upgrade to symbols-view@0.8.0 2013-10-02 14:40:15 -07:00
Matt Colyer 8f80eeb63f See if tests pass when minimized 2013-10-02 14:23:35 -07:00
Kevin Sawicki 156ca6d9fd Update initial path using atom.loadSettings 2013-10-02 14:22:02 -07:00
Kevin Sawicki 5aa83163ad Memoize load settings and return a clone
Calling this method actual eats up a lot of spec time since
it does an ipc channel sync call.
2013-10-02 14:09:30 -07:00
Matt Colyer 16fd6debea Prevent window from displaying when just running tests 2013-10-02 14:05:07 -07:00
Matt Colyer 171728367e Remove unused import 2013-10-02 13:52:08 -07:00
Kevin Sawicki 9b97433214 Remove unused .nakignore file 2013-10-02 13:46:09 -07:00
Kevin Sawicki 46762327c6 Merge pull request #881 from atom/ks-globalization
Clean up globals
2013-10-02 13:45:36 -07:00
Kevin Sawicki 3591b921fd Update atom and window globals in beforEach 2013-10-02 13:40:35 -07:00
Kevin Sawicki a85817369e Add shim for packages accessing atom.packageStates 2013-10-02 13:40:35 -07:00
Kevin Sawicki 63b79a1d04 Bring back userPackageDirPaths for backwards-compatibility 2013-10-02 13:40:35 -07:00
Kevin Sawicki 022db0fc44 Access keymap via atom global 2013-10-02 13:40:35 -07:00
Kevin Sawicki dde7ccadd4 Move onDrop global to WindowEventHandler 2013-10-02 13:40:35 -07:00
Kevin Sawicki c7bc92f6e7 Access rootView through atom global 2013-10-02 13:40:35 -07:00
Kevin Sawicki 2a9ceb42b2 Reference project and rootView using atom global 2013-10-02 13:40:35 -07:00
Kevin Sawicki 550f112be8 Remove unused requires 2013-10-02 13:40:35 -07:00
Kevin Sawicki 333c5a0db2 Add requireWithGlobals() to atom global 2013-10-02 13:40:35 -07:00
Kevin Sawicki dc9c59f0b3 Add atom prefix to globals 2013-10-02 13:40:34 -07:00
Kevin Sawicki 068a10b2db Extract deserializer management into class 2013-10-02 13:40:34 -07:00
Kevin Sawicki cad2c9c7af 📝 Mention centering behavior 2013-10-02 13:40:34 -07:00
Kevin Sawicki 1d7861677a 📝 doc dimension getter/setter 2013-10-02 13:40:34 -07:00
Kevin Sawicki 1e108aa0d1 Reference packageStates via atom.packages 2013-10-02 13:40:34 -07:00
Kevin Sawicki 0c532b62ff Reference package states on packages ivar 2013-10-02 13:40:34 -07:00
Kevin Sawicki 7cae014d09 💄 Initialize ivars in constructor 2013-10-02 13:40:34 -07:00
Kevin Sawicki ebe1598a71 Correctly passthrough call to deactivatePackages 2013-10-02 13:40:34 -07:00
Kevin Sawicki 22f2d4c1c5 Update packageDirPaths on new config instance 2013-10-02 13:40:34 -07:00
Kevin Sawicki c3e462db00 Use subscribe instead of on 2013-10-02 13:40:34 -07:00
Kevin Sawicki bdddb4eb52 Require atom after window 2013-10-02 13:40:34 -07:00
Kevin Sawicki ed5dbe983e Trigger event when packages are loaded 2013-10-02 13:40:34 -07:00
Kevin Sawicki 52ef2db198 Separate construction vs. initialization 2013-10-02 13:40:34 -07:00
Kevin Sawicki 45a1334c75 Require atom after window is required 2013-10-02 13:40:34 -07:00
Kevin Sawicki f56758acd2 Shim window.restoreDimensions to atom 2013-10-02 13:40:34 -07:00
Kevin Sawicki 8150263f52 Initialize paths in constructor
Previously this was done at eval time which
required globals to be set before the class could
be required.
2013-10-02 13:40:33 -07:00
Kevin Sawicki 901b128572 💄 Remove extra newline 2013-10-02 13:40:33 -07:00
Kevin Sawicki dc8fae12b6 Create new Atom class in spec/benchmark bootstraps 2013-10-02 13:40:33 -07:00
Kevin Sawicki e2d727f838 Move Syntax global to Atom class 2013-10-02 13:40:33 -07:00
Kevin Sawicki 5c4a8f55c8 Add deserializeEditorWindow to Atom class 2013-10-02 13:40:33 -07:00
Kevin Sawicki 4be4868959 Move dimension helpers from window to Atom class 2013-10-02 13:40:33 -07:00
Kevin Sawicki 4e3c5d2aba Keep command install functions local 2013-10-02 13:40:33 -07:00
Kevin Sawicki 6a65aad274 💄 Use atom.getLoadSettings() 2013-10-02 13:40:33 -07:00
Kevin Sawicki 62278d9137 Create config, pasteboard, and keymap in Atom 2013-10-02 13:40:33 -07:00
Kevin Sawicki 8660a46fac 📝 Mark Atom class as public 2013-10-02 13:40:33 -07:00
Kevin Sawicki 3f5875e5db 💄 Add getCurrentWindow() helper 2013-10-02 13:40:33 -07:00
Kevin Sawicki 7f4ccf6a42 Export an Atom class from atom.coffee 2013-10-02 13:40:33 -07:00
Kevin Sawicki 44d6bf9bf0 Call getLoadPackages() instead of referencing ivar 2013-10-02 13:40:33 -07:00
Kevin Sawicki fc3dcd9749 Add PackageManager class accessible from atom.packages 2013-10-02 13:40:33 -07:00
Kevin Sawicki 862220adf2 Store less cache as an ivar on ThemeManager 2013-10-02 13:40:33 -07:00
Kevin Sawicki c808630ba1 Move all stylesheet globals to ThemeManager 2013-10-02 13:40:32 -07:00
Matt Colyer d72f235c52 Merge pull request #917 from atom/apm-test
Add spec-directory command line option
2013-10-02 13:25:01 -07:00
Kevin Sawicki c4265c6b00 Upgrade to collaboration@0.19.0 2013-10-02 13:20:40 -07:00
Matt Colyer fc98a9905c Refine the command line help message 2013-10-02 13:16:19 -07:00
Matt Colyer fad7c9586c Update older (and incorrect) flag in atom.sh 2013-10-02 13:10:10 -07:00
Kevin Sawicki 3f764569f7 Upgrade to coffeestack@0.6.0 2013-10-02 13:07:11 -07:00
Kevin Sawicki 3de5c7bf3d 💄 Newline separate dependency sections 2013-10-02 12:59:55 -07:00
Kevin Sawicki dc088f49f9 Upgrade to tantamout@0.5.0 2013-10-02 12:59:21 -07:00
Kevin Sawicki 9c57f94b1f Upgrade to scandal@1.3.0 2013-10-02 12:59:00 -07:00
Kevin Sawicki 2b181c67c2 Upgrade to scandal@0.4.0 2013-10-02 12:58:48 -07:00
Matt Colyer 62b7599bea Add spec-directory command line option 2013-10-02 12:17:42 -07:00
Kevin Sawicki 96c9657593 Prepare 28.0.0 release 2013-10-02 11:26:25 -07:00
Kevin Sawicki 5de21e2cd7 Ignore theme names that cannot be resolved 2013-10-02 11:24:39 -07:00
Kevin Sawicki a3ee15e584 Remove node_modules from NODE_PATH
Packages now specify their dependencies in package.json so they
should no longer rely on the availability of modules in the main
node_modules folder.
2013-10-02 10:56:15 -07:00
Kevin Sawicki c1eb1a69db Upgrade to space-pen@1.2.1 2013-10-02 10:53:52 -07:00
Kevin Sawicki e72925f0bc Upgrade to scandal@0.3.0 2013-10-02 10:39:02 -07:00
Kevin Sawicki d1c1266ed0 Upgrade to collaboration@0.18.0 2013-10-02 10:30:53 -07:00
Kevin Sawicki 420461c9f5 Upgrade to git-utils@0.25.0 2013-10-02 10:02:33 -07:00
Garen Torikian 4908d6462a Merge pull request #915 from atom/remove-atom-title
Remove 'atom -' from title
2013-10-01 21:50:03 -07:00
Garen Torikian e2b23cd522 Remove quotes from title string 2013-10-01 17:53:55 -07:00
Matt Colyer 42e254576c Merge pull request #900 from atom/mc-release-notes
API to Notify render processes when updates are available
2013-10-01 16:41:56 -07:00
Matt Colyer 074eb3fd69 Don't pass updateVersion to AtomWindow 2013-10-01 16:38:43 -07:00
Garen Torikian 4546dbbb23 Remove 'atom -' from title 2013-10-01 16:33:18 -07:00
Kevin Sawicki 8bf301639b Prepare 27.0.0 release 2013-10-01 16:27:15 -07:00
Matt Colyer 4dd22c6ab4 Include release-notes by default 2013-10-01 15:58:45 -07:00
Matt Colyer 16b7a21866 Merge branch 'master' into mc-release-notes 2013-10-01 15:55:31 -07:00
Kevin Sawicki 3189347899 Use window height to determine number of lines to render
This prevents the editor from displaying empty lines when a view is hidden
and the editor suddenly has more vertical space available to fill.
2013-10-01 15:35:08 -07:00
Kevin Sawicki 786f35f272 Merge pull request #913 from atom/ks-cloud-ant
Switch to cloudant from iriscouch
2013-10-01 15:20:15 -07:00
Kevin Sawicki de021f2575 Add back --silent flag 2013-10-01 15:14:06 -07:00
Kevin Sawicki ef40b66fc7 Upgrade to javascript-tmbundle@2.0.0 2013-10-01 15:05:36 -07:00
Kevin Sawicki f0ed8d8093 Downgrade to telepath@0.8.1 2013-10-01 13:34:24 -07:00
Kevin Sawicki 465cf71007 Upgrade to link@0.4.0 2013-10-01 13:27:47 -07:00
Kevin Sawicki 7a43afb31d Temporarily disable silent flag for CI debugging 2013-10-01 13:21:46 -07:00
Kevin Sawicki b3d90a1dcf Update package versions for new registry 2013-10-01 13:19:47 -07:00
Kevin Sawicki e62d5ad23b Upgrade apm to version that uses :cloud:🐜 2013-10-01 12:44:51 -07:00
Kevin Sawicki ee388b2600 Set window size and position before showing
Previously a new dev window that threw an error during bootstrap
would not be displayed.
2013-10-01 08:37:14 -07:00
Kevin Sawicki 5eb72097e5 Add missing require for quit command 2013-10-01 08:32:57 -07:00
probablycorey d42c2b3e5e Update readme
This update is pointless. I JUST WANTED TO BE THE 10,000th commit!
2013-09-30 16:43:25 -07:00
Matt Colyer 6dc6f1b7ac Call window:update-available on new AtomWindows 2013-09-30 13:36:21 -07:00
Matt Colyer a1839cccf9 Merge branch 'master' into mc-release-notes 2013-09-30 10:51:05 -07:00
Kevin Sawicki b9328c82e5 Remove themes folder from .atom template
Themes now go in ~/.atom/packages
2013-09-30 08:56:12 -07:00
Kevin Sawicki b120109cbf Expose shell.beep() through atom global 2013-09-29 22:08:45 -07:00
Kevin Sawicki 6cad026a56 Mention find-and-replace 2013-09-29 21:55:30 -07:00
Cheng Zhao cc185fc9a7 Update to atom-shell v0.5.3. 2013-09-29 22:30:37 +08:00
Matt Colyer 0d1e1c6fc6 Add missing line to set updateAvailable 2013-09-27 17:10:06 -07:00
Matt Colyer fba448ac2d Notify render processes when updates are available 2013-09-27 16:46:39 -07:00
Kevin Sawicki 4f8198b53a Mention double click improvement 2013-09-27 16:08:21 -07:00
Kevin Sawicki e3b34b8ddc Remove light/dark style direction 2013-09-27 16:07:31 -07:00
Kevin Sawicki 467282ce72 Merge pull request #898 from atom/ks-selecting-between-words-and-non-words
Favor the word when double clicking between word/non-word
2013-09-27 16:06:48 -07:00
Kevin Sawicki e2daef477c Return false if either character is whitespace 2013-09-27 16:00:24 -07:00
Kevin Sawicki cd4e64a8f8 📝 correct typos in comments 2013-09-27 16:00:24 -07:00
Kevin Sawicki 542d17913d 📝 doc Cursor.isBetweenWordAndNonWord() 2013-09-27 16:00:24 -07:00
Kevin Sawicki e5b9b1f3cf Favor the word when double clicking between word/non-word
Closes #523
2013-09-27 16:00:24 -07:00
Matt Colyer c3ee3a6496 Bump metrics packages for more resilent specs 2013-09-27 15:36:12 -07:00
Ben Ogle 28aa996b3f Merge pull request #896 from atom/bo-is-visible-is-evil
Speed up pane swapping -- isVisible() is slow
2013-09-27 15:05:47 -07:00
Matt Colyer c8a4157a3f Update metrics with performance data. 2013-09-27 14:41:53 -07:00
Ben Ogle ce9920a9ff Use jquery's hidden code in our isHidden() 2013-09-27 14:33:39 -07:00
Ben Ogle 48337f3203 Just check for display != 'none' for visilbility 2013-09-27 13:44:10 -07:00
Kevin Sawicki 2146384820 📝 Use apm publish minor in the example 2013-09-27 13:25:17 -07:00
Kevin Sawicki 32c4634c85 Upgrade to symbols-view@0.6.0 2013-09-27 13:05:05 -07:00
Kevin Sawicki b18d638fef Trigger destroyed event on TextBuffer
This is useful for packages that are buffer-oriented and want to
unsubscribe when the buffer is no longer useable.
2013-09-27 13:01:53 -07:00
Kevin Sawicki 1e65dd6c16 Upgrade to apm@c431f087249 2013-09-27 12:27:28 -07:00
Kevin Sawicki 8636c8d3d6 Add initial publishing docs
Closes #872
2013-09-27 12:25:46 -07:00
Kevin Sawicki a433f5eb61 Use current window by default in atom.confirmSync
Closes atom/tree-view#7
2013-09-27 12:10:36 -07:00
Kevin Sawicki f1d0711198 Upgrade to github-sign-in@0.6.0 2013-09-27 11:51:22 -07:00
probablycorey 6fb400926f Allow task to ask for GitHub API token 2013-09-27 11:41:37 -07:00
Kevin Sawicki 4d4914ac7c Upgrade to github-sign-in@0.5.0 2013-09-27 11:38:19 -07:00
Ben Ogle 51fed1a29a Upgrade to find-and-replace@0.21.1 2013-09-27 10:57:46 -07:00
probablycorey 2f511ec412 Give error more descriptive title 2013-09-27 10:47:26 -07:00
probablycorey 2870edaf06 Output error message if GitHub api fails 2013-09-27 10:47:02 -07:00
Kevin Sawicki 438de204ca Stop tokenizing buffer when it is destroyed 2013-09-27 10:13:27 -07:00
Kevin Sawicki a6cd8e7c85 Only reposition hidden input when editor has focus 2013-09-27 08:17:29 -07:00
Cheng Zhao 12ffc222bb Uses GitHub Releases API to download atom-shell. 2013-09-27 19:15:56 +08:00
Ben Ogle f07bbb0c7c Upgrade to markdown-preview@0.5.0 2013-09-26 18:18:26 -07:00
Ben Ogle 58ccdb4c02 Upgrade to markdown-preview@0.4.0 2013-09-26 18:15:03 -07:00
probablycorey 96cc1272b3 Update find and replace package 2013-09-26 17:00:44 -07:00
Ben Ogle 0b9a316e02 Upgrade to fuzzy-finder@0.6.0 2013-09-26 15:37:28 -07:00
Ben Ogle 6ec728698e Upgrade to find-and-replace@0.19.0 2013-09-26 15:00:16 -07:00
Ben Ogle ce98bf4343 upgrade to find-and-replace@0.18.1 2013-09-26 14:53:16 -07:00
Ben Ogle 951941a626 Upgrade to find-and-replace@0.18.0 2013-09-26 14:33:41 -07:00
Ben Ogle a9e383afa4 Add paths-searched event to the scan-handler
This allows the interface to know how many total paths were searched
2013-09-26 14:33:41 -07:00
probablycorey 6a04ffd6d2 Merge branch 'cj-dev-mode-status' 2013-09-26 14:32:58 -07:00
probablycorey 33a7ff8722 Add padding to skull 2013-09-26 14:32:44 -07:00
probablycorey 35c8d53275 Use a skull and crossbones instead of a triangle 2013-09-26 14:26:28 -07:00
probablycorey 687776c3fb Use spacepen for html generation
For consistency
2013-09-26 14:26:07 -07:00
probablycorey fb4de36a87 Merge remote-tracking branch 'origin/master' into cj-dev-mode-status 2013-09-26 14:19:35 -07:00
Matt Colyer e029616782 Merge pull request #878 from atom/mc-expose-bindings
Add API for interacting with Keymap
2013-09-26 13:26:01 -07:00
Nathan Sobo 43e2d17b1e Upgrade telepath to 0.8.0 for Document::saveSync fixes 2013-09-26 13:41:28 -06:00
Kevin Sawicki 643e32043b 🐎 Set spec directory once
Prevents an IPC call on each beforeEach getting the load settings
2013-09-26 12:20:32 -07:00
Matt Colyer 9d16dab3db Integrate settings-view with keybinding listing 2013-09-26 12:13:57 -07:00
Ben Ogle 4c86bd7dbc Upgrade to find-and-replace@0.17.0 2013-09-26 12:02:51 -07:00
Matt Colyer 67913b3672 Merge branch 'master' into mc-expose-bindings 2013-09-26 10:26:13 -07:00
Cheng Zhao 554b85153c Update to atom-shell v0.5.1. 2013-09-26 11:51:24 +08:00
Kevin Sawicki fbb778b96c Upgrade to find-and-replace@0.16.0 2013-09-25 18:56:02 -07:00
Kevin Sawicki c938c1c064 Only schedule atom.setFullScreen() when set in state 2013-09-25 18:44:37 -07:00
Paul Betts 8b73224fe3 Rewrite underscore code 2013-09-25 18:03:00 -07:00
Ben Ogle 025cee96c2 Update find and replace + themes to have coloring
for the find matches
2013-09-25 17:51:36 -07:00
Paul Betts 903a1b9bf0 Use tmp.mkdir 2013-09-25 17:50:40 -07:00
Paul Betts 459e4d5523 Rewrite evil files test to generate files on the fly 2013-09-25 17:50:40 -07:00
Paul Betts 3e933ee81b Nuke these from the repo, they break cloning on Win32 2013-09-25 17:50:40 -07:00
Kevin Sawicki 5cecd533ef Add back durations to spec reporter 2013-09-25 17:36:21 -07:00
probablycorey cceb2ebac2 Remove skull from application menu
BECAUSE IT IS A LIE
2013-09-25 17:23:16 -07:00
probablycorey 92edaf157a Use warning color 2013-09-25 17:22:56 -07:00
probablycorey 0dd08dd3d2 Add tiny dev tools status indicator 2013-09-25 17:19:30 -07:00
Ben Ogle 512f45c61e Upgrade to find-and-replace@0.14.1 2013-09-25 17:11:35 -07:00
Kevin Sawicki 153e400137 Add -9 flag to pkill command
When I ssh'ed into one of the CI boxes it had over 500 Atom processes
still hanging around.
2013-09-25 17:10:56 -07:00
Kevin Sawicki 18c4d54612 Upgrade to find-and-replace@0.14.0 2013-09-25 17:06:49 -07:00
Ben Ogle a27e6fd445 Merge pull request #885 from atom/cj-project-scan
Project scan changes for new searching behavior
2013-09-25 16:46:19 -07:00
Ben Ogle 614ca3cb5f Update to FNR v0.13.0 2013-09-25 16:40:55 -07:00
Kevin Sawicki 7840c2dac9 Merge pull request #883 from atom/ks-blank-bug
Fix blank bug
2013-09-25 16:31:46 -07:00
Ben Ogle b3fd473304 UPgrade to FNR v0.12.0 2013-09-25 16:30:36 -07:00
probablycorey 123c44c4b2 Make the --dev flag work when opening a another atom window from the command line 2013-09-25 16:27:28 -07:00
Kevin Sawicki 2a2750862a Add failing spec 2013-09-25 16:24:51 -07:00
probablycorey 93940c03ef 💄 2013-09-25 16:16:45 -07:00
Kevin Sawicki 6581eb4db6 Update offset in existing focusout handler 2013-09-25 16:14:13 -07:00
Kevin Sawicki bc3aec584b Inline hidden input offset updating 2013-09-25 16:07:59 -07:00
Kevin Sawicki 8199147fca Put input in top corner on blur
This allows it to not scroll on the next focus but still be reset
to the right location on the next cursor moved event
2013-09-25 16:07:59 -07:00
Kevin Sawicki 84efe44a5a Always keep hidden input position in visible area
Previously the input could be offscreen depend on the scroll
position of the editor and this would cause a scroll event to
occur when the input gained focused causing the editor rendering
to go out of sync.
2013-09-25 16:07:59 -07:00
Ben Ogle 824049e17a Add escapeAttribute to underscore-extensions 2013-09-25 15:59:10 -07:00
Matt Colyer c22d411e16 Handle linked packages and linked atoms 2013-09-25 15:46:06 -07:00
Matt Colyer 0f408a5626 Remove focus from test 2013-09-25 15:43:41 -07:00
Ben Ogle da6aff222b upgrade themes for loading spinners 2013-09-25 15:09:00 -07:00
Ben Ogle 865591a3da Fix indentation 2013-09-25 15:03:50 -07:00
Matt Colyer 45c9d500e9 📝 2013-09-25 14:42:36 -07:00
Matt Colyer 16e6e3ff4f Keep BindingSet private, add Keymap.getAllKeyMappings 2013-09-25 14:39:31 -07:00
probablycorey 1e88caac50 Make cut/copy/paste menu items work
Previously menu item commands were being triggered on `window` they now are triggered on
`document.activeElement`.
2013-09-25 13:57:45 -07:00
probablycorey 9006ab95fc 💄 2013-09-25 13:44:50 -07:00
Nathan Sobo 935ac5c1a0 Upgrade to telepath v0.6.0 for Site::deserializeDocument 2013-09-25 14:06:32 -06:00
Nathan Sobo 745af71fa1 Update collaboration hoping to avoid "address in use" errors in specs 2013-09-25 14:06:32 -06:00
Nathan Sobo 33a7c86646 Upgrade telepath to v0.5.1
This version of telepath provides telepath.Model, document-based
property resolution, and relational operators.
2013-09-25 14:06:10 -06:00
Kevin Sawicki 76d283c51c Upgrade to collaboration@0.15.0 2013-09-25 12:00:23 -07:00
Ben Ogle 04f0bf0244 Provide scan() delegation in editSession 2013-09-25 11:03:29 -07:00
Ben Ogle 238939e738 Bubble contents-modified from buffer through editSession 2013-09-25 11:03:29 -07:00
Ben Ogle 00cdb3e317 Add lineText and lineTextOffset to buffer.scan 2013-09-25 11:03:29 -07:00
probablycorey 9c4d239696 Fix Project::scan specs 2013-09-25 11:03:29 -07:00
Ben Ogle cb11e20100 Upgrade to scandal 0.2.0 2013-09-25 11:03:29 -07:00
probablycorey f467746cba Project::scan uses core.ignoredNames 2013-09-25 11:03:29 -07:00
probablycorey 7856a8ce62 Make the scan task actually work 2013-09-25 11:03:29 -07:00
probablycorey ba80ba458c Remove console.logs 2013-09-25 11:03:28 -07:00
probablycorey cd554a4f7b Project::scan uses a task to do its work 2013-09-25 11:03:28 -07:00
probablycorey e26d7a0320 wip 2013-09-25 11:03:28 -07:00
probablycorey 861adf6692 Start using scandal and make the specs pass 2013-09-25 11:03:28 -07:00
Ben Ogle 6dd08f85d3 Return the lineText from project.scan
Also change up match -> matchText for consistency.
2013-09-25 11:03:28 -07:00
Ben Ogle cf88868bf0 Use the full name of the -G option 2013-09-25 11:03:28 -07:00
Ben Ogle d8fdbcf1b1 Use the -G param in project::scan to search within directories 2013-09-25 11:03:28 -07:00
Ben Ogle 8dc6d57901 Ignore test 2013-09-25 11:03:28 -07:00
Kevin Sawicki d4047c80cb Load package stylesheets right before activation
Previously this was done eagerly for packages using activation events.
2013-09-25 10:22:42 -07:00
Kevin Sawicki 00c0baeceb Upgrade to metrics@0.3.0 2013-09-25 10:22:26 -07:00
Kevin Sawicki 685ec46fbb Upgrade to metrics@0.2.0 2013-09-25 10:15:32 -07:00
Cheng Zhao 774aba3c7d Update atom-shell to v0.5.0. 2013-09-25 17:39:45 +08:00
Kevin Sawicki 0602983640 Upgrade to timecop@0.4.0 2013-09-24 21:54:24 -07:00
Kevin Sawicki ea54fd78b8 Add getter for loaded themes 2013-09-24 21:44:42 -07:00
Kevin Sawicki 9222f158b5 Measure load/activate time in package classes 2013-09-24 21:31:48 -07:00
Kevin Sawicki ef48da9f2e Upgrade to timecop@0.3.0 2013-09-24 21:20:11 -07:00
Kevin Sawicki 04e7bd86d7 💄 Consistently format time log messages 2013-09-24 21:03:21 -07:00
Kevin Sawicki b65c735666 💄 Move require to top 2013-09-24 20:58:49 -07:00
Kevin Sawicki 01a02d168d Remove unused require 2013-09-24 20:57:29 -07:00
Kevin Sawicki 31c03258e9 Log app start time similarly to window start time 2013-09-24 20:53:57 -07:00
Kevin Sawicki e6f7ed9862 Run script/test from npm test 2013-09-24 20:34:36 -07:00
Kevin Sawicki 64a619fc96 Upgrade to collaboration@0.14.0 2013-09-24 19:45:45 -07:00
Matt Colyer 8eeca35c85 Expose minimal interface for viewing keymap 2013-09-24 17:06:05 -07:00
Kevin Sawicki 9f697996bc Remove patrick from dependencies 2013-09-24 17:05:13 -07:00
Matt Colyer 8f9927cb3f Merge branch 'mc-settings-view-themes' 2013-09-24 16:16:39 -07:00
Matt Colyer 8395539774 Update settings-view for theme filtering 2013-09-24 15:36:49 -07:00
Ben Ogle bec93ed092 Update to light ui v0.2.1 2013-09-24 14:03:01 -07:00
Kevin Sawicki ba7279dd51 Upgrade to find-and-replace@0.11.0 2013-09-24 10:39:51 -07:00
Ben Ogle 9f37aeba83 Upgrade to find-and-replace v0.10.0 2013-09-24 10:32:21 -07:00
Ben Ogle 55cb7b4b5a Merge pull request #875 from atom/bo-multiple-new-files
Allow users to create more than one empty buffer
2013-09-24 10:30:29 -07:00
Ben Ogle 35ffdb8bf9 Make changes from kevin for clarity 2013-09-24 10:19:15 -07:00
Matt Colyer f4f1c54016 Merge pull request #869 from atom/exception-reporting
Include exception-reporting
2013-09-24 09:56:10 -07:00
Matt Colyer e95e64c4fb Merge branch 'master' into exception-reporting
Conflicts:
	package.json
2013-09-24 09:48:12 -07:00
Kevin Sawicki a47743e18e Upgrade to find-and-replace@0.9.0 2013-09-23 18:09:03 -07:00
Ben Ogle 87fb07e657 Allow for more than one empty buffer to be open
Closes #679
2013-09-23 18:05:56 -07:00
Kevin Sawicki ef3ccc992b Upgrade to find-and-replace@0.8.0 2013-09-23 18:01:16 -07:00
Kevin Sawicki 49cc27527d Upgrade to github-sign-in@0.4.0 2013-09-23 17:34:22 -07:00
Kevin Sawicki 19635c160d Upgrade to find-and-replace@0.7.0 2013-09-23 16:48:14 -07:00
Kevin Sawicki 869fe71f73 Accept timeout option to waitsForPromise 2013-09-23 16:44:59 -07:00
Kevin Sawicki 36345185b5 📝 Mention calling after setUpEnvironment 2013-09-23 16:34:49 -07:00
Ben Ogle cdde6020d3 Merge pull request #874 from atom/bo-style-updates
Style updates
2013-09-23 16:34:23 -07:00
Kevin Sawicki f5a034f38a Add API for configuring default events for non-editor windows
Used by collaboration for when joining fails but basic keybindings
and events should still work.
2013-09-23 16:33:31 -07:00
Ben Ogle 2e7a86144e Upgrade to v0.6.0 of tree view 2013-09-23 16:27:51 -07:00
Ben Ogle 1ceaa0ceca Upgrade to v0.2.0 of dark ui theme 2013-09-23 16:27:51 -07:00
Ben Ogle 8880c32c00 Upgrade to v0.2.0 of light-ui 2013-09-23 16:27:51 -07:00
Ben Ogle d1e2c5ff82 Use find-and-replace v0.6.0 2013-09-23 16:27:50 -07:00
Ben Ogle 0e94468e6e Remove scroll-view offset
It is overridden by something in js
2013-09-23 16:27:50 -07:00
Ben Ogle 4b4f9f753f Add .focusable-panel class 2013-09-23 16:27:50 -07:00
Ben Ogle d35aa2b021 Center the mini editors 2013-09-23 16:27:50 -07:00
Ben Ogle 347b1924cd Add font-family to ui-variables 2013-09-23 16:27:49 -07:00
Ben Ogle 0e6e34cdbf Use ui-demo 0.7.0 2013-09-23 16:27:49 -07:00
Ben Ogle 82fcada49e fix blocks for lists 2013-09-23 16:27:49 -07:00
Ben Ogle a8595023c2 Move some panel styles into core 2013-09-23 16:27:49 -07:00
Kevin Sawicki b2d543b9ee Merge pull request #868 from atom/timecop
Timecop
2013-09-23 16:14:11 -07:00
Kevin Sawicki 3b78fddc56 Upgrade to timecop@0.2.0 2013-09-23 16:07:18 -07:00
Kevin Sawicki 4c2df6e291 📝 Tweak wording in require comment 2013-09-23 16:07:18 -07:00
Kevin Sawicki 461a271526 Prime require cache with atom exports 2013-09-23 16:07:18 -07:00
Kevin Sawicki 26811e62bb Add timecop@0.1.0 2013-09-23 16:07:18 -07:00
Kevin Sawicki 7faa50633e Upgrade to github-sign-in@0.3.0 2013-09-23 16:05:28 -07:00
Kevin Sawicki 7370c5fccd Upgrade to package-generator@0.8.0 2013-09-23 15:05:13 -07:00
Kevin Sawicki 137a84a6c5 Upgrade to telepath@0.4.0 2013-09-23 12:14:42 -07:00
Kevin Sawicki b39936ea29 Upgrade to snippets@0.5.0 2013-09-23 12:13:42 -07:00
Matt Colyer 46914e31f5 Include exception-reporting 2013-09-23 10:44:19 -07:00
Kevin Sawicki ae57c8f3a0 Export Site from telepath 2013-09-23 08:43:13 -07:00
Kevin Sawicki cb3143199e Upgrade to coffee-script-tmbundle@7.0.0 2013-09-22 21:33:03 -07:00
Kevin Sawicki 906ed61ec6 Record activation and load time for each package 2013-09-22 13:59:18 -07:00
Kevin Sawicki e68f1f785d Upgrade to terminal@0.9.0 2013-09-22 13:52:55 -07:00
Kevin Sawicki eec38f225e Upgrade to settings-view@0.22.0 2013-09-21 11:47:03 -07:00
Kevin Sawicki da353f6973 Upgrade to image-view@0.5.0 2013-09-21 11:44:46 -07:00
Kevin Sawicki 8d9deed687 Upgrade to image-view@0.7.0 2013-09-21 11:43:43 -07:00
Kevin Sawicki 4872c5c1a3 Export telepath.Document as Document from core 2013-09-21 11:41:07 -07:00
Kevin Sawicki f4b3cb419c Upgrade to ui-demo@0.6.0 2013-09-21 11:10:43 -07:00
Kevin Sawicki f4266b5f6a 🐎 Cache compiled CSON files
This configures season to use a cache directory similar to the
coffee cache so that dev windows don't have to recompile CSON file
on each load.

This shaves hundreds of milliseconds off of the dev window load time.

The cached CSON files are located in /tmp/atom-compile-cache/cson
2013-09-21 10:41:13 -07:00
Kevin Sawicki e254e95792 Upgrade to status-bar@0.7.0 2013-09-20 18:11:14 -07:00
Kevin Sawicki 9a014b4f9e Mention solarized 2013-09-20 18:03:51 -07:00
Ben Ogle f864414f59 Fix button heights.
relates to atom/find-and-replace#16
2013-09-20 18:03:21 -07:00
Ben Ogle 78176da861 Add a theme fixture 2013-09-20 18:03:21 -07:00
Kevin Sawicki 3c080a0d66 Only hide on close when focused 2013-09-20 17:59:19 -07:00
Kevin Sawicki f98d06d212 Add node_modules back to NODE_PATH
This is required until all packages are migrated to include their
dependencies in package.json instead of requiring other modules directly
from core.

This allows apm linking to still working while packages are migrated.
2013-09-20 17:20:01 -07:00
Kevin Sawicki fa6e85a522 💄 Require Editor and Range from atom 2013-09-20 17:06:30 -07:00
Kevin Sawicki 5a9972b370 Update editor width is chars when soft wrap is toggled
Closes #858
2013-09-20 17:04:21 -07:00
Kevin Sawicki & Matt Colyer de341a7f4c Use correct binding sets by first keystroke variable name 2013-09-20 16:24:25 -07:00
Kevin Sawicki b729858eaa Upgrade to settings-view@0.20.0 2013-09-20 15:28:43 -07:00
Matt Colyer a7bae716f1 Add context menus for the tree-view and spell-check 2013-09-20 14:43:57 -07:00
Matt Colyer a772c7461f Merge pull request #850 from atom/context-menu
Context menu
2013-09-20 14:36:11 -07:00
Matt Colyer ca3f645301 Fix requires 2013-09-20 14:14:17 -07:00
Matt Colyer d6ee17da08 Merge branch 'master' into context-menu 2013-09-20 13:57:27 -07:00
Kevin Sawicki 85cf53c210 Use dev window bootstrap file when in dev mode 2013-09-20 13:52:58 -07:00
Ben Ogle ec70950b39 Use ui-demo 0.5.0 2013-09-20 13:33:53 -07:00
Matt Colyer 25e49550cb Merge branch 'master' into context-menu
Conflicts:
	src/atom.coffee
2013-09-20 13:31:45 -07:00
Kevin Sawicki c04fa6d911 Upgrade to find-and-replace@0.5.0 2013-09-20 13:28:20 -07:00
Kevin Sawicki 191b487a53 Remove node_modules from .nakignore
This is useful to have searchable now that packages are in this folder
and can be still be excluded by using the VCS ignore config option.
2013-09-20 13:00:27 -07:00
Kevin Sawicki ef9ece74d4 Merge pull request #853 from atom/atom-api
Public API
2013-09-20 12:55:12 -07:00
Kevin Sawicki 9a54c25fca Upgrade to terminal@0.8.0 2013-09-20 12:43:40 -07:00
Kevin Sawicki 80239223db Upgrade to published package versions 2013-09-20 12:38:39 -07:00
Kevin Sawicki 571bf5f9ea Resolve bootstrap scripts against dev resource path 2013-09-20 11:04:52 -07:00
Kevin Sawicki 6a0fcc9330 Verify style.theme instead of style.userTheme
This caused specs to fail locally but not on CI since CI has
not user theme
2013-09-20 10:03:02 -07:00
Kevin Sawicki 21a3df202c Compile and lint exports folder 2013-09-20 10:03:02 -07:00
Kevin Sawicki d46891caf0 Rename atom-api require to atom 2013-09-20 10:03:02 -07:00
Kevin Sawicki ed1dcceb31 Add Public keyword to all exported classes 2013-09-20 10:03:02 -07:00
Kevin Sawicki 7c7dc1d585 Put editor-stats dependency in correct order 2013-09-20 10:03:01 -07:00
Kevin Sawicki e02a1187e1 Rename atom-api to atom 2013-09-20 10:03:01 -07:00
Kevin Sawicki 05ce975ab4 Use relative path to atom require 2013-09-20 10:03:01 -07:00
Kevin Sawicki a5191e8169 💄 Sort exports alphabetically 2013-09-20 10:03:01 -07:00
Kevin Sawicki 5c8b1a1f11 Resolve CSON file using require 2013-09-20 10:03:01 -07:00
Kevin Sawicki d754c473fc Simply NODE_PATH to only include exports 2013-09-20 10:03:01 -07:00
Kevin Sawicki 88ccafa164 Use path.join for fixtures packages path 2013-09-20 10:03:01 -07:00
Kevin Sawicki a805f9a1f5 Start doc messages with a 📝 2013-09-20 10:03:01 -07:00
Kevin Sawicki 68f6275b7c doc: Update event name 2013-09-20 10:03:01 -07:00
Kevin Sawicki a0fa0c760c Support sending messages directly to task 2013-09-20 10:03:01 -07:00
Kevin Sawicki b4f62c8efe Use atom-api tag of find-and-replace 2013-09-20 10:03:01 -07:00
Kevin Sawicki bbd2f37b4f Switch to atom-api published tags 2013-09-20 10:03:01 -07:00
Kevin Sawicki 27573fe619 Use relative require paths 2013-09-20 10:02:23 -07:00
Kevin Sawicki 3197273e21 Spy on node's fs 2013-09-20 10:02:23 -07:00
Kevin Sawicki c2d5cd9b55 Use relative path for atom-package require 2013-09-20 10:02:23 -07:00
Kevin Sawicki 7c31710a5d Export BufferedProcess from core 2013-09-20 10:02:23 -07:00
Kevin Sawicki 51ecd515dd Mention why jquery shim is needed 2013-09-20 10:02:23 -07:00
Kevin Sawicki e5b2c6cd11 Export stringscore from vendor 2013-09-20 10:02:23 -07:00
Kevin Sawicki b6e112ca8d Export Point and Range from telepath 2013-09-20 10:02:22 -07:00
Kevin Sawicki 6791e00562 Don't export classes that are unusable from a task
Detect if a task is being run in atom-api and only export
classes that are usable from that context.
2013-09-20 10:02:22 -07:00
Kevin Sawicki f4d8c84a8e Include stack for uncaught exceptions 2013-09-20 10:02:22 -07:00
Kevin Sawicki 05505a9871 Add missing require 2013-09-20 10:02:22 -07:00
Kevin Sawicki 47db0a7b3b Export pathForRepositoryUrl from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki 8cadf8252d Use openers ivar 2013-09-20 10:02:22 -07:00
Kevin Sawicki 58367170ce Export Directory class from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki a727fa5a84 Export Git class from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki 6484667c6e Export Task class from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki fe48ec6232 Export SelectList from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki 6146c0934a Export EventEmitter from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki 49647ffc58 Provide type from package
This prevents packages from needing instance of checks for package
class type
2013-09-20 10:02:22 -07:00
Kevin Sawicki 32556b0ce6 Export BufferedNodeProcess from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki 53d9eaf976 Export Editor from core 2013-09-20 10:02:22 -07:00
Kevin Sawicki 7737ba93a8 💄 Sort exports 2013-09-20 10:02:21 -07:00
Kevin Sawicki 6690dd6942 Export Subscriber from core 2013-09-20 10:02:21 -07:00
Kevin Sawicki a06012cf2e Remove duplicate constructor 2013-09-20 10:02:21 -07:00
Kevin Sawicki 00373cd386 Export ScrollView from core 2013-09-20 10:02:21 -07:00
Kevin Sawicki 0d88104367 Store openers on instance instead of on class
This allows packages to not have require access to Project just to register
a custom opener and allows projects to have different sets of openers.
2013-09-20 10:02:21 -07:00
Kevin Sawicki f95669c4bd Use relative require paths to src/ files 2013-09-20 10:02:21 -07:00
Kevin Sawicki a52951712c Use fs from atom-api 2013-09-20 10:02:21 -07:00
Kevin Sawicki cd12b1df0b Use relative path to task-bootstrap 2013-09-20 10:02:21 -07:00
Kevin Sawicki 99eab6f98e Inline requires instead of paths 2013-09-20 10:02:21 -07:00
Kevin Sawicki c8e9865b39 Use relative path to view class require 2013-09-20 10:02:21 -07:00
Kevin Sawicki 8f6be6caca Resolve path to handler 2013-09-20 10:02:21 -07:00
Kevin Sawicki d11742e178 Use relative require path to package class 2013-09-20 10:02:21 -07:00
Kevin Sawicki aee8df1909 Use correct path underscore-extensions 2013-09-20 10:02:21 -07:00
Kevin Sawicki 6f6daf6db0 Use relative paths for requires 2013-09-20 10:02:21 -07:00
Kevin Sawicki 0aa28cbfac Pre-resolve paths used in task bootstrap 2013-09-20 10:02:20 -07:00
Kevin Sawicki cc4477185f Resolve bootstrap script to make it absolute 2013-09-20 10:02:20 -07:00
Kevin Sawicki 73fab20d7e Use relative require path for coffee-cache 2013-09-20 10:02:20 -07:00
Kevin Sawicki 8fec056895 Remove src from NODE_PATH 2013-09-20 10:02:20 -07:00
Kevin Sawicki 41fc4f7fe6 Use relative require paths in src/ files 2013-09-20 10:02:20 -07:00
Kevin Sawicki ad0c105630 Upgrade to jasmine-focused@0.14.0 2013-09-20 10:02:20 -07:00
Kevin Sawicki 38f0e24485 Pass absolute paths to requireStylesheet 2013-09-20 10:02:20 -07:00
Kevin Sawicki 3120ca7bec Require File from atom-api 2013-09-20 10:02:20 -07:00
Kevin Sawicki 200e91175a Use require.resolve to lookup stylesheet path 2013-09-20 10:02:20 -07:00
Kevin Sawicki 3c94ca4b9e Use relative paths in spec requires 2013-09-20 10:02:20 -07:00
Kevin Sawicki fd85acd3eb Remove unused require 2013-09-20 10:02:20 -07:00
Kevin Sawicki 95673b390d Use relative paths when resolving 2013-09-20 10:02:20 -07:00
Kevin Sawicki 671c2750ef Don't resolve fixtures directories using load path 2013-09-20 10:02:19 -07:00
Kevin Sawicki 521a2b8636 Use relative paths for resolving fixture paths 2013-09-20 10:02:19 -07:00
Kevin Sawicki 96302e1e0d Add vendor prefix for jasmine path 2013-09-20 10:02:19 -07:00
Kevin Sawicki d6383f2bea Add temporary stringscore shim to exports 2013-09-20 10:02:19 -07:00
Kevin Sawicki e9db2cfe17 Remove vendor prefix from bootstrap path 2013-09-20 10:02:19 -07:00
Kevin Sawicki c7a0a4bcd9 Use relative require paths in specs 2013-09-20 10:02:19 -07:00
Kevin Sawicki 7ad85ee71f Export jQuery directly from vendor/ 2013-09-20 10:02:19 -07:00
Kevin Sawicki 9915ba73b8 Remove spec/ from NODE_PATH 2013-09-20 10:02:19 -07:00
Kevin Sawicki 6ccc8fe793 Keep RootView unrenamed for now 2013-09-20 10:02:19 -07:00
Kevin Sawicki 864ebf5c36 Remove vendor/ from NODE_PATH
Add jQuery temporarily to exports to not break packages
2013-09-20 10:02:19 -07:00
Kevin Sawicki 71b74c466e Remove unused requires 2013-09-20 10:02:19 -07:00
Kevin Sawicki 57eaaece9d Set fs extensions to override fs functions 2013-09-20 10:02:19 -07:00
Kevin Sawicki 595bd076bf Export all fs functions through fs-utils 2013-09-20 10:02:19 -07:00
Kevin Sawicki b84df9ff29 Use relative require path to jasmine stylesheet 2013-09-20 10:02:19 -07:00
Kevin Sawicki 1547912e3f 💄 2013-09-20 10:02:18 -07:00
Kevin Sawicki 7e6ee6cc0c Use relative require paths to stylesheets 2013-09-20 10:02:18 -07:00
Kevin Sawicki 4bbc93e806 Remove static from NODE_PATH 2013-09-20 10:02:18 -07:00
Kevin Sawicki 52abb4afc9 Remove nakedLoad and use standard require for jasmine 2013-09-20 10:02:18 -07:00
Kevin Sawicki 53dadf2d7f Use relative requires to vendored stringscore 2013-09-20 10:02:18 -07:00
Kevin Sawicki 867ab355b0 Use relative requires to vendored specificity 2013-09-20 10:02:18 -07:00
Kevin Sawicki a7afe7b46f Add underscore, jQuery, and SpacePen to exports 2013-09-20 10:02:18 -07:00
Kevin Sawicki 358b98cc70 Navigate up to src directory 2013-09-20 10:02:18 -07:00
Kevin Sawicki 1b8d61e0b4 Export File class 2013-09-20 10:02:18 -07:00
Kevin Sawicki d322f9a5fa Add exports folder to NODE_PATH
This is where all public classes will be exported through
2013-09-20 10:02:18 -07:00
Matt Colyer e6d3fa7c62 Fix race condition in package-generator specs 2013-09-20 10:01:13 -07:00
Cheng Zhao 98334aebdd Update atom-shell to v0.4.9. 2013-09-20 19:54:08 +08:00
Matt Colyer e8125defb9 Update specs to match latest changes 2013-09-19 14:55:17 -07:00
Matt Colyer f82449c814 Only show context menu separator when it makes sense. 2013-09-19 14:44:15 -07:00
probablycorey bc62d9e780 Update snippets package 2013-09-19 14:44:12 -07:00
probablycorey 924bad6e53 Remove keybindings for commands that mini editors don't use 2013-09-19 14:44:12 -07:00
Matt Colyer c39ced381d Implement declarative context menu loading 2013-09-19 14:21:31 -07:00
Matt Colyer 0aa0d7529a Merge branch 'master' into context-menu 2013-09-19 12:01:36 -07:00
Matt Colyer f187d88197 Add theme generation to package-generator 2013-09-19 11:59:00 -07:00
Kevin Sawicki ca9dda67a3 Upgrade to find-and-replace@0.3.0 2013-09-19 11:05:15 -07:00
probablycorey 810f047619 Sort package list alphabetically 2013-09-18 16:26:05 -07:00
probablycorey da97a01cf6 Replace the Command Panel with Find And Replace 2013-09-18 16:26:05 -07:00
Kevin Sawicki ecfc0f70e1 Upgrade to toml@0.2.0 2013-09-18 16:25:39 -07:00
Kevin Sawicki 9a05bc0add Upgrade to gfm@0.4.0 2013-09-18 16:25:17 -07:00
probablycorey 82de7009d5 Allow for case insensitive project.scan searches 2013-09-18 14:41:38 -07:00
Matt Colyer 037d39e943 Rewrite based on feedback 2013-09-18 09:53:57 -07:00
Cheng Zhao e509e23a0f Merge pull request #852 from atom/ime-support
Improve IME support
2013-09-17 23:09:18 -07:00
Kevin Sawicki 0797a89088 Add bootstrap to package.json
Removes the need to have it as a submodule by just using it directly
from the package.json using a Git URL bound to v3.0.0
2013-09-17 15:09:43 -07:00
Matt Colyer 2f419a639c s/ContextMenuMap/ContextMenu/g 2013-09-17 14:34:05 -07:00
Matt Colyer 63f8631fd1 Minor grammar improvements 2013-09-17 14:14:34 -07:00
Matt Colyer f64c0e0472 Warm the theme cache for the base16 theme 2013-09-17 14:10:11 -07:00
Matt Colyer 075daa8e94 Bundle solarized dark syntax theme 2013-09-17 14:09:54 -07:00
Matt Colyer 6c65de5b94 Bump metrics to 0.1.1
Switches to octolytics production service.
2013-09-17 13:58:16 -07:00
Kevin Sawicki 89204f9077 Spy on atom.hide in window specs 2013-09-17 11:11:01 -07:00
Kevin Sawicki 067b2b437c Mention base16 theme now bundled 2013-09-17 11:02:13 -07:00
Kevin Sawicki f5c5ca0a55 Hide window immediately when closing
Previously the body element would be hidden causing a white flash
before the window was closed.

Now the window is hidden during beforeunload unless it is in the middle
of a restart.
2013-09-17 11:00:58 -07:00
Cheng Zhao e955a0d282 Enable to use http proxy when updating atom-shell.
Used for 🐢 networking :/
2013-09-17 10:07:19 +08:00
Kevin Sawicki 1054f1be16 Remove unused .github file 2013-09-16 19:06:51 -07:00
Kevin Sawicki 57dc5eced2 Add base16-tomorrow-dark-theme@0.1.0 2013-09-16 18:49:19 -07:00
Cheng Zhao faffc09f7a Merge pull request #844 from atom/custom-resource-loader
Add custom resource loader, fixes #197
2013-09-16 18:44:21 -07:00
Kevin Sawicki 3fee026d04 Don't load keymaps, grammars, or properties for themes
Theme packages are just stylesheets and previously all themes had
their stylesheets loaded even when there weren't being used.
2013-09-16 18:38:46 -07:00
Kevin Sawicki 74e8614653 💄 Use theme as variable name instead of t 2013-09-16 18:34:59 -07:00
Ben Ogle b1bd387aee Remove parens 2013-09-16 18:09:45 -07:00
Ben Ogle 1ba04cb58a Reverse the loading order of themes.
We want the first/top-most theme's css to be loaded after the others 
so its styles will override styles in the other themes.
2013-09-16 18:09:01 -07:00
Matt Colyer 9e11f5a737 Add ContextMenuMap and use it to create the context menu 2013-09-16 17:38:41 -07:00
Matt Colyer 2e5e841cd5 Pull logic for context menus into render process 2013-09-16 17:28:20 -07:00
Kevin Sawicki 37c10af4de Upgrade to atom-light-syntax@0.2.0 2013-09-16 17:18:59 -07:00
Kevin Sawicki 958618ae01 Upgrade to atom-dark-syntax@0.2.0 2013-09-16 17:12:16 -07:00
Kevin Sawicki 35fd5be62d Upgrade to less-cache@0.8.0 2013-09-16 16:58:07 -07:00
Kevin Sawicki 52ac06cfd9 Don't look for less files under src/
This is no longer needed now that packages have been extracted from
this folder.
2013-09-16 16:44:54 -07:00
Kevin Sawicki 9aed542e4e Remove bootstrap from less config 2013-09-16 16:36:52 -07:00
Kevin Sawicki d9313bd5e3 Remove remaining references to deleted themes folder 2013-09-16 16:34:49 -07:00
Kevin Sawicki 46b0c8087e Remove bootstrap from LESS search path 2013-09-16 16:32:21 -07:00
Kevin Sawicki 9ea1ad7ce9 Use resolvable path to bootstrap stylesheet 2013-09-16 16:31:51 -07:00
Kevin Sawicki f1f5fb4fd8 Upgrade to settings-view@0.18.0 2013-09-16 16:30:40 -07:00
Kevin Sawicki 33bce240cf Use LESS imports paths from config 2013-09-16 16:23:59 -07:00
Kevin Sawicki bb479f47d9 Put vendor/bootstrap/less instead of vendor/ on less search path 2013-09-16 16:16:05 -07:00
Kevin Sawicki 613f72003c Precompile main stylesheet from each theme 2013-09-16 15:52:15 -07:00
Kevin Sawicki 92c2da30cc Remove themes directory from less config 2013-09-16 15:47:58 -07:00
Kevin Sawicki 262ada0b6c 💄 typo in TODO comment 2013-09-16 15:35:45 -07:00
Kevin Sawicki 508a0d4f2d Upgrade to less-cache@0.7.0 2013-09-16 15:34:06 -07:00
Kevin Sawicki 02f0bfb0e0 💄 2013-09-16 15:05:54 -07:00
Kevin Sawicki b68fc9c44a Copy dev dependencies to application directory 2013-09-16 15:01:13 -07:00
Kevin Sawicki 0d8411dbbb Prebuild LESS cache for common theme configurations 2013-09-16 14:58:25 -07:00
Kevin Sawicki f54f4f440d 💄 2013-09-16 14:41:25 -07:00
Kevin Sawicki c80afda593 Don't precompile LESS files 2013-09-16 14:41:25 -07:00
Kevin Sawicki c8fc7b8400 Delete less cache from partial-clean task 2013-09-16 14:40:39 -07:00
Kevin Sawicki ad381087dd Cache compiled LESS files 2013-09-16 14:40:39 -07:00
Matt Colyer 134510dfe1 Move old Theme specs and apply them to AtomPackage. 2013-09-16 12:15:09 -07:00
Cheng Zhao 61f9cf059a 💄 Remove unused requires. 2013-09-17 00:05:09 +08:00
Kevin Sawicki a234ed96bd Remove themes paths from config
Themes are now co-located with packages
2013-09-16 08:34:03 -07:00
Cheng Zhao 486de96751 Make accented character suggestion work for multiple cursors. 2013-09-16 18:05:44 +08:00
Cheng Zhao 80244a1ae7 Work around of the accented character suggestion feature in OS X.
On OS X, press and hold `c` could show an accent menu to replace `c` with
accented ones like `ć`, there is no corresponding events in W3C, so we
detected it by checking whether the text in input box are selected (this
is how Chrome implemented this feature).

And also note that IME inputs were handled the same way in Chrome, the
compostion text would be marked as selected and got replaced with final
inputs. However the compostion text won't trigger textInput event, so
it's distinguished by checking whether the hiddenInput's value are
changed by Chrome.

Fixes atom/atom-shell#50.
2013-09-16 15:54:25 +08:00
Cheng Zhao 666d202eb6 Add spec for syncing cursorView and hiddenInput's position. 2013-09-16 11:03:40 +08:00
Cheng Zhao 54e25677b6 Restore previous selected text after IME composition is done. 2013-09-16 10:44:15 +08:00
Cheng Zhao f4e3f7a055 Skip the undo stack when changing composition text. 2013-09-16 10:43:34 +08:00
Cheng Zhao dee9cce2e3 Select the text while inserting. 2013-09-14 20:20:45 +08:00
Cheng Zhao a92a65929a Make hiddentInput bigger when inputing with IME.
Some IME's input bubble would have strange behavior when they thought
the target input box is small.
2013-09-14 20:10:36 +08:00
Cheng Zhao c9d4c761bb Show IME's composition text on screen.
The composition text should only show on screen temporarily and gets
disappered when input is cancelled or done. We simply mark the
composition as selected, so it can not only indicate this is composition
text instead of normal text, but also updates the composition without
adding new interfaces.
2013-09-14 19:52:39 +08:00
Cheng Zhao 0c839f419a Move hidden input to the same position with cursor view.
This is required to make IME's input bubble follow the cursor.
2013-09-14 18:22:34 +08:00
Cheng Zhao c682a964fa Add spec for the 'atom' protocol URLs. 2013-09-14 15:00:19 +08:00
Cheng Zhao 0a8d9bdad5 doc: Add usage on the 'atom' protocol URL. 2013-09-14 14:34:00 +08:00
Cheng Zhao 1b4be18dd7 Add ~/.atom/packages to the resource load path. 2013-09-14 11:07:00 +08:00
Cheng Zhao 656793108c Add the "atom://" custom protocol handler. 2013-09-14 11:04:15 +08:00
Cheng Zhao 59e7229ea4 Update to atom-shell v0.4.7. 2013-09-14 11:04:15 +08:00
Matt Colyer 906c5b0a9d Bump settings view, again. 2013-09-13 17:22:10 -07:00
Matt Colyer 05dd400772 Bump settings-view for compatibility 2013-09-13 17:16:33 -07:00
Matt Colyer c413f024f2 Make the build green 2013-09-13 16:21:26 -07:00
Matt Colyer 382a7b8a7f Update specs to reflect new functionality 2013-09-13 16:21:07 -07:00
Matt Colyer 658c106349 Convert fixture themes to packages 2013-09-13 16:20:05 -07:00
Matt Colyer a4fd23b645 Remove unused Theme class 2013-09-13 13:50:25 -07:00
Matt Colyer a83878590d Remove build step which copied themes folder 2013-09-13 12:13:33 -07:00
Matt Colyer c6a23ba32c Add theme dependencies 2013-09-13 12:13:32 -07:00
Matt Colyer e00936f49c Remove themes directory 2013-09-13 12:13:32 -07:00
Matt Colyer 1361ec6ec1 Ensure that theme styles are applied after packages 2013-09-13 12:13:32 -07:00
Matt Colyer 708c760c6c Implement index.less/css fallback for themes 2013-09-13 12:13:32 -07:00
Matt Colyer b1675714e6 Load themes after packages, since we depend on them 2013-09-13 12:13:32 -07:00
Matt Colyer a4dedeb92d Use packages to load themes 2013-09-13 12:13:32 -07:00
Matt Colyer a3069edec0 Add test for initialLine option to EditSession 2013-09-13 11:42:31 -07:00
Matt Colyer 7c84f38410 Be more defensive about parsing line numbers 2013-09-13 11:42:31 -07:00
Matt Colyer 9a64b2775d 💄 2013-09-13 11:42:31 -07:00
Matt Colyer 3dd6e97ca1 Correct documentation 2013-09-13 11:42:31 -07:00
Matt Colyer 4b90ba06ff Add a small note about where ipc 'open'. 2013-09-13 11:42:31 -07:00
Matt Colyer e8838e3bd0 Handle file paths that contain line numbers 2013-09-13 11:42:31 -07:00
Ben Ogle 7aa87adf8d upgrade to status-bar 0.5.0 2013-09-13 11:38:21 -07:00
probablycorey ae6f0c40e6 Fix default project path in specs 2013-09-13 11:34:47 -07:00
Ben Ogle 448064b1cb Only attach the mousewheel handler on regular editors 2013-09-13 11:05:33 -07:00
Ben Ogle f9a5d505d2 Upgrade to Settings 0.15.0 2013-09-13 11:02:37 -07:00
Corey Johnson 2bba50bdd0 Use a packages fixtures directory as the default project directory 2013-09-13 09:01:22 -07:00
Corey Johnson 2152004883 Use the ACTUAL spec directory instead of the specs parent 2013-09-13 09:01:22 -07:00
Corey Johnson e64119ade2 Rename specPath loadSetting to specDirectory 2013-09-13 09:01:22 -07:00
Ben Ogle 7d679f9808 Upgrade to settings 0.14.0 2013-09-12 16:27:23 -07:00
Ben Ogle 5d923357a9 Add a separator between panes in the light theme 2013-09-12 14:04:19 -07:00
Ben Ogle b6a503ac3b Add a separator between panels 2013-09-12 14:04:19 -07:00
Ben Ogle be5c7a87f9 Fix strangeness when split panes 2013-09-12 14:04:19 -07:00
Ben Ogle 634ce0ade1 Use settings-view v0.13.0 2013-09-12 14:04:19 -07:00
Ben Ogle a89daf5153 Remove units on 0 2013-09-12 14:04:19 -07:00
Ben Ogle 09907388b7 Add sortable styles to the light theme 2013-09-12 14:04:19 -07:00
Ben Ogle a8e8bb9303 Fix section styles 2013-09-12 14:04:18 -07:00
Ben Ogle f310797b96 Style the bootstrap tabs 2013-09-12 14:04:18 -07:00
Ben Ogle f887df178c Fix small issues 2013-09-12 14:04:18 -07:00
Ben Ogle c8e0b99241 Add drop down styles to dark theme 2013-09-12 14:04:18 -07:00
Ben Ogle 81a19ea3db Add pane styles to dark theme 2013-09-12 14:04:18 -07:00
Ben Ogle 6400365a27 Style the .caret 2013-09-12 14:04:18 -07:00
Ben Ogle 7ae8f2d836 Style the sortable lists in settings 2013-09-12 14:04:17 -07:00
Ben Ogle 6277fbcf80 Remove merged screw up 2013-09-12 14:04:17 -07:00
Ben Ogle 579ccbde0f Move sortable styles into the theme 2013-09-12 14:04:17 -07:00
Ben Ogle b96c1b4186 Sections can be created with the .section class 2013-09-12 14:04:17 -07:00
Ben Ogle e0a9d3acec Links have a pointer cursor 2013-09-12 14:04:17 -07:00
Ben Ogle 261f61ac26 Oops 2013-09-12 14:04:17 -07:00
Ben Ogle e9b7e27fe0 Update sections to handle the edge borders 2013-09-12 14:04:17 -07:00
Ben Ogle 210fbc6fb1 Add bootstrap less file 2013-09-12 14:04:17 -07:00
Ben Ogle 5b362a5a34 AtomPackages emit events 2013-09-12 14:02:55 -07:00
Ben Ogle fe6732bcdb Remove theme.deactivate calls in afterEach 2013-09-12 14:02:55 -07:00
Ben Ogle 48f01c66e2 Change Theme load verbiage to activate
This is to be more consistent with packages.
2013-09-12 14:02:54 -07:00
Ben Ogle 28d48f983e Use _.contains() rather than indexOf() 2013-09-12 14:02:54 -07:00
Ben Ogle ce35a1d380 Remove duplicate of Theme creation 2013-09-12 14:02:54 -07:00
Ben Ogle c831898781 getLoadedStylesheetPaths -> getStylesheetPaths
To be consistent with Packages
2013-09-12 14:02:54 -07:00
Ben Ogle f3aa8f1024 💄 Long line -> multiple lines 2013-09-12 14:02:54 -07:00
Ben Ogle 69f28855f1 💄 Reorder functions in Theme 2013-09-12 14:02:54 -07:00
Ben Ogle a806f9c95c Add getPath() and getLoadedStylesheetPaths() 2013-09-12 14:02:54 -07:00
Ben Ogle 05b98cefe5 getThemes -> getLoadedThemes 2013-09-12 14:02:53 -07:00
Ben Ogle c1af8a86d3 Remove log line 2013-09-12 14:02:53 -07:00
Ben Ogle 91ce1a573d Remove the unloadBaseStylesheets()
It is no longer necessary. We now replace the contents of the style tags
2013-09-12 14:02:53 -07:00
Ben Ogle d8850c2c77 Use cachedContents when checking for an update.
Without this change, we would never get the initial file's change
without calling .read() first
2013-09-12 14:02:53 -07:00
Ben Ogle 261d386809 Add a theme-added event to the theme manager 2013-09-12 14:02:53 -07:00
Ben Ogle d3eec2db05 deactivated event on themes + can reload stylesheet 2013-09-12 14:02:53 -07:00
Ben Ogle b48a35fc14 Reload the stylesheet when it is applied >1x 2013-09-12 14:02:53 -07:00
Ben Ogle d2e125357a Fix .block css definition
It was selecting .blocks in the highlighted syntax. See #836
2013-09-12 13:47:10 -07:00
Kevin Sawicki 2304518a1e Upgrade to archive-view@0.5.0 2013-09-11 19:04:48 +01:00
Kevin Sawicki 428ae8b06f Upgrade to archive-view@0.4.0 2013-09-11 18:56:59 +01:00
Matt Colyer b5dfc81467 Ignore git ignored files when searching a project 2013-09-11 10:05:34 -07:00
Matt Colyer 81a18565f0 Publish docs don't need patch versions 2013-09-11 09:49:43 -07:00
Corey Johnson 15c3e2c729 Update comment 2013-09-10 14:51:09 -07:00
Corey Johnson 2eb3b7bf35 Always open dev tools before benchmarks are run
Otherwise profiles aren't generated.
2013-09-10 14:51:09 -07:00
Corey Johnson 249044e754 Add application:run-benchmarks command 2013-09-10 14:51:09 -07:00
Ben Ogle c5b56d4070 Update to grammar-selector v0.3.1 2013-09-10 13:55:34 -07:00
Ben Ogle 83f09af89b Remove .less extensions from imports 2013-09-10 12:01:35 -07:00
Ben Ogle d183688699 Update to collaboration v0.10.0 2013-09-10 12:01:35 -07:00
Ben Ogle b7f424cac3 Update to command-panel v0.3.0 2013-09-10 12:01:35 -07:00
Ben Ogle b7a258f152 Update to command-palette v0.2.0 2013-09-10 12:01:35 -07:00
Ben Ogle 3534a2842a Update to fuzzy-finder v0.4.0 2013-09-10 12:01:35 -07:00
Ben Ogle f492617225 Update to grammar-selector v0.3.0 2013-09-10 12:01:35 -07:00
Ben Ogle 3ade9f2612 Update to settings-view v0.12.0 2013-09-10 12:01:34 -07:00
Ben Ogle c82e708a99 Update to status-bar v0.4.0 2013-09-10 12:01:34 -07:00
Ben Ogle f6a0c1cbf3 Update to tabs v0.3.0 2013-09-10 12:01:34 -07:00
Ben Ogle f7e0230fc1 Use tree-view 0.3.0 2013-09-10 12:01:16 -07:00
Ben Ogle 3b2ff8adcf Unset the theme
This caused failures in the CommandPanel package.
2013-09-10 12:01:16 -07:00
Ben Ogle 864631643b Use dev version of collaboration 2013-09-10 12:01:16 -07:00
Ben Ogle 31964bc399 💄 Multiple rules on multiple lines in themes 2013-09-10 12:01:16 -07:00
Ben Ogle e9b3ad2f68 💄 Rules with multiple selectors on 2 lines
In /static
2013-09-10 12:01:16 -07:00
Ben Ogle ba0b90971e Remove ui-colors from static 2013-09-10 12:01:16 -07:00
Ben Ogle c1f92facfb Use 0.3.1 of ui-demo 2013-09-10 12:01:15 -07:00
Ben Ogle f8b6e8acce Use dev version of command-panel. 2013-09-10 12:01:15 -07:00
Ben Ogle 598b1b100e Add .has-flat-children 2013-09-10 12:01:15 -07:00
Ben Ogle e8f3879048 Move text declaration into the other heading definition 2013-09-10 12:01:15 -07:00
Ben Ogle a94a1924a0 Add selected var to the ui variables 2013-09-10 12:01:15 -07:00
Ben Ogle e99f97b9fe Add bordered panels to the light theme 2013-09-10 12:01:15 -07:00
Ben Ogle d39651a69d Add new vars to all ui-variables files. 2013-09-10 12:01:15 -07:00
Ben Ogle 8c0021a4cb Fix tabs 2013-09-10 12:01:15 -07:00
Ben Ogle ee131f7012 Add .bordered panel 2013-09-10 12:01:15 -07:00
Ben Ogle 57f6558602 Panels and inset panels are handled better 2013-09-10 12:01:14 -07:00
Ben Ogle 3621136ab5 💄 No more bootstrap-overrides.less 2013-09-10 12:01:14 -07:00
Ben Ogle 99ea5f02e4 Add pane-item class 2013-09-10 12:01:14 -07:00
Ben Ogle b8085e06b7 Handle trees without disclosure arrows 2013-09-10 12:01:14 -07:00
Ben Ogle & Kevin Sawicki 01bfe77eb7 Move inset-panel out of tool-panel 2013-09-10 12:01:14 -07:00
Ben Ogle e3a78bab9c Light mini editors handle light syntax theme 2013-09-10 12:01:14 -07:00
Ben Ogle c02e073827 Dark mini editors handle light syntax 2013-09-10 12:01:14 -07:00
Ben Ogle 351ce7fa15 Include dev command-palette 2013-09-10 12:01:14 -07:00
Ben Ogle 187dee8e7b Include dev grammar selector 2013-09-10 12:01:14 -07:00
Ben Ogle e339933d98 upgrade to ui-demo 0.3.0 2013-09-10 12:01:14 -07:00
Ben Ogle 35009b73b5 Add fuzzy-finder dev to package.json 2013-09-10 12:01:13 -07:00
Ben Ogle e81d2e9ecc Add status-bar dev to package.json 2013-09-10 12:01:13 -07:00
Ben Ogle 243e62d14e Use dev tabs package 2013-09-10 12:01:13 -07:00
Ben Ogle f7ba202720 Add link styles 2013-09-10 12:00:47 -07:00
Ben Ogle f336ebf668 Revert tabs version to 0.2.0 2013-09-10 12:00:46 -07:00
Ben Ogle d37b5fcb46 Use left margin in inline-blocks to the right 2013-09-10 12:00:23 -07:00
Ben Ogle 0e7cae9a91 Add .icon-size mixin to octicons 2013-09-10 12:00:23 -07:00
Ben Ogle cc83b70459 Use tabs from bo-theme-rework bucket. 2013-09-10 12:00:23 -07:00
Ben Ogle 3e4ba1f833 Add padding to all .icons 2013-09-10 11:59:49 -07:00
Ben Ogle d311ee9c70 Rename links -> icons 2013-09-10 11:59:49 -07:00
Kevin Sawicki 15beb22636 Upgrade to ui-demo@0.2.0 2013-09-10 11:59:49 -07:00
Ben Ogle 84bd5d543a extract a few styles from the tree view 2013-09-10 11:59:49 -07:00
Kevin Sawicki 14eacd4c26 Remove unneeded units on zero values 2013-09-10 11:59:49 -07:00
Ben Ogle 1267ac57fc Add new variables to the fixture theme 2013-09-10 11:59:48 -07:00
Ben Ogle 15e9ec2766 Add new variables to static fallback 2013-09-10 11:59:48 -07:00
Ben Ogle ffcf621afc Add new variables to dark theme 2013-09-10 11:59:48 -07:00
Ben Ogle 3cb6710eed Fix selected items in lists 2013-09-10 11:59:48 -07:00
Ben Ogle 65f597c324 Fix shadow in popover-list 2013-09-10 11:59:48 -07:00
Ben Ogle 599b33f4e0 Style inputs 2013-09-10 11:59:48 -07:00
Ben Ogle 7df12f0110 Add tree view css for light ui 2013-09-10 11:59:48 -07:00
Ben Ogle 8df96e9cd5 Style lists in overlays 2013-09-10 11:59:48 -07:00
Ben Ogle 852cbe3529 Fix weirdness with list colors in light ui 2013-09-10 11:59:48 -07:00
Ben Ogle 35acd60c7f Selected things in lists should use proper text color 2013-09-10 11:59:47 -07:00
Ben Ogle 6aa8bb4116 Lists use the selected bg color 2013-09-10 11:59:47 -07:00
Ben Ogle 4c0c786097 Bottom border looks better 2013-09-10 11:59:47 -07:00
Ben Ogle 7ffc766d26 Refactor tab border colors a bit 2013-09-10 11:59:47 -07:00
Ben Ogle b81329d8d8 Style the tabs 2013-09-10 11:59:47 -07:00
Ben Ogle bc6cd238d2 Selected text is different than highlighted 2013-09-10 11:59:47 -07:00
Ben Ogle 14c153e00f Use proper selected variable 2013-09-10 11:59:47 -07:00
Ben Ogle 906fe7bb37 Use button mixin properly in panels 2013-09-10 11:59:46 -07:00
Ben Ogle 2912893ac7 Buttons for light UI 2013-09-10 11:59:46 -07:00
Ben Ogle 53ab72e058 Update variables 2013-09-10 11:59:46 -07:00
Kevin Sawicki 44437cbb9a Add ui-demo@0.1.0 2013-09-10 11:59:46 -07:00
Kevin Sawicki 884ab2ed7b Upgrade to tree-view@bo-theme-rework 2013-09-10 11:59:46 -07:00
Kevin Sawicki b4f90bdf4d Upgrade to settings-view@bo-upgrade-bootstrap 2013-09-10 11:59:46 -07:00
Kevin Sawicki ed4b69b43f Disable duplicate-background-images rule
This causes false positives for mixins that set the background-image.
2013-09-10 11:59:46 -07:00
Kevin Sawicki d2efaf03d1 Remove unneeded units 2013-09-10 11:59:45 -07:00
Ben Ogle 4798db3679 initial light theme 2013-09-10 11:59:45 -07:00
Ben Ogle 41a3e8f84d Remove old light theme 2013-09-10 11:59:45 -07:00
Kevin Sawicki 95b7891a05 💄 2013-09-10 11:59:45 -07:00
Ben Ogle 407919f566 Rename neue-dark-ui to atom-dark-ui 2013-09-10 11:59:45 -07:00
Ben Ogle 50fd78ff7b Remove old dark ui theme 2013-09-10 11:59:45 -07:00
Ben Ogle e9c0f6b6d9 Remove ui-mixins dep from static 2013-09-10 11:59:45 -07:00
Ben Ogle 9440512113 Extract some of the list structure into base css 2013-09-10 11:59:45 -07:00
Ben Ogle dfdd172b17 Move sections into base CSS 2013-09-10 11:59:44 -07:00
Ben Ogle 6e9bcfcbcf Move links css into base css 2013-09-10 11:59:44 -07:00
Ben Ogle 59f51eb25b Move utility block classes to the base css 2013-09-10 11:59:44 -07:00
Ben Ogle 14569aa46b Pull common button code into base css 2013-09-10 11:59:44 -07:00
Ben Ogle 14aa8951f8 Move files around for consistency 2013-09-10 11:59:44 -07:00
Ben Ogle 5734ee840c Add ui-site-colors classes and rename the vars. 2013-09-10 11:59:44 -07:00
Ben Ogle 41a531391f Simplify ui-variables a ton 2013-09-10 11:59:44 -07:00
Ben Ogle d11b2118ba Use more of the variables in buttons 2013-09-10 11:59:44 -07:00
Ben Ogle 94567729fc Add button variants 2013-09-10 11:59:43 -07:00
Ben Ogle a512332bb5 Add @workspace-background-color.
I needed a name for the bg color of a tab that is not an editor. 
Like the settings, the UI demo, maybe the key map editor.
2013-09-10 11:59:43 -07:00
Ben Ogle 7241635fdf Fix tree padding broken by bootstrap upgrade 2013-09-10 11:59:43 -07:00
Ben Ogle 6587bbc2dc Change button color when in a panel-heading 2013-09-10 11:59:43 -07:00
Ben Ogle 2777374fc7 Update buttons
Colors in a mixin. btn-toolbar fixes
2013-09-10 11:59:43 -07:00
Ben Ogle 262ed0a602 Hover selected buttons are more clear 2013-09-10 11:59:43 -07:00
Ben Ogle 334d4862c6 Buttons finished. 2013-09-10 11:59:43 -07:00
Ben Ogle 9a3fe7b875 Add inline-block 2013-09-10 11:59:43 -07:00
Ben Ogle ba671c4f04 Add .block element 2013-09-10 11:59:43 -07:00
Ben Ogle e3b5dc28d6 Upgrade bootstrap to 3.0.0 2013-09-10 11:59:42 -07:00
Ben Ogle 40d54a0210 buttons wip 2013-09-10 11:59:42 -07:00
Ben Ogle d4fa8d67f5 Text smaller is .9em 2013-09-10 11:59:42 -07:00
Ben Ogle 95b9f4e17f Fix lists to make use of the text-* classes 2013-09-10 11:59:42 -07:00
Ben Ogle b06b6747e7 highlighted to highlight. Add text- prefix 2013-09-10 11:59:42 -07:00
Ben Ogle c028ae678e Style update to make the ui demo look better 2013-09-10 11:59:42 -07:00
Ben Ogle d32e0c9773 💄 2013-09-10 11:59:42 -07:00
Ben Ogle 815ffe2ac1 Style the badge class 2013-09-10 11:59:42 -07:00
Ben Ogle ac75571b8d Select list things for .mark-active class 2013-09-10 11:59:42 -07:00
Ben Ogle 7a0f484aa0 Remove highlight-selected from the select list 2013-09-10 11:59:41 -07:00
Ben Ogle df5b3f01af Remove highlight-selected classes 2013-09-10 11:59:41 -07:00
Ben Ogle 3f6ddbc3f4 Add git icons, use them in select-lists 2013-09-10 11:59:41 -07:00
Ben Ogle 7ab4565b9d Remove highlighted bg on select lists. 2013-09-10 11:59:41 -07:00
Ben Ogle 4b9b9ca4c5 Get rid of disclosure arrows. Do them in :before. 2013-09-10 11:59:41 -07:00
Ben Ogle 0e102bde13 Remove the highlight div on selected items.
Use before instead.
2013-09-10 11:59:41 -07:00
Ben Ogle f09bbac0f7 Fix Section styling 2013-09-10 11:59:41 -07:00
Ben Ogle 44b05c916b Update text styles in theme 2013-09-10 11:59:41 -07:00
Ben Ogle 5de41d19e7 Add more text classes 2013-09-10 11:59:41 -07:00
Ben Ogle bacc5f4228 Add an icon size variable 2013-09-10 11:59:40 -07:00
Ben Ogle c47624062f Move key-binding to utilities 2013-09-10 11:59:40 -07:00
Ben Ogle 4552906adf Cleanup panels 2013-09-10 11:59:40 -07:00
Ben Ogle eb5c6b7da8 Add utilities and sections 2013-09-10 11:59:40 -07:00
Ben Ogle 04f21adc5c Add icon handling in list-groups 2013-09-10 11:59:40 -07:00
Ben Ogle 17e0b3a78a Key binding css 2013-09-10 11:59:40 -07:00
Ben Ogle 8b84b77a2d popover-list css 2013-09-10 11:59:40 -07:00
Ben Ogle 7e95518d0e Style the select-lists 2013-09-10 11:59:40 -07:00
Ben Ogle 39dd42ce8e 💄 on popover-lists 2013-09-10 11:59:39 -07:00
Ben Ogle ed09b69db7 Add overlay to the new theme 2013-09-10 11:59:39 -07:00
Ben Ogle 3fc6995ac1 Use panel colors in tabs 2013-09-10 11:59:39 -07:00
Ben Ogle c3350a6d60 Add tabs to the theme 2013-09-10 11:59:39 -07:00
Ben Ogle bfd1aaa1ed Add highlight pills for text 2013-09-10 11:59:39 -07:00
Ben Ogle 0889288e1e Setup the highlights for tree views 2013-09-10 11:59:39 -07:00
Ben Ogle e7defe6e11 Style the inset panels 2013-09-10 11:59:39 -07:00
Ben Ogle ffef4e3a7e Better handling of selected items 2013-09-10 11:59:39 -07:00
Ben Ogle ac36a07298 list-group -> list-tree 2013-09-10 11:59:39 -07:00
Ben Ogle d2b5dbb5c1 Move to ui-variables rather than ui-colors 2013-09-10 11:59:38 -07:00
Ben Ogle 945f859c96 Use disclosure-arrow in the lists 2013-09-10 11:59:38 -07:00
Ben Ogle 3fef64eefb Add ui-sizes less file 2013-09-10 11:59:38 -07:00
Ben Ogle e19a6a7370 Add disclosure-arrow 2013-09-10 11:59:38 -07:00
Ben Ogle 4d88a95eed 💄 2013-09-10 11:59:38 -07:00
Ben Ogle c91c705c6d Add octicon classes 2013-09-10 11:59:38 -07:00
Ben Ogle 649e3b503e Text additions 2013-09-10 11:59:38 -07:00
Ben Ogle 494cac02ae Add loading widgets to the theme 2013-09-10 11:59:38 -07:00
Ben Ogle 5d260d1331 Add utilities less file to base css 2013-09-10 11:59:37 -07:00
Ben Ogle a192a79bec 💄 2013-09-10 11:59:37 -07:00
Ben Ogle 2abd9a65fc Add smaller text classes 2013-09-10 11:59:37 -07:00
Ben Ogle b668a30fa4 Add icons.less 2013-09-10 11:59:37 -07:00
Ben Ogle 22ce57e5b0 Add mini editor styles 2013-09-10 11:59:37 -07:00
Ben Ogle 08d70a5b5b Use all the sheets in package.cson 2013-09-10 11:59:37 -07:00
Ben Ogle 0a77526f24 Move mixins to ui-mixins 2013-09-10 11:59:37 -07:00
Ben Ogle ff6fb2174a Add new theme with new approach at colors + components 2013-09-10 11:59:37 -07:00
Matt Colyer 697e340117 Add metrics package to default bundle 2013-09-10 11:51:44 -07:00
Garen Torikian 669987a01c Bump biscotto version 2013-09-10 11:19:05 -07:00
Corey Johnson 8ef3debfd0 Mention version fix 2013-09-10 10:43:49 -07:00
Kevin Sawicki 80bb6b6057 Prepare 26.0.0 release 2013-09-10 08:06:21 +01:00
Kevin Sawicki dbdfc7fbbb Mention package generator fix 2013-09-10 08:06:05 +01:00
Kevin Sawicki 14a7b2ccde Upgrade apm for install command fix 2013-09-10 07:57:18 +01:00
Kevin Sawicki c40c77ec31 Upgrade to terminal@0.7.0 2013-09-10 07:44:31 +01:00
Kevin Sawicki e08437f668 Upgrade apm 2013-09-10 07:44:05 +01:00
Kevin Sawicki 45af1d10cb Lint Gruntfile 2013-09-09 23:25:26 +01:00
Kevin Sawicki 31a5ec62fd Delete cache dir exported by coffee-cache in clean task 2013-09-09 18:56:15 +01:00
Kevin Sawicki 6b00e01c60 💄 2013-09-09 18:56:15 +01:00
Kevin Sawicki b471a613da Use coffee-cache tag of terminal package 2013-09-09 18:56:15 +01:00
Kevin Sawicki bc76b70552 Add SHA-1 based CoffeeScript compile cache
This restores the require cache that was used pre-node integration
2013-09-09 18:56:15 +01:00
Kevin Sawicki e10f06e48f Spawn unzip command directly
adm-zip does not support retaining the executable flag and node-unzip
fails for files the size of atom-shell.zip
2013-09-09 18:40:23 +01:00
Kevin Sawicki a669950239 Lint tasks folder 2013-09-09 18:40:22 +01:00
Kevin Sawicki a171fdeca0 Upgrade to atom-shell@0.4.5 2013-09-09 18:40:22 +01:00
Kevin Sawicki fe4f9471e6 Remove cache directory before downloading
This ensures any previously failed downloads/extractions are cleaned
up before a new atom-shell distribution is downloaded and extracted.
2013-09-09 18:40:22 +01:00
Kevin Sawicki a7eaac3984 Invoke callback after zip file is removed 2013-09-09 18:40:22 +01:00
Kevin Sawicki 325438c532 Look for version file to determine if cached
This guards against the directory being created but extraction
previously failing.
2013-09-09 18:40:22 +01:00
Kevin Sawicki c24eec8205 💄 2013-09-09 18:40:22 +01:00
Kevin Sawicki d4f06a096e Invoke callback when no work to be done 2013-09-09 18:40:22 +01:00
Kevin Sawicki 23f30dbbfd Remove unused read stream 2013-09-09 18:40:22 +01:00
Kevin Sawicki 5b73ef20eb Catch any errors thrown by adm-zip 2013-09-09 18:40:22 +01:00
Kevin Sawicki 0e3caafe4d Update atom-shell to version in package.json
This changes the behavior to always install the atom-shell version
in the package.json instead of the latest.

This also ports over the script/update-atom-shell script to a Grunt task.
2013-09-09 18:40:22 +01:00
Matt Colyer 0c61ab6ad7 Use images served over https in guides 2013-09-09 10:22:20 -07:00
Corey Johnson c90eb7fc73 Add better errors to .toHaveLength spec exception
Returns a helpful error when the actual object does not have a length
var.
2013-09-09 09:28:36 -07:00
Kevin Sawicki 2876618218 Upgrade to season@0.12.0 2013-09-09 16:09:52 +01:00
Kevin Sawicki 2a70c6a217 Initially show and focus the window on the next tick
This prevents a white flicker when the window eventually loads
2013-09-09 15:59:56 +01:00
Cheng Zhao 72e725e6bc Update atom-shell to v0.4.5. 2013-09-09 16:28:31 +08:00
Kevin Sawicki fc6e2c7e15 Remove unused class 2013-09-07 14:57:34 +01:00
Kevin Sawicki 3904be2e00 Remove instructional Rakefile
Grunt was switched to over 2 months ago
2013-09-07 14:49:33 +01:00
Kevin Sawicki a4ecbf1fcf Upgrade to package-generator@0.4.0 2013-09-07 06:58:25 +01:00
Kevin Sawicki 89bfe387eb Upgrade to whitespace@0.3.0 2013-09-07 06:08:35 +01:00
Kevin Sawicki b7e0992e36 Upgrade to package-generator@0.3.0 2013-09-07 05:56:50 +01:00
Garen Torikian 31f1a7f4ef Update package.json 2013-09-06 16:53:31 -07:00
Garen Torikian 51faedb50b Update package.json 2013-09-06 16:22:19 -07:00
Kevin Sawicki 0aedfd7af6 💄 use ?= for assignments 2013-09-05 20:52:40 -07:00
Cheng Zhao e59a2dbb84 Merge pull request #802 from atom/atom-shell-4-5
Update atom-shell to v0.4.4.
2013-09-05 18:28:30 -07:00
Cheng Zhao 12aa35f83f Make BufferedNodeProcess adapt to changes of atom-shell v0.4.4. 2013-09-06 09:20:03 +08:00
Cheng Zhao bad0b74d5b Update to atom-shell v0.4.4. 2013-09-06 08:58:17 +08:00
Cheng Zhao e6cf8c8378 Update apm: Update node to v0.10.18. 2013-09-06 08:57:53 +08:00
Kevin Sawicki c6e688dc29 Prepare 25.0.0 release 2013-09-05 15:38:26 -07:00
Kevin Sawicki 1643f1702b 🐎 Precompile bootstrap.less
A regression occurred where bootstrap.less was not being precompiled
adding 200-300ms to startup since it was recompiled each time.
2013-09-05 15:37:36 -07:00
Kevin Sawicki e18674598f 24.0.0 2013-09-05 13:50:48 -07:00
Kevin Sawicki c7752ca766 Mention save fix 2013-09-05 13:50:17 -07:00
Kevin Sawicki eb6ee0286e Upgrade to whitespace@0.2.0 2013-09-05 13:47:04 -07:00
Kevin Sawicki 6686a68a0d Mention nak upgrade fix 2013-09-05 12:04:37 -07:00
Kevin Sawicki b3fdf08258 💄 path being resolved is always relative 2013-09-05 11:58:58 -07:00
Kevin Sawicki 67008e3584 Only put spec on NODE_PATH when running specs 2013-09-05 11:58:57 -07:00
Kevin Sawicki 030c341a00 Remove ~/.atom/packages from NODE_PATH
Packages paths needed for requires should be obtained from the atom global.
2013-09-05 11:58:57 -07:00
Kevin Sawicki 3770b3073e Upgrade to nak@0.2.18
Closes #784
2013-09-05 09:40:24 -07:00
Kevin Sawicki 6dbf003c03 Downgrade to atom-shell@0.4.3
Specs are failing against 0.4.4 so hardcode 0.4.3 until this is resolved.
2013-09-05 09:34:28 -07:00
Kevin Sawicki ca3fff8a94 💄 correct typo in method name 2013-09-04 14:01:46 -07:00
Kevin Sawicki aba6958e55 Load base stylesheets in spec-helper
This fixes the editor specs not working when focused.
2013-09-04 13:33:39 -07:00
Kevin Sawicki 5852238cd8 Reload instead of unload in afterEach
This ensures the stylesheets with the fixtures variables
are unloaded and the default ones are reloaded.
2013-09-04 13:32:55 -07:00
Kevin Sawicki 3a5ad9b48d Unload base stylesheets in an after each
This prevents the blue background from bleeding over into other specs.
2013-09-04 12:56:54 -07:00
Kevin Sawicki 7b2429851c Load bootstrap stylsheets in spec helper 2013-09-04 12:48:58 -07:00
Ben Ogle 26e1df4127 Add loadThemes() to atom global 2013-09-04 12:25:29 -07:00
Ben Ogle 2b2dc15ac1 Fix styles in jasmine runner 2013-09-04 12:25:29 -07:00
Ben Ogle 9d94afc8c5 Move base stylesheet loading in startEditorWindow 2013-09-04 12:25:29 -07:00
Kevin Sawicki 26ee4a065c Use space-ben to create editor div 2013-09-04 12:25:29 -07:00
Kevin Sawicki d48df331b0 Use attachToDom instead of appending directly to #jasmine-content 2013-09-04 12:25:28 -07:00
Kevin Sawicki fd69581397 Update path in comment for less-imports rename 2013-09-04 12:25:28 -07:00
Ben Ogle 8f236c8a60 Rename less-imports to variables 2013-09-04 12:25:28 -07:00
Ben Ogle c0ef23bc7d 💄 Update spec description 2013-09-04 12:25:28 -07:00
Ben Ogle 41eb649ee5 Join dirs in config LESS path 2013-09-04 12:25:28 -07:00
Ben Ogle 5c1799d751 Add individual imports to each LESS file
Make the Less linter happy
2013-09-04 12:25:28 -07:00
Ben Ogle 1d7f5845d0 remove duplicate spec 2013-09-04 12:25:28 -07:00
Ben Ogle 7c63a206f1 Revert "Remove ui-colors"
This reverts commit 45179d44be9d69923a0afaac5470b5399079b071.
2013-09-04 12:25:27 -07:00
Ben Ogle 15c1669ab6 Don't load bootstrap on reload of base sheets 2013-09-04 12:25:27 -07:00
Ben Ogle 127a2af397 Remove log line 2013-09-04 12:25:27 -07:00
Ben Ogle 30a4eb12c5 Remove ui-colors 2013-09-04 12:25:27 -07:00
Ben Ogle d1c1ecc9a4 Add ability to override ui-variables in theme
This required moving the importable less files to a `less-imports` 
directory and adding that directory to the less path. Otherwise, 
atom.less would import ui-variables from its current directory 
(/static/ui-variables) as less searches the current directory before 
any other directories on the path.
2013-09-04 12:25:27 -07:00
Ben Ogle 084457c2a0 Update the less files to properly import less 2013-09-04 12:25:27 -07:00
Ben Ogle 5c12a7ceef Move base stylesheet loading into atom.
Load the config during setup, but don't observe until the editor window
starts up.
2013-09-04 12:25:27 -07:00
Ben Ogle 9c5c05ff41 Get the proper directories before themeManage load 2013-09-04 12:25:27 -07:00
Kevin Sawicki a9c4b23563 Use relative require path for keystroke-pattern.pegjs 2013-09-04 08:54:40 -07:00
Kevin Sawicki 3009c3a9ba Add to-the-hubs@0.1.0 2013-09-04 08:49:53 -07:00
Kevin Sawicki bf0b3ee66e Prepare 23.0.0 release 2013-09-04 08:39:02 -07:00
Kevin Sawicki 8385a5403d Remove unused require 2013-09-03 19:38:31 -07:00
Kevin Sawicki 43938e9c86 Remove leftover paths from src relayout 2013-09-03 19:31:00 -07:00
Kevin Sawicki 7fc7f2574f Upgrade to settings-view@0.11.0 2013-09-03 19:14:50 -07:00
Kevin Sawicki 7ae08f5282 Upgrade to tabs@0.2.0 2013-09-03 19:14:36 -07:00
Kevin Sawicki 3508792234 Upgrade to grunt-lesslint@0.13.0 2013-09-03 17:06:37 -07:00
Kevin Sawicki b91c23e3c5 Upgrade to grunt-lesslint@0.12.0 2013-09-03 16:42:50 -07:00
Kevin Sawicki 8415922d20 💄 consistent argument ordering 2013-09-03 16:21:39 -07:00
Kevin Sawicki b57d655a8a Delete /tmp/atom-coffee-cache before building
Temp fix to get CI working again
2013-09-03 16:18:34 -07:00
Corey Johnson 35a9350b3f Use updated tree-view 2013-09-03 14:55:50 -07:00
Corey Johnson 5b3cd1b1e5 Use subscribe instead of on
So we don't listen to events after the pane container has been removed
2013-09-03 14:48:42 -07:00
Corey Johnson 653eaf4186 Rename spec 2013-09-03 14:48:42 -07:00
Corey Johnson 0b73020a35 Use pane events to trigger pane-container:active-pane-item-changed 2013-09-03 14:48:42 -07:00
Corey Johnson 49e6e82d67 Add spec for when the active pane is changed 2013-09-03 14:48:42 -07:00
Corey Johnson fc8a3f5e78 Rename pane-container:active-item-changed
To pane-container:active-pane-item-changed
2013-09-03 14:48:42 -07:00
Corey Johnson 915159d7a0 Fix pane:became-inactive and pane:became-active events 2013-09-03 14:48:42 -07:00
Corey Johnson 7fd0d934ef Add pane-container:active-item-changed event 2013-09-03 14:48:42 -07:00
Corey Johnson 44de8fe2d3 Add getActivePaneItem method to Pane and PaneAxis 2013-09-03 14:48:42 -07:00
Kevin Sawicki e3a236afbd Mention git status fix 2013-09-03 14:33:45 -07:00
Kevin Sawicki 3c0197dc35 Mention spec runner, settings view, and lit coffee fixes 2013-09-03 14:32:02 -07:00
Kevin Sawicki 68a50b196a Update spec counts when runner completes
This ensures 0/0 is displayed even when no specs were ran.
2013-09-03 14:25:42 -07:00
Kevin Sawicki f9e95c273f Only run core specs when resource path is the Atom repo 2013-09-03 14:25:42 -07:00
Kevin Sawicki 5664e94e05 Copy entire spec folder to application dir 2013-09-03 14:25:42 -07:00
Kevin Sawicki e6360594aa Move jasmine-focused to a dependency
This is required to be able to run specs from a release build.
2013-09-03 14:25:42 -07:00
Kevin Sawicki f5bb0333b9 Run apm clean instead of deleting node_modules
This ensures removed modules are uninstalled before specs run but
unchanged modules can be cached between builds.
2013-09-03 14:13:04 -07:00
Kevin Sawicki 1512029864 Remove deletion of node directory
This directory is no longer at the root of the repo
2013-09-03 14:13:04 -07:00
Kevin Sawicki 6730b19e00 Don't run partial-clean during ci task 2013-09-03 14:13:04 -07:00
Kevin Sawicki f88949bf2d Upgrade to coffee-script-tmbundle@6.0.0
This has a fix for allowing injection grammars inside of
CoffeeScript comments.
2013-09-03 14:06:30 -07:00
Kevin Sawicki 18e1e8146e Add styles for markdown in Literate CoffeeScript 2013-09-03 14:06:30 -07:00
Kevin Sawicki d78f455b23 Push filler tokens when no patterns match an empty line
This ensures that empty lines always contain tokens even when no
patterns match on empty lines.
2013-09-03 14:06:30 -07:00
Kevin Sawicki 4850636092 Tokenize empty lines using grammars
The literate CoffeeScript grammar uses empty lines to pop out of
the paragraph pattern.
2013-09-03 14:06:30 -07:00
Kevin Sawicki d4a384e04a Upgrade to coffee-script-tmbundle@5.0.0 2013-09-03 14:06:30 -07:00
Kevin Sawicki f84a332829 Upgrade to oniguruma@v0.20.0
This adds support for named capture groups
2013-09-03 14:06:30 -07:00
Kevin Sawicki 24eeda0bc7 Upgrade to settings-view@0.10.0 2013-09-03 14:05:04 -07:00
Kevin Sawicki a4774ab358 Upgrade apm for package install fix 2013-09-03 11:36:52 -07:00
Kevin Sawicki 193f727ba7 doc: Use correct code block fences
* Replace cson fences with coffeescript
  * json was being incorrectly being used for cson
  * Certain blocks had no fence name
2013-09-03 10:21:51 -07:00
Kevin Sawicki df293125f4 Upgrade to markdown-preview@0.2.0 2013-09-03 10:16:37 -07:00
Kevin Sawicki b60ad6e086 Upgrade to gfm@0.3.0 2013-09-03 10:16:20 -07:00
Kevin Sawicki c800cef4da doc: correct typo in timeline 2013-09-03 10:01:11 -07:00
Kevin Sawicki 25434e943e Silently install apm's dependencies 2013-09-02 21:25:06 -07:00
Kevin Sawicki aaea8bdb31 Trigger buffer-created from Project::addBufferAtIndex
This ensures that any listeners for this event will be notified when
a buffer is add via deserialization from a telepath document.
2013-09-02 11:46:32 -07:00
Kevin Sawicki 91531d53da Doc Git::destroy as a public method 2013-09-02 11:34:26 -07:00
Kevin Sawicki 63a3d9de94 Pass project to Git.open in the options hash
Previously the project global was unavailable in the Git constructor
since it had not been set as a global yet and so the Git instance was never
configured to watch the project's buffers for save/reload events.  This caused
the status to be out of sync in places like the gutter and status bar.
2013-09-02 11:34:20 -07:00
Cheng Zhao d9b2b3e565 The atom-shell's distribution filename now includes version and platform. 2013-09-02 14:09:14 +08:00
Kevin Sawicki d9695170ce Setup NODE_PATH when restarting render process
Without this the NODE_PATH env var will possibly be wrong when restarting
a window after another window has been opened that has a different NODE_PATH
value.

Close #630
2013-09-01 11:16:35 -07:00
Kevin Sawicki 963ad4b28c Stub out console::trace in task-bootstrap
This prevents errors from being logged when console.trace() is called
from a task process.
2013-09-01 10:16:36 -07:00
Jason Rudolph 4bf09baa30 Merge pull request #780 from atom/add-get-upstream-branch-to-git
Add #getUpstreamBranch to Git
2013-08-31 13:13:08 -07:00
Jason Rudolph 9f823040f2 Add #getUpstreamBranch to Git 2013-08-31 09:25:09 -04:00
Kevin Sawicki 34f16c58e8 Upgrade to collaboration@0.9.0 2013-08-30 15:27:37 -07:00
Matt Colyer 59d832c5c4 Bump package.json version while we work on 22.0 2013-08-30 15:17:09 -07:00
Matt Colyer 647dcd5988 Update create theme guide based on feedback 2013-08-30 15:14:12 -07:00
Matt Colyer 93a0c6eeb5 Create an outline for creating a theme 2013-08-30 15:14:12 -07:00
Kevin Sawicki d79881063a Upgrade version to 21.0.0 2013-08-30 14:09:57 -07:00
Nathan Sobo 49b80d306b 💩 Delete files that were moved to docs/proposals
I thought I deleted these when I moved them but I guess I screwed up.
2013-08-30 15:02:51 -06:00
Nathan Sobo 91adc01e4e 🐎 Don't get every line to check for soft-tabs
Getting all the lines requires SharedString to construct a big array.
It's more efficient to check them one line at a time.
2013-08-30 14:36:45 -06:00
Kevin Sawicki & Matt Colyer 4cc553daf8 🐎 Upgrade to telepath@0.1.2 2013-08-30 11:54:08 -07:00
Kevin Sawicki & Matt Colyer 538b648042 Add more selectors to cover end of ruby embedded strings 2013-08-30 10:10:40 -07:00
Matt Colyer 78b28b6ee6 Fix color highlight issue in Ruby, #716 2013-08-30 10:10:40 -07:00
Kevin Sawicki fe725ec909 Display time in seconds instead of milliseconds 2013-08-29 21:33:21 -07:00
Kevin Sawicki 35d4eadd45 Upgrade to fuzzy-finder@0.3.0 2013-08-29 19:42:37 -07:00
Kevin Sawicki 47bccc142e Upgrade to autocomplete@0.4.0 2013-08-29 19:38:01 -07:00
Kevin Sawicki 8fb10e35a9 🚱 Destroy current project in beforeEach
Previously the window specs were calling window::deserializeEditorWindow
without first destroying the spec project causing the global to be
reassigned over and leaking the initial project and repo.
2013-08-29 18:41:27 -07:00
Kevin Sawicki 2687fafca4 🚱 Destroy environments in an afterEach
These were leaking projects and therefore repos.
2013-08-29 18:37:03 -07:00
Kevin Sawicki 40860a59f5 Destroy deserialized project in an afterEach 2013-08-29 18:24:51 -07:00
Kevin Sawicki 989fffba6a 🚱 Destroy repo in Project::setPath
Previously if the new path was non-null then the current repo would be
leaked and never destroyed
2013-08-29 18:08:01 -07:00
Corey Johnson 9f1edd3189 Use a simpler escapeRegExp method 2013-08-29 15:58:21 -07:00
Kevin Sawicki e03544bab6 Hide body when unloading
This prevents a weird UI flicker when refreshing with the settings
view open.
2013-08-29 15:23:26 -07:00
Kevin Sawicki fd9f3d6543 Don't serialize packages unless the main module was activated
The settings-view activates the config for each package before it renders
causing the main module to be required in order to call activateConfig().
This was causing serialize to be called when the window state was being
saved which was incorrect since activate hadn't actually been called even
though the main module was required.
2013-08-29 14:48:42 -07:00
Matt Colyer 19b5f3e202 Added a section to getting started guide
@xpaulbettsx noted that he wasn't aware that atom windows were tied to a
specific directory.
2013-08-29 10:40:40 -07:00
Kevin Sawicki f80ad91bec Upgrade to grammar-selector@0.2.0 2013-08-29 10:24:26 -07:00
Kevin Sawicki 1e21665b69 Upgrade to status-bar@0.3.0 2013-08-29 10:13:58 -07:00
Kevin Sawicki 57132f57bd Suppress deserialization warning during window spec 2013-08-29 09:18:52 -07:00
Kevin Sawicki de5b2c5cf1 Suppress deserialization warning during pane spec 2013-08-29 09:15:31 -07:00
Kevin Sawicki d12eed3f68 Don't build description string unless actually logging it 2013-08-28 22:19:18 -07:00
Kevin Sawicki 951b3253da Remove unused name field from tracked specs 2013-08-28 22:12:34 -07:00
Kevin Sawicki e40d837b40 Log longest specs/suites during grunt test 2013-08-28 22:07:57 -07:00
Kevin Sawicki 3e626f28c4 Only require AtomReporter if actually being used 2013-08-28 21:20:31 -07:00
Kevin Sawicki 156e9f9b24 Upgrade to collaboration@0.8.0 2013-08-28 21:10:58 -07:00
Kevin Sawicki e0ccfc4788 Use terminal reporter from jasmine-node
This gives the same filtered stack traces and text output
as all our node modules that already use jasmine-node indirectly
through jasmine-focused.
2013-08-28 20:57:43 -07:00
Kevin Sawicki 8307ae8938 💄 correct lint indentation problem 2013-08-28 20:32:35 -07:00
Kevin Sawicki 464785ec3b Map npm test to grunt test 2013-08-28 20:30:23 -07:00
Kevin Sawicki 64e47aeea8 Migrate telepath to package dependency 2013-08-28 20:24:36 -07:00
Kevin Sawicki & Nathan Sobo 2bd4386090 Destroy unretained buffers when serializing project
Previously buffers could linger indefinitely if an error occurred
during startup between the deserialization of the project and the
original retaining edit session.
2013-08-28 18:37:40 -07:00
Kevin Sawicki & Nathan Sobo 40b6183937 🐎 Don't pretty print serialized window state 2013-08-28 18:13:44 -07:00
Nathan Sobo 33dc008b10 🐎 Upgrade telepath for faster SharedArray::findMarkers method 2013-08-28 16:49:06 -06:00
Matt Colyer 9fe9e0dc41 Add documentation for Selection.expandOver* 2013-08-28 15:39:08 -07:00
Kevin Sawicki c8b7040144 🐎 Find elements by id in spec reporter
Previously classes containing the spec/suite id were used which
caused major amounts of time finding DOM nodes using class selectors
instead of id selectors.

This decreases the Editor spec from ~90s to ~30s.
2013-08-28 14:56:52 -07:00
Kevin Sawicki 8e4c9076f1 Upgrade to jasmine-focused@0.12.0 2013-08-28 14:52:32 -07:00
Kevin Sawicki 1381ffdbf5 Invoke grunt callback when shell test command completes 2013-08-28 14:19:29 -07:00
Kevin Sawicki b8c906d00e Only log warning if error occurs 2013-08-28 14:15:30 -07:00
Kevin Sawicki d9c62a76bf Implement test task using grunt shell
This prevents duplicate messages in the CI build logs.
2013-08-28 14:11:05 -07:00
Kevin Sawicki c27103db8a Expect output when -t/--test flag is specified 2013-08-28 12:54:16 -07:00
Kevin Sawicki 2f46539026 Use global.devResourcePath when running package specs
This allows package specs to be launched from windows that
are not in dev mode, previously the window would fail to launch
in this case.
2013-08-28 12:49:18 -07:00
Kevin Sawicki 6261124464 Update spec to use atom::close instead of window::close 2013-08-28 10:43:12 -07:00
Kevin Sawicki 29f1f5cbe5 Call close on native window instead of JS window
Added atom.close() which forwards to remote.getCurrentWindow().close()
since calling window.close() does not call the unload handler registered
on the window global.

Closes #764
2013-08-28 09:10:54 -07:00
Nathan Sobo 2921ac856c Fall back to empty document if window state cannot be deserialized
If the telepath serialization version has changed it will return null
from Site::deserializeDocument.
2013-08-28 10:03:40 -06:00
Nathan Sobo 4474212b3e Upgrade telepath for serialization version fix 2013-08-28 10:00:32 -06:00
Kevin Sawicki b02ac8696e Add missing parens to call to app.quit() 2013-08-28 08:09:52 -07:00
Kevin Sawicki bd96814576 Correct apm command 2013-08-28 08:01:56 -07:00
Kevin Sawicki 5091efab8e Correct apm command 2013-08-28 08:01:24 -07:00
Kevin Sawicki 14522f6769 Doc critical emoji commit message guidelines 2013-08-27 13:03:16 -07:00
Kevin Sawicki & Nathan Sobo 38422150b0 🚱 Clear blinking interval when cursor view is removed 2013-08-27 13:00:41 -07:00
Kevin Sawicki & Nathan Sobo e28ef3a76c 🚱 Call off on active item when it is removed 2013-08-27 13:00:41 -07:00
Kevin Sawicki 6baaf404af 🚱 Use subscribe for tokenized buffer event listeners 2013-08-27 13:00:41 -07:00
Kevin Sawicki f42bd3f34b 🚱 Clear config subscriptions when unobserving 2013-08-27 13:00:41 -07:00
Matt Colyer 2bca1abb2a Remove trailing whitespace 2013-08-27 10:17:02 -07:00
Matt Colyer a44662c885 Actually fix task.coffee 2013-08-27 10:17:02 -07:00
Matt Colyer 0f014463c1 Undo accidental change to method signature 2013-08-27 10:17:02 -07:00
Matt Colyer 7c55348fde Fix incorrect biscotto references 2013-08-27 10:17:01 -07:00
Matt Colyer ae59078c5d Update to biscotto 0.0.14 2013-08-27 10:17:01 -07:00
Matt Colyer 4cb1f6c509 Add comments to Task 2013-08-27 10:17:01 -07:00
Matt Colyer 16ab3e5538 Reformat Selection comments 2013-08-27 10:17:01 -07:00
Matt Colyer 696a54392e Determine public API of SelectList 2013-08-27 10:17:01 -07:00
Matt Colyer 9521358c55 Add note to scroll-view.coffee 2013-08-27 10:17:01 -07:00
Matt Colyer a5e563c04c Reformatted comments for RootView 2013-08-27 10:17:01 -07:00
Matt Colyer 631995996b Reformat comments for project.coffee 2013-08-27 10:17:01 -07:00
Matt Colyer f239cdf307 Add comments to pane.coffee 2013-08-27 10:17:01 -07:00
Matt Colyer d3e482ed6f Reformat Git comments 2013-08-27 10:17:01 -07:00
Matt Colyer 75af26ea3e Reformat comments in file.coffee 2013-08-27 10:17:00 -07:00
Matt Colyer 2d547e3b9e Reformat comments in edit-session.coffee 2013-08-27 10:17:00 -07:00
Matt Colyer e84a6b4869 Reformat Cursor class's comments to Markdown 2013-08-27 10:17:00 -07:00
Matt Colyer c1c73a822a Mark classes as private per discussion 2013-08-27 10:17:00 -07:00
Matt Colyer e774b956e0 Fix visibility of classes. 2013-08-27 10:17:00 -07:00
Matt Colyer 68affd9b08 Update Directory documentation. 2013-08-27 10:17:00 -07:00
Matt Colyer dd1a04aec0 Add visibility to comments of Cursor 2013-08-27 10:17:00 -07:00
Matt Colyer ec37ec1e49 Update Config documentation 2013-08-27 10:17:00 -07:00
Matt Colyer 3d1a27875d Update ApplicationMenu documentation 2013-08-27 10:17:00 -07:00
Matt Colyer ad69522bd1 Update buffered-process's documentation 2013-08-27 10:16:59 -07:00
Matt Colyer 0043b9de77 Update atom-application documentation to latest format 2013-08-27 10:16:59 -07:00
Matt Colyer 0abbe8affb Change to bold for documentation sections 2013-08-27 10:16:59 -07:00
Matt Colyer 1c39b851e4 Update AtomApplication to new documentation style 2013-08-27 10:16:59 -07:00
Matt Colyer fdf250871d Fix all biscoto warnings 2013-08-27 10:16:59 -07:00
Matt Colyer 0e8ec74662 Fix more TomDoc references 2013-08-27 10:16:59 -07:00
Matt Colyer 8e2777ccc0 Get class visibility correct 2013-08-27 10:16:59 -07:00
Matt Colyer d5c2878d53 Document BufferedProcess and BufferedNodeProcess 2013-08-27 10:16:59 -07:00
Matt Colyer f47fdd0ae1 Make AtomApplication class private 2013-08-27 10:16:59 -07:00
Matt Colyer 2f4cca445b Document AtomApplication 2013-08-27 10:16:58 -07:00
Matt Colyer b67496a4f2 Document ApplicationMenu 2013-08-27 10:16:58 -07:00
Matt Colyer a604e51f1c Remove redundant argument to biscotto 2013-08-27 10:16:58 -07:00
Matt Colyer 61e5e6ea28 Fix delegation references in comments 2013-08-27 10:16:58 -07:00
Matt Colyer 3808f81886 Ensure API docs have the proper title 2013-08-27 10:16:58 -07:00
Kevin Sawicki 5a2b2b18c6 Upgrade to gfm@0.2.0 2013-08-27 09:40:37 -07:00
Kevin Sawicki 437cb0ccef Upgrade to symbols-view@0.4.0 2013-08-27 08:47:11 -07:00
Kevin Sawicki decaa3dfcf 💄 Move extend calls to top of class 2013-08-26 19:09:42 -07:00
Kevin Sawicki 03573b4e06 🐎 Upgrade telepath 2013-08-26 18:50:13 -07:00
Kevin Sawicki 70162d39f7 Unsubscribe from SharedString when buffer is destroyed 2013-08-26 14:45:26 -07:00
Kevin Sawicki f6f93342bc Initialize destroyed item states before setting root 2013-08-26 13:47:28 -07:00
Kevin Sawicki b22e45b8a9 Call PaneContainer::itemAdded from PaneContainer::reopenItem
This ensures the active item in the new root is filtered out of
the reopen stack, preventing a duplicate item from being opened.
2013-08-26 13:36:55 -07:00
Kevin Sawicki 419be22b7b Use Subscriber::subscribe for telepath change listeners 2013-08-26 13:04:13 -07:00
Kevin Sawicki c5535bde81 Upgrade to spell-check@0.3.0 2013-08-26 12:25:42 -07:00
Kevin Sawicki 5640f57eae 💄 move extend calls to top of class 2013-08-23 18:33:38 -07:00
Kevin Sawicki 325d534d91 💄 spec description 2013-08-23 18:29:12 -07:00
Kevin Sawicki eaf80a0194 Rename softWrapColumn to editorWidthInChars 2013-08-23 18:09:17 -07:00
Kevin Sawicki 3f848606ee Use setEditorWidthInChars to resize editor
This makes the comparisons for the soft wrap column more sane.
2013-08-23 18:09:17 -07:00
Kevin Sawicki c2b3c2e3aa Rename callbackImmediately option to callNow 2013-08-23 18:09:17 -07:00
Kevin Sawicki 08b80c15ad 💄 Remove comment for removed parameter 2013-08-23 18:09:17 -07:00
Kevin Sawicki 052a489751 💄 toggle comments 2013-08-23 18:09:17 -07:00
Kevin Sawicki 51192bb3e9 Remove config listeners when DisplayBuffer is destroyed 2013-08-23 18:09:17 -07:00
Kevin Sawicki 32396a2a8b Update soft wrapped lines when config changes
DisplayBuffer now observes for config changes to the preferred line length
and the preference to soft wrap at the preferred line length to update
any wrapped screen lines.
2013-08-23 18:09:16 -07:00
Kevin Sawicki a45b93614e Add editor.softWrapAtPreferredLineLength config setting
This is used by the DisplayBuffer to use `editor.preferredLineLength`
as the soft wrap column instead of the editor size.
2013-08-23 18:09:16 -07:00
Kevin Sawicki 8f193e4fb5 Remove default edit session options from Project
Instead read the config values directly where they are actually
used such as in EditSession, TokenizedBuffer, and DisplayBuffer.
2013-08-23 18:09:16 -07:00
Kevin Sawicki cbd4fab8f2 Emit event from display buffer when soft wrap changes
This allows the editor to be reactive to the edit session
and always respect the edit session's current value when
initially opened.
2013-08-23 18:09:16 -07:00
Kevin Sawicki 8b3b033b09 Add explicit call to setSoftWrap in specs
This is now required now that setting the soft wrap
column does not cause wrapping unless soft wrap is enabled.
2013-08-23 18:09:16 -07:00
Kevin Sawicki e675fe73c8 Set soft wrap explicitly on the display buffer
This is required now that soft wrap column only takes affect
when soft wrap is enabled.
2013-08-23 18:09:16 -07:00
Kevin Sawicki 0b7262aa62 Always calculate the soft wrap column 2013-08-23 18:09:16 -07:00
Kevin Sawicki 5001c6e84e Enable soft wrap explicitly in specs
This is required now that the soft wrap setting and soft wrap
column are decoupled.
2013-08-23 18:09:16 -07:00
Kevin Sawicki a4411ab2ca Update specs for resize handler changes 2013-08-23 18:09:16 -07:00
Kevin Sawicki 5ea8c6c27b Don't store soft wrap column on EditSession
This removes duplicate state between the edit session and
display buffer.
2013-08-23 18:09:16 -07:00
Kevin Sawicki da1e5f5c10 Always update the soft wrap column when the window resizes
This allows the edit session and display buffer to always be
notified of soft wrap column changes regardless of their initial
soft wrap state.
2013-08-23 18:09:16 -07:00
Kevin Sawicki c33f7cde2a Move soft wrap state from EditSession to DisplayBuffer 2013-08-23 18:09:16 -07:00
Kevin Sawicki a39e136c43 💄 2013-08-23 18:09:16 -07:00
Kevin Sawicki 275ee62e8d 💩 Upgrade telepath 2013-08-23 15:50:50 -07:00
Kevin Sawicki 62a19aa6fa 🐎 Upgrade telepath 2013-08-23 15:18:15 -07:00
probablycorey 78b9a99f86 Add window:run-package-specs command
This will only run specs found in the current projects spec directory
2013-08-23 09:02:22 -07:00
probablycorey ba632751a0 Rename application:run-specs to application:run-all-specs 2013-08-23 09:02:22 -07:00
Nathan Sobo 96a16494ff Add a proposals folder in docs and put the private beta stuff there 2013-08-22 21:21:40 -06:00
Nathan Sobo a39d1c274e 🐎 Upgrade telepath for performance improvements
Again, addresses #734 but we're still too slow.
2013-08-22 19:24:43 -06:00
Kevin Sawicki de8dab5939 Upgrade to collaboration@0.7.0 2013-08-22 14:53:35 -07:00
Kevin Sawicki f32a289193 Store relative buffer path instead of id
This allows the tokenized buffer to be deserialized during reopening
from the pane container.

Closes #744
2013-08-22 14:42:08 -07:00
Kevin Sawicki 92a80208d3 Update the relative path when the buffer's file moves 2013-08-22 13:59:46 -07:00
Kevin Sawicki 2793ebb5c4 Remove unused bufferId from edit session document
This is now on tokenized buffer instead.
2013-08-22 13:07:28 -07:00
Kevin Sawicki 44d90615ec Remove unused ivar 2013-08-22 13:05:51 -07:00
Kevin Sawicki 7bf350251e Add EditSession::getRelativePath
Closes #746
2013-08-22 12:16:44 -07:00
Kevin Sawicki e4b5cfd600 Call AtomPackage::deactivateConfig from AtomPackage::deactivate
This adds back support for a package's main module implementing
deactivateConfig.
2013-08-22 11:13:32 -07:00
Kevin Sawicki 20a669e94f Upgrade to settings-view@0.8.0 2013-08-22 11:04:03 -07:00
Kevin Sawicki 25be233c5f Call AtomPackage::activateConfig from AtomPackage::activateNow
Previously this method was unused and so packages implementing
activateConfig were not being called.
2013-08-22 11:01:17 -07:00
Matt Colyer 13f35bc6e3 Fix documentation links 2013-08-22 10:43:45 -07:00
Joel Glovier 2efc39a265 Fixed broken links in ReadMe 2013-08-22 13:31:31 -04:00
Joel Glovier 1a31e3418d Fixed broken links for configuring.md, theming.md, and extending.md 2013-08-22 13:29:37 -04:00
Joel Glovier 090d350802 Fixed broken links to configuring.md, theming.md and extending.md 2013-08-22 13:28:33 -04:00
Joel Glovier 4f547b8c21 Fixed broken links to configuring, theming, and extending. 2013-08-22 13:27:52 -04:00
Kevin Sawicki 76992dfaeb Upgrade to autocomplete@0.3.0 2013-08-22 09:32:52 -07:00
Kevin Sawicki 070a72e76c Add ctrl-A/E keybinding to select to beginning/end of line
Closes #711
2013-08-22 09:00:02 -07:00
Kevin Sawicki 95a23cdada Add default config for editor.softTabs 2013-08-21 18:53:34 -07:00
Kevin Sawicki 6fa0c82fac Mention soft wrap and tab length setting 2013-08-21 18:52:14 -07:00
Kevin Sawicki a0db412140 Use editor.softTabs config value when creating edit sessions
This replaces the internal softWrap state and removes the previous
getter and setter for this value that was on Project.
2013-08-21 18:12:26 -07:00
Kevin Sawicki 2f4a57e5e4 Remove get/setSoftWrap from Project
The config should now be the place that soft wrap settings is interacted
with.
2013-08-21 18:08:59 -07:00
Kevin Sawicki 0da647acdf Use display: inline for editor fold marker
This prevents it from wrapping to the next line when the window
is narrower than the line length.

Closes #211
2013-08-21 17:52:19 -07:00
Kevin Sawicki 147e75ad95 Use editor.softWrap config value when creating edit sessions
Closes #666
2013-08-21 17:17:06 -07:00
Kevin Sawicki 2f4db45320 Use editor.tabLength config value when creating edit sessions
Closes #708
2013-08-21 17:12:04 -07:00
Kevin Sawicki c18810ca67 Upgrade to settings-view@0.7.0 2013-08-21 16:48:38 -07:00
probablycorey 204de3ac24 Support long version for foreground command 2013-08-21 16:19:37 -07:00
probablycorey 986a9ce0a0 Add cli option to keep the browser process running in the foreground 2013-08-21 16:19:37 -07:00
probablycorey 25b7d356a1 Make load paths work when Atom is run in stable mode 2013-08-21 16:19:37 -07:00
probablycorey e833649111 Remove aa script and replace it with compile-main-to-app 2013-08-21 16:19:37 -07:00
probablycorey 0d74753d3e The browser process loads files from the resource path in dev mode
main.coffee is the only exception
2013-08-21 16:19:37 -07:00
Kevin Sawicki 9306c9b262 Upgrade to symbols-view@0.3.0 2013-08-21 15:58:28 -07:00
Kevin Sawicki 283cbcc9ab Use constructor.name instead of hard-coded string 2013-08-21 15:41:27 -07:00
Kevin Sawicki 935df2f4f1 Add issues url to package.json 2013-08-21 15:40:55 -07:00
Kevin Sawicki 07bcd8c1ef Upgrade to archive-view@0.3.0 2013-08-21 15:40:00 -07:00
Kevin Sawicki 6ad088f6d5 Upgrade to settings-view@0.6.0 2013-08-21 14:57:39 -07:00
Kevin Sawicki b181a77130 Upgrade to image-view@0.3.0 2013-08-21 14:57:39 -07:00
Matt Colyer d83adc3a27 Update documentation concerning themes 2013-08-21 14:53:56 -07:00
Matt Colyer 1ad971f424 Consistently use 'cmd' to represent 'meta' key 2013-08-21 14:53:56 -07:00
Matt Colyer 0b8800c818 Document favoring less over css 2013-08-21 14:53:56 -07:00
Matt Colyer bb7d8812da Update document regarding symbols 2013-08-21 14:53:56 -07:00
Matt Colyer f0677e43fa First pass at documentation correctness 2013-08-21 14:53:56 -07:00
Matt Colyer 159f521104 Reorganize documentation 2013-08-21 14:53:56 -07:00
Matt Colyer 46d713169f Add missing guides to the index 2013-08-21 14:53:56 -07:00
Matt Colyer 95535d93c6 Remove package related documentation from core 2013-08-21 14:53:56 -07:00
Corey Johnson & Nathan Sobo 7173467b1a 🐎 Upgrade telepath to improve fold performance
This addresses #734. It improves performance from ~10s to ~1.5s when
running a foldAll on edit-session-spec. This still needs to get better.
2013-08-21 15:22:25 -06:00
Corey Johnson & Nathan Sobo 03712392c9 Write DisplayBuffer::findMarkers in terms of TextBuffer::findMarkers 2013-08-21 15:22:25 -06:00
Kevin Sawicki 0e49582616 Upgrade to settings-view@0.5.0 2013-08-21 13:15:17 -07:00
Kevin Sawicki 1dad3ae7ca Upgrade to collaboration@0.6.0 2013-08-21 13:02:50 -07:00
Kevin Sawicki c2123fce1f Upgrade to terminal@0.6.0 2013-08-21 10:51:24 -07:00
Kevin Sawicki 2190a009d8 Upgrade to settings-view@0.4.0 2013-08-21 10:19:04 -07:00
Kevin Sawicki e199000985 Mention python grammar fix 2013-08-21 08:51:04 -07:00
Kevin Sawicki ba70c15328 Upgrade telepath for redo fix
Closes #736
2013-08-20 19:04:14 -07:00
Nathan Sobo 0192c57f46 Fix corner case in RowMap::mapBufferRowRange w/ 0-buffer-row regions
Fixes #688

The DisplayBuffer applies buffer and screen deltas to the row map as
rows are inserted/removed from the buffer/screen. This can leave some
of the regions in a weird state, such as mapping multiple screen rows
to zero buffer rows. But next the DisplayBuffer applies any new mappings
based on the replaced lines over the top of existing regions. These
weirdly shaped regions should be overwritten by newly inserted regions,
so at the end of the operation the row map makes sense again.

This fixes a corner case where regions spanning 0 buffer rows at the
very beginning of the row range were not being included in the set of
regions to replace. This was in turn causing the RowMap to get into a
bad state in certain situations involving soft-wrapped lines.
2013-08-20 19:30:29 -06:00
Nathan Sobo b60b21cf3a Add RowMap::inspect, which returns a string for debugging the regions 2013-08-20 19:30:28 -06:00
Kevin Sawicki & Nathan Sobo 116c56c236 Serialize site across window loads
This prevents issues with the site counter resetting to 1 on each
load causing duplicate array and marker ids to be generated.

Closes #729
2013-08-20 18:29:19 -07:00
Kevin Sawicki 6fb8dcbaa5 Add site color variables to ui-colors
These are used by the collaboration package to represent
participants in the current session.
2013-08-20 17:15:43 -07:00
Kevin Sawicki 6e2fd18f62 Add back ability to open an arbitrary window
atom.open now takes an options has that can contain either pathsToOpen
or the complete settings of a new window.

This will be used by the collaboration package to open the window when a
session is being joined.
2013-08-20 15:30:53 -07:00
Matt Colyer 90da89d31c Use JSON frontmatter 2013-08-20 15:02:01 -07:00
Matt Colyer 0999dc6d44 Add a proper template for the docs 2013-08-20 15:02:01 -07:00
Matt Colyer 72cedf9027 Synchronize directory structure 2013-08-20 15:02:01 -07:00
Matt Colyer c38eccf39d Add a simple documentation index 2013-08-20 15:02:01 -07:00
Matt Colyer 3be3543ad9 Update deploy task to include guides as well 2013-08-20 15:02:01 -07:00
Matt Colyer 588efa2e11 Add grunt 'docs' task to build both guides and API docs 2013-08-20 15:02:01 -07:00
Kevin Sawicki 2fee0f1083 💄 space separate array items 2013-08-20 14:20:16 -07:00
Corey Johnson 55ee11e16a Compile keymaps into atom application 2013-08-20 14:19:32 -07:00
Kevin Sawicki b22e4d67ec Upgrade to terminal@0.5.0 2013-08-20 12:32:01 -07:00
Corey Johnson & Nathan Sobo 85626383ee Move command handling to AtomWindow 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo fc60ba682c 💄 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo 0e7cb3ff78 🔫 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo 03ef5a72c4 Make getTemplate take keystrokesByCommand as a parameter
This clarifies the fact that we can't call this method without having
a keystrokes hash from a running window, which is why we also have a
getDefaultTemplate method which doesn't need the keystrokes.
2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo 2cd91eda98 💄 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo 5d27d56056 Rename ApplicationMenu::parseTemplate to translateTemplate 2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo 0c9a1fdc80 Rename Keymap::toObject to Keymap::keystrokesByCommand
Also add spec for passing a selector
2013-08-20 12:23:15 -07:00
Corey Johnson & Nathan Sobo 79dd4320da Rename AtomMenu to ApplicationMenu 2013-08-20 12:23:14 -07:00
probablycorey 37c7c8abee Remove the whitespace grunt:lint was complaining about 2013-08-20 12:23:14 -07:00
probablycorey 77bb829a3e Make keymap.toObject(selector) work 2013-08-20 12:23:14 -07:00
probablycorey dba0998687 Revert "trigger commands from the browser process on the active.element"
This reverts commit f023ce89096b1c7a6faf337cf48d29cfbb296091.
2013-08-20 12:23:14 -07:00
probablycorey 0c542d2317 Menu Items only show keyBindings that match the selector "body" 2013-08-20 12:23:14 -07:00
probablycorey 477ac1768b Rename ApplicationMenu to AtomMenu
This is so all browser process classes start with Atom.*
2013-08-20 12:23:14 -07:00
probablycorey 39ec96021e Listen for application commands using the @command method
This adds application level commands to the command palette.
2013-08-20 12:23:14 -07:00
probablycorey ab397b306c AtomApplication listens for application level events 2013-08-20 12:23:14 -07:00
probablycorey d3575bd45e Remove return value from openPath()
It is not used anywhere
2013-08-20 12:23:13 -07:00
probablycorey f6ad85488c Fix parameter ordering 2013-08-20 12:23:13 -07:00
probablycorey b8406368c6 Add underscore so download update menu item works 2013-08-20 12:23:13 -07:00
probablycorey 6278364ed2 💄 2013-08-20 12:23:13 -07:00
probablycorey 068e656627 Remove unused atom.getVersion method 2013-08-20 12:23:13 -07:00
probablycorey 6d50d05336 Move default menu creation into ApplicationMenu 2013-08-20 12:23:13 -07:00
probablycorey 60d804fb72 Don't intercept non-core commands 2013-08-20 12:23:13 -07:00
probablycorey fb2439f193 Move ApplicationMenu to the AtomApplication
This moves it completely out of the renderer process
2013-08-20 12:23:13 -07:00
probablycorey 4d8b2672ff Rename menu-bar to application-menu
Also move it to the src root in preparation for it's use in the
browser process
2013-08-20 12:23:13 -07:00
probablycorey e057d35048 Create a MenuBar object (instead of treating it like a singleton.) 2013-08-20 12:23:13 -07:00
probablycorey 6e3517dd4a Menu bar does not directly access the keymap anymore
This makes the keyBindingsForCommand methods obsolete
2013-08-20 12:23:12 -07:00
probablycorey 37c17075ea Add keymap.toObject() 2013-08-20 12:23:12 -07:00
probablycorey 1074642e8f Remove unused openWindow method 2013-08-20 12:23:12 -07:00
probablycorey e360379ced Create default menu bar that is shown if atom crashes during launch 2013-08-20 12:23:12 -07:00
probablycorey efb70e0562 Remove specs and methods that are no longer used 2013-08-20 12:23:12 -07:00
probablycorey 9a156c8629 Remove keymap.bindDefaultKeys
No longer needed since default keys are handled in AtomApplication
2013-08-20 12:23:12 -07:00
probablycorey afd1a7419d Menu bar is load by the first created Atom Window 2013-08-20 12:23:12 -07:00
Corey Johnson b3582b2632 Add keymap.keyBindingsForCommand 2013-08-20 12:23:11 -07:00
Corey Johnson e68bc47dc5 💄 2013-08-20 12:23:11 -07:00
Corey Johnson b5f4b8d254 Set devMode option on loadSettings 2013-08-20 12:23:11 -07:00
probablycorey 8803bab816 trigger commands from the browser process on the active.element 2013-08-20 12:23:11 -07:00
Kevin Sawicki b94d22794b Upgrade to bracket-matcher@0.3.0 2013-08-20 12:09:34 -07:00
Kevin Sawicki 27cee3e19c Don't terminate tokenization if stack size changes
Previously Python import blocks were not tokenizing correctly since
the loop was prematurely terminating when a match at the end of the line
was reached and no tokens were generated for it.

This approach was incorrect since the tokenizer may have just popped a rule
and another loop could possibly pop more rules.

Now this early termination is only performed if the stack size hasn't changed.
2013-08-20 11:38:06 -07:00
Ben Ogle b10a01ddc2 fix naming of background colors in default ui colors 2013-08-20 11:25:30 -07:00
Ben Ogle 14b5308bb3 Merge pull request #733 from atom/bo-theme-buttons
Add styled buttons to themes
2013-08-20 11:22:26 -07:00
Ben Ogle 4c0ffe122d Add buttons to the light ui theme 2013-08-20 11:14:07 -07:00
Ben Ogle 7ca2779e56 Fix background highlight colors naming 2013-08-20 11:13:54 -07:00
Ben Ogle 5579551521 add buttons to ui dark theme 2013-08-20 10:47:26 -07:00
Kevin Sawicki d89e95dc54 💄 Move extend under class declaration 2013-08-20 10:15:31 -07:00
Corey Johnson 7ace46d81f Add private beta docs 2013-08-20 09:43:48 -07:00
Kevin Sawicki e13eebdcd2 Remove fontello
This is no longer used now that the octicons include video/audio
on/off icons that are used in the collaboration package.
2013-08-19 21:42:32 -07:00
Kevin Sawicki 3cb3c888ba Upgrade to collaboration@0.5.0 2013-08-19 21:42:28 -07:00
Kevin Sawicki 0947e1cffa Upgrade octicons for mute/unmute icons 2013-08-19 21:40:19 -07:00
Kevin Sawicki 044bcd4053 💄 2013-08-19 21:28:09 -07:00
Kevin Sawicki 805c17d20c Revert "Remove ws dependency now managed in collaboration package"
This reverts commit dc8362cabf.

This is still needed since apm install does not install dev dependencies
of third-party modules.
2013-08-19 21:25:37 -07:00
Kevin Sawicki 77ed5324b1 Move specs from spec/app to spec/ 2013-08-19 21:23:00 -07:00
Kevin Sawicki dc8362cabf Remove ws dependency now managed in collaboration package 2013-08-19 21:08:02 -07:00
Kevin Sawicki 87b859b947 Update links for new repo location under atom org. 2013-08-19 20:50:09 -07:00
Kevin Sawicki f92e61a683 Upgrade to collaboration@0.4.0 2013-08-19 20:36:56 -07:00
Kevin Sawicki 3bd04f8da8 Remove atom-collaboration-server from .gitmodules
This is now reference in the collaboration package repository
2013-08-19 20:33:03 -07:00
Kevin Sawicki d08aa4b9d9 Update telepath submodule URL for new location in atom org. 2013-08-19 20:32:37 -07:00
Kevin Sawicki 38a3adae89 Update apm submodule URL for new location in atom org. 2013-08-19 20:30:32 -07:00
Kevin Sawicki 2f8c9ffa66 Remove src from nof list of directories
It no longer contains any package specs.
2013-08-19 20:20:36 -07:00
Kevin Sawicki a7a1244599 Flatten spec directory 2013-08-19 20:13:58 -07:00
Kevin Sawicki 6ec8b6e26f Update doc tasks for new src layout 2013-08-19 20:13:57 -07:00
Kevin Sawicki 76332c76bd Flatten src directory
* Move src/app to src/
  * Move src/stdlib to src/
  * Remove src/app and src/stdlib from NODE_PATH
2013-08-19 20:13:57 -07:00
Kevin Sawicki 45c11e6fd4 Move src/app/keymaps to repo root 2013-08-19 20:13:57 -07:00
Kevin Sawicki b6785d78e8 Reset themes in afterEach
This ensures they don't bleed over into other specs.
2013-08-19 19:49:52 -07:00
Kevin Sawicki e31cd35ce8 Upgrade apm to fix update command
Closes #726
2013-08-19 19:25:28 -07:00
Kevin Sawicki c80373b11e Upgrade to image-view@0.2.0 2013-08-19 19:15:52 -07:00
Kevin Sawicki & Nathan Sobo cf65945d5c 🐎 Upgrade telepath for performance improvements 2013-08-19 18:07:32 -07:00
Kevin Sawicki & Nathan Sobo f76108fdfd 🐎 Cache tab whitespace regexes in Token 2013-08-19 18:07:32 -07:00
Ben Ogle 8ea8671430 Merge pull request #706 from github/bo-inject-less-vars
Add theme dir(s) to less import paths -> allow package LESS to import from the current theme
2013-08-19 18:03:55 -07:00
Kevin Sawicki & Nathan Sobo f02d05811c Upgrade to collaboration@0.3.0 to fix CI 2013-08-19 16:25:05 -07:00
Kevin Sawicki & Nathan Sobo 0af8c9362b Remove duplicate call to TokenizedBuffer:resetTokenizesLines()
This is already handled in an event listener bound to 'grammar-changed'
which TokenizedBuffer::setGrammar triggers.
2013-08-19 16:20:35 -07:00
Ben Ogle d01cde3358 add another import 2013-08-19 15:55:17 -07:00
Ben Ogle 128543ec7e fix import 2013-08-19 15:55:17 -07:00
Ben Ogle 5de52c59ee Comment 2013-08-19 15:55:17 -07:00
Ben Ogle ea019870fb Add in the fallback ui colors. 2013-08-19 15:55:17 -07:00
Ben Ogle a98b2fd37f Success colors are green! 2013-08-19 15:55:17 -07:00
Ben Ogle c2aefa7616 Change colors in dark ui to match pattern in light ui colors 2013-08-19 15:55:17 -07:00
Ben Ogle 2d12f08375 Update light ui with color system 2013-08-19 15:55:16 -07:00
Ben Ogle 66162902be Pull colors out of the dark-ui theme 2013-08-19 15:55:16 -07:00
Ben Ogle 595f6a975f import the right colors file 2013-08-19 15:55:16 -07:00
Ben Ogle 15085384b9 change name of event to reloaded 2013-08-19 15:55:16 -07:00
Ben Ogle 0eff8deabc remove parens from the list comp 2013-08-19 15:55:16 -07:00
Ben Ogle 72db35d663 rename colors to ui-colors 2013-08-19 15:55:16 -07:00
Ben Ogle 51ec4d3285 Use a few colors in the themes. 2013-08-19 15:55:16 -07:00
Ben Ogle 8b149f63cb Add colors.less files.
Adds one for each theme, and a fallback
2013-08-19 15:55:16 -07:00
Ben Ogle 15a48147b1 Use theme.reload event to reload the theme stylesheets 2013-08-19 15:55:16 -07:00
Ben Ogle 3bc6023a66 Use import paths from themes when loading a less sheet 2013-08-19 15:55:15 -07:00
Ben Ogle b89e58e551 ThemeManager emits a reload event when reloaded 2013-08-19 15:55:15 -07:00
Ben Ogle 6cd003f68e Add reloadStylesheets() to AtomPackage 2013-08-19 15:55:15 -07:00
Ben Ogle 8730638ade Add directory and ImportPaths paths to themes 2013-08-19 15:55:15 -07:00
Kevin Sawicki & Nathan Sobo c3850e4d44 Upgrade to collaboration@0.2.0 for summit branch updates 2013-08-19 15:54:39 -07:00
Kevin Sawicki 0a8ebca67a Use an async waterfall to chain deploy commands 2013-08-19 15:34:25 -07:00
Kevin Sawicki & Nathan Sobo 347801b074 Merge branch 'summit'
Conflicts:
	src/app/config.coffee
	src/atom-application.coffee
	src/main.coffee
2013-08-19 14:01:24 -07:00
Kevin Sawicki & Nathan Sobo fe010eccc7 Update telepath for SharedString::lineForRow speedup 2013-08-19 13:51:59 -07:00
Kevin Sawicki 2959b51afb Upgrade telepath for assumePrimitiveElements optimization 2013-08-19 13:43:43 -07:00
Kevin Sawicki & Nathan Sobo 24e0d8fc03 Add ~/.atom/dev/packages to package load path in dev mode 2013-08-19 09:56:43 -07:00
Kevin Sawicki & Nathan Sobo 42a34c01c9 Add devMode flag to atom.getLoadSettings() 2013-08-19 09:55:11 -07:00
Nathan Sobo cfe5bb1b02 Get benchmark-suite running again 2013-08-18 10:20:20 -06:00
Nathan Sobo f23f23d032 Upgrade telepath for assumePrimitive optimization 2013-08-18 10:19:36 -06:00
Kevin Sawicki 65330a00e3 Special case last row in TextBuffer::suggestedLineEndingForRow
This fixes the TextBuffer specs for changes in the underlying
behavior of SharedString::lineEndingForRow in telepath.
2013-08-16 21:22:06 -07:00
Kevin Sawicki 7f9b057c52 💄 2013-08-16 21:20:47 -07:00
Kevin Sawicki 647b5881a8 Remove TextBuffer::lineEndingForRow spec covered in telepath 2013-08-16 21:16:34 -07:00
Kevin Sawicki 9c76214fe9 Expect undefined instead of null for invalid buffer rows 2013-08-16 21:03:04 -07:00
Kevin Sawicki 3d5516fad9 Default to empty arrays for user and bundled package paths 2013-08-16 20:52:20 -07:00
Kevin Sawicki 338b59dc5f Upgrade telepath for line performance improvements 2013-08-16 20:45:30 -07:00
probablycorey 09c8b2a3a8 Remove the close-without-confirm event
This was not being used anymore.
2013-08-16 15:49:24 -07:00
Kevin Sawicki & Nathan Sobo 1ca7663be4 Upgrade packages for collaboration branch releases 2013-08-16 12:35:05 -07:00
Kevin Sawicki & Nathan Sobo 0e2d6caf94 Upgrade telepath for stack overflow fix 2013-08-16 12:05:15 -07:00
Kevin Sawicki & Nathan Sobo fe2baa18ca Use atom.getAvailablePackageNames() to load package specs 2013-08-16 11:35:43 -07:00
Kevin Sawicki & Nathan Sobo a147dc01d7 Clear undo stack after setting initial buffer text 2013-08-16 11:30:37 -07:00
Kevin Sawicki & Nathan Sobo 2f4555a16f Add config.userPackageDirPaths which includes dev packages in dev mode 2013-08-16 11:18:08 -07:00
Kevin Sawicki & Nathan Sobo 4c121bb084 Upgrade telepath for timestamp fix 2013-08-16 11:18:00 -07:00
Matt Colyer d3130845d1 Adds deploy-docs grunt task 2013-08-16 10:11:14 -07:00
Kevin Sawicki 13a622a853 Upgrade telepath for SharedString transaction fixes 2013-08-16 09:08:58 -07:00
Ben Ogle 1254ceeb6d Merge pull request #715 from github/bo-pane-events
Add a pane:became-inactive event
2013-08-15 18:26:41 -07:00
Ben Ogle eea38a696f add a pane:became-inactive event 2013-08-15 17:28:14 -07:00
Kevin Sawicki & Nathan Sobo 27928a7145 Upgrade telepath for Document::begin/commit/abortTransaction() 2013-08-15 17:17:32 -07:00
Kevin Sawicki 67755ccdc3 Upgrade apm for new link in dev mode command 2013-08-15 08:15:15 -07:00
Kevin Sawicki & Nathan Sobo 6178c64c68 Add ~/.atom/dev/packages to package load path in dev mode 2013-08-14 17:41:32 -07:00
Kevin Sawicki & Nathan Sobo b305a09be3 Add devMode flag to atom.getLoadSettings() 2013-08-14 17:33:58 -07:00
Kevin Sawicki & Nathan Sobo 5313f6cf66 Upgrade telepath for Range.fromPointWithDelta() fix 2013-08-14 16:35:30 -07:00
Kevin Sawicki & Nathan Sobo f00bb58932 TokenizedBuffer constructor now takes an object 2013-08-14 16:35:10 -07:00
Kevin Sawicki & Nathan Sobo ad36b2c6a6 Allow user package specs to override bundled package specs 2013-08-14 15:36:45 -07:00
Kevin Sawicki & Nathan Sobo b3fe63b1b4 Don't return duplicates from atom.getAvailalblePackageNames() 2013-08-14 15:34:47 -07:00
Kevin Sawicki c6d1409151 Merge branch 'master' into summit
Conflicts:
	.pairs
	package.json
	spec/app/tokenized-buffer-spec.coffee
	src/app/edit-session.coffee
	src/app/project.coffee
	src/app/window.coffee
	src/atom-application.coffee
	static/root-view.less
2013-08-14 14:05:35 -07:00
Kevin Sawicki 5235114eed Use fs.readdirSync() for listing package directories
Previously fsUtils.listTreeSync() was used which returns every path
in the tree, not just paths directly underneath the root path.

This speeds up the spec suite require time by not stat'ing the entire
node_modules directory.
2013-08-14 11:29:48 -07:00
Ted Nyman c61d45805d Formatting 2013-08-14 11:01:50 -07:00
Ted Nyman c294c94c02 Update documentation location 2013-08-14 11:01:50 -07:00
Kevin Sawicki b7a8e22d82 Set spec type after all specs in the category are required 2013-08-14 10:58:56 -07:00
Nathan Sobo bd6dda6f0f Don't load buffer contents from disk without an isModified key in state
When we deserialize a replicated buffer, we always want to honor the
current contents of state. If the state was produced by a call to
`getState` instead of `serialize`, it won't have an `isModified` key,
so we should not load from disk.
2013-08-14 11:55:37 -06:00
Nathan Sobo 468034f261 🙊 2013-08-14 11:46:10 -06:00
Nathan Sobo c6a0e385f7 Always include text in serialized buffer state; also include isModified
Previously, we were not including the text when serializing an
unmodified buffer. We would use the absence of the text field to
determine that the buffer was previously unmodified when deserializing.
The problem is that text now stores the markers associated with the
buffer, and we want to retain those across serialization regardless of
the modified status. So now I include the text always, along with an
isModified flag which if true, will tell to reload the buffer if it
has changed since we last serialized it. Reloading a buffer should
probably do a diff-and-patch in the future rather than replacing the
contents outright, so that we always preserve markers as best as we can.
2013-08-14 11:31:17 -06:00
Kevin Sawicki 4781636889 💄 Group dependencies by type 2013-08-14 10:27:12 -07:00
Nathan Sobo fa6ea01bfc Restore assignment of @project ivar in TextBuffer
Because TextBuffers need a reference to `project` during deserialization,
and because the project global deserializes text buffers while it itself
is being deserialized (which happens before the global is actually
assigned), we have to pass a project reference into TextBuffer. This is
really annoying and makes me want to store the references to open buffers 
elsewhere. But for now it's the only way to break the circularity.
2013-08-14 10:49:48 -06:00
Kevin Sawicki f021ce3657 Compile bundled package files in compile task
Any .coffee, .cson, and .less files found in bundled Atom packages
in node_modules are now compiled during the compile task
2013-08-14 09:28:17 -07:00
Kevin Sawicki 71b238fafc Upgrade to command-logger@0.2.0 2013-08-14 08:48:13 -07:00
Kevin Sawicki 63df6c8dcd Upgrade to settings-view@0.3.0 2013-08-14 08:48:13 -07:00
Kevin Sawicki 7fc8cea167 Upgrade to settings-view@0.2.0 2013-08-14 08:48:12 -07:00
Kevin Sawicki 726a60b348 Upgrade to archive-view 0.2 2013-08-14 08:48:12 -07:00
Kevin Sawicki 0429ed09ff Remove humanize-plus dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki 14df854ea8 Remove keytar dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki c8727873c7 Remove jqueryui-browser dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki 3b7e1400c0 Remove roaster dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki 2ddd77122e Remove config.bundledPackagesDirPath that was src/packages 2013-08-14 08:48:12 -07:00
Kevin Sawicki 41268c67d7 Remove internal packages section from spec reporter 2013-08-14 08:48:12 -07:00
Kevin Sawicki 4777c4c42c Remove mention of src/packages 2013-08-14 08:48:12 -07:00
Kevin Sawicki ced95e7ad9 Remove src/packages from NODE_PATH 2013-08-14 08:48:12 -07:00
Kevin Sawicki 68ddeeef01 Pull out collaboration package into a separate repo 2013-08-14 08:48:12 -07:00
Kevin Sawicki 184e6a14c7 Pull out settings-view package into a separate repo 2013-08-14 08:48:12 -07:00
Kevin Sawicki 25378e9905 Pull out command-panel package into a separate repo 2013-08-14 08:48:12 -07:00
Kevin Sawicki 80a6999af4 Pull out fuzzy-finder package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 257722f82e Pull out command-palette package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 58a938b3f1 Pull out snippets package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 875f187915 Pull out status-bar package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 229e380e28 Pull out tree-view package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 52e8e3aaf3 Pull out autocomplete package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki dc775f93ff Pull out tabs package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 63b1546212 Pull out bookmarks package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki b9585d1cf2 Pull out package-generator package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 189b9051a9 Pull out whitespace package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki f3ef0b77a8 Pull out bracket-matcher package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki bdefff6abe Pull out editor-stats package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 235078be8e Pull out github-sign-in package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 02d7668c73 Pull out link package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 7bb41f57b0 Pull out markdown-preview package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki c1c50a0b4c Pull out symbols-view package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 7bc135d82e Pull out grammar-selector package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki a1847b5355 Pull out go-to-line package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 3686a5b0ba Pull out git-diff package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki db82f6bb8b Pull out gists package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki d5b5c76485 Pull out gfm package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 6430aefaa8 Pull out toml package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki f41ffd6cbf Pull out wrap-guide package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 8a44da49d1 Remove tilde from humanize-plus dependency 2013-08-14 08:48:10 -07:00
Kevin Sawicki 9e50c829a0 Pull out image-view package into separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki d2cf652a0b Pull out command-logger package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki 01fee754f7 Pull out autoflow package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki 24c304481e Pull out archive-view package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki d02d42f40e Pull out spell-check package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki c747e1c686 Separate npm and apm output with an empty line 2013-08-14 08:46:53 -07:00
Corey Johnson & Nathan Sobo 3c166edd26 Start switch to Telepath for undo/redo
Also, TextBuffer spec passes!
2013-08-13 17:34:31 -07:00
Corey Johnson & Nathan Sobo 2d46a98ea2 Update telepath 2013-08-13 17:14:10 -07:00
Cheng Zhao 51a847c820 Merge pull request #697 from github/buffered-node-process
Remove dependency of bundled node
2013-08-13 00:05:17 -07:00
Cheng Zhao 4f7c7568e9 Update apm: No more need of bundled node. 2013-08-13 14:48:40 +08:00
Cheng Zhao 326ee2e5fa 💄 2013-08-13 14:47:28 +08:00
Cheng Zhao 32a0faf068 Don't assume we have a bundled node process in BufferedProcess. 2013-08-13 14:47:27 +08:00
Cheng Zhao 66da13a6ff Add BufferedNodeProcess to execute apm and nak.
On Windows the shebang string is not supported, so we haveto execute apm
and nak as scripts instead of as executables.
2013-08-13 14:47:27 +08:00
Cheng Zhao ebaa6c349f Revert "Downgrade to atom-shell@v0.2.1"
This reverts commit d7cfb757d6.
2013-08-13 14:47:27 +08:00
Kevin Sawicki 063d48c4ab Use ScopeSelector class from first-mate
Begin migrating TextMate helpers out of src/ and into the first-mate
package.
2013-08-12 16:22:18 -07:00
Jessica Lord & Kevin Sawicki 0a53e2f7bb Use getText() instead of val() for username & password 2013-08-12 15:52:28 -07:00
Jessica Lord & Kevin Sawicki 12fbd89e79 Clear username and password when detached 2013-08-12 15:46:01 -07:00
Jessica Lord & Kevin Sawicki 6a16ef0cf8 Listen for buffer changed events to validate sign in view 2013-08-12 15:45:52 -07:00
Jessica Lord & Kevin Sawicki 8d180dd767 Set text security on line elements only
This ensures the disc does not appear when the field is empty
2013-08-12 15:44:57 -07:00
Jessica Lord & Kevin Sawicki 475fefa2fd turned off html clear to show duplicate password disc 2013-08-12 15:01:41 -07:00
Jessica Lord & Kevin Sawicki 86d0fca621 Switch GitHub Sign in to mini-editors
Previously bootstrap <input> fields didn't work with keybindings.
Switched to mini-editors to enable expected keybindings. Edited tabs for
focusing and password text to disc style.
2013-08-12 14:56:47 -07:00
Kevin Sawicki 3056efd351 Remove unused lines variable 2013-08-12 14:41:14 -07:00
Kevin Sawicki 2597837ba7 Use ~/.atom/storage instead of ~/.atom/.storage
The serialization format is changing for telepath and this allows a clean
upgrade and the dotted directory does not seem needed since it is already
behind one dotted directory (.atom).
2013-08-09 10:38:57 -07:00
Nathan Sobo 0f14dd9420 Disable pane-splitting spec for now
We'll get it working once this branch gets merged to master.
2013-08-08 11:01:01 -06:00
Kevin Sawicki c22bbf98b8 Remove unused redis dependency 2013-07-28 19:22:45 -07:00
Kevin Sawicki 555611aa1f Prepend new participant views instead of appending 2013-07-27 13:45:21 -07:00
Nathan Sobo 579cfb4a4a Disable audio for self-streams 2013-07-27 13:53:10 -06:00
Kevin Sawicki 9753a63227 Trigger connected event for local media connection to self
Also upgrade atom-collaboration-server
2013-07-27 11:56:04 -07:00
Kevin Sawicki 292815c014 Add participant view for self
This will show your own camera video and which color you appear
as to other session participants.
2013-07-27 11:38:16 -07:00
Kevin Sawicki b38a6f2235 Request avatars to be 420px 2013-07-27 11:10:58 -07:00
Kevin Sawicki 0b6f38118e Add back setting avatar background image to avatar url 2013-07-27 11:02:44 -07:00
Kevin Sawicki 50932bc9e2 Remove unused require 2013-07-27 10:42:25 -07:00
Kevin Sawicki 99ff064072 💄 remove unneeded units 2013-07-27 10:40:50 -07:00
Kevin Sawicki 51899e602c 💄 remove trailing whitespace 2013-07-27 10:40:15 -07:00
Kevin Sawicki bca15a7589 Show avatar until video becomes available 2013-07-27 10:39:24 -07:00
Kevin Sawicki c723dd5406 Exclude remote markers from TextBuffer.serialize() 2013-07-27 10:31:11 -07:00
Kevin Sawicki 891f032def Unfocus collaboration spec 2013-07-27 10:06:04 -07:00
Nathan Sobo 433435743e Log some collaboration events until we're more stable 2013-07-27 09:48:01 -06:00
Ben Ogle 2a010cb00a volume 100%; remove remove link 2013-07-26 17:41:15 -07:00
Ben Ogle d13cc7d96f Merge branch 'summit' of github.com:github/atom into summit 2013-07-26 17:32:07 -07:00
Kevin Sawicki & Matt Colyer 624ca77173 Wrap webkitGetUserMedia in nextTick for reliability 2013-07-26 17:24:37 -07:00
Ben Ogle ac8c95d9a6 Fix padding on connections count 2013-07-26 17:16:47 -07:00
Ben Ogle 492fc46fb8 Add avatar when video hidden 2013-07-26 17:08:52 -07:00
Ben Ogle 86d1990894 Add fontello icons.
Remove this when we have octicons for audio and video
2013-07-26 16:54:35 -07:00
Kevin Sawicki & Nathan Sobo 121ee10f5a Call atom.getWindowState() instead of accessing property directly 2013-07-26 16:17:32 -07:00
Kevin Sawicki & Nathan Sobo c1e6aeece8 Store live reference to root view state in window state instead of clone 2013-07-26 16:17:32 -07:00
Ben Ogle 450caa124a add another color 2013-07-26 16:12:34 -07:00
Ben Ogle 85e90f2c09 Add ParticipantViewContainer
makes the stacking of participant views waaay better
2013-07-26 16:10:04 -07:00
Ben Ogle c6293afc3b Add index to participant view to stack multiple vids 2013-07-26 15:39:03 -07:00
Ben Ogle 87183f52ad comment out the avatar thing 2013-07-26 15:39:03 -07:00
Ben Ogle c49e092082 toggle classes added to participant view 2013-07-26 15:39:03 -07:00
Ben Ogle 100110430a Add toggle states and colors to toggle vid and audio buttons 2013-07-26 15:39:03 -07:00
Kevin Sawicki & Nathan Sobo 9d2756a8ae Rename audio/video configuration keys 2013-07-26 15:28:23 -07:00
Kevin Sawicki & Nathan Sobo 163015517e Create media connection for each other participant 2013-07-26 15:06:16 -07:00
Ben Ogle 5b267f4a3f cursor has site color 2013-07-26 14:44:32 -07:00
Ben Ogle e07f92c4ee Pick colors for the cursors and volume bars 2013-07-26 14:32:36 -07:00
Ben Ogle a7b496f8c1 add site-id class to selection-view 2013-07-26 14:10:11 -07:00
Ben Ogle f562a84bb5 add TODO for the crappy siteId hash usage 2013-07-26 14:01:18 -07:00
Ben Ogle e84065fd9d Better use of participant object 2013-07-26 14:00:53 -07:00
Ben Ogle c6737caae6 add test for clientId -> siteId map 2013-07-26 13:50:02 -07:00
Ben Ogle a0b7b4dd96 use clientIdToSiteId in participant view 2013-07-26 13:50:02 -07:00
Ben Ogle 4fe90900cc add clientIdToSiteId to session's document 2013-07-26 13:48:24 -07:00
Matt Colyer e088daa15b Copy the session id when hosting via the statusbar 2013-07-26 13:43:25 -07:00
Matt Colyer cc9902958e Remove unused github avatar initialization 2013-07-26 13:30:40 -07:00
Matt Colyer b87b4c1089 Reduce size of video stream 2013-07-26 12:22:33 -07:00
Kevin Sawicki & Nathan Sobo c2ec172617 Upgrade telepath to avoid marker update corner case 2013-07-26 13:04:42 -06:00
Kevin Sawicki & Nathan Sobo a60320df3a Add Participant class 2013-07-26 12:25:20 -06:00
Kevin Sawicki & Nathan Sobo 32f75040de Spec 💄 – Move spies to beforeEach and s/host/leader/g 2013-07-26 11:48:42 -06:00
probablycorey c7321a795b Use WsChannel to handle media webrtc handshake 2013-07-26 08:54:07 -07:00
Kevin Sawicki & Nathan Sobo 8493ef092e Add Editor.getRelativePath() that delegates to EditSession 2013-07-26 08:45:41 -07:00
Kevin Sawicki & Nathan Sobo a9edaaba51 Add failing spec for splitting edit sessions 2013-07-26 08:45:13 -07:00
Kevin Sawicki 0e89db68a3 Upgrade to patrick 0.4 2013-07-26 08:40:45 -07:00
Kevin Sawicki 4f6f26735c Upgrade to git-utils 0.24 2013-07-26 08:38:40 -07:00
Kevin Sawicki & Nathan Sobo b4401cf10c Upgrade to patrick 0.3 2013-07-25 19:22:02 -07:00
Kevin Sawicki & Nathan Sobo b55d4364ff Allow audio/video to be disabled via config 2013-07-25 19:18:09 -07:00
Kevin Sawicki & Nathan Sobo 4c65332e55 Log when attempting to open non-session URL 2013-07-25 19:04:16 -07:00
Kevin Sawicki & Nathan Sobo 20f983874a Log the session being joined from the browser process 2013-07-25 19:03:30 -07:00
Kevin Sawicki & Nathan Sobo f859c1e32a Warn if we drop replication events 2013-07-25 19:00:32 -07:00
Ben Ogle eb40100b0f Add action bar to video. 2013-07-25 18:40:42 -07:00
Ben Ogle ad946ea482 Add email title to user. Could be a proper tooltip? 2013-07-25 18:40:42 -07:00
Ben Ogle f547af2896 Add small view by clicking 2013-07-25 18:40:41 -07:00
Ben Ogle 05caa45939 use getOtherParticipants in initial view creation 2013-07-25 18:40:41 -07:00
Ben Ogle b73f020555 remove listening event, add logic to started and stopped events 2013-07-25 18:40:41 -07:00
Ben Ogle b4ee425711 subscribe to participant change events in status bar view 2013-07-25 18:40:41 -07:00
Kevin Sawicki & Nathan Sobo ffb4387aab Upgrade atom-collaboration-server 2013-07-25 18:10:49 -07:00
Kevin Sawicki & Nathan Sobo ba644ea9f1 Add SSL support to session 2013-07-25 17:58:51 -07:00
Ben Ogle & Corey Johnson 602fecefa6 Handle participant exiting 2013-07-25 16:05:48 -07:00
probablycorey d49d3156eb Display audio and video on all sessions 2013-07-25 16:05:48 -07:00
probablycorey 47ee4337ce Add Ben Ogle to pairs file
For the 50th time
2013-07-25 16:05:48 -07:00
probablycorey a8cdf2036d Add isListening to session 2013-07-25 16:05:48 -07:00
probablycorey 0ee9aecbd1 Change isHost to isLeader 2013-07-25 16:05:48 -07:00
probablycorey 34b6c71e8a 💄 2013-07-25 16:05:47 -07:00
Ben Ogle ff73ffcb16 style the video 2013-07-25 16:05:47 -07:00
Ben Ogle cff8833b4c Add status bar icon for sharing.
Also adds participant views to the rootView
2013-07-25 16:05:30 -07:00
Kevin Sawicki & Nathan Sobo 9f8a6598e3 Use avatar url directly 2013-07-25 14:36:32 -07:00
Kevin Sawicki & Nathan Sobo 0771270c0d Remove user from ec2 host 2013-07-25 14:17:25 -07:00
Kevin Sawicki & Nathan Sobo 185f97e3b2 Default session host to ec2 instance 2013-07-25 13:59:23 -07:00
Kevin Sawicki & Nathan Sobo 3685cb3b52 Display participants in host and guest views
Also add back media connection starting in Session
2013-07-25 13:47:55 -07:00
Kevin Sawicki & Nathan Sobo bb3cacf2cd Unify guest and host sessions into single class 2013-07-25 12:56:38 -07:00
Kevin Sawicki & Nathan Sobo 241e787d0f Emit 'participant-exited' events 2013-07-25 12:26:41 -06:00
Kevin Sawicki & Nathan Sobo 4c49b69613 Include participant data in 'participant-entered' event 2013-07-25 12:13:08 -06:00
Kevin Sawicki & Nathan Sobo 954a130f41 Include participants data w/ GuestSession 'started' events 2013-07-25 12:08:33 -06:00
Kevin Sawicki & Nathan Sobo 721bc67389 💄 2013-07-25 11:59:17 -06:00
Kevin Sawicki & Nathan Sobo 1755702e1a Include participants data w/ HostSession 'started' event 2013-07-25 11:51:07 -06:00
Kevin Sawicki & Nathan Sobo a4e1d84ebb Assign clientId to Session from its channel 2013-07-25 11:50:29 -06:00
Kevin Sawicki & Nathan Sobo b9e23b96eb Use atom-collaboration-server directly in specs 2013-07-25 10:38:54 -06:00
Kevin Sawicki & Nathan Sobo a22587d09b Send OAuth token as web socket query param 2013-07-24 19:47:10 -07:00
Kevin Sawicki & Nathan Sobo 50c1fb2e3c Remove redis channel 2013-07-24 18:42:52 -07:00
Kevin Sawicki & Nathan Sobo 1f00254759 Handle presence on server and clean up channel/event names 2013-07-24 19:35:05 -06:00
Kevin Sawicki & Nathan Sobo de403a68c3 Remove Pusher-related code 2013-07-24 19:10:05 -06:00
Kevin Sawicki & Nathan Sobo 6b19cbad44 Replace RedisChannel with WsChannel 2013-07-24 18:59:55 -06:00
Kevin Sawicki & Nathan Sobo 1fc6509a51 Use Redis pub/sub for channels. to @mcolyer for the idea! 2013-07-24 17:20:01 -06:00
Kevin Sawicki & Nathan Sobo 1bfb10bf2b Distribute events with pusher 2013-07-24 15:05:39 -07:00
Kevin Sawicki 71cbcf9c4a Enable peer.js debug flag
This will log messages from the reliable library to try
and debug the packet loss issue.
2013-07-24 08:29:07 -07:00
Kevin Sawicki 40d76d2db9 Replace git global with project.getRepo() 2013-07-23 19:31:32 -07:00
Kevin Sawicki & Nathan Sobo 79fab6602f Don't replicate spell check markers 2013-07-23 18:31:30 -07:00
Kevin Sawicki & Nathan Sobo 672d0051cc Upgrade to peer.js 0.2.8 2013-07-23 18:04:52 -07:00
Kevin Sawicki & Nathan Sobo 865ab16fdf Uncomment essential logging lines 2013-07-23 17:52:05 -07:00
Corey Johnson & Matt Colyer ce2a613858 Remove sharing ivar from Host Session 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 087c4c60a1 Don't turn on the web cam until sharing is begun 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 77acaf0a1a Refactor Host Session 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 12ffff9dde Refactor guest session 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 81147c4bc6 Add TURN server support for all WebRTC connections 2013-07-23 17:49:19 -07:00
Matt Colyer 0e3940373d Add user to turn server configuration 2013-07-23 17:49:19 -07:00
Corey Johnson & Matt Colyer 07dea75562 Configure TURN and STUN servers 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo 1bd9a6bef3 Display cursors from all replicas 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo 1bf6307480 Display selections from all replicas 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo b8b9653fc0 💄 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo 636f81703c Distinguish remote and local selections in EditSession
Also: Add an Environment spec helper class that swaps out global
variables to simulate running code in different environments for the
replication specs.
2013-07-23 17:49:14 -07:00
Kevin Sawicki 5161a71bae Remove unused telepath key from initial data hash 2013-07-23 12:02:59 -07:00
Kevin Sawicki & Nathan Sobo 9c67aa105b Replace createSite with new Site 2013-07-23 11:58:41 -07:00
Kevin Sawicki adbdb1492f DRY up repo URL to project path mapping 2013-07-23 11:56:42 -07:00
Kevin Sawicki 4fff0b9792 Remove project path from state so it doesn't replicate 2013-07-23 11:40:21 -07:00
Kevin Sawicki 4c912f4538 Pretty print window state JSON when serializing to disk 2013-07-23 11:34:03 -07:00
Kevin Sawicki a305e15746 Shrink avatar image/video to 32px 2013-07-23 08:31:32 -07:00
Kevin Sawicki 202492cc4b Trigger started/stopped events based on peer.js open/close events 2013-07-23 08:28:02 -07:00
Kevin Sawicki & Nathan Sobo f3a932bbde Remove unused initialPath load setting
This is now handled inside Project@deserialize
2013-07-22 20:00:15 -07:00
Kevin Sawicki & Nathan Sobo 7aa2084147 💄 2013-07-22 19:59:18 -07:00
Kevin Sawicki & Nathan Sobo 019a0f2b84 Don't deserialize null pane container root 2013-07-22 19:58:59 -07:00
Kevin Sawicki & Nathan Sobo 501a6b7d11 Add site global used to create all telepath documents 2013-07-22 19:58:27 -07:00
Kevin Sawicki & Nathan Sobo 0370eb9236 Default soft wrap to millionth column
This is because peer.js cannot encode Infinity
but it should be ideally controlled via a boolean
flag instead of column number.
2013-07-22 18:40:57 -07:00
Kevin Sawicki & Nathan Sobo 4cba8ab48f Serialize project when editor window is unloaded 2013-07-22 18:39:32 -07:00
Kevin Sawicki & Nathan Sobo f4e7693e70 💩 Put apm back to version we clobbered during merge 2013-07-22 18:47:16 -06:00
Kevin Sawicki & Nathan Sobo 73adc40c4e 💄 use array-shorthand instead of new Range 2013-07-22 18:39:46 -06:00
Kevin Sawicki & Nathan Sobo 844469a9a7 Resolve filePath in Project.buildBuffer 2013-07-22 18:39:22 -06:00
Kevin Sawicki & Nathan Sobo faa8a8d9fc Use absolute path instead of uri when opening save-as dialog 2013-07-22 18:18:42 -06:00
Kevin Sawicki & Nathan Sobo fa59aafffb Relativize buffer paths for replication
TextBuffers now maintain a reference to their containing project to
make it easier to test replication of buffers between environments
without worrying about the value of the `project` global.

We're also starting the process of moving the `git` global into Project
as the `Project.repository` property.
2013-07-22 18:13:01 -06:00
Corey Johnson & Matt Colyer d051cbe0f6 Add video and audio streams to host view 2013-07-22 14:13:58 -07:00
Corey Johnson & Matt Colyer 1f18c0ba02 Stream audio and video feed of host to guest view
Conflicts:
	src/packages/collaboration/lib/session-utils.coffee
2013-07-22 13:58:55 -07:00
Corey Johnson & Matt Colyer 034aaa2927 Assume first message sent by host is a telepath document 2013-07-22 13:57:46 -07:00
probablycorey 7b57c12f59 💄 2013-07-22 13:57:36 -07:00
Kevin Sawicki & Nathan Sobo 642df0924d Merge branch 'master' into shared-buffers
Conflicts:
	vendor/apm
2013-07-22 11:54:51 -07:00
Kevin Sawicki 56a2c79fe1 Merge branch 'collaboration-presence' into shared-buffers
Conflicts:
	src/app/edit-session.coffee
	src/app/project.coffee
	src/app/text-buffer.coffee
	src/app/window.coffee
	src/packages/collaboration/lib/bootstrap.coffee
	src/packages/collaboration/lib/session-utils.coffee
	vendor/telepath
2013-07-22 10:12:45 -07:00
Nathan Sobo d85560e886 💄 2013-07-21 18:38:51 -06:00
Nathan Sobo 25d594e717 Update spell-check package for new telepath-based marker API 2013-07-21 18:00:55 -06:00
Nathan Sobo 383ba80d1e Use EditSession.getSoftTabs instead of .softTabs attr in snippets spec 2013-07-21 17:51:42 -06:00
Nathan Sobo 561e666091 Eliminate EditSession.markersForBufferPosition
We use findMarkers for everything now
2013-07-21 17:51:02 -06:00
Nathan Sobo 071f8a6a84 Use .findMarkers instead of .markersForBufferPosition in snippets 2013-07-21 17:50:12 -06:00
Nathan Sobo da95d26c58 Upgrade telepath to fix markers at end of buffer being invalid 2013-07-21 17:49:51 -06:00
Nathan Sobo 9c4478302e Translate attribute names in DisplayBufferMarker.matchesAttributes 2013-07-21 17:49:15 -06:00
Nathan Sobo 28a0bdaf95 Add TextBuffer.destroyMarker 2013-07-21 17:14:16 -06:00
Nathan Sobo 50ade54c3c Also serialize project in pane specs that remove the pane from the DOM
The project contains the only reference to the buffer that belongs to
the edit session in the serialized pane. If we tear down the pane then
the edit session is destroyed and the buffer is removed. So we have to
serialize and restore the project to its previous state once we finish
tearing down the view.
2013-07-21 16:55:44 -06:00
Nathan Sobo d43f459ad1 Fall back to .serialize() if a pane item has no .getState() method 2013-07-21 16:46:22 -06:00
Nathan Sobo 383985d331 Ensure there is clean serialization of RootView state
Everything from RootView to Pane needs to return a serialized clone of
its state, so we don't accidentally further mutate the serialized state
in tests.
2013-07-20 22:40:40 -06:00
Nathan Sobo 5246d4cd72 Add Project.getState() and make Project.serialize clone state 2013-07-20 21:24:32 -06:00
Nathan Sobo 97c4b9a83a Don't clone state in EditSession.getState() 2013-07-20 21:21:51 -06:00
Nathan Sobo ff9acb50ff Deserialize display buffer when deserializing edit sessions
Previously, we kept display buffer attributes in the edit session's
serialized state, then recreated a fresh display buffer each time when
deserializing edit sessions. Now that DisplayBuffer and TokenizedBuffer
are serializable, we can just include them directly when serializing
the edit session.
2013-07-20 18:21:44 -06:00
Nathan Sobo ca0832e58e Include folds in DisplayBuffer deserialization 2013-07-20 16:41:46 -07:00
Nathan Sobo 503629fdcb 💄 2013-07-20 16:40:38 -07:00
Nathan Sobo eeeb453cf9 Back DisplayBuffer with a telepath document 2013-07-20 16:22:26 -07:00
Nathan Sobo e1f795a352 Back TokenizedBuffer with a telepath document 2013-07-20 15:42:13 -07:00
Nathan Sobo 2b7a294cdd Use new marker attribute API to store/replicate selection goal ranges 2013-07-20 02:24:35 -07:00
Nathan Sobo c85932d46b Preserve folds and all selection attributes when copying EditSessions 2013-07-20 02:23:12 -07:00
Nathan Sobo 75cf1acce1 Honor preserveFolds option when creating a new selection 2013-07-20 02:23:12 -07:00
Nathan Sobo 7f5d71dada 💄 2013-07-20 02:23:12 -07:00
Nathan Sobo 1f8fd3c16c Fix isReversed option name 2013-07-20 02:23:12 -07:00
Nathan Sobo 7ccfd6c94b 💄 2013-07-20 02:23:12 -07:00
Nathan Sobo 1911ef2d80 Fix 'isReversed' option name for marker creation 2013-07-20 02:23:12 -07:00
Nathan Sobo 74347ea874 Upgrade telepath to allow marker attributes to be updated 2013-07-20 02:23:06 -07:00
Nathan Sobo de1b69dbc9 Add DisplayBuffer.copy 2013-07-18 11:34:39 -07:00
Nathan Sobo 8b53b4d749 Add ability to copy display buffer markers 2013-07-18 10:25:03 -07:00
Nathan Sobo c54bb792b2 Make EditSession.copy return a copy with a unique id and markers
We want to be able to use the copy independently, which means we
should not use EditSession@deserialize to create it because that will
tie us to the same selection markers.
2013-07-18 06:23:43 -07:00
Nathan Sobo 804df73e8d Get edit session specs passing with selection based markers 2013-07-17 19:16:42 -07:00
Nathan Sobo a724ef3b40 Tag selection markers with a disambiguating EditSession id
This prevents selection markers created by different edit sessions
from being shared. Otherwise every edit session for a buffer would be
forced to have the same selection/cursor state.
2013-07-17 15:29:21 -07:00
Nathan Sobo ab8c0bbf04 Make DisplayBuffer.getMarkers call down into TextBuffer.getMarkers 2013-07-17 15:00:15 -07:00
Ben Ogle & Nathan Sobo 96f434f276 Set languageMode and softTabs in constructor, not setBuffer
The softTabs option is only in scope in the constructor, and it can
sometimes be needed if we're unable to auto-determine the softTabs
setting from the buffer.
2013-07-17 14:59:46 -07:00
Ben Ogle & Nathan Sobo ba3fa50c6e Add DisplayBufferMarker.getAttributes 2013-07-17 14:58:21 -07:00
Ben Ogle & Nathan Sobo e8d4bbe5e7 💄 Extract setBuffer/buildDisplayBuffer methods 2013-07-17 12:05:18 -07:00
Ben Ogle & Nathan Sobo bb695ec53f Replicate the destruction of selections 2013-07-17 11:53:39 -07:00
Ben Ogle & Nathan Sobo 6079dd4ba3 💄 2013-07-17 11:33:56 -07:00
Ben Ogle & Nathan Sobo 47bfac22c2 Replicate the addition of new selections 2013-07-17 11:12:42 -07:00
Ben Ogle & Nathan Sobo 461e331f58 🙊 2013-07-17 11:12:18 -07:00
Ben Ogle & Nathan Sobo f32e1fc643 Replicate initial EditSession selection state 2013-07-17 10:25:28 -07:00
Ben Ogle & Nathan Sobo baeae2d8d5 Upgrade telepath so we can query 'invalidation' key in findMarkers 2013-07-17 10:25:02 -07:00
Kevin Sawicki 6482e26526 Copy session url to clipboard instead of just id 2013-07-16 09:49:47 -07:00
Kevin Sawicki 0a4e3cec94 Add missing connection prefix to event name 2013-07-16 09:49:47 -07:00
Kevin Sawicki c8accea5dc Synchronize instead of Synchronize 2013-07-16 09:49:47 -07:00
Kevin Sawicki 438b8f6a14 Support launching the app directly with a URL
In this case there will be no paths to open and so editor windows
should be created.

This will allow sessions to be joined when Atom isn't currently running
but a session link is clicked from within another application.
2013-07-16 09:49:47 -07:00
Kevin Sawicki 522768e6c0 Handle opening session urls 2013-07-16 09:49:47 -07:00
Kevin Sawicki 5bb45d4684 Add serialization version to image and archive edit sessions 2013-07-16 09:49:46 -07:00
Kevin Sawicki 3d6fb85152 Upgrade to patrick 2.0 2013-07-16 09:49:46 -07:00
Kevin Sawicki 9ccf9365c3 Make all edit session uri's relative
This allows them to be collaborated without having absolute paths
in the shared document.
2013-07-16 09:49:46 -07:00
Kevin Sawicki a9710e7a63 Ignore session id if empty 2013-07-16 09:49:46 -07:00
Kevin Sawicki f3bb826e8d Remove unused color from dark collaboration theme 2013-07-16 09:49:46 -07:00
Kevin Sawicki 96b91ef36b Add collaboration stylesheet for light theme 2013-07-16 09:49:46 -07:00
Kevin Sawicki ae9ffbb526 Rename buddy-list.less to collaboration.less 2013-07-16 09:49:46 -07:00
Kevin Sawicki 89dba4603c Add progress bar to loading sesion view 2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 8812b6c31d Use patrick to mirror repository state 2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 33f538ebf4 Create new branch if guest has unpushed changes 2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 56b333e7fb 💄
Kevin found this offensive
2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 72d76e511e Begin replication of host repo state 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 601efa53e6 Only create single host view instance 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki af80327995 Set guest session project path from repo name 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 3ce520d9de Store participants and repository under collaborationState doc 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 1836257f0b Show avatars in host and guest views 2013-07-16 09:49:45 -07:00
Kevin Sawicki 98765c7d5c Only display participants that aren't the host 2013-07-16 09:49:45 -07:00
Kevin Sawicki f3ca26e2c9 Trigger participants-changed in guest session 2013-07-16 09:49:45 -07:00
Kevin Sawicki b1ca43ac0f Upgrade telepath 2013-07-16 09:49:45 -07:00
Kevin Sawicki 5ce0cf65c4 Unvendor pusher.js 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 460a09f9eb Show participants in the session 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 40d500949b Remove presence from collaboration package. 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki be078b2b41 Add share button to buddy list 2013-07-16 09:49:45 -07:00
Kevin Sawicki 0fd44994ee Trigger status changed for self 2013-07-16 09:49:44 -07:00
Kevin Sawicki 09e73b16fe Show all open windows in buddy list 2013-07-16 09:49:44 -07:00
Kevin Sawicki b55e62f2ab Use fat arrow for callbacks 2013-07-16 09:49:44 -07:00
Kevin Sawicki aab4d7a78b Add avatar to buddy view 2013-07-16 09:49:44 -07:00
Kevin Sawicki 533f91e7ac Remove unused class 2013-07-16 09:49:44 -07:00
Kevin Sawicki aed7d3ed70 Make buddy list a permanent view on the right 2013-07-16 09:49:44 -07:00
Kevin Sawicki 0fdb15f9a6 Move peer.js to vendor directory 2013-07-16 09:49:44 -07:00
Kevin Sawicki 05748cd7dc Display repo and branch in buddy list 2013-07-16 09:49:44 -07:00
Kevin Sawicki b127492c9f Add initial buddy list 2013-07-16 09:49:44 -07:00
Kevin Sawicki 4fde8f0753 Export Pusher class 2013-07-16 09:49:44 -07:00
Kevin Sawicki e7ba9e1c9d Add Git.getConfigValue() 2013-07-16 09:49:44 -07:00
Kevin Sawicki d1812d74d6 Vendor pusher.js 2013-07-16 09:49:44 -07:00
Kevin Sawicki & Nathan Sobo abc20b3a05 Update text buffer to use telepath markers 2013-07-15 17:07:06 -07:00
Kevin Sawicki 010fa219aa Move Point and Range specs to telepath 2013-07-05 12:53:51 -07:00
Kevin Sawicki cdbbb114f6 Use PeerServer ☁️ instead of EC2 2013-07-05 12:53:51 -07:00
Kevin Sawicki b8bd9b6ec6 Compare site id using site from original event
Previously the site was being looked for in a copy of the event where
only the range and text keys were picked and so it was always missing.
2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo 5a26fa838f Emit markers-updated event for remote buffer changes
This is temporary until markers are a part of telepath.
2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo bffe361151 Upgrade telepath 2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo bf45beedbe Swap parameter order for Document.deserialize() 2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo e82170efcb Serialize EditSession's buffer's id instead of its path 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 9b22ca4825 Serialize window state in telepath format 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 85cc81851f Replicate insertion and removal of project buffers
Buffers are now destroyed when removed from the project if they
haven't been destroyed already.
2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 30273c6a66 Add serialization version to TextBuffer 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo e01ac96b66 Guard against a null pending changed event
Previously TextBuffer would emit change events even when the change
was empty. SharedString does not emit empty change events and so a
pending event may no longer be present when a marker-updated event
fires.
2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 2ff282011b 💄 2013-07-05 12:53:50 -07:00
Kevin Sawicki f766bbbb38 Remove Point and Range classes now provided by telepath 2013-07-05 12:53:50 -07:00
Kevin Sawicki e5ef23dc5a Expect null instead of undefined for invalid line rows 2013-07-05 12:53:50 -07:00
Kevin Sawicki fddcbae4eb Clip range specified to change() 2013-07-05 12:53:50 -07:00
Kevin Sawicki 2d313e07ff Clip position in characterIndexForPosition() 2013-07-05 12:53:50 -07:00
Kevin Sawicki 1efa480b4e Upgrade telepath 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 05a3f35512 Normalize line endings in TextBuffer.change() 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 72f9af4d00 Replicate buffer changes
Still some failures due to line endings
2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo dd0f7a032f Start basing Buffer's text on a replicable string 2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo 010c3435da Add Project serialization version 2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo da3a89fc27 Don't show pane items that can't be deserialized 2013-07-05 12:53:49 -07:00
Nathan Sobo 30e4531a8f Store buffer paths instead of serialized buffers in EditSession state
Since there can be multiple edit sessions per buffer, it doesn't make
sense to serialize the buffer multiple times. Previously, we were
de-duplicating buffers in the deserialize method itself, but this won't
work now that we want to replicate buffers.
2013-07-05 12:53:49 -07:00
565 arquivos alterados com 15826 adições e 41281 exclusões
-2
Ver Arquivo
@@ -1,2 +0,0 @@
[docs]
title = The Guide to Atom
+2 -1
Ver Arquivo
@@ -7,4 +7,5 @@ node_modules
npm-debug.log
/tags
/atom-shell/
docs/api
docs/output
spec/fixtures/evil-files/
+1 -7
Ver Arquivo
@@ -1,9 +1,3 @@
[submodule "vendor/bootstrap"]
path = vendor/bootstrap
url = https://github.com/twbs/bootstrap
[submodule "vendor/apm"]
path = vendor/apm
url = https://github.com/github/apm.git
[submodule "vendor/telepath"]
path = vendor/telepath
url = https://github.com/github/telepath.git
url = https://github.com/atom/apm.git
-4
Ver Arquivo
@@ -1,4 +0,0 @@
tags
node_modules
docs/api
.git
+1
Ver Arquivo
@@ -8,6 +8,7 @@ pairs:
jp: Justin Palmer; justin
gt: Garen Torikian; garen
mc: Matt Colyer; mcolyer
bo: Ben Ogle; benogle
jr: Jason Rudolph; jasonrudolph
jl: Jessica Lord; jlord
email:
-79
Ver Arquivo
@@ -1,79 +0,0 @@
* Added: Terminal package now bundled by default, open with ctrl-`
* Fixed: Fuzzy finder not showing results for files at a certain depth
* Fixed: Atom > Preferences... menu not opening settings in focused window
* Fixed: Atom failing to launch if the theme being used was not found
* Improved: Theme changes now immediately take effect
* Fixed: Wrap in quotes/parens now works in split panes
* Improved: Autocomplete now includes CSS property names and values
* Improved: Settings GUI is now a pane item
* Added: Support package filtering in Settings GUI
* Added: Dynamically load all config options in the Settings GUI
* Added: Ability to bookmark lines and navigate bookmarks
* Fixed: Error when inserting newlines in CSS
* Fixed: Folding all will fold comments as well
* Added: Ability to fold all code at a given indentation level
* Improved: cmd-n now opens a new tab and cmd-shift-n now opens a new window.
* Added: Inspect Element context menu
* Fixed: Save As dialog now defaults to directory path of current editor
* Fixed: Using toggle comment shortcut respects indentation level
* Fixed: Search never completing in the command panel
* Fixed: cmd-n now works when no windows are open
* Fixed: Error selecting a grammar for an untitled editor
* Added: j/k now can be used to navigate the tree view and archive editor
* Fixed: Atom can now be launched when ~/.atom/config.cson doesn't exist
* Added: Initial collaboration sessions
* Fixed: Empty lines being deleted via uppercase/downcase command
* Fixed: Keybindings not working when using non-English keyboard language
* Fixed: cmd-shift-p and cmd-alt-w not doing anything when pressed
* Improved: Use grunt (instead of rake) for build system
* Fixed: Java files not syntax highlighting correctly.
* Fixed: LESS/CSS now indents properly after hitting enter.
* Added: Support for browsing .tar.gz and .zip files in the editor
* Added: TODO/FIXME/CHANGED are now highlighted in comments.
* Fixed: Full screen state of windows is now persisted across restarts.
* Added: Makefile syntax highlighting now included.
* Added: Open fuzzy finder to specific line using colon suffix (i.e ':25')
* Fixed: Issues deleting and moving over certain UTF-8 characters
* Fixed: Tree view not properly highlighting or revealing for open images.
* Added: Packages can now be installed from the configuration UI.
* Fixed: .git folder now ignored by default when searching
* Fixed: Not being able to disable packages from configuration UI.
* Fixed: Fuzzy finder showing poor results for entered text
* Improved: App icon
* Fixed: Fuzzy finder being empty sometimes
* Improved: App icon
* Fixed: End of line invisibles rendering incorrectly with the indent guide
* Fixed: Updates not installing automatically on restart
* Fixed: Wrap guide not displaying
* Fixed: Error when saving with the markdown preview focused
* Fixed: Atom always running in dev mode
* Fixed: Crash when running in dev mode without a path to the Atom source
* Fixed: Freeze when editing a RoR class
* Added: meta-N to open a new untitled editor in the current window
* Fixed: Styling in command logger
* Added: XML and Ruby syntax highlighting in Markdown files
* Fixed: Error when editing files in a HEAD-less Git repository
* Fixed: Invisible characters not being visible when enabled
* Added: Editor gutter now displays Git status for lines
* Improved: Startup time
* Added: SQL bundle now included
* Added: PEG.js bundle now included
* Added: Hyperlinks can now be opened with ctrl-O
* Fixed: PHP syntax highlighting
+11 -3
Ver Arquivo
@@ -16,17 +16,25 @@
styleguides
* Include thoughtfully worded [Jasmine](http://pivotal.github.com/jasmine/)
specs
* Style new elements in both the light and dark default themes when
appropriate
* New packages go in `src/packages/`
* Add 3rd-party packages as a `package.json` dependency
* Commit messages are in the present tense
* Commit messages that improve the format of the code start with :lipstick:
* Commit messages that improve the performance start with :racehorse:
* Commit messages that remove memory leaks start with :non-potable_water:
* Commit messages that improve documentation start with :memo:
* Files end with a newline
* Class variables and methods should be in the following order:
* Class variables (variables starting with a `@`)
* Class methods (methods starting with a `@`)
* Instance variables
* Instance methods
* Be ware of platform differences
* The home directory is `process.env.USERPROFILE` on Windows, while on OS X
and Linux it's `process.env.HOME`
* Path separator is `\` on Windows, and is `/` on OS X and Linux, so use
`path.join` to concatenate filenames.
* Temporary directory is not `/tmp` on Windows, use `os.tmpdir()` when
possible
## Philosophy
+130 -53
Ver Arquivo
@@ -1,58 +1,99 @@
fs = require 'fs'
path = require 'path'
os = require 'os'
fm = require 'json-front-matter'
_ = require 'underscore-plus'
packageJson = require './package.json'
module.exports = (grunt) ->
appName = 'Atom.app'
buildDir = grunt.option('build-dir') ? '/tmp/atom-build'
shellAppDir = path.join(buildDir, appName)
contentsDir = path.join(shellAppDir, 'Contents')
appDir = path.join(contentsDir, 'Resources', 'app')
installDir = path.join('/Applications', appName)
[major, minor, patch] = packageJson.version.split('.')
if process.platform is 'win32'
appName = 'Atom'
tmpDir = os.tmpdir()
installRoot = process.env.ProgramFiles
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
shellAppDir = path.join(buildDir, appName)
appDir = path.join(shellAppDir, 'resources', 'app')
else
appName = 'Atom.app'
tmpDir = '/tmp'
installRoot = '/Applications'
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
shellAppDir = path.join(buildDir, appName)
contentsDir = path.join(shellAppDir, 'Contents')
appDir = path.join(contentsDir, 'Resources', 'app')
installDir = path.join(installRoot, appName)
coffeeConfig =
options:
sourceMap: true
glob_to_multiple:
expand: true
src: [
'src/**/*.coffee'
'exports/**/*.coffee'
'static/**/*.coffee'
]
dest: appDir
ext: '.js'
lessConfig =
options:
paths: [
'static/variables'
'static'
]
glob_to_multiple:
expand: true
src: [
'static/**/*.less'
]
dest: appDir
ext: '.css'
prebuildLessConfig =
src: [
'static/**/*.less'
'node_modules/bootstrap/less/bootstrap.less'
]
csonConfig =
options:
rootObject: true
glob_to_multiple:
expand: true
src: [
'menus/*.cson'
'keymaps/*.cson'
'static/**/*.cson'
]
dest: appDir
ext: '.json'
for child in fs.readdirSync('node_modules') when child isnt '.bin'
directory = path.join('node_modules', child)
{engines, theme} = grunt.file.readJSON(path.join(directory, 'package.json'))
if engines?.atom?
coffeeConfig.glob_to_multiple.src.push("#{directory}/**/*.coffee")
lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less")
prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme
csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson")
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
atom: {appDir, appName, buildDir, contentsDir, installDir, shellAppDir}
coffee:
options:
sourceMap: true
glob_to_multiple:
expand: true
src: [
'src/**/*.coffee'
'static/**/*.coffee'
]
dest: appDir
ext: '.js'
coffee: coffeeConfig
less:
options:
paths: [
'static'
'vendor'
]
glob_to_multiple:
expand: true
src: [
'src/**/*.less'
'static/**/*.less'
'themes/**/*.less'
]
dest: appDir
ext: '.css'
less: lessConfig
cson:
options:
rootObject: true
glob_to_multiple:
expand: true
src: [
'src/**/*.cson'
'static/**/*.cson'
'themes/**/*.cson'
]
dest: appDir
ext: '.json'
'prebuild-less': prebuildLessConfig
cson: csonConfig
coffeelint:
options:
@@ -60,19 +101,23 @@ module.exports = (grunt) ->
level: 'error'
max_line_length:
level: 'ignore'
indentation:
level: 'ignore'
src: [
'dot-atom/**/*.coffee'
'exports/**/*.coffee'
'src/**/*.coffee'
'tasks/**/*.coffee'
'Gruntfile.coffee'
]
test: [
'spec/*.coffee'
'spec/app/**/*.coffee'
'spec/stdlib/**/*.coffee'
]
csslint:
options:
'adjoining-classes': false
'duplicate-background-images': false
'box-model': false
'box-sizing': false
'bulletproof-font-face': false
@@ -91,28 +136,60 @@ module.exports = (grunt) ->
'universal-selector': false
'vendor-prefix': false
src: [
'src/**/*.css',
'static/**/*.css'
'themes/**/*.css'
]
lesslint:
src: [
'src/**/*.less',
'static/**/*.less'
'themes/**/*.less'
]
markdown:
guides:
files: [
expand: true
cwd: 'docs'
src: '**/*.md'
dest: 'docs/output/'
ext: '.html'
]
options:
template: 'docs/template.jst'
templateContext:
tag: "v#{major}.#{minor}"
markdownOptions:
gfm: true
preCompile: (src, context) ->
parsed = fm.parse(src)
_.extend(context, parsed.attributes)
parsed.body
shell:
'kill-atom':
command: 'pkill -9 Atom'
options:
stdout: false
stderr: false
failOnError: false
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-lesslint')
grunt.loadNpmTasks('grunt-cson')
grunt.loadNpmTasks('grunt-contrib-csslint')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-markdown')
grunt.loadNpmTasks('grunt-shell')
grunt.loadTasks('tasks')
grunt.registerTask('compile', ['coffee', 'less', 'cson'])
grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson'])
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
grunt.registerTask('ci', ['lint', 'partial-clean', 'update-atom-shell', 'build', 'set-development-version', 'test'])
grunt.registerTask('test', ['shell:kill-atom', 'run-specs'])
grunt.registerTask('ci', ['update-atom-shell', 'build', 'set-development-version', 'lint', 'test'])
grunt.registerTask('deploy', ['partial-clean', 'update-atom-shell', 'build', 'codesign'])
grunt.registerTask('default', ['update-atom-shell', 'build', 'set-development-version', 'install'])
grunt.registerTask('docs', ['markdown:guides', 'build-docs'])
defaultTasks = ['update-atom-shell', 'build']
defaultTasks.push('set-development-version') if process.platform is 'darwin'
defaultTasks.push('install')
grunt.registerTask('default', defaultTasks)
+1 -1
Ver Arquivo
@@ -2,7 +2,7 @@
![atom](https://s3.amazonaws.com/speakeasy/apps/icons/27/medium/7db16e44-ba57-11e2-8c6f-981faf658e00.png)
Check out our [documentation on the docs tab](https://github.com/github/atom/docs).
Check out our [guides](https://atom-docs.githubapp.com/v26.0/index.html) and [API documentation](https://atom-docs.githubapp.com/v26.0/api/index.html).
## Installing
-11
Ver Arquivo
@@ -1,11 +0,0 @@
rule "" do |t|
puts <<-HELP
Atom now uses grunt instead of Rake.
See https://github.com/github/atom/pull/596 for more info.
tl;dr
-----
Run ./script/build instead of rake install.
HELP
end
-2
Ver Arquivo
@@ -1,2 +0,0 @@
coffee -c -o /Applications/Atom.app/Contents/Resources/app/src/ src/main.coffee src/atom-application.coffee src/atom-window.coffee &&
/Applications/Atom.app/Contents/MacOS/Atom --resource-path=$(pwd) --executed-from=$(pwd) $@
+5 -4
Ver Arquivo
@@ -1,5 +1,5 @@
#!/bin/sh
ATOM_PATH=/Applications/Atom.app
ATOM_PATH=${ATOM_PATH-/Applications/Atom.app}
ATOM_BINARY=$ATOM_PATH/Contents/MacOS/Atom
if [ ! -d $ATOM_PATH ]; then sleep 5; fi # Wait for Atom to reappear, Sparkle may be replacing it.
@@ -9,14 +9,14 @@ if [ ! -d $ATOM_PATH ]; then
exit 1
fi
while getopts ":whv-:" opt; do
while getopts ":wtfvhs-:" opt; do
case "$opt" in
-)
case "${OPTARG}" in
wait)
WAIT=1
;;
help|version)
help|version|foreground|test)
EXPECT_OUTPUT=1
;;
esac
@@ -24,7 +24,7 @@ while getopts ":whv-:" opt; do
w)
WAIT=1
;;
h|v)
h|v|f|t)
EXPECT_OUTPUT=1
;;
esac
@@ -32,6 +32,7 @@ done
if [ $EXPECT_OUTPUT ]; then
$ATOM_BINARY --executed-from="$(pwd)" --pid=$$ $@
exit $?
else
open -a $ATOM_PATH -n --args --executed-from="$(pwd)" --pid=$$ $@
fi
+11 -3
Ver Arquivo
@@ -1,5 +1,13 @@
require 'atom'
{runSpecSuite} = require 'jasmine-helper'
require '../src/window'
Atom = require '../src/atom'
atom = new Atom()
atom.show() unless atom.getLoadSettings().exitWhenDone
window.atom = atom
{runSpecSuite} = require '../spec/jasmine-helper'
atom.openDevTools()
document.title = "Benchmark Suite"
runSpecSuite("benchmark-suite", true)
benchmarkSuite = require.resolve('./benchmark-suite')
runSpecSuite(benchmarkSuite, true)
+13 -28
Ver Arquivo
@@ -1,30 +1,10 @@
nakedLoad 'jasmine-jquery'
$ = require 'jquery'
_ = require 'underscore'
Keymap = require 'keymap'
Point = require 'point'
Config = require 'config'
Project = require 'project'
require '../spec/spec-helper'
require 'window'
requireStylesheet "jasmine.less"
# Load TextMate bundles, which specs rely on (but not other packages)
atom.loadTextMatePackages()
beforeEach ->
# reset config after each benchmark; don't load or save from/to `config.json`
window.config = new Config()
spyOn(config, 'load')
spyOn(config, 'save')
keymap = new Keymap
keymap.bindDefaultKeys()
$(window).on 'keydown', (e) -> keymap.handleKeyEvent(e)
keymap.bindKeys '*',
'meta-w': 'close'
'alt-meta-i': 'show-console'
$(document).on 'close', -> window.close()
path = require 'path'
{$, _, Point, fs} = require 'atom'
Project = require '../src/project'
fsUtils = require '../src/fs-utils'
TokenizedBuffer = require '../src/tokenized-buffer'
defaultCount = 100
window.pbenchmark = (args...) -> window.benchmark(args..., profile: true)
@@ -32,7 +12,13 @@ window.fbenchmark = (args...) -> window.benchmark(args..., focused: true)
window.fpbenchmark = (args...) -> window.benchmark(args..., profile: true, focused: true)
window.pfbenchmark = window.fpbenchmark
window.benchmarkFixturesProject = new Project(require.resolve 'benchmark/fixtures')
window.benchmarkFixturesProject = new Project(path.join(__dirname, 'fixtures'))
beforeEach ->
window.project = window.benchmarkFixturesProject
jasmine.unspy(window, 'setTimeout')
jasmine.unspy(window, 'clearTimeout')
jasmine.unspy(TokenizedBuffer::, 'tokenizeInBackground')
window.benchmark = (args...) ->
description = args.shift()
@@ -43,7 +29,6 @@ window.benchmark = (args...) ->
[fn, options] = args
{ profile, focused } = (options ? {})
atom.showDevTools() if profile
method = if focused then fit else it
method description, ->
total = measure ->
+122 -18
Ver Arquivo
@@ -1,31 +1,25 @@
require 'benchmark-helper'
$ = require 'jquery'
_ = require 'underscore'
TokenizedBuffer = require 'tokenized-buffer'
require './benchmark-helper'
{$, _, RootView} = require 'atom'
TokenizedBuffer = require '../src/tokenized-buffer'
describe "editor.", ->
editor = null
beforeEach ->
window.rootViewParentSelector = '#jasmine-content'
window.attachRootView(require.resolve('benchmark/fixtures'))
window.rootView = new RootView
window.rootView.attachToDom()
rootView.width(1024)
rootView.height(768)
rootView.open() # open blank editor
editor = rootView.getActiveEditor()
rootView.openSync() # open blank editor
editor = rootView.getActiveView()
afterEach ->
if editor.pendingDisplayUpdate
waitsFor "editor to finish rendering", (done) ->
editor.on 'editor:display-updated', done
runs ->
projectPath = project.getPath()
$(window).off 'beforeunload'
window.shutdown()
atom.setRootViewStateForPath(projectPath, null)
describe "keymap.", ->
event = null
@@ -37,7 +31,7 @@ describe "editor.", ->
describe "opening-buffers.", ->
benchmark "300-line-file.", ->
buffer = project.bufferForPath('medium.coffee')
buffer = project.bufferForPathSync('medium.coffee')
describe "empty-file.", ->
benchmark "insert-delete", ->
@@ -46,7 +40,7 @@ describe "editor.", ->
describe "300-line-file.", ->
beforeEach ->
rootView.open('medium.coffee')
rootView.openSync('medium.coffee')
describe "at-begining.", ->
benchmark "insert-delete", ->
@@ -65,13 +59,123 @@ describe "editor.", ->
editor.insertText('"')
editor.backspace()
describe "empty-vs-set-innerHTML.", ->
[firstRow, lastRow] = []
beforeEach ->
firstRow = editor.getFirstVisibleScreenRow()
lastRow = editor.getLastVisibleScreenRow()
benchmark "build-gutter-html.", 1000, ->
editor.gutter.renderLineNumbers(null, firstRow, lastRow)
benchmark "set-innerHTML.", 1000, ->
editor.gutter.renderLineNumbers(null, firstRow, lastRow)
editor.gutter.lineNumbers[0].innerHtml = ''
benchmark "empty.", 1000, ->
editor.gutter.renderLineNumbers(null, firstRow, lastRow)
editor.gutter.lineNumbers.empty()
describe "positionLeftForLineAndColumn.", ->
line = null
beforeEach ->
editor.scrollTop(2000)
editor.resetDisplay()
line = editor.lineElementForScreenRow(106)[0]
describe "one-line.", ->
beforeEach ->
editor.clearCharacterWidthCache()
benchmark "uncached", 5000, ->
editor.positionLeftForLineAndColumn(line, 106, 82)
editor.clearCharacterWidthCache()
benchmark "cached", 5000, ->
editor.positionLeftForLineAndColumn(line, 106, 82)
describe "multiple-lines.", ->
[firstRow, lastRow] = []
beforeEach ->
firstRow = editor.getFirstVisibleScreenRow()
lastRow = editor.getLastVisibleScreenRow()
benchmark "cache-entire-visible-area", 100, ->
for i in [firstRow..lastRow]
line = editor.lineElementForScreenRow(i)[0]
editor.positionLeftForLineAndColumn(line, i, Math.max(0, editor.lineLengthForBufferRow(i)))
describe "text-rendering.", ->
beforeEach ->
editor.scrollTop(2000)
benchmark "resetDisplay", 50, ->
editor.resetDisplay()
benchmark "htmlForScreenRows", 1000, ->
lastRow = editor.getLastScreenRow()
editor.htmlForScreenRows(0, lastRow)
benchmark "htmlForScreenRows.htmlParsing", 50, ->
lastRow = editor.getLastScreenRow()
html = editor.htmlForScreenRows(0, lastRow)
div = document.createElement('div')
div.innerHTML = html
describe "gutter-api.", ->
describe "getLineNumberElementsForClass.", ->
beforeEach ->
editor.gutter.addClassToLine(20, 'omgwow')
editor.gutter.addClassToLine(40, 'omgwow')
benchmark "DOM", 20000, ->
editor.gutter.getLineNumberElementsForClass('omgwow')
benchmark "getLineNumberElement.DOM", 20000, ->
editor.gutter.getLineNumberElement(12)
benchmark "toggle-class", 2000, ->
editor.gutter.addClassToLine(40, 'omgwow')
editor.gutter.removeClassFromLine(40, 'omgwow')
describe "find-then-unset.", ->
classes = ['one', 'two', 'three', 'four']
benchmark "single-class", 200, ->
editor.gutter.addClassToLine(30, 'omgwow')
editor.gutter.addClassToLine(40, 'omgwow')
editor.gutter.removeClassFromAllLines('omgwow')
benchmark "multiple-class", 200, ->
editor.gutter.addClassToLine(30, 'one')
editor.gutter.addClassToLine(30, 'two')
editor.gutter.addClassToLine(40, 'two')
editor.gutter.addClassToLine(40, 'three')
editor.gutter.addClassToLine(40, 'four')
for klass in classes
editor.gutter.removeClassFromAllLines(klass)
describe "line-htmlification.", ->
div = null
html = null
beforeEach ->
lastRow = editor.getLastScreenRow()
html = editor.htmlForScreenRows(0, lastRow)
div = document.createElement('div')
benchmark "setInnerHTML", 1, ->
div.innerHTML = html
describe "9000-line-file.", ->
benchmark "opening.", 5, ->
rootView.open('huge.js')
rootView.openSync('huge.js')
describe "after-opening.", ->
beforeEach ->
rootView.open('huge.js')
rootView.openSync('huge.js')
benchmark "moving-to-eof.", 1, ->
editor.moveCursorToBottom()
@@ -106,7 +210,7 @@ describe "TokenizedBuffer.", ->
[languageMode, buffer] = []
beforeEach ->
editSession = benchmarkFixturesProject.open('medium.coffee')
editSession = benchmarkFixturesProject.openSync('medium.coffee')
{ languageMode, buffer } = editSession
benchmark "construction", 20, ->
-29
Ver Arquivo
@@ -1,29 +0,0 @@
## Command Panel
The command panel contains a partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam).
In addition, packages are free to design and define any scoped command.
Pop open the command line by hitting .
You can get a list of commands available to Atom (including any keybindings) by hitting `meta-p`.
## Examples
`,` selects the entire file
`1,4` selects lines 1-4 in the current file
`/pattern` selects the first match after the cursor/selection
`s/pattern/replacement` replaces the first text matching pattern in current selection
`s/pattern/replacement/g` replaces all text matching pattern in current selection
`,s/pattern/replacement/g` replaces all text matching pattern in file
`1,4s/pattern/replacement` replaces all text matching pattern in lines 1-4
`x/pattern` selects all matches in the current selections
`,x/pattern` selects all matches in the file
`,x/pattern1/ x/pattern2` "structural regex" - selects all matches of pattern2 inside matches of pattern1
-3
Ver Arquivo
@@ -1,3 +0,0 @@
# Built-In Packages
Atom ships with several optional built-in packages.
-7
Ver Arquivo
@@ -1,7 +0,0 @@
## Markdown Preview
The `markdown-preview` extension displays the rendered HTML for the markdown
in the current editor.
It can be activated from the editor using the `ctrl-m` key-binding and is
currently enabled for `.markdown`, `.md`, `.mkd`, `.mkdown`, and `.ron` files.
-33
Ver Arquivo
@@ -1,33 +0,0 @@
## Wrap Guide
The `wrap-guide` extension places a vertical line in each editor at a certain
column to guide your formatting, so lines do not exceed a certain width.
By default, the wrap-guide is placed at the 80th column.
### Configuration
You can customize where the column is placed using the `wrapGuide.columns`
config option:
```coffeescript
"wrap-guide":
columns: [
{ pattern: "\.mm$", column: 200 },
{ pattern: "\.cc$", column: 120 }
]
```
The above config example would place the guide at the 200th column for paths
that end with `.mm` and place the guide at the 120th column for paths that end
with `.cc`.
You can configure the color and/or width of the line by adding the following
CSS to a custom stylesheet:
```css
.wrap-guide {
width: 10px;
background-color: red;
}
```
+629
Ver Arquivo
@@ -0,0 +1,629 @@
# Authoring Packages
Packages are at the core of Atom. Nearly everything outside of the main editor
is handled by a package. That includes "core" pieces like the file tree, status
bar and more.
A package can contain a variety of different resource types to change Atom's
behavior. The basic package layout is as follows (though not every package will
have all of these directories):
```text
my-package/
grammars/
keymaps/
lib/
menus/
spec/
snippets/
stylesheets/
index.coffee
package.json
```
## package.json
Similar to [npm packages][npm], Atom packages can contain a _package.json_ file
in their top-level directory. This file contains metadata about the package,
such as the path to its "main" module, library dependencies, and manifests
specifying the order in which its resources should be loaded.
In addition to the regular [npm package.json keys][npm-keys] available, Atom
package.json files have their own additions.
- `main` (**Required**): the path to the CoffeeScript file that's the entry point
to your package
- `stylesheets` (**Optional**): an Array of Strings identifying the order of the
stylesheets your package needs to load. If not specified, stylesheets in the
_stylesheets_ directory are added alphabetically.
- `keymaps`(**Optional**): an Array of Strings identifying the order of the
key mappings your package needs to load. If not specified, mappings in the
_keymaps_ directory are added alphabetically.
- `menus`(**Optional**): an Array of Strings identifying the order of
the menu mappings your package needs to load. If not specified, mappings
in the _keymap_ directory are added alphabetically.
- `snippets` (**Optional**): an Array of Strings identifying the order of the
snippets your package needs to load. If not specified, snippets in the
_snippets_ directory are added alphabetically.
- `activationEvents` (**Optional**): an Array of Strings identifying events that
trigger your package's activation. You can delay the loading of your package
until one of these events is trigged.
## Source Code
If you want to extend Atom's behavior, your package should contain a single
top-level module, which you export from _index.coffee_ (or whichever file is
indicated by the `main` key in your _package.json_ file). The remainder of your
code should be placed in the `lib` directory, and required from your top-level
file.
Your package's top-level module is a singleton object that manages the lifecycle
of your extensions to Atom. Even if your package creates ten different views and
appends them to different parts of the DOM, it's all managed from your top-level
object.
Your package's top-level module should implement the following methods:
- `activate(rootView, state)`: This **required** method is called when your
package is loaded. It is always passed the window's global `rootView`, and is
sometimes passed state data if the window has been reloaded and your module
implements the `serialize` method. Use this to do initialization work when your
package is started (like setting up DOM elements or binding events).
- `serialize()`: This **optional** method is called when the window is shutting
down, allowing you to return JSON to represent the state of your component. When
the window is later restored, the data you returned is passed to your
module's `activate` method so you can restore your view to where the user left
off.
- `deactivate()`: This **optional** method is called when the window is shutting
down. If your package is watching any files or holding external resources in any
other way, release them here. If you're just subscribing to things on window,
you don't need to worry because that's getting torn down anyway.
### Simple Package Code
```text
my-package/
package.json # optional
index.coffee
lib/
my-package.coffee
```
`index.coffee`:
```coffeescript
module.exports = require "./lib/my-package"
```
`my-package/my-package.coffee`:
```coffeescript
module.exports =
activate: (rootView, state) -> # ...
deactivate: -> # ...
serialize: -> # ...
```
Beyond this simple contract, your package has access to Atom's API. Be aware
that since we are early in development, APIs are subject to change and we have
not yet established clear boundaries between what is public and what is private.
Also, please collaborate with us if you need an API that doesn't exist. Our goal
is to build out Atom's API organically based on the needs of package authors
like you.
Check out [wrap-guide] for a simple example of Atom's package API in action.
## Stylesheets
Stylesheets for your package should be placed in the _stylesheets_ directory.
Any stylesheets in this directory will be loaded and attached to the DOM when
your package is activated. Stylesheets can be written as CSS or [LESS] (but LESS
is recommended).
Ideally you will not need much in the way of styling. We've provided a standard
set of components. You can view all components by opening the styleguide: open
the command palette (`cmd-p`) and search for _styleguide_ or just
`cmd-ctrl-shift-g`.
If you do need styling, we try to keep only structural styles in the package
stylesheets. Colors and sizing should be taken from the active theme's
[ui-variables.less][ui-variables]. If you follow this guideline, your package
will look good out of the box with any theme!
An optional `stylesheets` array in your _package.json_ can list the stylesheets
by name to specify a loading order; otherwise, stylesheets are loaded
alphabetically.
## Keymaps
```coffeescript
'.tree-view-scroller':
'ctrl-V': 'changer:magic'
```
It's recommended that you provide key bindings for commonly used actions for
your extension, especially if you're also adding a new command.
Keymaps are placed in the _keymaps_ subdirectory. By default, all keymaps are
loaded in alphabetical order. An optional `keymaps` array in your _package.json_
can specify which keymaps to load and in what order.
See the [main keymaps documentation][keymaps] for more detailed information on
how keymaps work.
## Menus
Menus are placed in the _menus_ subdirectory. By default, all menus are loaded
in alphabetical order. An optional `menus` array in your _package.json_ can
specify which menus to load and in what order.
### Application Menu
```coffee-script
'menu': [
{
'label': 'Packages'
'submenu': [
{
'label': 'My Package'
'submenu': [
{
'label': 'Toggle'
'command': 'my-package:toggle'
}
]
}
]
}
]
```
It's recommended that you create an application menu item for common actions
with your package that aren't tied to a specific element.
To add your own item to the application menu simply create a top level `menu`
key in any menu configuration file in _menus_ (since the above is [CSON] it
should end with `.cson`)
The menu templates you specify are merged with all other templates provided
by other packages in the order which they were loaded.
### Context Menu
```coffee-script
'context-menu':
'.tree-view':
'Add file': 'tree-view:add-file'
'#root-view':
'Inspect Element': 'core:inspect'
```
It's recommended to specify a context menu item for commands that are linked to
specific parts of the interface, like adding a file in the tree-view.
To add your own item to the application menu simply create a top level
`context-menu` key in any menu configuration file in _menus_ (since the above is
[CSON] it should end with `.cson`)
Context menus are created by determining which element was selected and
then adding all of the menu items whose selectors match that element (in
the order which they were loaded). The process is then repeated for the
elements until reaching the top of the DOM tree.
In the example above, the `Add file` item will only appear when the focused item
or one of its parents has the `tree-view` class applied to it.
## Snippets
An extension can supply language snippets in the _snippets_ directory which
allows the user to enter repetitive text quickly.
```coffeescript
".source.coffee .specs":
"Expect":
prefix: "ex"
body: "expect($1).to$2"
"Describe":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
```
A snippets file contains scope selectors at its top level (`.source.coffee
.spec`). Each scope selector contains a hash of snippets keyed by their name
(`Expect`, `Describe`). Each snippet also specifies a `prefix` and a `body` key.
The `prefix` represents the first few letters to type before hitting the `tab`
key to autocomplete. The `body` defines the autofilled text. You can use
placeholders like `$1`, `$2`, to indicate regions in the body the user can
navigate to every time they hit `tab`.
All files in the directory are automatically loaded, unless the _package.json_
supplies a `snippets` key. As with all scoped items, snippets loaded later take
precedence over earlier snippets when two snippets match a scope with the same
specificity.
## Language Grammars
If you're developing a new language grammar, you'll want to place your file in
the _grammars_ directory. Each grammar is a pairing of two keys, `match` and
`captures`. `match` is a regular expression identifying the pattern to
highlight, while `captures` is an object representing what to do with each
matching group.
For example:
```coffeescript
{
'match': '(?:^|\\s)(__[^_]+__)'
'captures':
'1': 'name': 'markup.bold.gfm'
}
```
This indicates that the first matching capture (`(__[^_]+__)`) should have the
`markup.bold.gfm` token applied to it.
To capture a single group, simply use the `name` key instead:
```coffeescript
{
'match': '^#{1,6}\\s+.+$'
'name': 'markup.heading.gfm'
}
```
This indicates that Markdown header lines (`#`, `##`, `###`) should be applied
with the `markup.heading.gfm` token.
More information about the significance of these tokens can be found in
[section 12.4 of the TextMate Manual][tm-tokens].
Your grammar should also include a `filetypes` array, which is a list of file
extensions your grammar supports:
```coffeescript
'fileTypes': [
'markdown'
'md'
'mkd'
'mkdown'
'ron'
]
```
## Bundle External Resources
It's common to ship external resources like images and fonts in the package, to
make it easy to reference the resources in HTML or CSS, you can use the `atom`
protocol URLs to load resources in the package.
The URLs should be in the format of
`atom://package-name/relative-path-to-package-of-resource`, for example, the
`atom://image-view/images/transparent-background.gif` would be equivablent to
`~/.atom/packages/image-view/images/transparent-background.gif`.
You can also use the `atom` protocol URLs in themes.
## Writing Tests
Your package **should** have tests, and if they're placed in the _spec_
directory, they can be run by Atom.
Under the hood, [Jasmine] is being used to execute the tests, so you can
assume that any DSL available there is available to your package as well.
**FIXME: Explain the following**
* jasmine
* jasmine-focused
* `spec/fixtures` and global.project
* setTimeout
* whatever else is different in spec-helper
## Running tests
Once you've got your test suite written, the recommended way to run it is `apm
test`. `apm test` prints its output to the console and returns the proper status
code depending on whether tests passed or failed.
## Publishing
Atom bundles a command line utility called [apm] which can be used to publish
Atom packages to the public registry.
Once your package is written and ready for distribution you can run the
following to publish your package:
```sh
cd my-package
apm publish minor
```
This will update your `package.json` to have a new minor `version`, commit the
change, create a new [Git tag][git-tag], and then upload the package to the
registry.
Run `apm help publish` to see all the available options and `apm help` to see
all the other available commands.
# Full Example
Let's take a look at creating our first package.
To get started hit `cmd-p`, and start typing "Package Generator." to generate
the package. Once you select the package generator command, it'll ask you for a
name for your new package. Let's call ours _changer_.
Now, _changer_ is going to have a default set of folders and files created for
us. Hit `cmd-r` to reload Atom, then hit `cmd-p` and start typing "Changer."
You'll see a new `Changer:Toggle` command which, if selected, pops up a new
message. So far, so good!
In order to demonstrate the capabilities of Atom and its API, our Changer plugin
is going to do two things:
1. It'll show only modified files in the file tree
2. It'll append a new pane to the editor with some information about the modified
files
Let's get started!
## Changing Keybindings and Commands
Since Changer is primarily concerned with the file tree, let's write a
key binding that works only when the tree is focused. Instead of using the
default `toggle`, our keybinding executes a new command called `magic`.
_keymaps/changer.cson_ can easily become this:
```coffeescript
'.tree-view':
'ctrl-V': 'changer:magic'
```
Notice that the keybinding is called `ctrl-V` &mdash; that's actually `ctrl-shift-v`.
You can use capital letters to denote using `shift` for your binding.
`.tree-view` represents the parent container for the tree view.
Keybindings only work within the context of where they're entered. For example,
hitting `ctrl-V` anywhere other than tree won't do anything. You can map to
`body` if you want to scope to anywhere in Atom, or just `.editor` for the
editor portion.
To bind keybindings to a command, we'll use the `rootView.command` method. This
takes a command name and executes a function in the code. For example:
```coffeescript
rootView.command "changer:magic", => @magic()
```
It's common practice to namespace your commands with your package name, and
separate it with a colon (`:`). Rename the existing `toggle` method to `magic`
to get the binding to work.
Reload the editor, click on the tree, hit your keybinding, and...nothing
happens! What the heck?!
Open up the _package.json_ file, and notice the key that says
`activationEvents`. Basically, this tells Atom to not load a package until it
hears a certain event. Let's change the event to `changer:magic` and reload the
editor.
Hitting the key binding on the tree now works!
## Working with Styles
The next step is to hide elements in the tree that aren't modified. To do that,
we'll first try and get a list of files that have not changed.
All packages are able to use jQuery in their code. In fact, we have [a list of
some of the bundled libraries Atom provides by default](#included-libraries).
Let's bring in jQuery:
```coffeescript
{$} = require 'atom'
```
Now, we can query the tree to get us a list of every file that _wasn't_
modified:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
console.log el
```
You can access the dev console by hitting `alt-cmd-i`. When we execute the
`changer:magic` command, the browser console lists the items that are not being
modified. Let's add a class to each of these elements called `hide-me`:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
$(el).addClass("hide-me")
```
With our newly added class, we can manipulate the visibility of the elements
with a simple stylesheet. Open up _changer.css_ in the _stylesheets_ directory,
and add a single entry:
```css
ol.entries .hide-me {
display: none;
}
```
Refresh atom, and run the `changer` command. You'll see all the non-changed
files disappear from the tree. There are a number of ways you can get the list
back; let's just naively iterate over the same elements and remove the class:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
if !$(el).hasClass("hide-me")
$(el).addClass("hide-me")
else
$(el).removeClass("hide-me")
```
## Creating a New Panel
The next goal of this package is to append a panel to the Atom editor that lists
some information about the modified files.
To do that, we're going to first create a new class method called `content`.
Every package that extends from the `View` class can provide an optional class
method called `content`. The `content` method constructs the DOM that your
package uses as its UI. The principals of `content` are built entirely on
[SpacePen], which we'll touch upon only briefly here.
Our display will simply be an unordered list of the file names, and their
modified times. Let's start by carving out a `div` to hold the filenames:
```coffeescript
@content: ->
@div class: 'modified-files-container', =>
@ul class: 'modified-files-list', outlet: 'modifiedFilesList', =>
@li 'Test'
@li 'Test2'
```
You can add any HTML5 attribute you like. `outlet` names the variable your
package can uses to manipulate the element directly. The fat pipe (`=>`)
indicates that the next set are nested children.
We'll add one more line to `magic` to make this pane appear:
```coffeescript
rootView.vertical.append(this)
```
If you hit the key command, you'll see a box appear right underneath the editor.
Success!
Before we populate this, let's apply some logic to toggle the pane off and on,
just like we did with the tree view:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
rootView.vertical.append(this)
```
There are about a hundred different ways to toggle a pane on and off, and this
might not be the most efficient one. If you know your package needs to be
toggled on and off more freely, it might be better to draw the interface during the
initialization, then immediately call `hide()` on the element to remove it from
the view. You can then swap between `show()` and `hide()`, and instead of
forcing Atom to add and remove the element as we're doing here, it'll just set a
CSS property to control your package's visibility.
Refresh Atom, hit the key combo, and see your test list.
## Calling Node.js Code
Since Atom is built on top of Node.js, you can call any of its libraries,
including other modules that your package requires.
We'll iterate through our resulting tree, and construct the path to our modified
file based on its depth in the tree:
```coffeescript
path = require 'path'
# ...
modifiedFiles = []
# for each single entry...
$('ol.entries li.file.modified span.name').each (i, el) ->
filePath = []
# ...grab its name...
filePath.unshift($(el).text())
# ... then find its parent directories, and grab their names
parents = $(el).parents('.directory.modified')
parents.each (i, el) ->
filePath.unshift($(el).find('div.header span.name').eq(0).text())
modifiedFilePath = path.join(project.rootDirectory.path, filePath.join(path.sep))
modifiedFiles.push modifiedFilePath
```
`modifiedFiles` is an array containing a list of our modified files. We're also
using the node.js [`path` library][path] to get the proper directory separator
for our system.
Let's remove the two `@li` elements we added in `@content`, so that we can
populate our `modifiedFilesList` with real information. We'll do that by
iterating over `modifiedFiles`, accessing a file's last modified time, and
appending it to `modifiedFilesList`:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
When you toggle the modified files list, your pane is now populated with the
filenames and modified times of files in your project. You might notice that
subsequent calls to this command reduplicate information. We could provide an
elegant way of rechecking files already in the list, but for this demonstration,
we'll just clear the `modifiedFilesList` each time it's closed:
```coffeescript
# toggles the pane
if @hasParent()
@modifiedFilesList.empty()
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
# Included Libraries
FIXME: Describe `require 'atom'
In addition to core node.js modules, all packages can `require` the following
popular libraries into their packages:
* [SpacePen] (as `require 'space-pen'`)
* [jQuery] (as `require 'jquery'`)
* [Underscore] (as `require 'underscore'`)
Additional libraries can be found by browsing Atom's *node_modules* folder.
[npm]: http://en.wikipedia.org/wiki/Npm_(software)
[npm-keys]: https://npmjs.org/doc/json.html
[apm]: https://github.com/atom/apm
[git-tag]: http://git-scm.com/book/en/Git-Basics-Tagging
[wrap-guide]: https://github.com/atom/wrap-guide/
[keymaps]: internals/keymaps.md
[tm-tokens]: http://manual.macromates.com/en/language_grammars.html
[spacepen]: https://github.com/nathansobo/space-pen
[path]: http://nodejs.org/docs/latest/api/path.html
[jquery]: http://jquery.com/
[underscore]: http://underscorejs.org/
[jasmine]: https://github.com/pivotal/jasmine
[cson]: https://github.com/atom/season
[less]: http://lesscss.org
[ui-variables]: https://github.com/atom/atom-dark-ui/blob/master/stylesheets/ui-variables.less
+135
Ver Arquivo
@@ -0,0 +1,135 @@
# Creating a Theme
Atom's interface is rendered using HTML and it's styled via [LESS] (a superset
of CSS). Don't worry if you haven't heard of LESS before, it's just like CSS but
with a few handy extensions.
Since CSS is the basis of the theming system, we can load multiple themes within
Atom and they behaves just as they would on a website. Themes loaded first are overridden by
themes which are loaded later (the order is controlled from within the Settings
pane).
This flexibility is helpful for users which prefer a light interface with a dark
syntax theme. Atom currently has only interface and syntax themes but it is
possible to create a theme to style something specific &mdash; say a changing
the colors in the tree view or creating a language specific syntax theme.
## Getting Started
To create your own theme you'll need a few things:
* A working install of [Atom], so you can work on your new theme.
* A working install of [git] to track changes.
* And a [GitHub] account, so you can distribute your themes.
Themes are pretty straight forward but it's still helpful to be familiar with
a few things before starting:
* LESS is a superset of CSS but it has some really handy features like
variables. If you aren't familiar with its syntax take a few minutes
to [familiarize yourself][less-tutorial].
* Atom uses Chrome at its core, so you can use Chrome devtools to
inspect the current state of the interface. Checkout Google's
[extensive tutorial][devtools-tutorial] for a short introduction.
## Creating a Minimal Syntax Theme
1. Open the Command Palette (`cmd-p`)
1. Search for `Package Generator: Generate Syntax Theme` and select it.
1. Choose a name for your theme. A folder will be created with this name.
1. Press enter to create your theme. After creation, your theme will be
installed and enabled.
1. An Atom window will open with your newly created theme.
1. Open `package.json` and update the relevant parts.
1. Open `stylesheets/colors.less` to change the various colors variables which
have been already been defined.
1. Open `stylesheets/base.less` and modify the various syntax CSS selectors
that have been already been defined.
1. When you're ready, update the `README.md` and include an example screenshot
of your new theme in action.
1. Reload atom (`cmd-r`) to see changes you made reflected in your Atom window.
1. Look in the theme settings, your new theme should be show in the enabled themes section
![themesettings-img]
1. Open a terminal to your new theme directory; it should be in `~/.atom/packages/<my-name>`.
1. To publish, initialize a git repository, push to GitHub, and run
`apm publish`.
Want to make edits and have them immediately show up without reloading? Open a
development window (__View > Developer > Open in Dev Mode__ menu) to the
directory of your choice &mdash; even the new theme itself. Then just edit away!
Changes will be instantly reflected in the editor without having to reload.
## Interface Themes
There are only two differences between interface and syntax themes - what
they target and what they provide. Interface themes only target elements which
are outside of the editor and **must** provide a `ui-variables.less` file which
contains all of the variables provided by the [core themes][ui-variables].
To create a UI theme, do the following:
1. Fork one of the following repos
1. [atom-dark-ui]
1. [atom-light-ui]
1. Open a terminal in the forked theme's directory
1. Open your new theme in a Dev Mode Atom window (run `atom -d .` in the terminal or use the __View > Developer > Open in Dev Mode__ menu)
1. Change the name of the theme in the theme's `package.json` file
1. Run `apm link` to tell Atom about your new theme
1. Reload Atom (`cmd-r`)
1. Enable the theme via the themes panel in settings
1. Make changes! Since you opened the theme in a Dev Mode window, changes will
be instantly reflected in the editor without having to reload.
## Development workflow
There are a few of tools to help make theme development fast.
### Live Reload
Reloading via `cmd-r` after you make changes to your theme less than ideal. Atom
supports [live updating][livereload] of styles on Dev Mode Atom windows.
1. Open your theme directory in a dev window by either using the
__View > Developer > Open in Dev Mode__ menu or the `cmd-shift-o` shortcut
1. Make a change to your theme file and save &mdash; your change should be
immediately applied!
If you'd like to reload all styles at any time, you can use the shortcut
`cmd-ctrl-shift-r`.
### Developer Tools
Atom is based on the Chrome browser, and supports Chrome's Developer Tools. You
can open them by selecting the __View > Toggle Developer Tools__ menu or by using the
`cmd-option-i` shortcut.
The dev tools allow you to inspect elements and take a look at their CSS
properties.
![devtools-img]
### Atom Styleguide
If you are creating an interface theme, you'll want a way to see how your theme
changes affect all the components in the system. The [styleguide] is a page with
every component Atom supports rendered.
To open the styleguide, open the command palette (`cmd-p`) and search for
_styleguide_ or use the shortcut `cmd-ctrl-shift-g`.
![styleguide-img]
[less]: http://lesscss.org/
[git]: http://git-scm.com/
[atom]: https://atom.io/
[github]: https://github.com/
[less-tutorial]: https://speakerdeck.com/danmatthews/less-css
[devtools-tutorial]: https://developers.google.com/chrome-developer-tools/docs/elements
[ui-variables]: https://github.com/atom/atom-dark-ui/blob/master/stylesheets/ui-variables.less
[livereload]: https://github.com/atom/dev-live-reload
[styleguide]: https://github.com/atom/styleguide
[atom-dark-ui]: https://github.com/atom/atom-dark-ui
[atom-light-ui]: https://github.com/atom/atom-light-ui
[styleguide-img]: https://f.cloud.github.com/assets/69169/1347390/2d431d98-36af-11e3-8f8e-3f4ce1e67adb.png
[devtools-img]: https://f.cloud.github.com/assets/69169/1347391/2d51f91c-36af-11e3-806f-f7b334af43e9.png
[themesettings-img]: https://f.cloud.github.com/assets/69169/1347569/3150bd0c-36b2-11e3-9d69-423503acfe3f.png
@@ -1,54 +1,23 @@
# Configuration Settings
# Customizing Atom
## Your .atom Directory
To change a setting, configure a theme, or install a package just open the
Settings pane in the current window by pressing `cmd+,`.
When you install Atom, an _.atom_ directory is created in your home directory.
If you press `meta-,`, that directory is opened in a new window. For the
time being, this serves as the primary interface for adjusting configuration
settings, adding and changing key bindings, tweaking styles, etc.
## Changing The Theme
Atom loads configuration settings from the `config.cson` file in your _~/.atom_
directory, which contains CoffeeScript-style JSON:
Because Atom themes are based on CSS, it's possible (and encouraged) to have
multiple themes active at the same time. Atom comes with both light and dark
interface themes as well as several syntax themes (you can also [create your
own][create-theme]).
```coffeescript
core:
hideGitIgnoredFiles: true
editor:
fontSize: 18
```
To change the active themes just open the Settings pane (`cmd-,`) and select the
`Themes` tab. You can install non-bundled themes by going to the `Available
Themes` section on the `Packages` tab within the Settings panel.
Configuration is broken into namespaces, which are defined by the config hash's
top-level keys. In addition to Atom's core components, each package may define
its own namespace.
## Installing Packages
## Glossary of Config Keys
- `core`
- `disablePackages`: An array of package names to disable
- `hideGitIgnoredFiles`: Whether files in the _.gitignore_ should be hidden
- `ignoredNames`: File names to ignore across all of Atom (not fully implemented)
- `themes`: An array of theme names to load, in cascading order
- `autosave`: Save a buffer when its view loses focus
- `editor`
- `autoIndent`: Enable/disable basic auto-indent (defaults to `true`)
- `autoIndentOnPaste`: Enable/disable auto-indented pasted text (defaults to `false`)
- `nonWordCharacters`: A string of non-word characters to define word boundaries
- `fontSize`: The editor font size
- `fontFamily`: The editor font family
- `invisibles`: Specify characters that Atom renders for invisibles in this hash
- `tab`: Hard tab characters
- `cr`: Carriage return (for Microsoft-style line endings)
- `eol`: `\n` characters
- `space`: Leading and trailing space characters
- `preferredLineLength`: Identifies the length of a line (defaults to `80`)
- `showInvisibles`: Whether to render placeholders for invisible characters (defaults to `false`)
- `fuzzyFinder`
- `ignoredNames`: Files to ignore *only* in the fuzzy-finder
- `whitespace`
- `ensureSingleTrailingNewline`: Whether to reduce multiple newlines to one at the end of files
- `wrapGuide`
- `columns`: Array of hashes with a `pattern` and `column` key to match the
the path of the current editor to a column position.
You can install non-bundled packages by going to the `Available Packages`
section on the `Packages` tab within the Settings panel (`cmd-,`).
## Customizing Key Bindings
@@ -61,8 +30,9 @@ built-in keymaps:
'.editor':
'enter': 'editor:newline'
".select-list .editor.mini":
'enter': 'core:confirm',
'body':
'ctrl-P': 'core:move-up'
'ctrl-p': 'core:move-down'
```
This keymap defines the meaning of `enter` in two different contexts. In a
@@ -71,68 +41,88 @@ the editor to insert a newline. But if the same keystroke occurs inside of a
select list's mini-editor, it instead emits the `core:confirm` event based on
the binding in the more-specific selector.
By default, any keymap files in your `~/.atom/keymaps` directory are loaded
in alphabetical order when Atom is started. They will always be loaded last,
giving you the chance to override bindings that are defined by Atom's core
keymaps or third-party packages.
By default, `~/.atom/keymap.cson` is loaded when Atom is started. It will always
be loaded last, giving you the chance to override bindings that are defined by
Atom's core keymaps or third-party packages.
## Changing The Theme
## Advanced Configuration
Atom comes bundled with two themes `atom-dark-*` and `atom-light-*`.
Because Atom themes are based on CSS, it's possible to have multiple themes
active at the same time. For example, you'll usually select a theme for the UI
and another theme for syntax highlighting. You can select themes by specifying
them in the `core.themes` array in your `config.cson`:
```coffee-script
core:
themes: ["atom-light-ui", "atom-light-syntax"]
# or, if the sun is going down:
# themes: ["atom-dark-ui", "atom-dark-syntax"]
```
You install new themes by placing them in the _~/.atom/themes_ directory. A
theme can be a CSS file, a directory containing multiple CSS files, or a
TextMate theme (either _.tmTheme_ or _.plist_).
## Installing Packages (Partially Implemented)
To install a package, clone it into the _~/.atom/packages_ directory. Atom will
also load grammars and snippets from TextMate bundles. If you want to disable a
package without removing it from the packages directory, insert its name into
_config.core.disabledPackages_:
Atom loads configuration settings from the `config.cson` file in your _~/.atom_
directory, which contains CoffeeScript-style JSON:
```coffeescript
core:
disabledPackages: [
"fuzzy-finder",
"tree-view"
]
hideGitIgnoredFiles: true
editor:
fontSize: 18
```
## Quick Personal Hacks
The configuration itself is grouped by the package name or one of the two core
namespaces: `core` and `editor`.
### Configuration Key Reference
- `core`
- `disabledPackages`: An array of package names to disable
- `excludeVcsIgnoredPaths`: Don't search within files specified by _.gitignore_
- `hideGitIgnoredFiles`: Whether files in the _.gitignore_ should be hidden
- `ignoredNames`: File names to ignore across all of Atom
- `projectHome`: The directory where projects are assumed to be located
- `themes`: An array of theme names to load, in cascading order
- `editor`
- `autoIndent`: Enable/disable basic auto-indent (defaults to `true`)
- `autoIndentOnPaste`: Enable/disable auto-indented pasted text (defaults to `false`)
- `nonWordCharacters`: A string of non-word characters to define word boundaries
- `fontSize`: The editor font size
- `fontFamily`: The editor font family
- `invisibles`: Specify characters that Atom renders for invisibles in this hash
- `tab`: Hard tab characters
- `cr`: Carriage return (for Microsoft-style line endings)
- `eol`: `\n` characters
- `space`: Leading and trailing space characters
- `normalizeIndentOnPaste`: Enable/disable conversion of pasted tabs to spaces
- `preferredLineLength`: Identifies the length of a line (defaults to `80`)
- `showInvisibles`: Whether to render placeholders for invisible characters (defaults to `false`)
- `showIndentGuide`: Show/hide indent indicators within the editor
- `showLineNumbers`: Show/hide line numbers within the gutter
- `softWrap`: Enable/disable soft wrapping of text within the editor
- `softWrapAtPreferredLineLength`: Enable/disable soft line wrapping at `preferredLineLength`
- `tabLength`: Number of spaces within a tab (defaults to `2`)
- `fuzzyFinder`
- `ignoredNames`: Files to ignore *only* in the fuzzy-finder
- `whitespace`
- `ensureSingleTrailingNewline`: Whether to reduce multiple newlines to one at the end of files
- `removeTrailingWhitespace`: Enable/disable striping of whitespace at the end of lines (defaults to `true`)
- `wrapGuide`
- `columns`: Array of hashes with a `pattern` and `column` key to match the
the path of the current editor to a column position.
### Quick Personal Hacks
### user.coffee
When Atom finishes loading, it will evaluate _user.coffee_ in your _~/.atom_
directory, giving you a chance to run arbitrary personal CoffeeScript code to
make customizations. You have full access to Atom's API from code in this file.
Please refer to the [Atom Internals Guide](./internals/intro,md) for more information. If your
customizations become extensive, consider [creating a package](./packages/creating_packages.md).
If customizations become extensive, consider [creating a
package][create-a-package].
### user.css
### user.less
If you want to apply quick-and-dirty personal styling changes without creating
an entire theme that you intend to distribute, you can add styles to
_user.css_ in your _~/.atom_ directory.
_user.less_ in your _~/.atom_ directory.
For example, to change the color of the highlighted line number for the line that
contains the cursor, you could add the following style to _user.css_:
For example, to change the color of the highlighted line number for the line
that contains the cursor, you could add the following style to _user.less_:
```less
@highlight-color: pink;
```css
.editor .line-number.cursor-line {
color: pink;
color: @highlight-color;
}
```
[create-a-package]: creating-packages.md
[create-theme]: creating-a-theme.md
+49 -224
Ver Arquivo
@@ -1,63 +1,42 @@
# Getting Started
Welcome to Atom. This documentation provides a basic introduction to being
productive with this editor. We'll then delve into more details about configuring,
theming, and extending Atom.
Welcome to Atom! This guide provides a quick introduction so you can be
productive as quickly as possible. There are also guides which cover
[configuring], [theming], and [extending] Atom.
## The Command Palette
If there's one key-command you must remember in Atom, it should be `meta-p` (`meta` is
synonymous with the ⌘ key). You can always hit `meta-p` to bring up a list of
commands that are relevant to the currently focused UI element. If there is a
key binding for a given command, it is also displayed. This is a great way to
explore the system and get to know the key commands interactively. If you'd like
to learn about adding or changing a binding for a command, refer to the [key
bindings](#customizing-key-bindings) section.
If there's one key-command you must remember in Atom, it should be `cmd-p`. You
can always hit `cmd-p` to bring up a list of commands that are relevant to the
currently focused interface element. If there is a key binding for a given
command, it is also displayed. This is a great way to explore the system and get
to know the key commands interactively. If you'd like to learn about adding or
changing a binding for a command, refer to the [key bindings][key-bindings]
section below.
![Command Palette](http://f.cl.ly/items/32041o3w471F3C0F0V2O/Screen%20Shot%202013-02-13%20at%207.27.41%20PM.png)
![Command Palette]
## Basic Key Bindings
You can always use `meta-p` to explore available commands and their
bindings, but here's a list of a few useful commands.
- `meta-o` : open a file or directory
- `meta-shift-n` : open new window
- `meta-r` : reload the current window
- `meta-alt-ctrl-s` : run test specs
- `meta-t` : open file finder to navigate files in your project
- `meta-;` : open command prompt
- `meta-f` : open command prompt with `/` for a local file search
- `meta-g` : repeat the last local search
- `meta-shift-f` : open command prompt with `Xx/` for a project-wide search
- `meta-\` : focus/open tree view, or close it when it is focused
- `meta-|` : open tree view with the current file selected
- `ctrl-w v`, `ctrl-|` : split screen vertically
- `ctrl-w s`, `ctrl--` : split screen horizontally
- `meta-l` : go to line
## Usage Basics
### If You See A Rendering Bug
Things are pretty stable, but we think we have a couple rendering bugs lurking
that are hard to reproduce. If you see one, please hit `meta-p` and type
"save debug snapshot". Run that command to save a snapshot of the misbehaving
editor and send it to us, along with a screenshot and your best description of
how you produced the bug. Refreshing with `meta-r` should usually resolve the
issue so you can keep working.
## The Basics
### Working With Files
Atom windows are scoped to the directory in which they're opened from. So if you
launch Atom from the command line, everything will be relative to the current
directory. This means that the tree view on the left will only show files
contained within that directory.
This can be a useful way to organize multiple projects, as each project will be
contained within it's own window and it's state will be unique to that window.
#### Finding Files
The fastest way to find a file in your project is to use the fuzzy finder. Just
hit `meta-t` and start typing the name of the file you're looking for. If you
already have the file open as a tab and want to jump to it, hit `meta-b` to bring
hit `cmd-t` and start typing the name of the file you're looking for. If you
already have the file open as a tab and want to jump to it, hit `cmd-b` to bring
up a searchable list of open buffers.
You can also use the tree view to navigate to a file. To open or move focus to
the tree view, hit `meta-\`. You can then navigate to a file and select it with
the tree view, hit `cmd-\`. You can then navigate to a file and select it with
`return`.
#### Adding, Moving, Deleting Files
@@ -70,53 +49,27 @@ needed.
To move or rename a file or directory, select it in the tree view and hit `m`.
To delete a file, select it in the tree view and hit `delete`.
### Searching For Stuff
### Searching
#### Using the Command Line
#### Find and Replace
Atom has a command line similar to old-school editors such as emacs and vim. Nearly
every command has a key binding which you can discover with `meta-p`.
The command line is also (currently) the only place you can perform a search. Hitting
`meta-f` opens the command line and prepopulates it with the `/` command. This finds
text in the current buffer, starting at the location of the cursor. Pressing `meta-g`
repeats the search. Hitting `meta-shift-f` opens the command line and prepopulates
it with `Xx/`, which is a composite command that performs a global search. The results
of the search appear in the operation preview list, which you can focus
with `meta-:`.
Atom's command language is still under construction, and is loosely based on
the [Sam editor](http://doc.cat-v.org/bell_labs/sam_lang_tutorial/) from the
Plan 9 operating system. It's similar to Ex mode in vim, but is selection-based
rather than line-based. It allows you to compose commands together in
interesting ways.
To search within a buffer use `cmd-f`. To search the entire project use
`cmd-shift-f`. To find and replace within the current buffer use `cmd-alt-f`.
#### Navigating By Symbols
If you want to jump to a method, you can use the ctags-based symbols package.
The `meta-j` binding opens a list of all symbols in the current file. The
`meta-shift-j` binding opens a list of all symbols for the current project
based on a tags file. `meta-.` jumps to the tag for the word currently
under the cursor.
If you want to jump to a method, the `cmd-j` binding opens a list of all symbols
in the current file. `cmd-.` jumps to the tag for the word currently under the
cursor.
Make sure you have a tags file generated for the project for
the latter of these two bindings to work. Also, if you're editing CoffeeScript,
it's a good idea to update your `~/.ctags` file to understand the language. Here
is [a good example](https://github.com/kevinsawicki/dotfiles/blob/master/.ctags).
### Replacing Stuff
To perform a replacement, open up the command line with `meta-;` and use the `s`
command, as follows: `s/foo/bar/g`. Note that if you have a selection, the
replacement will only occur inside the selected text. An empty selection will
cause the replacement to occur across the whole buffer. If you want to run the
command on the whole buffer even if you have a selection, precede your
substitution with the `,` address; this indicates that the following command should
run on the whole buffer.
To search for symbols across your project use `cmd-shift-j`, but you'll need to
make sure you have a tags file generated for the project Also, if you're editing
CoffeeScript, it's a good idea to update your `~/.ctags` file to understand the
language. Here is [a good example][ctags].
### Split Panes
You can split any editor pane horizontally or vertically by using `ctrl-\` or
You can split any editor pane horizontally or vertically by using `ctrl-w s` or
`ctrl-w v`. Once you have a split pane, you can move focus between them with
`ctrl-tab` or `ctrl-w w`. To close a pane, close all tabs inside it.
@@ -124,154 +77,26 @@ You can split any editor pane horizontally or vertically by using `ctrl-\` or
You can fold everything with `ctrl-{` and unfold everything with
`ctrl-}`. Or, you can fold / unfold by a single level with `ctrl-[` and
`ctrl-]`. The user interaction around folds is still a bit rough, but we're
planning to improve it soon.
`ctrl-]`.
### Soft-Wrap
If you want to toggle soft wrap, trigger the command from the command palette.
Hit `meta-p` to open the palette, then type "wrap" to find the correct
Hit `cmd-p` to open the palette, then type "wrap" to find the correct
command.
## Your .atom Directory
## Configuration
When you install Atom, an `.atom` directory is created in your home directory.
If you press `meta-,`, that directory will be opened in a new window. For the
time being, this will serve as the primary interface for adjusting configuration
settings, adding and changing key bindings, tweaking styles, etc.
If you press `cmd-,`, a configuration panel will appear in the currently focused
pane. This serves as the primary interface for adjusting settings, installing
packages and changing themes.
## Configuration Settings
For more advanced configuration see the [customization guide][customization].
Atom loads configuration settings from the `config.cson` file in your `~/.atom`
directory, which contains CoffeeScript-style JSON:
```coffeescript
'editor':
'fontSize': 16
'core':
'themes': [
'atom-dark-ui'
'atom-dark-syntax'
]
```
Configuration is broken into namespaces, which are defined by the config hash's
top-level keys. In addition to Atom's core components, each package may define
its own namespace.
### Glossary of Config Keys
- core
- disabledPackages: An array of package names to disable
- hideGitIgnoredFiles: Whether files in the .gitignore should be hidden
- ignoredNames: File names to ignore across all of atom (not fully implemented)
- themes: An array of theme names to load, in cascading order
- autosave: Save a resource when its view loses focus
- editor
- autoIndent: Enable/disable basic auto-indent (defaults to true)
- autoIndentOnPaste: Enable/disable auto-indented pasted text (defaults to false)
- nonWordCharacters: A string of non-word characters to define word boundaries
- fontSize
- fontFamily
- invisibles: Specify characters that Atom renders for invisibles in this hash
- tab: Hard tab characters
- cr: Carriage return (For Microsoft-style line endings)
- eol: `\n` characters
- space: Leading and trailing space characters
- preferredLineLength: Packages such as autoflow use this (defaults to 80)
- showInvisibles: Whether to render placeholders for invisible characters (defaults to false)
- fuzzyFinder
- ignoredNames: Files to ignore *only* in the fuzzy-finder
- whitespace
- ensureSingleTrailingNewline: Whether to reduce multiple newlines to one at the end of files
- wrapGuide
- columns: Array of hashes with a `pattern` and `column` key to match the
the path of the current editor to a column position.
## Customizing Key Bindings
Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
to apply styles to elements, Atom keymaps use selectors to associate keystrokes
with events in specific contexts. Here's a small example, excerpted from Atom's
built-in keymaps:
```coffeescript
'.editor':
'enter': 'editor:newline'
'.select-list .editor.mini':
'enter': 'core:confirm'
```
This keymap defines the meaning of `enter` in two different contexts. In a
normal editor, pressing `enter` emits the `editor:newline` event, which causes
the editor to insert a newline. But if the same keystroke occurs inside of a
select list's mini-editor, it instead emits the `core:confirm` event based on
the binding in the more-specific selector.
By default, any keymap files in your `~/.atom/keymaps` directory will be loaded
in alphabetical order when Atom is started. They will always be loaded last,
giving you the chance to override bindings that are defined by Atom's core
keymaps or third-party packages.
## Changing The Theme
Atom comes bundles with two themes `atom-dark-*` and `atom-light-*`.
Because Atom themes are based on CSS, it's possible to have multiple themes
active at the same time. For example, you'll usually select a theme for the UI
and another theme for syntax highlighting. You can select themes by specifying
them in the `core.themes` array in your `config.cson`:
```coffeescript
core:
themes: ["atom-light-ui", "atom-light-syntax"]
# or, if the sun is going down:
# themes: ["atom-dark-ui", "atom-dark-syntax"]
```
You install new themes by placing them in the `~/.atom/themes` directory. A
theme can be a CSS file, a directory containing multiple CSS files, or a
TextMate theme (either `.tmTheme` or `.plist`).
## Installing Packages (Partially Implemented)
To install a package, clone it into the `~/.atom/packages` directory. Atom will
also load grammars and snippets from TextMate bundles. If you want to disable a
package without removing it from the packages directory, insert its name into
`config.core.disabledPackages`:
config.cson:
```coffeescript
core:
disabledPackages: [
"fuzzy-finder",
"tree-view"
]
```
## Quick Personal Hacks
### user.coffee
When Atom finishes loading, it will evaluate `user.coffee` in your `~/.atom`
directory, giving you a chance to run arbitrary personal CoffeeScript code to
make customizations. You have full access to Atom's API from code in this file.
Please refer to the Atom Internals Guide for more information. If your
customizations become extensive, consider creating a package.
### user.css
If you want to apply quick-and-dirty personal styling changes without creating
an entire theme that you intend to distribute, you can add styles to
`user.css` in your `~/.atom` directory.
For example to change the color of the highlighted line number for the line that
contains the cursor, you could add the following style to `user.css`:
```css
.editor .line-number.cursor-line {
color: pink;
}
```
[configuring]: customizing-atom.md
[theming]: creating-a-theme.md
[extending]: creating-a-package.md
[customization]: customizing-atom.md
[key-bindings]: #customizing-key-bindings
[command palette]: https://f.cloud.github.com/assets/1424/1091618/ee7c3554-166a-11e3-9955-aaa61bb5509c.png
[ctags]: https://github.com/kevinsawicki/dotfiles/blob/master/.ctags
+12
Ver Arquivo
@@ -0,0 +1,12 @@
## Guides
* [Getting Started](getting-started.md)
* [Customizing Atom](customizing-atom.md)
* [Creating a Package](creating-a-package.md)
* [Creating a Theme](creating-a-theme.md)
### Advanced Topics
* [Configuration](internals/configuration.md)
* [Keymaps](internals/keymaps.md)
* [Serialization](internals/serialization.md)
* [View System](internals/view-system.md)
+2 -2
Ver Arquivo
@@ -7,7 +7,7 @@ read config settings. You can read a value from `config` with `config.get`:
```coffeescript
# read a value with `config.get`
@autosave() if config.get "core.autosave"
@showInvisibles() if config.get "edtior.showInvisibles"
```
Or you can use `observeConfig` to track changes from a view object.
@@ -47,7 +47,7 @@ the following way:
```coffeescript
# basic key update
config.set("core.autosave", true)
config.set("core.showInvisibles", true)
config.pushAtKeyPath("core.disabledPackages", "wrap-guide")
```
-6
Ver Arquivo
@@ -1,6 +0,0 @@
# Atom Internals
To extend Atom effectively, you'll need to understand how it works internally.
This system is evolving fast and it's unlikely that these docs will cover all
of it any time soon, so view this as a jumping-off point. To really understand
how things work, use the web inspector or dive into the code.
+3 -3
Ver Arquivo
@@ -15,7 +15,7 @@ Note that the last example describes multiple keystrokes in succession:
- `p`
- `2`
- `ctrl-p`
- `ctrl-alt-meta-p`
- `ctrl-alt-cmd-p`
- `tab`
- `escape`
- `enter`
@@ -23,12 +23,12 @@ Note that the last example describes multiple keystrokes in succession:
A semantic event is the name of the custom event that will be triggered on the
target of the keydown event when a key binding matches. You can use the command
palette (bound to `meta-p`), to get a list of relevant events and their bindings
palette (bound to `cmd-p`), to get a list of relevant events and their bindings
in any focused context in Atom.
### Rules for Mapping A Keydown Event to A Semantic Event
A keymap's job is to translate a physical keystroke event (like `meta-D`) into a
A keymap's job is to translate a physical keystroke event (like `cmd-D`) into a
semantic event (like `editor:duplicate-line`). Whenever a keydown event occurs
on a focused element, it bubbles up the DOM as usual. As soon as an element on
the bubble path matches a key binding for the keystroke, the binding's semantic
+9 -8
Ver Arquivo
@@ -2,9 +2,8 @@
### SpacePen Basics
Atom's view system is built around the [SpacePen](http://github.com/nathansobo/space-pen)
view framework. SpacePen view objects inherit from the jQuery prototype, and
wrap DOM nodes
Atom's view system is built around the [SpacePen] view framework. SpacePen
view objects inherit from the jQuery prototype, and wrap DOM nodes
View objects are actually jQuery wrappers around DOM fragments, supporting all
the typical jQuery traversal and manipulation methods. In addition, view objects
@@ -28,17 +27,16 @@ editorView = editorElement.view()
editorView.setCursorBufferPosition([1, 2])
```
Refer to the [SpacePen](http://github.com/nathansobo/space-pen) documentation
for more details.
Refer to the [SpacePen] documentation for more details.
### RootView
The root of Atom's view hiererchy is a global called `rootView`, which is a
The root of Atom's view hierarchy is a global called `rootView`, which is a
singleton instance of the `RootView` view class. The root view fills the entire
window, and contains every other view. If you open Atom's inspector with
`alt-meta-i`, you can see the internal structure of `RootView`:
`alt-cmd-i`, you can see the internal structure of `RootView`:
![RootView in the inspector](http://f.cl.ly/items/2n0s3m0I2d223p3s3W01/root-view-inspector.png)
![RootView in the inspector][rootview-inspector]
#### Panes
@@ -62,3 +60,6 @@ rootView.horizontal.prepend(new MyView)
# place a view below the panes (or use .prepend() to place it above)
rootView.vertical.append(new MyOtherView)
```
[spacepen]: http://github.com/nathansobo/space-pen
[rootview-inspector]: https://f.cloud.github.com/assets/1424/1091631/1932c2d6-166b-11e3-8adf-9690fe82d3b8.png
-15
Ver Arquivo
@@ -1,15 +0,0 @@
getting-started.md
configuring-atom.md
built-in-packages/intro.md
built-in-packages/command-panel.md
built-in-packages/markdown-preview.md
built-in-packages/wrap-guide.md
packages/authoring-packages.md
packages/creating_a_package.md
packages/included_libraries.md
packages/package_json.md
themes/authoring-themes.md
internals/intro.md
internals/configuration.md
internals/keymaps.md
internals/view-system.md
-211
Ver Arquivo
@@ -1,211 +0,0 @@
# Authoring Packages
Packages are at the core of Atom. Nearly everything outside of the main editor manipulation
is handled by a package. That includes "core" pieces like the command panel, status bar,
file tree, and more.
A package can contain a variety of different resource types to change Atom's
behavior. The basic package layout is as follows (though not every package will
have all of these directories):
```text
my-package/
lib/
stylesheets/
keymaps/
snippets/
grammars/
spec/
package.json
index.coffee
```
**NOTE:** NPM behavior is partially implemented until we get a working Node.js
API built into Atom. The goal is to make Atom packages be a superset of NPM
packages.
Below, we'll break down each directory. There's also [a tutorial](./creating_a_package.md)
on creating your first package.
## package.json
Similar to [npm packages](http://en.wikipedia.org/wiki/Npm_(software\)), Atom packages
can contain a _package.json_ file in their top-level directory. This file contains metadata
about the package, such as the path to its "main" module, library dependencies,
and manifests specifying the order in which its resources should be loaded.
In addition to the regular [npm package.json keys](https://npmjs.org/doc/json.html)
available, Atom package.json files [have their own additions](./package_json.md).
## Source Code
If you want to extend Atom's behavior, your package should contain a single
top-level module, which you export from _index.coffee_ (or whichever file is
indicated by the `main` key in your _package.json_ file). The remainder of your
code should be placed in the `lib` directory, and required from your top-level
file.
Your package's top-level module is a singleton object that manages the lifecycle
of your extensions to Atom. Even if your package creates ten different views and
appends them to different parts of the DOM, it's all managed from your top-level
object.
Your package's top-level module should implement the following methods:
- `activate(rootView, state)`: This **required** method is called when your
package is loaded. It is always passed the window's global `rootView`, and is
sometimes passed state data if the window has been reloaded and your module
implements the `serialize` method. Use this to do initialization work when your
package is started (like setting up DOM elements or binding events).
- `serialize()`: This **optional** method is called when the window is shutting
down, allowing you to return JSON to represent the state of your component. When
the window is later restored, the data you returned is passed to your
module's `activate` method so you can restore your view to where the user left
off.
- `deactivate()`: This **optional** method is called when the window is shutting
down. If your package is watching any files or holding external resources in any
other way, release them here. If you're just subscribing to things on window,
you don't need to worry because that's getting torn down anyway.
### Simple Package Code
```text
my-package/
package.json # optional
index.coffee
lib/
my-package.coffee
```
`index.coffee`:
```coffeescript
module.exports = require "./lib/my-package"
```
`my-package/my-package.coffee`:
```coffeescript
module.exports =
activate: (rootView, state) -> # ...
deactivate: -> # ...
serialize: -> # ...
```
Beyond this simple contract, your package has full access to Atom's internal
API. Anything we call internally, you can call as well. Be aware that since we
are early in development, APIs are subject to change and we have not yet
established clear boundaries between what is public and what is private. Also,
please collaborate with us if you need an API that doesn't exist. Our goal is
to build out Atom's API organically based on the needs of package authors like
you.
See [Atom's built-in packages](https://github.com/github/atom/tree/master/src/packages)
for examples of Atom's API in action.
## Stylesheets
Stylesheets for your package should be placed in the _stylesheets_ directory.
Any stylesheets in this directory will be loaded and attached to the DOM when
your package is activated. Stylesheets can be written as CSS or LESS.
An optional `stylesheets` array in your _package.json_ can list the stylesheets by
name to specify a loading order; otherwise, stylesheets are loaded alphabetically.
## Keymaps
Keymaps are placed in the _keymaps_ subdirectory. It's a good idea to provide
default keymaps for your extension, especially if you're also adding a new command.
By default, all keymaps are loaded in alphabetical order. An optional `keymaps`
array in your _package.json_ can specify which keymaps to load and in what order.
See the [main keymaps documentation](../internals/keymaps.md) for more information on
how keymaps work.
## Snippets
An extension can supply language snippets in the _snippets_ directory. These can
be `.cson` or `.json` files. Here's an example:
```coffeescript
".source.coffee .specs":
"Expect":
prefix: "ex"
body: "expect($1).to$2"
"Describe":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
```
A snippets file contains scope selectors at its top level (`.source.coffee .spec`).
Each scope selector contains a hash of snippets keyed by their name (`Expect`, `Describe`).
Each snippet also specifies a `prefix` and a `body` key. The `prefix` represents
the first few letters to type before hitting the `tab` key to autocomplete. The
`body` defines the autofilled text. You can use placeholders like `$1`, `$2`, to indicate
regions in the body the user can navigate to every time they hit `tab`.
All files in the directory are automatically loaded, unless the
_package.json_ supplies a `snippets` key. As with all scoped
items, snippets loaded later take precedence over earlier snippets when two
snippets match a scope with the same specificity.
## Language Grammars
If you're developing a new language grammar, you'll want to place your file in
the _grammars_ directory. Each grammar is a pairing of two keys, `match` and
`captures`. `match` is a regular expression identifying the pattern to highlight,
while `captures` is a JSON representing what to do with each matching group.
For example:
```json
{
'match': '(?:^|\\s)(__[^_]+__)'
'captures':
'1': 'name': 'markup.bold.gfm'
}
```
This indicates that the first matching capture (`(__[^_]+__)`) should have the
`markup.bold.gfm` token applied to it.
To capture a single group, simply use the `name` key instead:
```json
{
'match': '^#{1,6}\\s+.+$'
'name': 'markup.heading.gfm'
}
```
This indicates that Markdown header lines (`#`, `##`, `###`) should be applied with
the `markup.heading.gfm` token.
More information about the significance of these tokens can be found in
[section 12.4 of the TextMate Manual](http://manual.macromates.com/en/language_grammars.html).
Your grammar should also include a `filetypes` array, which is a list of file extensions
your grammar supports:
```
'fileTypes': [
'markdown'
'md'
'mkd'
'mkdown'
'ron'
]
```
## Writing Tests
Your package **should** have tests, and if they're placed in the _spec_ directory,
they can be run by Atom.
Under the hood, [Jasmine](https://github.com/pivotal/jasmine) is being used to run
to execute the tests, so you can assume that any DSL available there is available
to your package as well.
-254
Ver Arquivo
@@ -1,254 +0,0 @@
# Creating Packages
Let's take a look at creating our first package.
Atom has a command you can enter that'll create a package for you:
`package-generator:generate`. Otherwise, you can hit `meta-p`, and start typing
"Package Generator." Once you activate this package, it'll ask you for a name for
your new package. Let's call ours _changer_.
Now, _changer_ is going to have a default set of folders and files created for us.
Hit `meta-R` to reload Atom, then hit `meta-p` and start typing "Changer." You'll
see a new `Changer:Toggle` command which, if selected, pops up a new message. So
far, so good!
In order to demonstrate the capabilities of Atom and its API, our Changer plugin
is going to do two things:
1. It'll show only modified files in the file tree
2. It'll append a new pane to the editor with some information about the modified
files
Let's get started!
## Changing Keybindings and Commands
Since Changer is primarily concerned with the file tree, let's write a keybinding
that works only when the tree is focused. Instead of using the default `toggle`,
our keybinding executes a new command called `magic`.
_keymaps/changer.cson_ can easily become this:
```cson
'.tree-view-scroller':
'ctrl-V': 'changer:magic'
```
Notice that the keybinding is called `ctrl-V`--that's actually `ctrl-shift-v`.
You can use capital letters to denote using `shift` for your binding.
`.tree-view-scroller` represents the parent container for the tree view. Keybindings
only work within the context of where they're entered. For example, hitting `ctrl-V`
anywhere other than tree won't do anything. You can map to `body` if you want
to scope to anywhere in Atom, or just `.editor` for the editor portion.
To bind keybindings to a command, we'll use the `rootView.command` method. This
takes a command name and executes a function in the code. For example:
```coffeescript
rootView.command "changer:magic", => @magic()
```
It's common practice to namespace your commands with your package name, and separate
it with a colon (`:`). Rename the existing `toggle` method to `magic` to get the
binding to work.
Reload the editor, click on the tree, hit your keybinding, and...nothing happens! What the heck?!
Open up the _package.json_ file, and notice the key that says `activationEvents`.
Basically, this tells Atom to not load a package until it hears a certain event.
Let's change the event to `changer:magic` and reload the editor.
Hitting the key binding on the tree now works!
## Working with styles
The next step is to hide elements in the tree that aren't modified. To do that,
we'll first try and get a list of files that have not changed.
All packages are able to use jQuery in their code. In fact, we have [a list of
some of the bundled libraries Atom provides by default](./included_libraries.md).
Let's bring in jQuery:
```coffeescript
$ = require 'jquery'
```
Now, we can query the tree to get us a list of every file that _wasn't_ modified:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
console.log el
```
You can access the dev console by hitting `alt-meta-i`. When we execute the
`changer:magic` command, the browser console lists the items that are not being
modified. Let's add a class to each of these elements called `hide-me`:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
$(el).addClass("hide-me")
```
With our newly added class, we can manipulate the visibility of the elements
with a simple stylesheet. Open up _changer.css_ in the _stylesheets_ directory,
and add a single entry:
```css
ol.entries .hide-me {
display: none;
}
```
Refresh atom, and run the `changer` command. You'll see all the non-changed files
disappear from the tree. There are a number of ways you can get the list back;
let's just naively iterate over the same elements and remove the class:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
if !$(el).hasClass("hide-me")
$(el).addClass("hide-me")
else
$(el).removeClass("hide-me")
```
## Creating a New Pane
The next goal of this package is to append a pane to the Atom editor that lists
some information about the modified files.
To do that, we're going to first create a new class method called `content`. Every
package that extends from the `View` class can provide an optional class method
called `content`. The `content` method constructs the DOM that your package uses
as its UI. The principals of `content` are built entirely on [SpacePen](https://github.com/nathansobo/space-pen),
which we'll touch upon only briefly here.
Our display will simply be an unordered list of the file names, and their
modified times. Let's start by carving out a `div` to hold the filenames:
```coffeescript
@content: ->
@div class: 'modified-files-container', =>
@ul class: 'modified-files-list', outlet: 'modifiedFilesList', =>
@li 'Test'
@li 'Test2'
```
You can add any HTML5 attribute you like. `outlet` names the variable
your package can uses to manipulate the element directly. The fat pipe (`=>`) indicates
that the next set are nested children.
We'll add one more line to `magic` to make this pane appear:
```coffeescript
rootView.vertical.append(this)
```
If you hit the key command, you'll see a box appear right underneath the editor.
Success!
Before we populate this, let's apply some logic to toggle the pane off and on, just
like we did with the tree view:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
rootView.vertical.append(this)
```
There are about a hundred different ways to toggle a pane on and off, and this
might not be the most efficient one. If you know your package needs to be toggled
on and off more freely, it might be better to draw the UI during the initialization,
then immediately call `hide()` on the element to remove it from the view. You can
then swap between `show()` and `hide()`, and instead of forcing Atom to add and remove
the element as we're doing here, it'll just set a CSS property to control your package's
visibility.
You might have noticed that our two `li` elements aren't showing up. Let's set
a color on them so that they pop. Open up `changer.css` and add this CSS:
```css
ul.modified-files-list {
color: white;
}
```
Refresh Atom, hit the key combo, and see your brilliantly white test list.
## Calling Node.js Code
Since Atom is built on top of Node.js, you can call any of its libraries, including
other modules that your package requires.
We'll iterate through our resulting tree, and construct the path to our modified
file based on its depth in the tree:
```coffeescript
path = require 'path'
# ...
modifiedFiles = []
# for each single entry...
$('ol.entries li.file.modified span.name').each (i, el) ->
filePath = []
# ...grab its name...
filePath.unshift($(el).text())
# ... then find its parent directories, and grab their names
parents = $(el).parents('.directory.modified')
parents.each (i, el) ->
filePath.unshift($(el).find('div.header span.name').eq(0).text())
modifiedFilePath = path.join(project.rootDirectory.path, filePath.join(path.sep))
modifiedFiles.push modifiedFilePath
```
`modifiedFiles` is an array containing a list of our modified files. We're also using
the node.js [`path` library](http://nodejs.org/docs/latest/api/path.html) to get
the proper directory separator for our system.
Let's remove the two `@li` elements we added in `@content`, so that we can populate
our `modifiedFilesList` with real information. We'll do that by iterating over
`modifiedFiles`, accessing a file's last modified time, and appending it to
`modifiedFilesList`:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
When you toggle the modified files list, your pane is now populated with the filenames
and modified times of files in your project. You might notice that subsequent calls
to this command reduplicate information. We could provide an elegant way of rechecking
files already in the list, but for this demonstration, we'll just clear the `modifiedFilesList`
each time it's closed:
```coffeescript
# toggles the pane
if @hasParent()
@modifiedFilesList.empty()
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
-10
Ver Arquivo
@@ -1,10 +0,0 @@
# Included Libraries
In addition to core node.js modules, all packages can `require` the following popular
libraries into their packages:
* [SpacePen](https://github.com/nathansobo/space-pen) (as `require 'space-pen'`)
* [jQuery](http://jquery.com/) (as `require 'jquery'`)
* [Underscore](http://underscorejs.org/) (as `require 'underscore'`)
Additional libraries can be found by browsing Atom's _node_modules_ folder.
-18
Ver Arquivo
@@ -1,18 +0,0 @@
# package.json format
The following keys are available to your package's _package.json_ manifest file:
- `main` (**Required**): the path to the CoffeeScript file that's the entry point
to your package
- `stylesheets` (**Optional**): an Array of Strings identifying the order of the
stylesheets your package needs to load. If not specified, stylesheets in the _stylesheets_
directory are added alphabetically.
- `keymaps`(**Optional**): an Array of Strings identifying the order of the
key mappings your package needs to load. If not specified, mappings in the _keymaps_
directory are added alphabetically.
- `snippets` (**Optional**): an Array of Strings identifying the order of the
snippets your package needs to load. If not specified, snippets in the _snippets_
directory are added alphabetically.
- `activationEvents` (**Optional**): an Array of Strings identifying events that
trigger your package's activation. You can delay the loading of your package until
one of these events is trigged.
+63
Ver Arquivo
@@ -0,0 +1,63 @@
## Atom Documentation Format
This document describes our documentation format, which is markdown with
a few rules.
### Philosophy
1. Method and argument names **should** clearly communicate its use.
1. Use documentation to enhance and not correct method/argument names.
#### Basic
In some cases all that's required is a single line. **Do not** feel
obligated to write more because we have a format.
```markdown
# Private: Returns the number of pixels from the top of the screen.
```
* **Each method should declare whether it's public or private by using `Public:`
or `Private:`** prefix.
* Following the colon, there should be a short description (that isn't redundant with the
method name).
* Documentation should be hard wrapped to 80 columns.
### Public vs Private
If a method is public it can be used by other classes (and possibly by
the public API). The appropriate steps should be taken to minimize the impact
when changing public methods. In some cases that might mean adding an
appropriate release note. In other cases it might mean doing the legwork to
ensure all affected packages are updated.
#### Complex
For complex methods it's necessary to explain exactly what arguments
are required and how different inputs effect the operation of the
function.
The idea is to communicate things that the API user might not know about,
so repeating information that can be gleaned from the method or argument names
is not useful.
```markdown
# Private: Determine the accelerator for a given command.
#
# * command:
# The name of the command.
# * keystrokesByCommand:
# An {Object} whose keys are commands and the values are Arrays containing
# the keystrokes.
# * options:
# + accelerators:
# Boolean to determine whether accelerators should be shown.
#
# Returns a String containing the keystroke in a format that can be interpreted
# by atom shell to provide nice icons where available.
#
# Raises an Exception if no window is available.
```
* Use curly brackets `{}` to provide links to other classes.
* Use `+` for the options list.
+70
Ver Arquivo
@@ -0,0 +1,70 @@
**Polish the user experience**
First and foremost, Atom is a **product**. Atom needs to feel familiar and
inviting. This includes a solid introductory experience and parity with the most
important features of Sublime Text.
* First launch UI and flow (actions below should be easily discoverable)
* Create a new file
* Open a project and edit an existing file
* Install a package
* Change settings (adjust theme, change key bindings, set config options)
* How to use command P
* Use collaboration internally
* How and where to edit keyBinding should be obvious to new users
* Finish find and replace in buffer/project
* Atom should start < 300ms
* Match Sublime's multiple selection functionality (#523)
* Fix softwrap bugs
* Menus & Context menus
* Track usage/engagement of our users (make this opted in?)
* Windows support
* Reliably and securely auto-update and list what's new
* Secure access to the keychain (don't give every package access to the keychain)
* Secure access to GitHub (each package can ask to have it's own oauth token)
* Don't crash when opening/editing large (> 10Mb) files
* Send js and native crash reports to a remote server
**Lay solid groundwork for a package and theme ecosystem**
Extensibility is one of Atom's key value propositions, so a smooth experience
for creating and maintaining packages is just as important as the user
experience. The package development, dependency and publishing workflow needs to
be solid. We also want to have a mechanism for clearly communicating with
package authors about breaking API changes.
* Finish APM backend (integrate with GitHub Releases)
* Streamline Dev workflow
* `apm create` - create package scaffolding
* `apm test` - so users can run focused package tests
* `apm publish` - should integrate release best practices (ie npm version)
* Determine which classes and methods should be included in the public API
* Users can find/install/update/fork existing packages and themes
**Tighten up the view layer**
Our current approach to the view layer need some improvement. We want to
actively promote the use of the M-V-VM design pattern, provide some declarative
event binding mechanisms in the view layer, and improve the performance of the
typical package specs. We don't want the current approach to be used as an
example in a bunch of new packages, so it's important to improve it now.
* Add marker view API
**Get atom.io online with some exciting articles and documentation**
We'd love to send our private alpha candidates to a nice site with information
about what Atom is, the philosophies and technologies behind it, and guidance
for how to get started.
* Design and create www.atom.io
* Guides
* Theme & Package creation guide
* Full API per release tag
* Changelog per release
* Explanation of features
* Explain Semver and general plans for the future (reassure developers we care about them)
* General Values/Goals
* Make docs accessible from Atom
* Community/contribution guidelines
* Is all communication to be done through issues?
* When should you publish a plugin?
* Do we need to vet plugins from a security perspective?
+16
Ver Arquivo
@@ -0,0 +1,16 @@
## Proposed Timeline
1. **October 30st** - Internal launch - persuade as many githubbers to switch as
possible.
1. Triage bugs and identify what needs to be fixed before private alpha. Maybe
talk to @chrissiebrodigan about doing a UX study.
1. **November 22st** - Private alpha launch
1. Trickle out invites as people ask/we need more testers.
1. If our usage metrics/engagement metrics decrease, stop, identify the issue
and fix it before continuing.
1. Launch
-55
Ver Arquivo
@@ -1,55 +0,0 @@
# Authoring Themes
If you understand CSS, you can write an Atom theme easily. Your theme can style
Atom's user interface, specify the appearance of syntax-highlighted code, or
both. For making a syntax highlighting theme, refer to
[section 12.4 of the TextMate Manual](http://manual.macromates.com/en/language_grammars.html)
for a list of the common scopes used by TextMate grammars. You'll just need to
translate scope names to CSS classes. To theme Atom's user interface, take a
look at the existing light and dark themes for an example. Pressing `alt-meta-i`
and inspecting the Atom's markup directly can also be helpful.
The most basic theme is just a _.css_ file. More complex themes occupy their own
folder, which can contain multiple stylesheets along with an optional
_package.cson_ file containing a manifest to control their load-order:
```text
~/.atom/themes/
rockstar.css
rainbow/
package.json
core.css
editor.css
tree-view.css
```
package.cson:
```coffee-script
stylesheets: ["core.css", "editor.less", "tree-view.css"]
```
The `package.cson` file specifies which stylesheets to load and in what order
with the `stylesheets` key. If no manifest is specified, all stylesheets are
loaded in alphabetical order when the user selects the theme.
## Theme Extensions (Not Yet Implemented)
A theme may need to be extended to cover DOM elements that are introduced by a
third-party Atom package. When a package is loaded, stylesheets with the same
name as the package will automatically be loaded from the `packages` directory
of active themes:
```text
~/.atom/themes/
midnight/midnight.less
midnight/packages/terminal.less
midnight/packages/tree-view.less
```
In the example above, if the `midnight` theme is active, its `terminal` and
`tree-view` stylesheets will be loaded automatically if and when those packages
are activated. If you author an extension to a theme consider sending its author
a pull request to have it included in the theme by default. Package-specific
theme stylesheets need not be listed in the theme's `package.json` because they
will be loaded automatically when the package is loaded.
+13
Ver Arquivo
@@ -0,0 +1,13 @@
# User keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Here's a small example, excerpted
# from Atom's built-in keymaps:
#
# '.editor':
# 'enter': 'editor:newline'
#
# 'body':
# 'ctrl-P': 'core:move-up'
# 'ctrl-p': 'core:move-down'
-1
Ver Arquivo
@@ -1 +0,0 @@
All themes in this directory will be automatically loaded
+31
Ver Arquivo
@@ -0,0 +1,31 @@
{Document, Point, Range, Site} = require 'telepath'
_ = require 'underscore-plus'
module.exports =
_: _
BufferedNodeProcess: require '../src/buffered-node-process'
BufferedProcess: require '../src/buffered-process'
Directory: require '../src/directory'
Document: Document
File: require '../src/file'
fs: require '../src/fs-utils'
Git: require '../src/git'
Point: Point
Range: Range
Site: Site
# The following classes can't be used from a Task handler and should therefore
# only be exported when not running as a child node process
unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE
{$, $$, $$$, View} = require '../src/space-pen-extensions'
module.exports.$ = $
module.exports.$$ = $$
module.exports.$$$ = $$$
module.exports.Editor = require '../src/editor'
module.exports.pathForRepositoryUrl = require('../src/project').pathForRepositoryUrl
module.exports.RootView = require '../src/root-view'
module.exports.SelectList = require '../src/select-list'
module.exports.ScrollView = require '../src/scroll-view'
module.exports.Task = require '../src/task'
module.exports.View = View
+29
Ver Arquivo
@@ -0,0 +1,29 @@
'body':
'meta-up': 'core:move-to-top'
'meta-down': 'core:move-to-bottom'
'meta-shift-up': 'core:select-to-top'
'meta-shift-down': 'core:select-to-bottom'
'.editor':
'meta-left': 'editor:move-to-first-character-of-line'
'meta-right': 'editor:move-to-end-of-line'
'meta-shift-left': 'editor:select-to-first-character-of-line'
'meta-shift-right': 'editor:select-to-end-of-line'
'home': 'editor:move-to-first-character-of-line'
'end': 'editor:move-to-end-of-line'
'shift-home': 'editor:select-to-first-character-of-line'
'shift-end': 'editor:select-to-end-of-line'
'alt-left': 'editor:move-to-previous-word-boundary'
'alt-right': 'editor:move-to-next-word-boundary'
'alt-shift-left': 'editor:select-to-previous-word-boundary'
'alt-shift-right': 'editor:select-to-next-word-boundary'
'alt-backspace': 'editor:backspace-to-beginning-of-word'
'meta-backspace': 'editor:backspace-to-beginning-of-line'
'alt-delete': 'editor:delete-to-end-of-word'
'ctrl-t': 'editor:transpose'
'ctrl-A': 'editor:select-to-first-character-of-line'
'ctrl-E': 'editor:select-to-end-of-line'
+16 -9
Ver Arquivo
@@ -1,4 +1,16 @@
'body':
'meta-q': 'application:quit'
'meta-h': 'application:hide'
'meta-H': 'application:hide-other-applications'
'meta-n': 'application:new-file'
'meta-N': 'application:new-window'
'meta-o': 'application:open'
'meta-O': 'application:open-dev'
'meta-m': 'application:minimize'
'meta-,': 'application:show-settings'
'alt-meta-ctrl-m': 'application:zoom'
'meta-alt-ctrl-s': 'application:run-all-specs'
'meta-s': 'core:save'
'meta-S': 'core:save-as'
'enter': 'core:confirm'
@@ -18,6 +30,7 @@
'delete': 'core:delete'
'meta-z': 'core:undo'
'meta-Z': 'core:redo'
'meta-y': 'core:redo'
'meta-x': 'core:cut'
'meta-c': 'core:copy'
'meta-v': 'core:paste'
@@ -26,12 +39,14 @@
'meta-alt-s': 'window:save-all'
'meta-W': 'window:close'
'meta-r': 'window:reload'
'meta-+': 'window:increase-font-size'
'meta--': 'window:decrease-font-size'
'ctrl-w w': 'window:focus-next-pane'
'ctrl-tab': 'window:focus-next-pane'
'ctrl-meta-f': 'window:toggle-full-screen'
'ctrl-alt-meta-r': 'window:reload'
'alt-meta-i': 'window:toggle-dev-tools'
'meta-alt-ctrl-p': 'window:run-package-specs'
'ctrl-|': 'pane:split-right'
'ctrl-w v': 'pane:split-right'
@@ -55,14 +70,6 @@
'alt-meta-w': 'pane:close-other-items'
'meta-P': 'pane:close'
'meta-n': 'new-editor'
'meta-N': 'new-window'
'meta-,': 'open-user-configuration'
'meta-o': 'open'
'meta-O': 'open-dev'
'meta-w': 'core:close'
'alt-meta-i': 'toggle-dev-tools'
'.tool-panel':
'meta-escape': 'tool-panel:unfocus'
'escape': 'core:close'
@@ -1,10 +1,16 @@
'.editor':
'ctrl-K': 'editor:delete-line'
'ctrl-W': 'editor:select-word'
'meta-alt-p': 'editor:log-cursor-scope'
'meta-u': 'editor:upper-case'
'meta-U': 'editor:lower-case'
'.editor:not(.mini)':
'enter': 'editor:newline'
'meta-enter': 'editor:newline-below'
'meta-shift-enter': 'editor:newline-above'
'tab': 'editor:indent'
'meta-=': 'editor:auto-indent'
'meta-d': 'editor:delete-line'
'ctrl-[': 'editor:fold-current-row'
'ctrl-]': 'editor:unfold-current-row'
@@ -26,16 +32,13 @@
'shift-tab': 'editor:outdent-selected-rows'
'meta-[': 'editor:outdent-selected-rows'
'meta-]': 'editor:indent-selected-rows'
'meta-/': 'editor:toggle-line-comments'
'ctrl-W': 'editor:select-word'
'meta-alt-p': 'editor:log-cursor-scope'
'meta-u': 'editor:upper-case'
'meta-U': 'editor:lower-case'
'ctrl-C': 'editor:copy-path'
'ctrl-meta-up': 'editor:move-line-up'
'ctrl-meta-down': 'editor:move-line-down'
'meta-D': 'editor:duplicate-line'
'ctrl-J': 'editor:join-line'
'meta-j': 'editor:join-line'
'meta-<': 'editor:scroll-to-cursor'
'.editor.mini':
+4
Ver Arquivo
@@ -0,0 +1,4 @@
'.select-list .mini.editor':
'enter': 'core:confirm'
'escape': 'core:cancel'
'meta-w': 'core:cancel'
+185
Ver Arquivo
@@ -0,0 +1,185 @@
'menu': [
{
label: 'Atom'
submenu: [
{ label: 'About Atom', command: 'application:about' }
{ label: "VERSION", enabled: false }
{ label: "Install update", command: 'application:install-update', visible: false }
{ type: 'separator' }
{ label: 'Preferences...', command: 'application:show-settings' }
{ type: 'separator' }
{ label: 'Hide Atom', command: 'application:hide' }
{ label: 'Hide Others', command: 'application:hide-other-applications' }
{ label: 'Show All', command: 'application:unhide-all-applications' }
{ type: 'separator' }
{ label: 'Quit', command: 'application:quit' }
]
}
{
label: 'File'
submenu: [
{ label: 'New Window', command: 'application:new-window' }
{ label: 'New File', command: 'application:new-file' }
{ label: 'Open...', command: 'application:open' }
{ label: 'Reopen Last Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: 'Save', command: 'core:save' }
{ label: 'Save As...', command: 'core:save-as' }
{ label: 'Save All', command: 'window:save-all' }
{ type: 'separator' }
{ label: 'Close Buffer', command: 'core:close' }
{ label: 'Close All Buffers', command: 'pane:close' }
{ label: 'Close Window', command: 'window:close' }
]
}
{
label: 'Edit'
submenu: [
{ label: 'Undo', command: 'core:undo' }
{ label: 'Redo', command: 'core:redo' }
{ type: 'separator' }
{ label: 'Cut', command: 'core:cut' }
{ label: 'Copy', command: 'core:copy' }
{ label: 'Copy Path', command: 'editor:copy-path' }
{ label: 'Paste', command: 'core:paste' }
{ label: 'Select All', command: 'core:select-all' }
{ type: 'separator' }
{ label: 'Toggle Comments', command: 'editor:toggle-line-comments' }
{
label: 'Lines',
submenu: [
{ label: 'Indent', command: 'editor:indent-selected-rows' }
{ label: 'Outdent', command: 'editor:outdent-selected-rows' }
{ label: 'Auto Indent', command: 'editor:auto-indent' }
{ type: 'separator' }
{ label: 'Move Line Up', command: 'editor:move-line-up' }
{ label: 'Move Line Down', command: 'editor:move-line-down' }
{ label: 'Duplicate Line', command: 'editor:duplicate-line' }
{ label: 'Delete Line', command: 'editor:delete-line' }
{ label: 'Join Lines', command: 'editor:join-line' }
]
}
{
label: 'Text',
submenu: [
{ label: 'Upper Case', command: 'editor:upper-case' }
{ label: 'Lower Case', command: 'editor:lower-case' }
{ type: 'separator' }
{ label: 'Delete to End of Word', command: 'editor:delete-to-end-of-word' }
{ label: 'Delete Line', command: 'editor:delete-line' }
{ type: 'separator' }
{ label: 'Transpose', command: 'editor:transpose' }
]
}
{
label: 'Folding',
submenu: [
{ label: 'Fold', command: 'editor:fold-current-row' }
{ label: 'Unfold', command: 'editor:unfold-current-row' }
{ label: 'Unfold All', command: 'editor:unfold-all' }
{ type: 'separator' }
{ label: 'Fold All', command: 'editor:fold-all' }
{ label: 'Fold Level 1', command: 'editor:fold-at-indent-level-1' }
{ label: 'Fold Level 2', command: 'editor:fold-at-indent-level-2' }
{ label: 'Fold Level 3', command: 'editor:fold-at-indent-level-3' }
{ label: 'Fold Level 4', command: 'editor:fold-at-indent-level-4' }
{ label: 'Fold Level 5', command: 'editor:fold-at-indent-level-5' }
{ label: 'Fold Level 6', command: 'editor:fold-at-indent-level-6' }
{ label: 'Fold Level 7', command: 'editor:fold-at-indent-level-7' }
{ label: 'Fold Level 8', command: 'editor:fold-at-indent-level-8' }
{ label: 'Fold Level 9', command: 'editor:fold-at-indent-level-9' }
]
}
]
}
{
label: 'Selection'
submenu: [
{ label: 'Add Selection Above', command: 'editor:add-selection-above' }
{ label: 'Add Selection Below', command: 'editor:add-selection-below' }
{ type: 'separator' }
{ label: 'Select to Top', command: 'core:select-to-top' }
{ label: 'Select to Bottom', command: 'core:select-to-bottom' }
{ type: 'separator' }
{ label: 'Select Line', command: 'editor:select-line' }
{ label: 'Select Word', command: 'editor:select-word' }
{ label: 'Select to Beginning of Word', command: 'editor:select-to-beginning-of-word' }
{ label: 'Select to Beginning of Line', command: 'editor:select-to-beginning-of-line' }
{ label: 'Select to First Character of Line', command: 'editor:select-to-first-character-of-line' }
{ label: 'Select to End of Word', command: 'editor:select-to-end-of-word' }
{ label: 'Select to End of Line', command: 'editor:select-to-end-of-line' }
]
}
{
label: 'Movement'
submenu: [
{ label: 'Move to Top', command: 'core:move-to-top' }
{ label: 'Move to Bottom', command: 'core:move-to-bottom' }
{ type: 'separator' }
{ label: 'Move to Beginning of Line', command: 'editor:move-to-beginning-of-line' }
{ label: 'Move to First Character of Line', command: 'editor:move-to-first-character-of-line' }
{ label: 'Move to End of Line', command: 'editor:move-to-end-of-line' }
{ type: 'separator' }
{ label: 'Move to Beginning of Word', command: 'editor:move-to-beginning-of-word' }
{ label: 'Move to End of Word', command: 'editor:move-to-end-of-word' }
{ label: 'Move to Next Word', command: 'editor:move-to-next-word-boundary' }
{ label: 'Move to Previous Word', command: 'editor:move-to-previous-word-boundary' }
]
}
{
label: 'Find'
submenu: []
}
{
label: 'View'
submenu: [
{ label: 'Reload', command: 'window:reload' }
{ label: 'Toggle Full Screen', command: 'window:toggle-full-screen' }
{
label: 'Developer'
submenu: [
{ label: 'Open In Dev Mode...', command: 'application:open-dev' }
{ label: 'Run Atom Specs', command: 'application:run-all-specs' }
{ label: 'Run Package Specs', command: 'window:run-package-specs' }
{ label: 'Toggle Developer Tools', command: 'window:toggle-dev-tools' }
]
}
{ type: 'separator' }
{ label: 'Toggle Soft Wrap', command: 'editor:toggle-soft-wrap' }
]
}
{
label: 'Collaboration'
submenu: []
}
{
label: 'Packages'
submenu: []
}
{
label: 'Window'
submenu: [
{ label: 'Minimize', command: 'application:minimize' }
{ label: 'Zoom', command: 'application:zoom' }
{ type: 'separator' }
{ label: 'Bring All to Front', command: 'application:bring-all-windows-to-front' }
]
}
{
label: 'Help'
submenu: [
{ label: 'Documentation', command: 'application:open-documentation' }
{ label: 'Report an Issue', command: 'application:report-issue' }
{ type: 'separator' }
]
}
]
+128 -69
Ver Arquivo
@@ -1,92 +1,151 @@
{
"name": "atom",
"version": "0.0.0",
"main": "./src/main.js",
"version": "33.0.0",
"main": "./src/browser/main.js",
"repository": {
"type": "git",
"url": "https://github.com/github/atom.git"
"url": "https://github.com/atom/atom.git"
},
"bugs": {
"url": "https://github.com/atom/atom/issues"
},
"atomShellVersion": "0.6.6",
"dependencies": {
"coffee-script": "1.6.2",
"ctags": "0.5.0",
"oniguruma": "0.16.0",
"mkdirp": "0.3.5",
"git-utils": "0.19.0",
"underscore": "1.4.4",
"d3": "3.0.8",
"coffee-cache": "0.1.0",
"pegjs": "0.7.0",
"async": "0.2.6",
"nak": "0.2.16",
"spellchecker": "0.6.0",
"pathwatcher": "0.5.0",
"keytar": "0.9.0",
"ls-archive": "0.9.0",
"temp": "0.5.0",
"rimraf": "2.1.4",
"plist": "git://github.com/nathansobo/node-plist.git",
"space-pen": "1.2.0",
"less": "git://github.com/nathansobo/less.js.git",
"roaster": "0.0.7",
"jqueryui-browser": "1.10.2-1",
"optimist": "0.4.0",
"season": "0.10.0",
"humanize-plus": "1.1.0",
"semver": "1.1.4",
"bootstrap": "git://github.com/twbs/bootstrap.git#v3.0.0",
"clear-cut": "0.1.0",
"coffee-script": "1.6.3",
"coffeestack": "0.6.0",
"emissary": "0.9.0",
"first-mate": "0.5.0",
"fuzzaldrin": "0.1.0",
"git-utils": "0.28.0",
"guid": "0.0.10",
"tantamount": "0.3.0",
"jasmine-focused": "~0.15.0",
"mkdirp": "0.3.5",
"less-cache": "0.9.0",
"nslog": "0.1.0",
"coffeestack": "0.4.0",
"first-mate": "0.1.0",
"c-tmbundle": "1.0.0",
"coffee-script-tmbundle": "4.0.0",
"css-tmbundle": "1.0.0",
"git-tmbundle": "1.0.0",
"go-tmbundle": "1.0.0",
"html-tmbundle": "1.0.0",
"hyperlink-helper-tmbundle": "1.0.0",
"java-tmbundle": "1.0.0",
"javascript-tmbundle": "1.0.0",
"json-tmbundle": "1.0.0",
"less-tmbundle": "1.0.0",
"make-tmbundle": "1.0.0",
"mustache-tmbundle": "1.0.0",
"objective-c-tmbundle": "1.0.0",
"pegjs-tmbundle": "1.0.0",
"perl-tmbundle": "1.0.0",
"php-tmbundle": "1.0.0",
"property-list-tmbundle": "1.0.0",
"puppet-textmate-tmbundle": "1.0.0",
"python-tmbundle": "1.0.0",
"ruby-on-rails-tmbundle": "1.0.0",
"ruby-tmbundle": "1.0.0",
"sass-tmbundle": "1.0.0",
"shellscript-tmbundle": "1.0.0",
"source-tmbundle": "1.0.0",
"sql-tmbundle": "1.0.0",
"text-tmbundle": "1.0.0",
"textmate-clojure": "1.0.0",
"todo-tmbundle": "1.0.0",
"xml-tmbundle": "1.0.0",
"yaml-tmbundle": "1.0.0",
"terminal": "0.3.0"
"oniguruma": "0.22.0",
"optimist": "0.4.0",
"pathwatcher": "0.8.0",
"pegjs": "0.7.0",
"plist": "git://github.com/nathansobo/node-plist.git",
"q": "0.9.7",
"rimraf": "2.1.4",
"scandal": "0.6.0",
"season": "0.14.0",
"semver": "1.1.4",
"space-pen": "2.0.0",
"telepath": "0.8.1",
"temp": "0.5.0",
"underscore-plus": "0.2.0"
},
"devDependencies": {
"biscotto": "0.0.12",
"biscotto": "0.0.17",
"formidable": "~1.0.14",
"fstream": "0.1.24",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-coffeelint": "0.0.6",
"grunt-lesslint": "0.8.0",
"grunt-lesslint": "0.13.0",
"grunt-cson": "0.5.0",
"grunt-contrib-csslint": "~0.1.2",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-less": "~0.6.4",
"jasmine-focused": "~0.7.0",
"grunt-contrib-less": "~0.8.0",
"walkdir": "0.0.7",
"js-yaml": "~2.1.0"
"ws": "0.4.27",
"js-yaml": "~2.1.0",
"grunt-markdown": "~0.4.0",
"json-front-matter": "~0.1.3",
"grunt-shell": "~0.3.1",
"jasmine-node": "git://github.com/kevinsawicki/jasmine-node.git#short-stacks",
"request": "~2.27.0"
},
"packageDependencies" : {
"atom-light-ui": "0.5.0",
"atom-light-syntax": "0.5.0",
"atom-dark-ui": "0.5.0",
"atom-dark-syntax": "0.5.0",
"base16-tomorrow-dark-theme": "0.2.0",
"solarized-dark-syntax": "0.3.0",
"archive-view": "0.11.0",
"autocomplete": "0.11.0",
"autoflow": "0.5.0",
"autosave": "0.3.0",
"bookmarks": "0.8.0",
"bracket-matcher": "0.7.0",
"collaboration": "0.34.0",
"command-logger": "0.6.0",
"command-palette": "0.6.0",
"dev-live-reload": "0.12.0",
"editor-stats": "0.5.0",
"exception-reporting": "0.5.0",
"find-and-replace": "0.32.0",
"fuzzy-finder": "0.15.0",
"gfm": "0.5.0",
"gists": "0.6.0",
"git-diff": "0.12.0",
"github-sign-in": "0.9.0",
"go-to-line": "0.8.0",
"grammar-selector": "0.8.0",
"image-view": "0.7.0",
"link": "0.7.0",
"markdown-preview": "0.12.0",
"metrics": "0.8.0",
"package-generator": "0.14.0",
"release-notes": "0.11.0",
"settings-view": "0.34.0",
"snippets": "0.11.0",
"spell-check": "0.9.0",
"status-bar": "0.15.0",
"styleguide": "0.9.0",
"symbols-view": "0.15.0",
"tabs": "0.7.0",
"terminal": "0.14.0",
"timecop": "0.9.0",
"to-the-hubs": "0.8.0",
"toml": "0.3.0",
"tree-view": "0.22.0",
"visual-bell": "0.3.0",
"whitespace": "0.7.0",
"wrap-guide": "0.4.0",
"language-c": "0.2.0",
"language-clojure": "0.1.0",
"language-coffee-script": "0.1.0",
"language-css": "0.2.0",
"language-git": "0.2.0",
"language-go": "0.2.0",
"language-html": "0.2.0",
"language-hyperlink": "0.3.0",
"language-java": "0.2.0",
"language-javascript": "0.3.0",
"language-json": "0.2.0",
"language-less": "0.1.0",
"language-make": "0.1.0",
"language-mustache": "0.1.0",
"language-objective-c": "0.2.0",
"language-pegjs": "0.1.0",
"language-perl": "0.2.0",
"language-php": "0.2.0",
"language-property-list": "0.2.0",
"language-puppet": "0.2.0",
"language-python": "0.2.0",
"language-ruby": "0.4.0",
"language-ruby-on-rails": "0.3.0",
"language-sass": "0.3.0",
"language-shellscript": "0.2.0",
"language-source": "0.2.0",
"language-sql": "0.2.0",
"language-text": "0.2.0",
"language-todo": "0.2.0",
"language-xml": "0.2.0",
"language-yaml": "0.1.0"
},
"private": true,
"scripts": {
"preinstall": "true"
"preinstall": "node -e 'process.exit(0)'",
"test": "node script/test"
}
}
+26 -16
Ver Arquivo
@@ -1,21 +1,31 @@
#!/bin/sh
#!/usr/bin/env node
var safeExec = require('./utils/child-process-wrapper.js').safeExec;
var path = require('path');
# exit on subprocess errors
set -o errexit
exit_unless_npm_exists() {
if ! hash npm 2> /dev/null; then
echo "ERROR: Atom requires npm"
exit 1
fi
// Executes an array of commands one by one.
function executeCommands(commands, done, index) {
index = (index == undefined ? 0 : index);
if (index < commands.length)
safeExec(commands[index], executeCommands.bind(this, commands, done, index + 1));
else
done(null);
}
exit_unless_npm_exists
// Join multiple commands into one line.
function joinCommands() {
var commandSeparator = process.platform == 'win32' ? '&' : ';';
return Array.prototype.slice.call(arguments, 0).join(commandSeparator);
}
git submodule --quiet sync
git submodule --quiet update --recursive --init
var echoNewLine = process.platform == 'win32' ? 'echo.' : 'echo';
var commands = [
'git submodule --quiet sync',
'git submodule --quiet update --recursive --init',
joinCommands('cd vendor/apm', 'npm install --silent .'),
'npm install --silent vendor/apm',
echoNewLine,
'node node_modules/.bin/apm install --silent'
];
(cd vendor/apm && npm install .)
npm install --silent vendor/apm
./node_modules/.bin/apm install --silent
process.chdir(path.dirname(__dirname));
executeCommands(commands, process.exit);
+6
Ver Arquivo
@@ -0,0 +1,6 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\bootstrap" %*
) ELSE (
node "%~dp0\bootstrap" %*
)
+10 -6
Ver Arquivo
@@ -1,8 +1,12 @@
#!/bin/sh
#!/usr/bin/env node
var cp = require('./utils/child-process-wrapper.js');
var path = require('path');
set -e
process.chdir(path.dirname(__dirname));
cd "$(dirname "$0")/.."
./script/bootstrap
./node_modules/.bin/grunt "$@"
cp.safeExec('node script/bootstrap', function() {
// ./node_modules/.bin/grunt "$@"
var gruntPath = path.join('node_modules', '.bin', 'grunt');
var args = [gruntPath].concat(process.argv.slice(2));
cp.safeSpawn(process.execPath, args, process.exit);
});
+36 -7
Ver Arquivo
@@ -1,11 +1,40 @@
#!/bin/sh
#!/usr/bin/env node
var cp = require('./utils/child-process-wrapper.js');
var fs = require('fs');
var path = require('path');
set -e
process.chdir(path.dirname(__dirname));
cd "$(dirname "$0")/.."
if (process.platform != 'darwin')
throw new Error('cibuild can not run on ' + process.platform + ' yet!');
rm -rf ~/.atom
git clean -dff
var homeDir = process.platform == 'win32' ? process.env.USERPROFILE : process.env.HOME;
rm -fr node_modules
./script/test
function readEnvironmentVariables() {
var credentialsPath = '/var/lib/jenkins/config/atomcredentials';
try {
var credentials = fs.readFileSync(credentialsPath, 'utf8');
var lines = credentials.trim().split('\n');
for (i in lines) {
var parts = lines[i].split('=');
var key = parts[0].trim();
var value = parts[1].trim().substr(1, parts[1].length - 2);
process.env[key] = value;
}
} catch(error) { }
}
readEnvironmentVariables();
cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
if (error)
process.exit(1);
var async = require('async');
async.series([
require('rimraf').bind(global, path.join(homeDir, '.atom')),
cp.safeExec.bind(global, 'git clean -dff'),
cp.safeExec.bind(global, 'node node_modules/.bin/apm clean'),
cp.safeExec.bind(global, 'node node_modules/.bin/grunt ci --stack --no-color'),
], function(error) {
process.exit(error ? 1 : 0);
});
})();
+1 -1
Ver Arquivo
@@ -8,7 +8,7 @@ set -ex
cd "$(dirname "$0")/../.."
rm -fr node_modules
./script/bootstrap
./node_modules/.bin/grunt --build-dir="$BUILT_PRODUCTS_DIR" deploy
./node_modules/.bin/grunt --no-color --build-dir="$BUILT_PRODUCTS_DIR" deploy
echo "TARGET_BUILD_DIR=$BUILT_PRODUCTS_DIR"
echo "FULL_PRODUCT_NAME=Atom.app"
+7 -6
Ver Arquivo
@@ -1,8 +1,9 @@
#!/bin/sh
#!/usr/bin/env node
var safeExec = require('./utils/child-process-wrapper.js').safeExec;
var path = require('path');
set -e
process.chdir(path.dirname(__dirname));
cd "$(dirname "$0")/.."
./script/bootstrap
./node_modules/.bin/grunt ci --stack --no-color
safeExec('node script/bootstrap', function() {
safeExec('node node_modules/.bin/grunt ci --stack --no-color', process.exit);
});
-30
Ver Arquivo
@@ -1,30 +0,0 @@
#!/bin/bash
cd "$(dirname "${BASH_SOURCE[0]}" )/.."
TARGET=${1:-atom-shell}
DISTURL="https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell"
CURRENT_VERSION=$(cat "${TARGET}/version" 2>&1)
LATEST_VERSION=ea1f81aa5260fe2d4a844f18e0251278fbadc093 # v0.2.1
if [ -z "${LATEST_VERSION}" ] ; then
echo "Could determine lastest version of atom-shell" >&2
exit 1
fi
TEMP_DIR=/tmp/atom-cached-atom-shells/${LATEST_VERSION}
if [[ ${LATEST_VERSION} != ${CURRENT_VERSION} ]]; then
if [ -d $TEMP_DIR ]; then
echo "Using cached version of atom-shell ${LATEST_VERSION} from ${TEMP_DIR}"
else
echo "Downloading/extracting atom-shell ${LATEST_VERSION}..."
mkdir -p $TEMP_DIR
curl "${DISTURL}/${LATEST_VERSION}/atom-shell.zip" > "${TEMP_DIR}/atom-shell.zip"
unzip -q "${TEMP_DIR}/atom-shell.zip" -d "${TEMP_DIR}"
rm "${TEMP_DIR}/atom-shell.zip"
fi
[ -e "${TARGET}" ] && rm -rf "${TARGET}"
cp -R "${TEMP_DIR}" "${TARGET}"
echo ${LATEST_VERSION} > "${TARGET}/version"
fi
+35
Ver Arquivo
@@ -0,0 +1,35 @@
var childProcess = require('child_process');
// Exit the process if the command failed and only call the callback if the
// command succeed, output of the command would also be piped.
exports.safeExec = function(command, options, callback) {
if (!callback) {
callback = options;
options = {};
}
var child = childProcess.exec(command, options, function(error, stdout, stderr) {
if (error)
process.exit(error.code);
else
callback(null);
});
child.stderr.pipe(process.stderr);
child.stdout.pipe(process.stdout);
}
// Same with safeExec but call child_process.spawn instead.
exports.safeSpawn = function(command, args, options, callback) {
if (!callback) {
callback = options;
options = {};
}
var child = childProcess.spawn(command, args, options);
child.stderr.pipe(process.stderr);
child.stdout.pipe(process.stdout);
child.on('exit', function(code) {
if (code != 0)
process.exit(code);
else
callback(null);
});
}
+3
Ver Arquivo
@@ -0,0 +1,3 @@
#!/bin/sh
coffee -c -o /Applications/Atom.app/Contents/Resources/app/src/ src/main.coffee
@@ -1,26 +0,0 @@
{createSite} = require 'telepath'
Editor = require 'editor'
describe "EditSession replication", ->
[editSession1, editSession2] = []
beforeEach ->
editSession1 = project.open('sample.js')
doc1 = editSession1.getState()
doc2 = doc1.clone(createSite(2))
doc1.connect(doc2)
editSession2 = deserialize(doc2)
it "replicates the scroll position", ->
editor1 = new Editor(editSession1)
editor2 = new Editor(editSession2)
editor1.attachToDom().width(50).height(50)
editor2.attachToDom().width(50).height(50)
editor1.scrollTop(10)
expect(editor1.scrollTop()).toBe 10
expect(editor2.scrollTop()).toBe 10
editor2.scrollLeft(20)
expect(editor2.scrollLeft()).toBe 20
expect(editor1.scrollLeft()).toBe 20
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-208
Ver Arquivo
@@ -1,208 +0,0 @@
_ = require 'underscore'
EventEmitter = require 'event-emitter'
describe "EventEmitter mixin", ->
[object, fooHandler1, fooHandler2, barHandler] = []
beforeEach ->
object = {}
_.extend(object, EventEmitter)
fooHandler1 = jasmine.createSpy('fooHandler1')
fooHandler2 = jasmine.createSpy('fooHandler2')
barHandler = jasmine.createSpy('barHandler')
object.on 'foo', fooHandler1
object.on 'foo', fooHandler2
object.on 'bar', barHandler
describe ".on", ->
describe "when called with multiple space-separated event names", ->
it "subscribes to each event names", ->
object.on ' a.b c.d\te ', fooHandler1
object.trigger 'a'
expect(fooHandler1).toHaveBeenCalled()
fooHandler1.reset()
object.trigger 'c'
expect(fooHandler1).toHaveBeenCalled()
fooHandler1.reset()
object.trigger 'e'
expect(fooHandler1).toHaveBeenCalled()
fooHandler1.reset()
object.trigger ''
expect(fooHandler1).not.toHaveBeenCalled()
describe ".trigger", ->
describe "when called with a non-namespaced event name", ->
it "triggers all handlers registered for the given event name", ->
object.trigger 'foo', 'data'
expect(fooHandler1).toHaveBeenCalledWith('data')
expect(fooHandler2).toHaveBeenCalledWith('data')
expect(barHandler).not.toHaveBeenCalled()
fooHandler1.reset()
fooHandler2.reset()
object.trigger 'bar', 'stuff'
expect(barHandler).toHaveBeenCalledWith('stuff')
describe "when there are namespaced handlers", ->
it "triggers only handlers registered with the given namespace / event combination", ->
barHandler2 = jasmine.createSpy('barHandler2')
object.on('bar.ns1', barHandler2)
object.trigger('bar')
expect(barHandler).toHaveBeenCalled()
expect(barHandler2).toHaveBeenCalled()
barHandler.reset()
barHandler2.reset()
object.trigger('bar.ns1')
expect(barHandler).not.toHaveBeenCalled()
expect(barHandler2).toHaveBeenCalled()
it "does not raise exceptions when called with non-existent events / namespaces", ->
object.trigger('junk')
object.trigger('junk.garbage')
describe ".off", ->
describe "when called with no arguments", ->
it "removes all subscriptions", ->
object.off()
object.trigger 'foo'
expect(fooHandler1).not.toHaveBeenCalled()
expect(fooHandler2).not.toHaveBeenCalled()
describe "when called with multiple space-separated event names", ->
it "unsubscribes from each event name", ->
object.on 'a.b c.d e', fooHandler1
object.off ' a.b\te '
object.trigger 'a'
expect(fooHandler1).not.toHaveBeenCalled()
fooHandler1.reset()
object.trigger 'e'
expect(fooHandler1).not.toHaveBeenCalled()
fooHandler1.reset()
object.trigger 'c.d'
expect(fooHandler1).toHaveBeenCalled()
describe "when called with a non-namespaced event name", ->
it "removes all handlers for that event name", ->
object.off 'foo'
object.trigger 'foo'
expect(fooHandler1).not.toHaveBeenCalled()
expect(fooHandler2).not.toHaveBeenCalled()
describe "when called with a non-namespaced event name and a handler function", ->
it "removes the specific handler", ->
object.off 'foo', fooHandler1
object.trigger 'foo'
expect(fooHandler1).not.toHaveBeenCalled()
expect(fooHandler2).toHaveBeenCalled()
it "does not throw an exception if there was not matching `on` call", ->
expect(-> object.off 'marco', -> "nothing").not.toThrow()
describe "when there are namespaced event handlers", ->
[barHandler2, bazHandler1, bazHandler2, bazHandler3] = []
beforeEach ->
barHandler2 = jasmine.createSpy('barHandler2')
bazHandler1 = jasmine.createSpy('bazHandler1')
bazHandler2 = jasmine.createSpy('bazHandler2')
bazHandler3 = jasmine.createSpy('bazHandler3')
object.on 'bar.ns1', barHandler2
object.on 'baz.ns1', bazHandler1
object.on 'baz.ns1', bazHandler2
object.on 'baz.ns2', bazHandler3
describe "when called with a namespaced event name", ->
it "removes all handlers in that namespace", ->
object.trigger 'baz'
expect(bazHandler1).toHaveBeenCalled()
expect(bazHandler2).toHaveBeenCalled()
expect(bazHandler3).toHaveBeenCalled()
bazHandler1.reset()
bazHandler2.reset()
bazHandler3.reset()
object.off 'baz.ns1'
object.trigger 'baz'
object.trigger 'baz.ns1'
expect(bazHandler1).not.toHaveBeenCalled()
expect(bazHandler2).not.toHaveBeenCalled()
expect(bazHandler3).toHaveBeenCalled()
describe "when called with just a namespace", ->
it "removes all handlers for all events on that namespace", ->
object.trigger 'bar'
expect(barHandler).toHaveBeenCalled()
expect(barHandler2).toHaveBeenCalled()
barHandler.reset()
barHandler2.reset()
object.trigger 'baz'
expect(bazHandler1).toHaveBeenCalled()
expect(bazHandler2).toHaveBeenCalled()
expect(bazHandler3).toHaveBeenCalled()
bazHandler1.reset()
bazHandler2.reset()
bazHandler3.reset()
object.off '.ns1'
object.trigger 'bar'
object.trigger 'bar.ns1'
expect(barHandler).toHaveBeenCalled()
expect(barHandler2).not.toHaveBeenCalled()
object.trigger 'baz'
object.trigger 'baz.ns1'
expect(bazHandler1).not.toHaveBeenCalled()
expect(bazHandler2).not.toHaveBeenCalled()
expect(bazHandler3).toHaveBeenCalled()
describe "when called with event names and namespaces that don't exist", ->
it "does not raise an exception", ->
object.off 'junk'
object.off '.garbage'
object.off 'junk.garbage'
describe ".one(event, callback)", ->
it "triggers the given callback once, then removes the subscription", ->
oneHandler = jasmine.createSpy('oneHandler')
object.one 'event', oneHandler
object.trigger('event')
expect(oneHandler).toHaveBeenCalled()
oneHandler.reset()
object.trigger('event')
expect(oneHandler).not.toHaveBeenCalled()
describe ".subscriptionCount()", ->
it "returns the total number of subscriptions on the object", ->
expect(object.subscriptionCount()).toBe 3
object.on 'baz', ->
expect(object.subscriptionCount()).toBe 4
object.off 'foo'
expect(object.subscriptionCount()).toBe 2
-121
Ver Arquivo
@@ -1,121 +0,0 @@
File = require 'file'
fsUtils = require 'fs-utils'
path = require 'path'
describe 'File', ->
[filePath, file] = []
beforeEach ->
filePath = path.join(fsUtils.resolveOnLoadPath('fixtures'), "atom-file-test.txt") # Don't put in /tmp because /tmp symlinks to /private/tmp and screws up the rename test
fsUtils.remove(filePath) if fsUtils.exists(filePath)
fsUtils.writeSync(filePath, "this is old!")
file = new File(filePath)
file.read()
afterEach ->
file.off()
fsUtils.remove(filePath) if fsUtils.exists(filePath)
describe "when the contents of the file change", ->
it "triggers 'contents-changed' event handlers", ->
changeHandler = null
changeHandler = jasmine.createSpy('changeHandler')
file.on 'contents-changed', changeHandler
fsUtils.writeSync(file.getPath(), "this is new!")
waitsFor "change event", ->
changeHandler.callCount > 0
runs ->
changeHandler.reset()
fsUtils.writeSync(file.getPath(), "this is newer!")
waitsFor "second change event", ->
changeHandler.callCount > 0
describe "when the file is removed", ->
it "triggers 'remove' event handlers", ->
removeHandler = null
removeHandler = jasmine.createSpy('removeHandler')
file.on 'removed', removeHandler
fsUtils.remove(file.getPath())
waitsFor "remove event", ->
removeHandler.callCount > 0
describe "when a file is moved (via the filesystem)", ->
newPath = null
beforeEach ->
newPath = path.join(path.dirname(filePath), "atom-file-was-moved-test.txt")
afterEach ->
if fsUtils.exists(newPath)
fsUtils.remove(newPath)
waitsFor "remove event", (done) -> file.on 'removed', done
it "it updates its path", ->
jasmine.unspy(window, "setTimeout")
moveHandler = null
moveHandler = jasmine.createSpy('moveHandler')
file.on 'moved', moveHandler
fsUtils.move(filePath, newPath)
waitsFor "move event", ->
moveHandler.callCount > 0
runs ->
expect(file.getPath()).toBe newPath
it "maintains 'contents-changed' events set on previous path", ->
jasmine.unspy(window, "setTimeout")
moveHandler = null
moveHandler = jasmine.createSpy('moveHandler')
file.on 'moved', moveHandler
changeHandler = null
changeHandler = jasmine.createSpy('changeHandler')
file.on 'contents-changed', changeHandler
fsUtils.move(filePath, newPath)
waitsFor "move event", ->
moveHandler.callCount > 0
runs ->
expect(changeHandler).not.toHaveBeenCalled()
fsUtils.writeSync(file.getPath(), "this is new!")
waitsFor "change event", ->
changeHandler.callCount > 0
describe "when a file is deleted and the recreated within a small amount of time (git sometimes does this)", ->
it "triggers a contents change event if the contents change", ->
jasmine.unspy(File.prototype, 'detectResurrectionAfterDelay')
jasmine.unspy(window, "setTimeout")
changeHandler = jasmine.createSpy("file changed")
removeHandler = jasmine.createSpy("file removed")
file.on 'contents-changed', changeHandler
file.on 'removed', removeHandler
expect(changeHandler).not.toHaveBeenCalled()
fsUtils.remove(filePath)
expect(changeHandler).not.toHaveBeenCalled()
waits 20
runs ->
fsUtils.writeSync(filePath, "HE HAS RISEN!")
expect(changeHandler).not.toHaveBeenCalled()
waitsFor "resurrection change event", ->
changeHandler.callCount == 1
runs ->
expect(removeHandler).not.toHaveBeenCalled()
fsUtils.writeSync(filePath, "Hallelujah!")
changeHandler.reset()
waitsFor "post-resurrection change event", ->
changeHandler.callCount > 0
-206
Ver Arquivo
@@ -1,206 +0,0 @@
Git = require 'git'
fsUtils = require 'fs-utils'
path = require 'path'
Task = require 'task'
describe "Git", ->
repo = null
beforeEach ->
fsUtils.remove('/tmp/.git') if fsUtils.isDirectorySync('/tmp/.git')
afterEach ->
repo.destroy() if repo?.repo?
describe "@open(path)", ->
it "returns null when no repository is found", ->
expect(Git.open('/tmp/nogit.txt')).toBeNull()
describe "new Git(path)", ->
it "throws an exception when no repository is found", ->
expect(-> new Git('/tmp/nogit.txt')).toThrow()
describe ".getPath()", ->
it "returns the repository path for a .git directory path", ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/master.git/HEAD'))
expect(repo.getPath()).toBe fsUtils.resolveOnLoadPath('fixtures/git/master.git')
it "returns the repository path for a repository path", ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/master.git'))
expect(repo.getPath()).toBe fsUtils.resolveOnLoadPath('fixtures/git/master.git')
describe ".isPathIgnored(path)", ->
it "returns true for an ignored path", ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/ignore.git'))
expect(repo.isPathIgnored('a.txt')).toBeTruthy()
it "returns false for a non-ignored path", ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/ignore.git'))
expect(repo.isPathIgnored('b.txt')).toBeFalsy()
describe ".isPathModified(path)", ->
[repo, filePath, newPath, originalPathText] = []
beforeEach ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'))
filePath = fsUtils.resolveOnLoadPath('fixtures/git/working-dir/file.txt')
newPath = path.join(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'), 'new-path.txt')
originalPathText = fsUtils.read(filePath)
afterEach ->
fsUtils.writeSync(filePath, originalPathText)
fsUtils.remove(newPath) if fsUtils.exists(newPath)
describe "when the path is unstaged", ->
it "returns false if the path has not been modified", ->
expect(repo.isPathModified(filePath)).toBeFalsy()
it "returns true if the path is modified", ->
fsUtils.writeSync(filePath, "change")
expect(repo.isPathModified(filePath)).toBeTruthy()
it "returns true if the path is deleted", ->
fsUtils.remove(filePath)
expect(repo.isPathModified(filePath)).toBeTruthy()
it "returns false if the path is new", ->
expect(repo.isPathModified(newPath)).toBeFalsy()
describe ".isPathNew(path)", ->
[filePath, newPath] = []
beforeEach ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'))
filePath = fsUtils.resolveOnLoadPath('fixtures/git/working-dir/file.txt')
newPath = path.join(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'), 'new-path.txt')
fsUtils.writeSync(newPath, "i'm new here")
afterEach ->
fsUtils.remove(newPath) if fsUtils.exists(newPath)
describe "when the path is unstaged", ->
it "returns true if the path is new", ->
expect(repo.isPathNew(newPath)).toBeTruthy()
it "returns false if the path isn't new", ->
expect(repo.isPathNew(filePath)).toBeFalsy()
describe ".checkoutHead(path)", ->
[path1, path2, originalPath1Text, originalPath2Text] = []
beforeEach ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'))
path1 = fsUtils.resolveOnLoadPath('fixtures/git/working-dir/file.txt')
originalPath1Text = fsUtils.read(path1)
path2 = fsUtils.resolveOnLoadPath('fixtures/git/working-dir/other.txt')
originalPath2Text = fsUtils.read(path2)
afterEach ->
fsUtils.writeSync(path1, originalPath1Text)
fsUtils.writeSync(path2, originalPath2Text)
it "no longer reports a path as modified after checkout", ->
expect(repo.isPathModified(path1)).toBeFalsy()
fsUtils.writeSync(path1, '')
expect(repo.isPathModified(path1)).toBeTruthy()
expect(repo.checkoutHead(path1)).toBeTruthy()
expect(repo.isPathModified(path1)).toBeFalsy()
it "restores the contents of the path to the original text", ->
fsUtils.writeSync(path1, '')
expect(repo.checkoutHead(path1)).toBeTruthy()
expect(fsUtils.read(path1)).toBe(originalPath1Text)
it "only restores the path specified", ->
fsUtils.writeSync(path2, 'path 2 is edited')
expect(repo.isPathModified(path2)).toBeTruthy()
expect(repo.checkoutHead(path1)).toBeTruthy()
expect(fsUtils.read(path2)).toBe('path 2 is edited')
expect(repo.isPathModified(path2)).toBeTruthy()
it "fires a status-changed event if the checkout completes successfully", ->
fsUtils.writeSync(path1, '')
repo.getPathStatus(path1)
statusHandler = jasmine.createSpy('statusHandler')
repo.on 'status-changed', statusHandler
repo.checkoutHead(path1)
expect(statusHandler.callCount).toBe 1
expect(statusHandler.argsForCall[0][0..1]).toEqual [path1, 0]
repo.checkoutHead(path1)
expect(statusHandler.callCount).toBe 1
describe ".destroy()", ->
it "throws an exception when any method is called after it is called", ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/master.git/HEAD'))
repo.destroy()
expect(-> repo.getShortHead()).toThrow()
describe ".getDiffStats(path)", ->
[filePath, originalPathText] = []
beforeEach ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'))
filePath = fsUtils.resolveOnLoadPath('fixtures/git/working-dir/file.txt')
originalPathText = fsUtils.read(filePath)
afterEach ->
fsUtils.writeSync(filePath, originalPathText)
it "returns the number of lines added and deleted", ->
expect(repo.getDiffStats(filePath)).toEqual {added: 0, deleted: 0}
fsUtils.writeSync(filePath, "#{originalPathText} edited line")
expect(repo.getDiffStats(filePath)).toEqual {added: 1, deleted: 1}
describe ".getPathStatus(path)", ->
[filePath, originalPathText] = []
beforeEach ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'))
filePath = fsUtils.resolveOnLoadPath('fixtures/git/working-dir/file.txt')
originalPathText = fsUtils.read(filePath)
afterEach ->
fsUtils.writeSync(filePath, originalPathText)
it "trigger a status-changed event when the new status differs from the last cached one", ->
statusHandler = jasmine.createSpy("statusHandler")
repo.on 'status-changed', statusHandler
fsUtils.writeSync(filePath, '')
status = repo.getPathStatus(filePath)
expect(statusHandler.callCount).toBe 1
expect(statusHandler.argsForCall[0][0..1]).toEqual [filePath, status]
fsUtils.writeSync(filePath, 'abc')
status = repo.getPathStatus(filePath)
expect(statusHandler.callCount).toBe 1
describe ".refreshStatus()", ->
[newPath, modifiedPath, cleanPath, originalModifiedPathText] = []
beforeEach ->
repo = new Git(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'))
modifiedPath = project.resolve('git/working-dir/file.txt')
originalModifiedPathText = fsUtils.read(modifiedPath)
newPath = project.resolve('git/working-dir/untracked.txt')
cleanPath = project.resolve('git/working-dir/other.txt')
fsUtils.writeSync(newPath, '')
afterEach ->
fsUtils.writeSync(modifiedPath, originalModifiedPathText)
fsUtils.remove(newPath) if fsUtils.exists(newPath)
it "returns status information for all new and modified files", ->
fsUtils.writeSync(modifiedPath, 'making this path modified')
statusHandler = jasmine.createSpy('statusHandler')
repo.on 'statuses-changed', statusHandler
repo.refreshStatus()
waitsFor ->
statusHandler.callCount > 0
runs ->
statuses = repo.statuses
expect(statuses[cleanPath]).toBeUndefined()
expect(repo.isStatusNew(statuses[newPath])).toBeTruthy()
expect(repo.isStatusModified(statuses[modifiedPath])).toBeTruthy()
-33
Ver Arquivo
@@ -1,33 +0,0 @@
Point = require 'point'
describe "Point", ->
describe ".isEqual(value)", ->
describe "when given value is a Point", ->
it "returns true when the rows and columns match", ->
expect(new Point(1,2)).toEqual new Point(1,2)
expect(new Point(2,1)).not.toEqual new Point(1,2)
describe "when given value is an Array", ->
it "returns true only when index zero matches row and index one matches column", ->
expect(new Point(1,2)).toEqual [1,2]
expect(new Point(2,1)).not.toEqual [1,2]
describe "when one of the points has a row or column that is NaN", ->
it "returns false", ->
expect(new Point(1, 3)).not.toEqual new Point(NaN, 3)
expect(new Point(1, 3)).not.toEqual new Point(1, NaN)
describe "compare", ->
it "returns 1, 0, or -1 based on whether the given point precedes, equals, or follows the receivers location in the buffer", ->
expect(new Point(5, 0).compare(new Point(5, 0))).toBe 0
expect(new Point(5, 0).compare(new Point(6, 0))).toBe -1
expect(new Point(5, 0).compare(new Point(5, 1))).toBe -1
expect(new Point(5, 0).compare(new Point(6, 1))).toBe -1
expect(new Point(5, 5).compare(new Point(4, 1))).toBe 1
expect(new Point(5, 5).compare(new Point(5, 3))).toBe 1
describe ".translate(other)", ->
it "returns a translated point", ->
expect(new Point(1,2).translate([2,4])).toEqual [3,6]
expect(new Point(1,2).translate([-1])).toEqual [0,2]
expect(new Point(1,2).translate([0,-2])).toEqual [1,0]
-344
Ver Arquivo
@@ -1,344 +0,0 @@
Project = require 'project'
fsUtils = require 'fs-utils'
path = require 'path'
_ = require 'underscore'
BufferedProcess = require 'buffered-process'
describe "Project", ->
beforeEach ->
project.setPath(project.resolve('dir'))
describe "when an edit session is destroyed", ->
it "removes edit session and calls destroy on buffer (if buffer is not referenced by other edit sessions)", ->
editSession = project.open("a")
anotherEditSession = project.open("a")
expect(project.editSessions.length).toBe 2
expect(editSession.buffer).toBe anotherEditSession.buffer
editSession.destroy()
expect(project.editSessions.length).toBe 1
anotherEditSession.destroy()
expect(project.editSessions.length).toBe 0
describe "when an edit session is saved and the project has no path", ->
it "sets the project's path to the saved file's parent directory", ->
project.setPath(undefined)
expect(project.getPath()).toBeUndefined()
editSession = project.open()
editSession.saveAs('/tmp/atom-test-save-sets-project-path')
expect(project.getPath()).toBe '/tmp'
fsUtils.remove('/tmp/atom-test-save-sets-project-path')
describe "when an edit session is deserialized", ->
it "emits an 'edit-session-created' event and stores the edit session", ->
handler = jasmine.createSpy('editSessionCreatedHandler')
project.on 'edit-session-created', handler
editSession1 = project.open("a")
expect(handler.callCount).toBe 1
expect(project.getEditSessions().length).toBe 1
expect(project.getEditSessions()[0]).toBe editSession1
editSession2 = deserialize(editSession1.serialize())
expect(handler.callCount).toBe 2
expect(project.getEditSessions().length).toBe 2
expect(project.getEditSessions()[0]).toBe editSession1
expect(project.getEditSessions()[1]).toBe editSession2
describe ".open(path)", ->
[fooOpener, barOpener, absolutePath, newBufferHandler, newEditSessionHandler] = []
beforeEach ->
absolutePath = fsUtils.resolveOnLoadPath('fixtures/dir/a')
newBufferHandler = jasmine.createSpy('newBufferHandler')
project.on 'buffer-created', newBufferHandler
newEditSessionHandler = jasmine.createSpy('newEditSessionHandler')
project.on 'edit-session-created', newEditSessionHandler
fooOpener = (pathToOpen, options) -> { foo: pathToOpen, options } if pathToOpen?.match(/\.foo/)
barOpener = (pathToOpen) -> { bar: pathToOpen } if pathToOpen?.match(/^bar:\/\//)
Project.registerOpener(fooOpener)
Project.registerOpener(barOpener)
afterEach ->
Project.unregisterOpener(fooOpener)
Project.unregisterOpener(barOpener)
describe "when passed a path that doesn't match a custom opener", ->
describe "when given an absolute path that hasn't been opened previously", ->
it "returns a new edit session for the given path and emits 'buffer-created' and 'edit-session-created' events", ->
editSession = project.open(absolutePath)
expect(editSession.buffer.getPath()).toBe absolutePath
expect(newBufferHandler).toHaveBeenCalledWith editSession.buffer
expect(newEditSessionHandler).toHaveBeenCalledWith editSession
describe "when given a relative path that hasn't been opened previously", ->
it "returns a new edit session for the given path (relative to the project root) and emits 'buffer-created' and 'edit-session-created' events", ->
editSession = project.open('a')
expect(editSession.buffer.getPath()).toBe absolutePath
expect(newBufferHandler).toHaveBeenCalledWith editSession.buffer
expect(newEditSessionHandler).toHaveBeenCalledWith editSession
describe "when passed the path to a buffer that has already been opened", ->
it "returns a new edit session containing previously opened buffer and emits a 'edit-session-created' event", ->
editSession = project.open(absolutePath)
newBufferHandler.reset()
expect(project.open(absolutePath).buffer).toBe editSession.buffer
expect(project.open('a').buffer).toBe editSession.buffer
expect(newBufferHandler).not.toHaveBeenCalled()
expect(newEditSessionHandler).toHaveBeenCalledWith editSession
describe "when not passed a path", ->
it "returns a new edit session and emits 'buffer-created' and 'edit-session-created' events", ->
editSession = project.open()
expect(editSession.buffer.getPath()).toBeUndefined()
expect(newBufferHandler).toHaveBeenCalledWith(editSession.buffer)
expect(newEditSessionHandler).toHaveBeenCalledWith editSession
describe "when passed a path that matches a custom opener", ->
it "returns the resource returned by the custom opener", ->
expect(project.open("a.foo", hey: "there")).toEqual { foo: "a.foo", options: {hey: "there"} }
expect(project.open("bar://baz")).toEqual { bar: "bar://baz" }
describe ".bufferForPath(path)", ->
describe "when opening a previously opened path", ->
it "does not create a new buffer", ->
buffer = project.bufferForPath("a").retain()
expect(project.bufferForPath("a")).toBe buffer
alternativeBuffer = project.bufferForPath("b").retain().release()
expect(alternativeBuffer).not.toBe buffer
buffer.release()
it "creates a new buffer if the previous buffer was destroyed", ->
buffer = project.bufferForPath("a").retain().release()
expect(project.bufferForPath("a").retain().release()).not.toBe buffer
describe ".resolve(uri)", ->
describe "when passed an absolute or relative path", ->
it "returns an absolute path based on the project's root", ->
absolutePath = fsUtils.resolveOnLoadPath('fixtures/dir/a')
expect(project.resolve('a')).toBe absolutePath
expect(project.resolve(absolutePath + '/../a')).toBe absolutePath
expect(project.resolve('a/../a')).toBe absolutePath
describe "when passed a uri with a scheme", ->
it "does not modify uris that begin with a scheme", ->
expect(project.resolve('http://zombo.com')).toBe 'http://zombo.com'
describe ".setPath(path)", ->
describe "when path is a file", ->
it "sets its path to the files parent directory and updates the root directory", ->
project.setPath(fsUtils.resolveOnLoadPath('fixtures/dir/a'))
expect(project.getPath()).toEqual fsUtils.resolveOnLoadPath('fixtures/dir')
expect(project.getRootDirectory().path).toEqual fsUtils.resolveOnLoadPath('fixtures/dir')
describe "when path is a directory", ->
it "sets its path to the directory and updates the root directory", ->
project.setPath(fsUtils.resolveOnLoadPath('fixtures/dir/a-dir'))
expect(project.getPath()).toEqual fsUtils.resolveOnLoadPath('fixtures/dir/a-dir')
expect(project.getRootDirectory().path).toEqual fsUtils.resolveOnLoadPath('fixtures/dir/a-dir')
describe "when path is null", ->
it "sets its path and root directory to null", ->
project.setPath(null)
expect(project.getPath()?).toBeFalsy()
expect(project.getRootDirectory()?).toBeFalsy()
describe ".getFilePaths()", ->
it "returns file paths using a promise", ->
paths = null
waitsForPromise ->
project.getFilePaths().done (foundPaths) -> paths = foundPaths
runs ->
expect(paths.length).toBeGreaterThan 0
it "ignores files that return true from atom.ignorePath(path)", ->
spyOn(project, 'isPathIgnored').andCallFake (filePath) -> path.basename(filePath).match /a$/
paths = null
waitsForPromise ->
project.getFilePaths().done (foundPaths) -> paths = foundPaths
runs ->
expect(paths).not.toContain(project.resolve('a'))
expect(paths).toContain(project.resolve('b'))
describe "when config.core.hideGitIgnoredFiles is true", ->
it "ignores files that are present in .gitignore if the project is a git repo", ->
config.set "core.hideGitIgnoredFiles", true
project.setPath(fsUtils.resolveOnLoadPath('fixtures/git/working-dir'))
paths = null
waitsForPromise ->
project.getFilePaths().done (foundPaths) -> paths = foundPaths
runs ->
expect(paths).not.toContain('ignored.txt')
describe "ignored file name", ->
ignoredFile = null
beforeEach ->
ignoredFile = path.join(fsUtils.resolveOnLoadPath('fixtures/dir'), 'ignored.txt')
fsUtils.writeSync(ignoredFile, "")
afterEach ->
fsUtils.remove(ignoredFile)
it "ignores ignored.txt file", ->
paths = null
config.pushAtKeyPath("core.ignoredNames", "ignored.txt")
waitsForPromise ->
project.getFilePaths().done (foundPaths) -> paths = foundPaths
runs ->
expect(paths).not.toContain('ignored.txt')
describe "ignored folder name", ->
ignoredFile = null
beforeEach ->
ignoredFile = path.join(fsUtils.resolveOnLoadPath('fixtures/dir'), 'ignored/ignored.txt')
fsUtils.writeSync(ignoredFile, "")
afterEach ->
fsUtils.remove(ignoredFile)
it "ignores ignored folder", ->
paths = null
config.get("core.ignoredNames").push("ignored.txt")
config.set("core.ignoredNames", config.get("core.ignoredNames"))
waitsForPromise ->
project.getFilePaths().done (foundPaths) -> paths = foundPaths
runs ->
expect(paths).not.toContain('ignored/ignored.txt')
describe ".scan(options, callback)", ->
describe "when called with a regex", ->
it "calls the callback with all regex matches in all files in the project", ->
matches = []
waitsForPromise ->
project.scan /(a)+/, (match) -> matches.push(match)
runs ->
expect(matches[0]).toEqual
path: project.resolve('a')
match: 'aaa'
range: [[0, 0], [0, 3]]
expect(matches[1]).toEqual
path: project.resolve('a')
match: 'aa'
range: [[1, 3], [1, 5]]
it "works with with escaped literals (like $ and ^)", ->
matches = []
waitsForPromise ->
project.scan /\$\w+/, (match) -> matches.push(match)
runs ->
expect(matches.length).toBe 1
expect(matches[0]).toEqual
path: project.resolve('a')
match: '$bill'
range: [[2, 6], [2, 11]]
it "works on evil filenames", ->
project.setPath(fsUtils.resolveOnLoadPath('fixtures/evil-files'))
paths = []
matches = []
waitsForPromise ->
project.scan /evil/, (result) ->
paths.push(result.path)
matches.push(result.match)
runs ->
expect(paths.length).toBe 5
matches.forEach (match) -> expect(match).toEqual 'evil'
expect(paths[0]).toMatch /a_file_with_utf8.txt$/
expect(paths[1]).toMatch /file with spaces.txt$/
expect(paths[2]).toMatch /goddam\nnewlines$/m
expect(paths[3]).toMatch /quote".txt$/m
expect(path.basename(paths[4])).toBe "utfa\u0306.md"
it "handles breaks in the search subprocess's output following the filename", ->
spyOn(BufferedProcess.prototype, 'bufferStream')
iterator = jasmine.createSpy('iterator')
project.scan /a+/, iterator
stdout = BufferedProcess.prototype.bufferStream.argsForCall[0][1]
stdout ":#{fsUtils.resolveOnLoadPath('fixtures/dir/a')}\n"
stdout "1;0 3:aaa bbb\n2;3 2:cc aa cc\n"
expect(iterator.argsForCall[0][0]).toEqual
path: project.resolve('a')
match: 'aaa'
range: [[0, 0], [0, 3]]
expect(iterator.argsForCall[1][0]).toEqual
path: project.resolve('a')
match: 'aa'
range: [[1, 3], [1, 5]]
describe "when the core.excludeVcsIgnoredPaths config is truthy", ->
[projectPath, ignoredPath] = []
beforeEach ->
projectPath = fsUtils.resolveOnLoadPath('fixtures/git/working-dir')
ignoredPath = path.join(projectPath, 'ignored.txt')
fsUtils.writeSync(ignoredPath, 'this match should not be included')
afterEach ->
fsUtils.remove(ignoredPath) if fsUtils.exists(ignoredPath)
it "excludes ignored files", ->
project.setPath(projectPath)
config.set('core.excludeVcsIgnoredPaths', true)
paths = []
matches = []
waitsForPromise ->
project.scan /match/, (result) ->
paths.push(result.path)
matches.push(result.match)
runs ->
expect(paths.length).toBe 0
expect(matches.length).toBe 0
it "includes files and folders that begin with a '.'", ->
projectPath = '/tmp/atom-tests/folder-with-dot-file'
filePath = path.join(projectPath, '.text')
fsUtils.writeSync(filePath, 'match this')
project.setPath(projectPath)
paths = []
matches = []
waitsForPromise ->
project.scan /match this/, (result) ->
paths.push(result.path)
matches.push(result.match)
runs ->
expect(paths.length).toBe 1
expect(paths[0]).toBe filePath
expect(matches.length).toBe 1
it "excludes values in core.ignoredNames", ->
projectPath = '/tmp/atom-tests/folder-with-dot-git/.git'
filePath = path.join(projectPath, 'test.txt')
fsUtils.writeSync(filePath, 'match this')
project.setPath(projectPath)
paths = []
matches = []
waitsForPromise ->
project.scan /match/, (result) ->
paths.push(result.path)
matches.push(result.match)
runs ->
expect(paths.length).toBe 0
expect(matches.length).toBe 0
-47
Ver Arquivo
@@ -1,47 +0,0 @@
Range = require 'range'
Point = require 'point'
describe "Range", ->
describe "constructor", ->
it "ensures that @start <= @end", ->
range1 = new Range(new Point(0, 1), new Point(0, 4))
expect(range1.start).toEqual(row: 0, column: 1)
range2 = new Range(new Point(1, 4), new Point(0, 1))
expect(range2.start).toEqual(row: 0, column: 1)
describe ".isEmpty()", ->
it "returns true if @start equals @end", ->
expect(new Range(new Point(1, 1), new Point(1, 1)).isEmpty()).toBeTruthy()
expect(new Range(new Point(1, 1), new Point(1, 2)).isEmpty()).toBeFalsy()
describe ".intersectsWith(otherRange)", ->
it "returns true if the ranges intersect or share an endpoint", ->
expect(new Range([1, 1], [2, 10]).intersectsWith(new Range([2, 1], [3, 10]))).toBeTruthy()
expect(new Range([2, 1], [3, 10]).intersectsWith(new Range([1, 1], [2, 10]))).toBeTruthy()
expect(new Range([2, 1], [3, 10]).intersectsWith(new Range([2, 5], [3, 1]))).toBeTruthy()
expect(new Range([2, 5], [3, 1]).intersectsWith(new Range([2, 1], [3, 10]))).toBeTruthy()
expect(new Range([2, 5], [3, 1]).intersectsWith(new Range([3, 1], [3, 10]))).toBeTruthy()
expect(new Range([3, 1], [3, 10]).intersectsWith(new Range([2, 5], [3, 1]))).toBeTruthy()
expect(new Range([2, 5], [3, 1]).intersectsWith(new Range([3, 2], [3, 10]))).toBeFalsy()
expect(new Range([3, 2], [3, 10]).intersectsWith(new Range([2, 5], [3, 1]))).toBeFalsy()
describe ".union(otherRange)", ->
it "returns the union of the two ranges", ->
expect(new Range([1, 1], [2, 10]).union(new Range([2, 1], [3, 10]))).toEqual [[1, 1], [3, 10]]
expect(new Range([2, 1], [3, 10]).union(new Range([1, 1], [2, 10]))).toEqual [[1, 1], [3, 10]]
expect(new Range([2, 1], [3, 10]).union(new Range([2, 5], [3, 1]))).toEqual [[2, 1], [3, 10]]
expect(new Range([2, 5], [3, 1]).union(new Range([2, 1], [3, 10]))).toEqual [[2, 1], [3, 10]]
describe ".compare(otherRange)", ->
it "sorts earlier ranges first, and larger ranges first if both ranges start at the same place", ->
expect(new Range([1, 1], [2, 10]).compare(new Range([2, 1], [3, 10]))).toBe -1
expect(new Range([2, 1], [3, 10]).compare(new Range([1, 1], [2, 10]))).toBe 1
expect(new Range([1, 1], [3, 10]).compare(new Range([1, 1], [2, 10]))).toBe -1
expect(new Range([1, 1], [2, 10]).compare(new Range([1, 1], [3, 10]))).toBe 1
expect(new Range([1, 1], [3, 10]).compare(new Range([1, 1], [3, 10]))).toBe 0
describe ".translate(startPoint, endPoint)", ->
it "returns a range translates by the specified start and end points", ->
expect(new Range([1, 1], [2, 10]).translate([1])).toEqual [[2, 1], [3, 10]]
expect(new Range([1, 1], [2, 10]).translate([1,2], [3,4])).toEqual [[2, 3], [5, 14]]
@@ -1,79 +0,0 @@
TextMateScopeSelector = require 'text-mate-scope-selector'
describe "TextMateScopeSelector", ->
describe ".matches(scopes)", ->
it "matches the asterix", ->
expect(new TextMateScopeSelector('*').matches(['a'])).toBeTruthy()
expect(new TextMateScopeSelector('*').matches(['b', 'c'])).toBeTruthy()
expect(new TextMateScopeSelector('a.*.c').matches(['a.b.c'])).toBeTruthy()
expect(new TextMateScopeSelector('a.*.c').matches(['a.b.c.d'])).toBeTruthy()
expect(new TextMateScopeSelector('a.*.c').matches(['a.b.d.c'])).toBeFalsy()
it "matches prefixes", ->
expect(new TextMateScopeSelector('a').matches(['a'])).toBeTruthy()
expect(new TextMateScopeSelector('a').matches(['a.b'])).toBeTruthy()
expect(new TextMateScopeSelector('a.b').matches(['a.b.c'])).toBeTruthy()
expect(new TextMateScopeSelector('a').matches(['abc'])).toBeFalsy()
expect(new TextMateScopeSelector('a.b-c').matches(['a.b-c.d'])).toBeTruthy()
expect(new TextMateScopeSelector('a.b').matches(['a.b-d'])).toBeFalsy()
expect(new TextMateScopeSelector('c++').matches(['c++'])).toBeTruthy()
expect(new TextMateScopeSelector('c++').matches(['c'])).toBeFalsy()
expect(new TextMateScopeSelector('a_b_c').matches(['a_b_c'])).toBeTruthy()
expect(new TextMateScopeSelector('a_b_c').matches(['a_b'])).toBeFalsy()
it "matches filters", ->
expect(new TextMateScopeSelector('R:g').matches(['g'])).toBeTruthy()
it "matches disjunction", ->
expect(new TextMateScopeSelector('a | b').matches(['b'])).toBeTruthy()
expect(new TextMateScopeSelector('a|b|c').matches(['c'])).toBeTruthy()
expect(new TextMateScopeSelector('a|b|c').matches(['d'])).toBeFalsy()
it "matches negation", ->
expect(new TextMateScopeSelector('a - c').matches(['a', 'b'])).toBeTruthy()
expect(new TextMateScopeSelector('a - c').matches(['a'])).toBeTruthy()
expect(new TextMateScopeSelector('-c').matches(['b'])).toBeTruthy()
expect(new TextMateScopeSelector('-c').matches(['c', 'b'])).toBeFalsy()
expect(new TextMateScopeSelector('a-b').matches(['a', 'b'])).toBeFalsy()
expect(new TextMateScopeSelector('a -b').matches(['a', 'b'])).toBeFalsy()
expect(new TextMateScopeSelector('a -c').matches(['a', 'b'])).toBeTruthy()
expect(new TextMateScopeSelector('a-c').matches(['a', 'b'])).toBeFalsy()
it "matches conjunction", ->
expect(new TextMateScopeSelector('a & b').matches(['b', 'a'])).toBeTruthy()
expect(new TextMateScopeSelector('a&b&c').matches(['c'])).toBeFalsy()
expect(new TextMateScopeSelector('a&b&c').matches(['a', 'b', 'd'])).toBeFalsy()
expect(new TextMateScopeSelector('a & -b').matches(['a', 'b', 'd'])).toBeFalsy()
expect(new TextMateScopeSelector('a & -b').matches(['a', 'd'])).toBeTruthy()
it "matches composites", ->
expect(new TextMateScopeSelector('a,b,c').matches(['b', 'c'])).toBeTruthy()
expect(new TextMateScopeSelector('a, b, c').matches(['d', 'e'])).toBeFalsy()
expect(new TextMateScopeSelector('a, b, c').matches(['d', 'c.e'])).toBeTruthy()
expect(new TextMateScopeSelector('a,').matches(['a', 'c'])).toBeTruthy()
expect(new TextMateScopeSelector('a,').matches(['b', 'c'])).toBeFalsy()
it "matches groups", ->
expect(new TextMateScopeSelector('(a,b) | (c, d)').matches(['a'])).toBeTruthy()
expect(new TextMateScopeSelector('(a,b) | (c, d)').matches(['b'])).toBeTruthy()
expect(new TextMateScopeSelector('(a,b) | (c, d)').matches(['c'])).toBeTruthy()
expect(new TextMateScopeSelector('(a,b) | (c, d)').matches(['d'])).toBeTruthy()
expect(new TextMateScopeSelector('(a,b) | (c, d)').matches(['e'])).toBeFalsy()
it "matches paths", ->
expect(new TextMateScopeSelector('a b').matches(['a', 'b'])).toBeTruthy()
expect(new TextMateScopeSelector('a b').matches(['b', 'a'])).toBeFalsy()
expect(new TextMateScopeSelector('a c').matches(['a', 'b', 'c', 'd', 'e'])).toBeTruthy()
expect(new TextMateScopeSelector('a b e').matches(['a', 'b', 'c', 'd', 'e'])).toBeTruthy()
describe ".toCssSelector()", ->
it "converts the TextMate scope selector to a CSS selector", ->
expect(new TextMateScopeSelector('a b c').toCssSelector()).toBe '.a .b .c'
expect(new TextMateScopeSelector('a.b.c').toCssSelector()).toBe '.a.b.c'
expect(new TextMateScopeSelector('*').toCssSelector()).toBe '*'
expect(new TextMateScopeSelector('a - b').toCssSelector()).toBe '.a:not(.b)'
expect(new TextMateScopeSelector('a & b').toCssSelector()).toBe '.a .b'
expect(new TextMateScopeSelector('a & -b').toCssSelector()).toBe '.a:not(.b)'
expect(new TextMateScopeSelector('a | b').toCssSelector()).toBe '.a, .b'
expect(new TextMateScopeSelector('a - (b.c d)').toCssSelector()).toBe '.a:not(.b.c .d)'
expect(new TextMateScopeSelector('a, b').toCssSelector()).toBe '.a, .b'
-32
Ver Arquivo
@@ -1,32 +0,0 @@
$ = require 'jquery'
Theme = require 'theme'
ThemeManager = require 'theme-manager'
describe "ThemeManager", ->
describe "when the core.themes config value changes", ->
it "add/removes stylesheets to reflect the new config value", ->
themeManager = new ThemeManager()
spyOn(themeManager, 'getUserStylesheetPath').andCallFake -> null
themeManager.load()
config.set('core.themes', [])
expect($('style.userTheme').length).toBe 0
config.set('core.themes', ['atom-dark-syntax'])
expect($('style.userTheme').length).toBe 1
expect($('style.userTheme:eq(0)').attr('id')).toMatch /atom-dark-syntax.less$/
config.set('core.themes', ['atom-light-syntax', 'atom-dark-syntax'])
expect($('style.userTheme').length).toBe 2
expect($('style.userTheme:eq(0)').attr('id')).toMatch /atom-light-syntax.less$/
expect($('style.userTheme:eq(1)').attr('id')).toMatch /atom-dark-syntax.less$/
config.set('core.themes', [])
expect($('style.userTheme').length).toBe 0
describe "when a theme fails to load", ->
it "logs a warning", ->
themeManager = new ThemeManager()
spyOn(console, 'warn')
themeManager.loadTheme('a-theme-that-will-not-be-found')
expect(console.warn).toHaveBeenCalled()
-50
Ver Arquivo
@@ -1,50 +0,0 @@
$ = require 'jquery'
fsUtils = require 'fs-utils'
path = require 'path'
Theme = require 'theme'
describe "Theme", ->
theme = null
beforeEach ->
$("#jasmine-content").append $("<div class='editor'></div>")
afterEach ->
theme.deactivate()
describe "when the theme is a file", ->
it "loads and applies css", ->
expect($(".editor").css("padding-bottom")).not.toBe "1234px"
themePath = project.resolve('themes/theme-stylesheet.css')
theme = new Theme(themePath)
expect($(".editor").css("padding-top")).toBe "1234px"
it "parses, loads and applies less", ->
expect($(".editor").css("padding-bottom")).not.toBe "1234px"
themePath = project.resolve('themes/theme-stylesheet.less')
theme = new Theme(themePath)
expect($(".editor").css("padding-top")).toBe "4321px"
describe "when the theme contains a package.json file", ->
it "loads and applies stylesheets from package.json in the correct order", ->
expect($(".editor").css("padding-top")).not.toBe("101px")
expect($(".editor").css("padding-right")).not.toBe("102px")
expect($(".editor").css("padding-bottom")).not.toBe("103px")
themePath = project.resolve('themes/theme-with-package-file')
theme = new Theme(themePath)
expect($(".editor").css("padding-top")).toBe("101px")
expect($(".editor").css("padding-right")).toBe("102px")
expect($(".editor").css("padding-bottom")).toBe("103px")
describe "when the theme does not contain a package.json file and is a directory", ->
it "loads all stylesheet files in the directory", ->
expect($(".editor").css("padding-top")).not.toBe "10px"
expect($(".editor").css("padding-right")).not.toBe "20px"
expect($(".editor").css("padding-bottom")).not.toBe "30px"
themePath = project.resolve('themes/theme-without-package-file')
theme = new Theme(themePath)
expect($(".editor").css("padding-top")).toBe "10px"
expect($(".editor").css("padding-right")).toBe "20px"
expect($(".editor").css("padding-bottom")).toBe "30px"
-163
Ver Arquivo
@@ -1,163 +0,0 @@
UndoManager = require 'undo-manager'
Buffer = require 'text-buffer'
Range = require 'range'
describe "UndoManager", ->
[buffer, undoManager] = []
beforeEach ->
buffer = new Buffer(require.resolve('fixtures/sample.js'))
undoManager = buffer.undoManager
afterEach ->
buffer.destroy()
describe ".undo()", ->
it "undoes the last change", ->
buffer.change(new Range([0, 5], [0, 9]), '')
buffer.insert([0, 6], 'h')
buffer.insert([0, 10], 'y')
expect(buffer.lineForRow(0)).toContain 'qshorty'
undoManager.undo()
expect(buffer.lineForRow(0)).toContain 'qshort'
expect(buffer.lineForRow(0)).not.toContain 'qshorty'
undoManager.undo()
expect(buffer.lineForRow(0)).toContain 'qsort'
undoManager.undo()
expect(buffer.lineForRow(0)).toContain 'quicksort'
it "does not throw an exception when there is nothing to undo", ->
undoManager.undo()
describe ".redo()", ->
beforeEach ->
buffer.change(new Range([0, 5], [0, 9]), '')
buffer.insert([0, 6], 'h')
buffer.insert([0, 10], 'y')
undoManager.undo()
undoManager.undo()
expect(buffer.lineForRow(0)).toContain 'qsort'
it "redoes the last undone change", ->
undoManager.redo()
expect(buffer.lineForRow(0)).toContain 'qshort'
undoManager.redo()
expect(buffer.lineForRow(0)).toContain 'qshorty'
undoManager.undo()
expect(buffer.lineForRow(0)).toContain 'qshort'
it "does not throw an exception when there is nothing to redo", ->
undoManager.redo()
undoManager.redo()
undoManager.redo()
it "discards the redo history when there is a new change following an undo", ->
buffer.insert([0, 6], 'p')
expect(buffer.getText()).toContain 'qsport'
undoManager.redo()
expect(buffer.getText()).toContain 'qsport'
describe "transaction methods", ->
describe "transact()", ->
beforeEach ->
buffer.setText('')
it "starts a transaction that can be committed later", ->
buffer.append('1')
undoManager.transact()
buffer.append('2')
buffer.append('3')
undoManager.commit()
buffer.append('4')
expect(buffer.getText()).toBe '1234'
undoManager.undo()
expect(buffer.getText()).toBe '123'
undoManager.undo()
expect(buffer.getText()).toBe '1'
undoManager.redo()
expect(buffer.getText()).toBe '123'
it "starts a transaction that can be aborted later", ->
buffer.append('1')
buffer.append('2')
undoManager.transact()
buffer.append('3')
buffer.append('4')
expect(buffer.getText()).toBe '1234'
undoManager.abort()
expect(buffer.getText()).toBe '12'
undoManager.undo()
expect(buffer.getText()).toBe '1'
undoManager.redo()
expect(buffer.getText()).toBe '12'
undoManager.redo()
expect(buffer.getText()).toBe '12'
describe "commit", ->
it "throws an exception if there is no current transaction", ->
expect(-> buffer.commit()).toThrow()
it "does not record empty transactions", ->
buffer.insert([0,0], "foo")
undoManager.transact()
undoManager.commit()
undoManager.undo()
expect(buffer.lineForRow(0)).not.toContain("foo")
describe "abort", ->
it "does not affect the undo stack when the current transaction is empty", ->
buffer.setText('')
buffer.append('1')
buffer.transact()
buffer.abort()
expect(buffer.getText()).toBe '1'
buffer.undo()
expect(buffer.getText()).toBe ''
it "throws an exception if there is no current transaction", ->
expect(-> buffer.abort()).toThrow()
describe "exception handling", ->
describe "when a `do` operation throws an exception", ->
it "clears the stack", ->
spyOn(console, 'error')
buffer.setText("word")
buffer.insert([0,0], "1")
expect(->
undoManager.pushOperation(do: -> throw new Error("I'm a bad do operation"))
).toThrow("I'm a bad do operation")
undoManager.undo()
expect(buffer.lineForRow(0)).toBe "1word"
describe "when an `undo` operation throws an exception", ->
it "clears the stack", ->
spyOn(console, 'error')
buffer.setText("word")
buffer.insert([0,0], "1")
undoManager.pushOperation(undo: -> throw new Error("I'm a bad undo operation"))
expect(-> undoManager.undo()).toThrow("I'm a bad undo operation")
expect(buffer.lineForRow(0)).toBe "1word"
describe "when an `redo` operation throws an exception", ->
it "clears the stack", ->
spyOn(console, 'error')
buffer.setText("word")
buffer.insert([0,0], "1")
undoManager.pushOperation(redo: -> throw new Error("I'm a bad redo operation"))
undoManager.undo()
expect(-> undoManager.redo()).toThrow("I'm a bad redo operation")
expect(buffer.lineForRow(0)).toBe "1word"
+76
Ver Arquivo
@@ -0,0 +1,76 @@
{$} = require 'atom'
path = require 'path'
Package = require '../src/package'
describe "AtomPackage", ->
describe "theme", ->
theme = null
beforeEach ->
$("#jasmine-content").append $("<div class='editor'></div>")
afterEach ->
theme.deactivate() if theme?
describe "when the theme contains a single style file", ->
it "loads and applies css", ->
expect($(".editor").css("padding-bottom")).not.toBe "1234px"
themePath = project.resolve('packages/theme-with-index-css')
theme = Package.load(themePath)
theme.activate()
expect($(".editor").css("padding-top")).toBe "1234px"
it "parses, loads and applies less", ->
expect($(".editor").css("padding-bottom")).not.toBe "1234px"
themePath = project.resolve('packages/theme-with-index-less')
theme = Package.load(themePath)
theme.activate()
expect($(".editor").css("padding-top")).toBe "4321px"
describe "when the theme contains a package.json file", ->
it "loads and applies stylesheets from package.json in the correct order", ->
expect($(".editor").css("padding-top")).not.toBe("101px")
expect($(".editor").css("padding-right")).not.toBe("102px")
expect($(".editor").css("padding-bottom")).not.toBe("103px")
themePath = project.resolve('packages/theme-with-package-file')
theme = Package.load(themePath)
theme.activate()
expect($(".editor").css("padding-top")).toBe("101px")
expect($(".editor").css("padding-right")).toBe("102px")
expect($(".editor").css("padding-bottom")).toBe("103px")
describe "when the theme does not contain a package.json file and is a directory", ->
it "loads all stylesheet files in the directory", ->
expect($(".editor").css("padding-top")).not.toBe "10px"
expect($(".editor").css("padding-right")).not.toBe "20px"
expect($(".editor").css("padding-bottom")).not.toBe "30px"
themePath = project.resolve('packages/theme-without-package-file')
theme = Package.load(themePath)
theme.activate()
expect($(".editor").css("padding-top")).toBe "10px"
expect($(".editor").css("padding-right")).toBe "20px"
expect($(".editor").css("padding-bottom")).toBe "30px"
describe "reloading a theme", ->
beforeEach ->
themePath = project.resolve('packages/theme-with-package-file')
theme = Package.load(themePath)
theme.activate()
it "reloads without readding to the stylesheets list", ->
expect(theme.getStylesheetPaths().length).toBe 3
theme.reloadStylesheet(theme.getStylesheetPaths()[0])
expect(theme.getStylesheetPaths().length).toBe 3
describe "events", ->
beforeEach ->
themePath = project.resolve('packages/theme-with-package-file')
theme = Package.load(themePath)
theme.activate()
it "deactivated event fires on .deactivate()", ->
theme.on 'deactivated', spy = jasmine.createSpy()
theme.deactivate()
expect(spy).toHaveBeenCalled()
+15
Ver Arquivo
@@ -0,0 +1,15 @@
{$} = require 'atom'
describe '"atom" protocol URL', ->
it 'sends the file relative in the package as response', ->
called = false
callback = -> called = true
$.ajax
url: 'atom://async/package.json'
success: callback
# In old versions of jQuery, ajax calls to custom protocol would always
# be treated as error eventhough the browser thinks it's a success
# request.
error: callback
waitsFor 'request to be done', -> called is true
+19 -27
Ver Arquivo
@@ -1,13 +1,12 @@
$ = require 'jquery'
{View, $$} = require 'space-pen'
_ = require 'underscore'
{View, $, $$} = require '../src/space-pen-extensions'
_ = require 'underscore-plus'
{convertStackTrace} = require 'coffeestack'
sourceMaps = {}
formatStackTrace = (stackTrace) ->
return stackTrace unless stackTrace
jasminePath = require.resolve('jasmine')
jasminePath = require.resolve('../vendor/jasmine')
jasminePattern = new RegExp("\\(#{_.escapeRegExp(jasminePath)}:\\d+:\\d+\\)\\s*$")
convertedLines = []
for line in stackTrace.split('\n')
@@ -24,9 +23,6 @@ class AtomReporter extends View
@div outlet: 'coreArea', =>
@div outlet: 'coreHeader', class: 'symbolHeader'
@ul outlet: 'coreSummary', class: 'symbolSummary list-unstyled'
@div outlet: 'internalArea', =>
@div outlet: 'internalHeader', class: 'symbolHeader'
@ul outlet: 'internalSummary', class: 'symbolSummary list-unstyled'
@div outlet: 'bundledArea', =>
@div outlet: 'bundledHeader', class: 'symbolHeader'
@ul outlet: 'bundledSummary', class: 'symbolSummary list-unstyled'
@@ -57,6 +53,7 @@ class AtomReporter extends View
$(document.body).append this
reportRunnerResults: (runner) ->
@updateSpecCounts()
if @failedCount == 0
@message.text "Success!"
else
@@ -94,7 +91,7 @@ class AtomReporter extends View
clearTimeout @timeoutId if @timeoutId?
@specPopup.show()
spec = _.find(window.timedSpecs, (spec) -> description is spec.name)
spec = _.find(window.timedSpecs, ({fullName}) -> description is fullName)
description = "#{description} #{spec.time}ms" if spec
@specPopup.text description
{left, top} = element.offset()
@@ -110,15 +107,18 @@ class AtomReporter extends View
if specFailures.is(":visible") then element.text "\uf03d" else element.html "\uf03f"
false
updateStatusView: (spec) ->
if @failedCount > 0
@status.addClass('failed') unless @status.hasClass('failed')
updateSpecCounts: ->
if @skippedCount
specCount = "#{@completeSpecCount - @skippedCount}/#{@totalSpecCount - @skippedCount} (#{@skippedCount} skipped)"
else
specCount = "#{@completeSpecCount}/#{@totalSpecCount}"
@specCount.text specCount
@specCount[0].textContent = specCount
updateStatusView: (spec) ->
if @failedCount > 0
@status.addClass('failed') unless @status.hasClass('failed')
@updateSpecCounts()
rootSuite = spec.suite
rootSuite = rootSuite.parentSuite while rootSuite.parentSuite
@@ -126,22 +126,18 @@ class AtomReporter extends View
time = "#{Math.round((spec.endedAt - @startedAt.getTime()) / 10)}"
time = "0#{time}" if time.length < 3
@time.text "#{time[0...-2]}.#{time[-2..]}s"
@time[0].textContent = "#{time[0...-2]}.#{time[-2..]}s"
addSpecs: (specs) ->
coreSpecs = 0
internalPackageSpecs = 0
bundledPackageSpecs = 0
userPackageSpecs = 0
for spec in specs
symbol = $$ -> @li class: "spec-summary pending spec-summary-#{spec.id}"
symbol = $$ -> @li id: "spec-summary-#{spec.id}", class: "spec-summary pending"
switch spec.specType
when 'core'
coreSpecs++
@coreSummary.append symbol
when 'internal'
internalPackageSpecs++
@internalSummary.append symbol
when 'bundled'
bundledPackageSpecs++
@bundledSummary.append symbol
@@ -153,10 +149,6 @@ class AtomReporter extends View
@coreHeader.text("Core Specs (#{coreSpecs}):")
else
@coreArea.hide()
if internalPackageSpecs > 0
@internalHeader.text("Internal Package Specs (#{internalPackageSpecs}):")
else
@internalArea.hide()
if bundledPackageSpecs > 0
@bundledHeader.text("Bundled Package Specs (#{bundledPackageSpecs}):")
else
@@ -170,7 +162,7 @@ class AtomReporter extends View
@runningSpecCount++
specComplete: (spec) ->
specSummaryElement = $(".spec-summary-#{spec.id}")
specSummaryElement = $("#spec-summary-#{spec.id}")
specSummaryElement.removeClass('pending')
specSummaryElement.data("description", spec.getFullName())
@@ -196,7 +188,7 @@ class SuiteResultView extends View
suite: null
initialize: (@suite) ->
@addClass("suite-view-#{@suite.id}")
@attr('id', "suite-view-#{@suite.id}")
@description.html @suite.description
attach: ->
@@ -205,7 +197,7 @@ class SuiteResultView extends View
parentSuiteView: ->
return unless @suite.parentSuite
if not suiteView = $(".suite-view-#{@suite.parentSuite.id}").view()
if not suiteView = $("#suite-view-#{@suite.parentSuite.id}").view()
suiteView = new SuiteResultView(@suite.parentSuite)
suiteView.attach()
@@ -233,7 +225,7 @@ class SpecResultView extends View
@parentSuiteView().append this
parentSuiteView: ->
if not suiteView = $(".suite-view-#{@spec.suite.id}").view()
if not suiteView = $("#suite-view-#{@spec.suite.id}").view()
suiteView = new SuiteResultView(@spec.suite)
suiteView.attach()
+191 -46
Ver Arquivo
@@ -1,9 +1,7 @@
$ = require 'jquery'
RootView = require 'root-view'
{$$} = require 'space-pen'
fsUtils = require 'fs-utils'
{$, $$, fs, RootView} = require 'atom'
Exec = require('child_process').exec
path = require 'path'
ThemeManager = require '../src/theme-manager'
describe "the `atom` global", ->
beforeEach ->
@@ -14,11 +12,22 @@ describe "the `atom` global", ->
describe "when the package has deferred deserializers", ->
it "requires the package's main module if one of its deferred deserializers is referenced", ->
pack = atom.loadPackage('package-with-activation-events')
spyOn(pack, 'activateStylesheets').andCallThrough()
expect(pack.mainModule).toBeNull()
object = deserialize({deserializer: 'Foo', data: 5})
expect(pack.mainModule).toBeDefined()
expect(object.constructor.name).toBe 'Foo'
expect(object.data).toBe 5
expect(pack.activateStylesheets).toHaveBeenCalled()
it "continues if the package has an invalid package.json", ->
spyOn(console, 'warn')
config.set("core.disabledPackages", [])
expect(-> atom.loadPackage("package-with-broken-package-json")).not.toThrow()
it "continues if the package has an invalid keymap", ->
config.set("core.disabledPackages", [])
expect(-> atom.loadPackage("package-with-broken-keymap")).not.toThrow()
describe ".unloadPackage(name)", ->
describe "when the package is active", ->
@@ -48,7 +57,7 @@ describe "the `atom` global", ->
describe "when the package has a main module", ->
describe "when the metadata specifies a main module path˜", ->
it "requires the module at the specified path", ->
mainModule = require('fixtures/packages/package-with-main/main-module')
mainModule = require('./fixtures/packages/package-with-main/main-module')
spyOn(mainModule, 'activate')
pack = atom.activatePackage('package-with-main')
expect(mainModule.activate).toHaveBeenCalled()
@@ -56,7 +65,7 @@ describe "the `atom` global", ->
describe "when the metadata does not specify a main module", ->
it "requires index.coffee", ->
indexModule = require('fixtures/packages/package-with-index/index')
indexModule = require('./fixtures/packages/package-with-index/index')
spyOn(indexModule, 'activate')
pack = atom.activatePackage('package-with-index')
expect(indexModule.activate).toHaveBeenCalled()
@@ -72,9 +81,9 @@ describe "the `atom` global", ->
[mainModule, pack] = []
beforeEach ->
mainModule = require 'fixtures/packages/package-with-activation-events/index'
mainModule = require './fixtures/packages/package-with-activation-events/index'
spyOn(mainModule, 'activate').andCallThrough()
AtomPackage = require 'atom-package'
AtomPackage = require '../src/atom-package'
spyOn(AtomPackage.prototype, 'requireMainModule').andCallThrough()
pack = atom.activatePackage('package-with-activation-events')
@@ -85,7 +94,7 @@ describe "the `atom` global", ->
expect(mainModule.activate).toHaveBeenCalled()
it "triggers the activation event on all handlers registered during activation", ->
rootView.open()
rootView.openSync()
editor = rootView.getActiveView()
eventHandler = jasmine.createSpy("activation-event")
editor.command 'activation-event', eventHandler
@@ -151,36 +160,70 @@ describe "the `atom` global", ->
expect(keymap.bindingsForElement(element1)['ctrl-n']).toBe 'keymap-2'
expect(keymap.bindingsForElement(element3)['ctrl-y']).toBeUndefined()
describe "menu loading", ->
beforeEach ->
atom.contextMenu.definitions = []
atom.menu.template = []
describe "when the metadata does not contain a 'menus' manifest", ->
it "loads all the .cson/.json files in the menus directory", ->
element = ($$ -> @div class: 'test-1')[0]
expect(atom.contextMenu.definitionsForElement(element)).toEqual []
atom.activatePackage("package-with-menus")
expect(atom.menu.template.length).toBe 2
expect(atom.menu.template[0].label).toBe "Second to Last"
expect(atom.menu.template[1].label).toBe "Last"
expect(atom.contextMenu.definitionsForElement(element)[0].label).toBe "Menu item 1"
expect(atom.contextMenu.definitionsForElement(element)[1].label).toBe "Menu item 2"
expect(atom.contextMenu.definitionsForElement(element)[2].label).toBe "Menu item 3"
describe "when the metadata contains a 'menus' manifest", ->
it "loads only the menus specified by the manifest, in the specified order", ->
element = ($$ -> @div class: 'test-1')[0]
expect(atom.contextMenu.definitionsForElement(element)).toEqual []
atom.activatePackage("package-with-menus-manifest")
expect(atom.menu.template[0].label).toBe "Second to Last"
expect(atom.menu.template[1].label).toBe "Last"
expect(atom.contextMenu.definitionsForElement(element)[0].label).toBe "Menu item 2"
expect(atom.contextMenu.definitionsForElement(element)[1].label).toBe "Menu item 1"
expect(atom.contextMenu.definitionsForElement(element)[2]).toBeUndefined()
describe "stylesheet loading", ->
describe "when the metadata contains a 'stylesheets' manifest", ->
it "loads stylesheets from the stylesheets directory as specified by the manifest", ->
one = fsUtils.resolveOnLoadPath("fixtures/packages/package-with-stylesheets-manifest/stylesheets/1.css")
two = fsUtils.resolveOnLoadPath("fixtures/packages/package-with-stylesheets-manifest/stylesheets/2.less")
three = fsUtils.resolveOnLoadPath("fixtures/packages/package-with-stylesheets-manifest/stylesheets/3.css")
expect(stylesheetElementForId(one)).not.toExist()
expect(stylesheetElementForId(two)).not.toExist()
expect(stylesheetElementForId(three)).not.toExist()
one = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/1.css")
two = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/2.less")
three = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/3.css")
expect(atom.themes.stylesheetElementForId(one)).not.toExist()
expect(atom.themes.stylesheetElementForId(two)).not.toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
atom.activatePackage("package-with-stylesheets-manifest")
expect(stylesheetElementForId(one)).toExist()
expect(stylesheetElementForId(two)).toExist()
expect(stylesheetElementForId(three)).not.toExist()
expect(atom.themes.stylesheetElementForId(one)).toExist()
expect(atom.themes.stylesheetElementForId(two)).toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
expect($('#jasmine-content').css('font-size')).toBe '1px'
describe "when the metadata does not contain a 'stylesheets' manifest", ->
it "loads all stylesheets from the stylesheets directory", ->
one = fsUtils.resolveOnLoadPath("fixtures/packages/package-with-stylesheets/stylesheets/1.css")
two = fsUtils.resolveOnLoadPath("fixtures/packages/package-with-stylesheets/stylesheets/2.less")
three = fsUtils.resolveOnLoadPath("fixtures/packages/package-with-stylesheets/stylesheets/3.css")
expect(stylesheetElementForId(one)).not.toExist()
expect(stylesheetElementForId(two)).not.toExist()
expect(stylesheetElementForId(three)).not.toExist()
one = require.resolve("./fixtures/packages/package-with-stylesheets/stylesheets/1.css")
two = require.resolve("./fixtures/packages/package-with-stylesheets/stylesheets/2.less")
three = require.resolve("./fixtures/packages/package-with-stylesheets/stylesheets/3.css")
expect(atom.themes.stylesheetElementForId(one)).not.toExist()
expect(atom.themes.stylesheetElementForId(two)).not.toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
atom.activatePackage("package-with-stylesheets")
expect(stylesheetElementForId(one)).toExist()
expect(stylesheetElementForId(two)).toExist()
expect(stylesheetElementForId(three)).toExist()
expect(atom.themes.stylesheetElementForId(one)).toExist()
expect(atom.themes.stylesheetElementForId(two)).toExist()
expect(atom.themes.stylesheetElementForId(three)).toExist()
expect($('#jasmine-content').css('font-size')).toBe '3px'
describe "grammar loading", ->
@@ -197,12 +240,12 @@ describe "the `atom` global", ->
describe "textmate packages", ->
it "loads the package's grammars", ->
expect(syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
atom.activatePackage('ruby-tmbundle', sync: true)
atom.activatePackage('language-ruby', sync: true)
expect(syntax.selectGrammar("file.rb").name).toBe "Ruby"
it "translates the package's scoped properties to Atom terms", ->
expect(syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBeUndefined()
atom.activatePackage('ruby-tmbundle', sync: true)
atom.activatePackage('language-ruby', sync: true)
expect(syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBe '# '
describe "when the package has no grammars but does have preferences", ->
@@ -219,7 +262,7 @@ describe "the `atom` global", ->
describe ".deactivatePackage(id)", ->
describe "atom packages", ->
it "calls `deactivate` on the package's main module", ->
it "calls `deactivate` on the package's main module if activate was successful", ->
pack = atom.activatePackage("package-with-deactivate")
expect(atom.isPackageActive("package-with-deactivate")).toBeTruthy()
spyOn(pack.mainModule, 'deactivate').andCallThrough()
@@ -228,13 +271,30 @@ describe "the `atom` global", ->
expect(pack.mainModule.deactivate).toHaveBeenCalled()
expect(atom.isPackageActive("package-with-module")).toBeFalsy()
spyOn(console, 'warn')
badPack = atom.activatePackage("package-that-throws-on-activate")
expect(atom.isPackageActive("package-that-throws-on-activate")).toBeTruthy()
spyOn(badPack.mainModule, 'deactivate').andCallThrough()
atom.deactivatePackage("package-that-throws-on-activate")
expect(badPack.mainModule.deactivate).not.toHaveBeenCalled()
expect(atom.isPackageActive("package-that-throws-on-activate")).toBeFalsy()
it "does not serialize packages that have not been activated called on their main module", ->
spyOn(console, 'warn')
badPack = atom.activatePackage("package-that-throws-on-activate")
spyOn(badPack.mainModule, 'serialize').andCallThrough()
atom.deactivatePackage("package-that-throws-on-activate")
expect(badPack.mainModule.serialize).not.toHaveBeenCalled()
it "absorbs exceptions that are thrown by the package module's serialize methods", ->
spyOn(console, 'error')
atom.activatePackage('package-with-serialize-error', immediate: true)
atom.activatePackage('package-with-serialization', immediate: true)
atom.deactivatePackages()
expect(atom.packageStates['package-with-serialize-error']).toBeUndefined()
expect(atom.packageStates['package-with-serialization']).toEqual someNumber: 1
expect(atom.packages.packageStates['package-with-serialize-error']).toBeUndefined()
expect(atom.packages.packageStates['package-with-serialization']).toEqual someNumber: 1
expect(console.error).toHaveBeenCalled()
it "removes the package's grammars", ->
@@ -252,12 +312,12 @@ describe "the `atom` global", ->
it "removes the package's stylesheets", ->
atom.activatePackage('package-with-stylesheets')
atom.deactivatePackage('package-with-stylesheets')
one = fsUtils.resolveOnLoadPath("package-with-stylesheets/stylesheets/1.css")
two = fsUtils.resolveOnLoadPath("package-with-stylesheets/stylesheets/2.less")
three = fsUtils.resolveOnLoadPath("package-with-stylesheets/stylesheets/3.css")
expect(stylesheetElementForId(one)).not.toExist()
expect(stylesheetElementForId(two)).not.toExist()
expect(stylesheetElementForId(three)).not.toExist()
one = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/1.css")
two = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/2.less")
three = require.resolve("./fixtures/packages/package-with-stylesheets-manifest/stylesheets/3.css")
expect(atom.themes.stylesheetElementForId(one)).not.toExist()
expect(atom.themes.stylesheetElementForId(two)).not.toExist()
expect(atom.themes.stylesheetElementForId(three)).not.toExist()
it "removes the package's scoped-properties", ->
atom.activatePackage("package-with-scoped-properties")
@@ -265,19 +325,104 @@ describe "the `atom` global", ->
atom.deactivatePackage("package-with-scoped-properties")
expect(syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBeUndefined()
describe "texmate packages", ->
describe "textmate packages", ->
it "removes the package's grammars", ->
expect(syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
atom.activatePackage('ruby-tmbundle', sync: true)
atom.activatePackage('language-ruby', sync: true)
expect(syntax.selectGrammar("file.rb").name).toBe "Ruby"
atom.deactivatePackage('ruby-tmbundle')
atom.deactivatePackage('language-ruby')
expect(syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
it "removes the package's scoped properties", ->
atom.activatePackage('ruby-tmbundle', sync: true)
atom.deactivatePackage('ruby-tmbundle')
atom.activatePackage('language-ruby', sync: true)
atom.deactivatePackage('language-ruby')
expect(syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBeUndefined()
describe ".getVersion", ->
it "returns the current version number", ->
expect(typeof atom.getVersion()).toBe 'string'
describe ".activate()", ->
packageActivator = null
themeActivator = null
beforeEach ->
spyOn(console, 'warn')
atom.packages.loadPackages()
loadedPackages = atom.packages.getLoadedPackages()
expect(loadedPackages.length).toBeGreaterThan 0
packageActivator = spyOn(atom.packages, 'activatePackages')
themeActivator = spyOn(atom.themes, 'activatePackages')
afterEach ->
atom.packages.unloadPackages()
Syntax = require '../src/syntax'
atom.syntax = window.syntax = new Syntax()
it "activates all the packages, and none of the themes", ->
atom.packages.activate()
expect(packageActivator).toHaveBeenCalled()
expect(themeActivator).toHaveBeenCalled()
packages = packageActivator.mostRecentCall.args[0]
expect(['atom', 'textmate']).toContain(pack.getType()) for pack in packages
themes = themeActivator.mostRecentCall.args[0]
expect(['theme']).toContain(theme.getType()) for theme in themes
describe ".en/disablePackage()", ->
describe "with packages", ->
it ".enablePackage() enables a disabled package", ->
packageName = 'package-with-main'
atom.config.pushAtKeyPath('core.disabledPackages', packageName)
atom.packages.observeDisabledPackages()
expect(config.get('core.disabledPackages')).toContain packageName
pack = atom.packages.enablePackage(packageName)
loadedPackages = atom.packages.getLoadedPackages()
activatedPackages = atom.packages.getActivePackages()
expect(loadedPackages).toContain(pack)
expect(activatedPackages).toContain(pack)
expect(config.get('core.disabledPackages')).not.toContain packageName
it ".disablePackage() disables an enabled package", ->
packageName = 'package-with-main'
atom.packages.activatePackage(packageName)
atom.packages.observeDisabledPackages()
expect(config.get('core.disabledPackages')).not.toContain packageName
pack = atom.packages.disablePackage(packageName)
activatedPackages = atom.packages.getActivePackages()
expect(activatedPackages).not.toContain(pack)
expect(config.get('core.disabledPackages')).toContain packageName
describe "with themes", ->
beforeEach ->
atom.themes.activateThemes()
afterEach ->
atom.themes.deactivateThemes()
atom.config.unobserve('core.themes')
it ".enablePackage() and .disablePackage() enables and disables a theme", ->
packageName = 'theme-with-package-file'
expect(config.get('core.themes')).not.toContain packageName
expect(config.get('core.disabledPackages')).not.toContain packageName
# enabling of theme
pack = atom.packages.enablePackage(packageName)
activatedPackages = atom.packages.getActivePackages()
expect(activatedPackages).toContain(pack)
expect(config.get('core.themes')).toContain packageName
expect(config.get('core.disabledPackages')).not.toContain packageName
# disabling of theme
pack = atom.packages.disablePackage(packageName)
activatedPackages = atom.packages.getActivePackages()
expect(activatedPackages).not.toContain(pack)
expect(config.get('core.themes')).not.toContain packageName
expect(config.get('core.themes')).not.toContain packageName
expect(config.get('core.disabledPackages')).not.toContain packageName
+35
Ver Arquivo
@@ -0,0 +1,35 @@
{fs} = require 'atom'
path = require 'path'
temp = require 'temp'
installer = require '../src/command-installer'
describe "install(commandPath, callback)", ->
directory = path.join(temp.dir, 'install-atom-command', 'atom')
commandPath = path.join(directory, 'source')
destinationPath = path.join(directory, 'bin', 'source')
beforeEach ->
spyOn(installer, 'findInstallDirectory').andCallFake (callback) ->
callback(directory)
fs.remove(directory) if fs.exists(directory)
it "symlinks the command and makes it executable", ->
fs.writeSync(commandPath, 'test')
expect(fs.isFileSync(commandPath)).toBeTruthy()
expect(fs.isExecutableSync(commandPath)).toBeFalsy()
expect(fs.isFileSync(destinationPath)).toBeFalsy()
installDone = false
installError = null
installer.install commandPath, (error) ->
installDone = true
installError = error
waitsFor -> installDone
runs ->
expect(installError).toBeNull()
expect(fs.isFileSync(destinationPath)).toBeTruthy()
expect(fs.realpathSync(destinationPath)).toBe fs.realpathSync(commandPath)
expect(fs.isExecutableSync(destinationPath)).toBeTruthy()
@@ -1,9 +1,11 @@
fs = require 'fs'
fsUtils = require 'fs-utils'
{fs} = require 'atom'
path = require 'path'
temp = require 'temp'
CSON = require 'season'
describe "Config", ->
dotAtomPath = path.join(temp.dir, 'dot-atom-dir')
describe ".get(keyPath)", ->
it "allows a key path's value to be read", ->
expect(config.set("foo.bar.baz", 42)).toBe 42
@@ -30,7 +32,7 @@ describe "Config", ->
config.set("foo.bar.baz", 42)
expect(config.save).toHaveBeenCalled()
expect(observeHandler).toHaveBeenCalledWith 42
expect(observeHandler).toHaveBeenCalledWith 42, {previous: undefined}
describe "when the value equals the default value", ->
it "does not store the value", ->
@@ -52,7 +54,18 @@ describe "Config", ->
expect(config.pushAtKeyPath("foo.bar.baz", "b")).toBe 2
expect(config.get("foo.bar.baz")).toEqual ["a", "b"]
expect(observeHandler).toHaveBeenCalledWith config.get("foo.bar.baz")
expect(observeHandler).toHaveBeenCalledWith config.get("foo.bar.baz"), {previous: ['a']}
describe ".unshiftAtKeyPath(keyPath, value)", ->
it "unshifts the given value to the array at the key path and updates observers", ->
config.set("foo.bar.baz", ["b"])
observeHandler = jasmine.createSpy "observeHandler"
config.observe "foo.bar.baz", observeHandler
observeHandler.reset()
expect(config.unshiftAtKeyPath("foo.bar.baz", "a")).toBe 2
expect(config.get("foo.bar.baz")).toEqual ["a", "b"]
expect(observeHandler).toHaveBeenCalledWith config.get("foo.bar.baz"), {previous: ['b']}
describe ".removeAtKeyPath(keyPath, value)", ->
it "removes the given value from the array at the key path and updates observers", ->
@@ -63,7 +76,7 @@ describe "Config", ->
expect(config.removeAtKeyPath("foo.bar.baz", "b")).toEqual ["a", "c"]
expect(config.get("foo.bar.baz")).toEqual ["a", "c"]
expect(observeHandler).toHaveBeenCalledWith config.get("foo.bar.baz")
expect(observeHandler).toHaveBeenCalledWith config.get("foo.bar.baz"), {previous: ['a', 'b', 'c']}
describe ".getPositiveInt(keyPath, defaultValue)", ->
it "returns the proper current or default value", ->
@@ -77,8 +90,10 @@ describe "Config", ->
expect(config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
describe ".save()", ->
nodeFs = require 'fs'
beforeEach ->
spyOn(fs, 'writeFileSync')
spyOn(nodeFs, 'writeFileSync')
jasmine.unspy config, 'save'
describe "when ~/.atom/config.json exists", ->
@@ -89,11 +104,11 @@ describe "Config", ->
config.set("x.y.z", 3)
config.setDefaults("a.b", e: 4, f: 5)
fs.writeFileSync.reset()
nodeFs.writeFileSync.reset()
config.save()
expect(fs.writeFileSync.argsForCall[0][0]).toBe(path.join(config.configDirPath, "config.json"))
writtenConfig = JSON.parse(fs.writeFileSync.argsForCall[0][1])
expect(nodeFs.writeFileSync.argsForCall[0][0]).toBe(path.join(config.configDirPath, "config.json"))
writtenConfig = JSON.parse(nodeFs.writeFileSync.argsForCall[0][1])
expect(writtenConfig).toEqual config.settings
describe "when ~/.atom/config.json doesn't exist", ->
@@ -104,12 +119,12 @@ describe "Config", ->
config.set("x.y.z", 3)
config.setDefaults("a.b", e: 4, f: 5)
fs.writeFileSync.reset()
nodeFs.writeFileSync.reset()
config.save()
expect(fs.writeFileSync.argsForCall[0][0]).toBe(path.join(config.configDirPath, "config.cson"))
expect(nodeFs.writeFileSync.argsForCall[0][0]).toBe(path.join(config.configDirPath, "config.cson"))
CoffeeScript = require 'coffee-script'
writtenConfig = CoffeeScript.eval(fs.writeFileSync.argsForCall[0][1], bare: true)
writtenConfig = CoffeeScript.eval(nodeFs.writeFileSync.argsForCall[0][1], bare: true)
expect(writtenConfig).toEqual config.settings
describe ".setDefaults(keyPath, defaults)", ->
@@ -138,34 +153,34 @@ describe "Config", ->
it "fires the callback every time the observed value changes", ->
observeHandler.reset() # clear the initial call
config.set('foo.bar.baz', "value 2")
expect(observeHandler).toHaveBeenCalledWith("value 2")
expect(observeHandler).toHaveBeenCalledWith("value 2", {previous: 'value 1'})
observeHandler.reset()
config.set('foo.bar.baz', "value 1")
expect(observeHandler).toHaveBeenCalledWith("value 1")
expect(observeHandler).toHaveBeenCalledWith("value 1", {previous: 'value 2'})
it "fires the callback when the observed value is deleted", ->
observeHandler.reset() # clear the initial call
config.set('foo.bar.baz', undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined, {previous: 'value 1'})
it "fires the callback when the full key path goes into and out of existence", ->
observeHandler.reset() # clear the initial call
config.set("foo.bar", undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined, {previous: 'value 1'})
observeHandler.reset()
config.set("foo.bar.baz", "i'm back")
expect(observeHandler).toHaveBeenCalledWith("i'm back")
expect(observeHandler).toHaveBeenCalledWith("i'm back", {previous: undefined})
describe ".initializeConfigDirectory()", ->
beforeEach ->
config.configDirPath = '/tmp/dot-atom-dir'
expect(fsUtils.exists(config.configDirPath)).toBeFalsy()
config.configDirPath = dotAtomPath
expect(fs.exists(config.configDirPath)).toBeFalsy()
afterEach ->
fsUtils.remove('/tmp/dot-atom-dir') if fsUtils.exists('/tmp/dot-atom-dir')
fs.remove(dotAtomPath) if fs.exists(dotAtomPath)
describe "when the configDirPath doesn't exist", ->
it "copies the contents of dot-atom to ~/.atom", ->
@@ -177,24 +192,23 @@ describe "Config", ->
waitsFor -> initializationDone
runs ->
expect(fsUtils.exists(config.configDirPath)).toBeTruthy()
expect(fsUtils.exists(path.join(config.configDirPath, 'packages'))).toBeTruthy()
expect(fsUtils.exists(path.join(config.configDirPath, 'snippets'))).toBeTruthy()
expect(fsUtils.exists(path.join(config.configDirPath, 'themes'))).toBeTruthy()
expect(fsUtils.isFileSync(path.join(config.configDirPath, 'config.cson'))).toBeTruthy()
expect(fs.exists(config.configDirPath)).toBeTruthy()
expect(fs.exists(path.join(config.configDirPath, 'packages'))).toBeTruthy()
expect(fs.exists(path.join(config.configDirPath, 'snippets'))).toBeTruthy()
expect(fs.isFileSync(path.join(config.configDirPath, 'config.cson'))).toBeTruthy()
describe ".loadUserConfig()", ->
beforeEach ->
config.configDirPath = '/tmp/dot-atom-dir'
config.configDirPath = dotAtomPath
config.configFilePath = path.join(config.configDirPath, "config.cson")
expect(fsUtils.exists(config.configDirPath)).toBeFalsy()
expect(fs.exists(config.configDirPath)).toBeFalsy()
afterEach ->
fsUtils.remove('/tmp/dot-atom-dir') if fsUtils.exists('/tmp/dot-atom-dir')
fs.remove(dotAtomPath) if fs.exists(dotAtomPath)
describe "when the config file contains valid cson", ->
beforeEach ->
fsUtils.writeSync(config.configFilePath, "foo: bar: 'baz'")
fs.writeSync(config.configFilePath, "foo: bar: 'baz'")
config.loadUserConfig()
it "updates the config data based on the file contents", ->
@@ -203,7 +217,7 @@ describe "Config", ->
describe "when the config file contains invalid cson", ->
beforeEach ->
spyOn(console, 'error')
fsUtils.writeSync(config.configFilePath, "{{{{{")
fs.writeSync(config.configFilePath, "{{{{{")
it "logs an error to the console and does not overwrite the config file on a subsequent save", ->
config.loadUserConfig()
@@ -213,19 +227,19 @@ describe "Config", ->
describe "when the config file does not exist", ->
it "creates it with an empty object", ->
fsUtils.makeTree(config.configDirPath)
fs.makeTree(config.configDirPath)
config.loadUserConfig()
expect(fsUtils.exists(config.configFilePath)).toBe true
expect(fs.exists(config.configFilePath)).toBe true
expect(CSON.readFileSync(config.configFilePath)).toEqual {}
describe ".observeUserConfig()", ->
updatedHandler = null
beforeEach ->
config.configDirPath = '/tmp/dot-atom-dir'
config.configDirPath = dotAtomPath
config.configFilePath = path.join(config.configDirPath, "config.cson")
expect(fsUtils.exists(config.configDirPath)).toBeFalsy()
fsUtils.writeSync(config.configFilePath, "foo: bar: 'baz'")
expect(fs.exists(config.configDirPath)).toBeFalsy()
fs.writeSync(config.configFilePath, "foo: bar: 'baz'")
config.loadUserConfig()
config.observeUserConfig()
updatedHandler = jasmine.createSpy("updatedHandler")
@@ -233,11 +247,11 @@ describe "Config", ->
afterEach ->
config.unobserveUserConfig()
fsUtils.remove('/tmp/dot-atom-dir') if fsUtils.exists('/tmp/dot-atom-dir')
fs.remove(dotAtomPath) if fs.exists(dotAtomPath)
describe "when the config file changes to contain valid cson", ->
it "updates the config data", ->
fsUtils.writeSync(config.configFilePath, "foo: { bar: 'quux', baz: 'bar'}")
fs.writeSync(config.configFilePath, "foo: { bar: 'quux', baz: 'bar'}")
waitsFor 'update event', -> updatedHandler.callCount > 0
runs ->
expect(config.get('foo.bar')).toBe 'quux'
@@ -246,7 +260,7 @@ describe "Config", ->
describe "when the config file changes to contain invalid cson", ->
beforeEach ->
spyOn(console, 'error')
fsUtils.writeSync(config.configFilePath, "}}}")
fs.writeSync(config.configFilePath, "}}}")
waitsFor "error to be logged", -> console.error.callCount > 0
it "logs a warning and does not update config data", ->
@@ -257,7 +271,7 @@ describe "Config", ->
describe "when the config file subsequently changes again to contain valid cson", ->
beforeEach ->
fsUtils.writeSync(config.configFilePath, "foo: bar: 'baz'")
fs.writeSync(config.configFilePath, "foo: bar: 'baz'")
waitsFor 'update event', -> updatedHandler.callCount > 0
it "updates the config data and resumes saving", ->
+122
Ver Arquivo
@@ -0,0 +1,122 @@
{$$} = require 'atom'
ContextMenuManager = require '../src/context-menu-manager'
describe "ContextMenuManager", ->
[contextMenu] = []
beforeEach ->
contextMenu = new ContextMenuManager
describe "adding definitions", ->
it 'loads', ->
contextMenu.add 'file-path',
'.selector':
'label': 'command'
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
describe 'dev mode', ->
it 'loads', ->
contextMenu.add 'file-path',
'.selector':
'label': 'command'
, devMode: true
expect(contextMenu.devModeDefinitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.devModeDefinitions['.selector'][0].command).toEqual 'command'
describe "building a menu template", ->
beforeEach ->
contextMenu.definitions = {
'.parent':[
label: 'parent'
command: 'command-p'
]
'.child': [
label: 'child'
command: 'command-c'
]
}
contextMenu.devModeDefinitions =
'.parent': [
label: 'dev-label'
command: 'dev-command'
]
describe "on a single element", ->
[element] = []
beforeEach ->
element = ($$ -> @div class: 'parent')[0]
it "creates a menu with a single item", ->
menu = contextMenu.combinedMenuTemplateForElement(element)
expect(menu[0].label).toEqual 'parent'
expect(menu[0].command).toEqual 'command-p'
expect(menu[1]).toBeUndefined()
describe "in devMode", ->
beforeEach -> contextMenu.devMode = true
it "creates a menu with development items", ->
menu = contextMenu.combinedMenuTemplateForElement(element)
expect(menu[0].label).toEqual 'parent'
expect(menu[0].command).toEqual 'command-p'
expect(menu[1].type).toEqual 'separator'
expect(menu[2].label).toEqual 'dev-label'
expect(menu[2].command).toEqual 'dev-command'
describe "on multiple elements", ->
[element] = []
beforeEach ->
element = $$ ->
@div class: 'parent', =>
@div class: 'child'
element = element.find('.child')[0]
it "creates a menu with a two items", ->
menu = contextMenu.combinedMenuTemplateForElement(element)
expect(menu[0].label).toEqual 'child'
expect(menu[0].command).toEqual 'command-c'
expect(menu[1].label).toEqual 'parent'
expect(menu[1].command).toEqual 'command-p'
expect(menu[2]).toBeUndefined()
describe "in devMode", ->
beforeEach -> contextMenu.devMode = true
xit "creates a menu with development items", ->
menu = contextMenu.combinedMenuTemplateForElement(element)
expect(menu[0].label).toEqual 'child'
expect(menu[0].command).toEqual 'command-c'
expect(menu[1].label).toEqual 'parent'
expect(menu[1].command).toEqual 'command-p'
expect(menu[2].label).toEqual 'dev-label'
expect(menu[2].command).toEqual 'dev-command'
expect(menu[3]).toBeUndefined()
describe "#executeBuildHandlers", ->
menuTemplate = [
label: 'label'
executeAtBuild: ->
]
event =
target: null
it 'should invoke the executeAtBuild fn', ->
buildFn = spyOn(menuTemplate[0], 'executeAtBuild')
contextMenu.executeBuildHandlers(event, menuTemplate)
expect(buildFn).toHaveBeenCalled()
expect(buildFn.mostRecentCall.args[0]).toBe event
+33
Ver Arquivo
@@ -0,0 +1,33 @@
DeserializerManager = require '../src/deserializer-manager'
describe ".deserialize(state)", ->
deserializer = null
class Foo
@deserialize: ({name}) -> new Foo(name)
constructor: (@name) ->
beforeEach ->
deserializer = new DeserializerManager()
deserializer.add(Foo)
it "calls deserialize on the deserializer for the given state object, or returns undefined if one can't be found", ->
spyOn(console, 'warn')
object = deserializer.deserialize({ deserializer: 'Foo', name: 'Bar' })
expect(object.name).toBe 'Bar'
expect(deserializer.deserialize({ deserializer: 'Bogus' })).toBeUndefined()
describe "when the deserializer has a version", ->
beforeEach ->
Foo.version = 2
describe "when the deserialized state has a matching version", ->
it "attempts to deserialize the state", ->
object = deserializer.deserialize({ deserializer: 'Foo', version: 2, name: 'Bar' })
expect(object.name).toBe 'Bar'
describe "when the deserialized state has a non-matching version", ->
it "returns undefined", ->
expect(deserializer.deserialize({ deserializer: 'Foo', version: 3, name: 'Bar' })).toBeUndefined()
expect(deserializer.deserialize({ deserializer: 'Foo', version: 1, name: 'Bar' })).toBeUndefined()
expect(deserializer.deserialize({ deserializer: 'Foo', name: 'Bar' })).toBeUndefined()
@@ -1,12 +1,12 @@
Directory = require 'directory'
fsUtils = require 'fs-utils'
Directory = require '../src/directory'
{fs} = require 'atom'
path = require 'path'
describe "Directory", ->
directory = null
beforeEach ->
directory = new Directory(fsUtils.resolveOnLoadPath('fixtures'))
directory = new Directory(path.join(__dirname, 'fixtures'))
afterEach ->
directory.off()
@@ -15,11 +15,11 @@ describe "Directory", ->
temporaryFilePath = null
beforeEach ->
temporaryFilePath = path.join(fsUtils.resolveOnLoadPath('fixtures'), 'temporary')
fsUtils.remove(temporaryFilePath) if fsUtils.exists(temporaryFilePath)
temporaryFilePath = path.join(__dirname, 'fixtures', 'temporary')
fs.remove(temporaryFilePath) if fs.exists(temporaryFilePath)
afterEach ->
fsUtils.remove(temporaryFilePath) if fsUtils.exists(temporaryFilePath)
fs.remove(temporaryFilePath) if fs.exists(temporaryFilePath)
it "triggers 'contents-changed' event handlers", ->
changeHandler = null
@@ -27,13 +27,13 @@ describe "Directory", ->
runs ->
changeHandler = jasmine.createSpy('changeHandler')
directory.on 'contents-changed', changeHandler
fsUtils.writeSync(temporaryFilePath, '')
fs.writeSync(temporaryFilePath, '')
waitsFor "first change", -> changeHandler.callCount > 0
runs ->
changeHandler.reset()
fsUtils.remove(temporaryFilePath)
fs.remove(temporaryFilePath)
waitsFor "second change", -> changeHandler.callCount > 0
@@ -42,10 +42,10 @@ describe "Directory", ->
beforeEach ->
temporaryFilePath = path.join(directory.path, 'temporary')
fsUtils.remove(temporaryFilePath) if fsUtils.exists(temporaryFilePath)
fs.remove(temporaryFilePath) if fs.exists(temporaryFilePath)
afterEach ->
fsUtils.remove(temporaryFilePath) if fsUtils.exists(temporaryFilePath)
fs.remove(temporaryFilePath) if fs.exists(temporaryFilePath)
it "no longer triggers events", ->
changeHandler = null
@@ -53,7 +53,7 @@ describe "Directory", ->
runs ->
changeHandler = jasmine.createSpy('changeHandler')
directory.on 'contents-changed', changeHandler
fsUtils.writeSync(temporaryFilePath, '')
fs.writeSync(temporaryFilePath, '')
waitsFor "change event", -> changeHandler.callCount > 0
@@ -62,7 +62,7 @@ describe "Directory", ->
directory.off()
waits 20
runs -> fsUtils.remove(temporaryFilePath)
runs -> fs.remove(temporaryFilePath)
waits 20
runs -> expect(changeHandler.callCount).toBe 0
@@ -84,9 +84,9 @@ describe "Directory", ->
expect(directory.relativize(path.join(absolutePath, "file.coffee"))).toBe "file.coffee"
it "returns a relative path based on the directory's symlinked source path", ->
symlinkPath = path.join(fsUtils.resolveOnLoadPath('fixtures'), 'symlink-to-dir')
symlinkPath = path.join(__dirname, 'fixtures', 'symlink-to-dir')
symlinkDirectory = new Directory(symlinkPath)
realFilePath = fsUtils.resolveOnLoadPath('fixtures/dir/a')
realFilePath = require.resolve('./fixtures/dir/a')
expect(symlinkDirectory.relativize(symlinkPath)).toBe ''
expect(symlinkDirectory.relativize(realFilePath)).toBe 'a'
@@ -97,13 +97,13 @@ describe "Directory", ->
it "returns true if the path is a child of the directory's path", ->
absolutePath = directory.getPath()
expect(directory.contains(path.join(absolutePath, "b"))).toBe true
expect(directory.contains(path.join(absolutePath, "b/file.coffee"))).toBe true
expect(directory.contains(path.join(absolutePath, "b", "file.coffee"))).toBe true
expect(directory.contains(path.join(absolutePath, "file.coffee"))).toBe true
it "returns true if the path is a child of the directory's symlinked source path", ->
symlinkPath = path.join(fsUtils.resolveOnLoadPath('fixtures'), 'symlink-to-dir')
symlinkPath = path.join(__dirname, 'fixtures', 'symlink-to-dir')
symlinkDirectory = new Directory(symlinkPath)
realFilePath = fsUtils.resolveOnLoadPath('fixtures/dir/a')
realFilePath = require.resolve('./fixtures/dir/a')
expect(symlinkDirectory.contains(realFilePath)).toBe true
it "returns false if the directory's path is not a prefix of the path", ->
@@ -1,20 +1,55 @@
DisplayBuffer = require 'display-buffer'
Buffer = require 'text-buffer'
_ = require 'underscore'
DisplayBuffer = require '../src/display-buffer'
{_} = require 'atom'
describe "DisplayBuffer", ->
[displayBuffer, buffer, changeHandler, tabLength] = []
beforeEach ->
tabLength = 2
atom.activatePackage('javascript-tmbundle', sync: true)
buffer = project.bufferForPath('sample.js')
displayBuffer = new DisplayBuffer(buffer, { tabLength })
displayBuffer.on 'changed', changeHandler = jasmine.createSpy 'changeHandler'
atom.activatePackage('language-javascript', sync: true)
buffer = project.bufferForPathSync('sample.js')
displayBuffer = new DisplayBuffer({buffer, tabLength})
changeHandler = jasmine.createSpy 'changeHandler'
displayBuffer.on 'changed', changeHandler
afterEach ->
displayBuffer.destroy()
buffer.release()
describe "@deserialize(state)", ->
it "constructs a display buffer with the same buffer, folds, editorWidthInChars, and tabLength", ->
displayBuffer.setTabLength(4)
displayBuffer.setEditorWidthInChars(64)
displayBuffer.createFold(2, 4)
displayBuffer2 = deserialize(displayBuffer.serialize())
expect(displayBuffer2.id).toBe displayBuffer.id
expect(displayBuffer2.buffer).toBe displayBuffer.buffer
expect(displayBuffer2.tokenizedBuffer.buffer).toBe displayBuffer.tokenizedBuffer.buffer
expect(displayBuffer2.isFoldedAtBufferRow(2)).toBeTruthy()
expect(displayBuffer2.getSoftWrapColumn()).toBe displayBuffer.getSoftWrapColumn()
expect(displayBuffer2.getTabLength()).toBe displayBuffer.getTabLength()
describe ".copy()", ->
it "creates a new DisplayBuffer with the same initial state", ->
marker1 = displayBuffer.markBufferRange([[1, 2], [3, 4]], id: 1)
marker2 = displayBuffer.markBufferRange([[2, 3], [4, 5]], isReversed: true, id: 2)
marker3 = displayBuffer.markBufferPosition([5, 6], id: 3)
displayBuffer.createFold(3, 5)
displayBuffer2 = displayBuffer.copy()
expect(displayBuffer2.id).not.toBe displayBuffer.id
expect(displayBuffer2.buffer).toBe displayBuffer.buffer
expect(displayBuffer2.getTabLength()).toBe displayBuffer.getTabLength()
expect(displayBuffer2.getMarkerCount()).toEqual displayBuffer.getMarkerCount()
expect(displayBuffer2.findMarker(id: 1)).toEqual marker1
expect(displayBuffer2.findMarker(id: 2)).toEqual marker2
expect(displayBuffer2.findMarker(id: 3)).toEqual marker3
expect(displayBuffer2.isFoldedAtBufferRow(3)).toBeTruthy()
# can diverge from origin
displayBuffer2.destroyFoldsContainingBufferRow(3)
expect(displayBuffer2.isFoldedAtBufferRow(3)).not.toBe displayBuffer.isFoldedAtBufferRow(3)
describe "when the buffer changes", ->
it "renders line numbers correctly", ->
originalLineCount = displayBuffer.getLineCount()
@@ -24,10 +59,23 @@ describe "DisplayBuffer", ->
describe "soft wrapping", ->
beforeEach ->
displayBuffer.setSoftWrapColumn(50)
displayBuffer.setSoftWrap(true)
displayBuffer.setEditorWidthInChars(50)
changeHandler.reset()
describe "rendering of soft-wrapped lines", ->
describe "when editor.softWrapAtPreferredLineLength is set", ->
it "uses the preferred line length as the soft wrap column when it is less than the configured soft wrap column", ->
config.set('editor.preferredLineLength', 100)
config.set('editor.softWrapAtPreferredLineLength', true)
expect(displayBuffer.lineForRow(10).text).toBe ' return '
config.set('editor.preferredLineLength', 5)
expect(displayBuffer.lineForRow(10).text).toBe 'funct'
config.set('editor.softWrapAtPreferredLineLength', false)
expect(displayBuffer.lineForRow(10).text).toBe ' return '
describe "when the line is shorter than the max line length", ->
it "renders the line unchanged", ->
expect(displayBuffer.lineForRow(0).text).toBe buffer.lineForRow(0)
@@ -45,7 +93,7 @@ describe "DisplayBuffer", ->
describe "when there is no whitespace before the boundary", ->
it "wraps the line exactly at the boundary since there's no more graceful place to wrap it", ->
buffer.change([[0, 0], [1, 0]], 'abcdefghijklmnopqrstuvwxyz\n')
displayBuffer.setSoftWrapColumn(10)
displayBuffer.setEditorWidthInChars(10)
expect(displayBuffer.lineForRow(0).text).toBe 'abcdefghij'
expect(displayBuffer.lineForRow(1).text).toBe 'klmnopqrst'
expect(displayBuffer.lineForRow(2).text).toBe 'uvwxyz'
@@ -104,6 +152,20 @@ describe "DisplayBuffer", ->
expect(changeHandler).toHaveBeenCalledWith(start: 3, end: 9, screenDelta: -6, bufferDelta: -4)
describe "when a newline is inserted, deleted, and re-inserted at the end of a wrapped line (regression)", ->
it "correctly renders the original wrapped line", ->
buffer = project.buildBufferSync(null, '')
displayBuffer = new DisplayBuffer({buffer, tabLength, editorWidthInChars: 30, softWrap: true})
buffer.insert([0, 0], "the quick brown fox jumps over the lazy dog.")
buffer.insert([0, Infinity], '\n')
buffer.delete([[0, Infinity], [1, 0]])
buffer.insert([0, Infinity], '\n')
expect(displayBuffer.lineForRow(0).text).toBe "the quick brown fox jumps over "
expect(displayBuffer.lineForRow(1).text).toBe "the lazy dog."
expect(displayBuffer.lineForRow(2).text).toBe ""
describe "position translation", ->
it "translates positions accounting for wrapped lines", ->
# before any wrapped lines
@@ -132,9 +194,9 @@ describe "DisplayBuffer", ->
expect(displayBuffer.bufferPositionForScreenPosition([3, -5])).toEqual([3, 0])
expect(displayBuffer.bufferPositionForScreenPosition([3, Infinity])).toEqual([3, 50])
describe ".setSoftWrapColumn(length)", ->
describe ".setEditorWidthInChars(length)", ->
it "changes the length at which lines are wrapped and emits a change event for all screen lines", ->
displayBuffer.setSoftWrapColumn(40)
displayBuffer.setEditorWidthInChars(40)
expect(tokensText displayBuffer.lineForRow(4).tokens).toBe 'left = [], right = [];'
expect(tokensText displayBuffer.lineForRow(5).tokens).toBe ' while(items.length > 0) {'
expect(tokensText displayBuffer.lineForRow(12).tokens).toBe 'sort(left).concat(pivot).concat(sort(rig'
@@ -144,14 +206,15 @@ describe "DisplayBuffer", ->
beforeEach ->
displayBuffer.destroy()
buffer.release()
buffer = project.bufferForPath('two-hundred.txt')
displayBuffer = new DisplayBuffer(buffer, { tabLength })
buffer = project.bufferForPathSync('two-hundred.txt')
displayBuffer = new DisplayBuffer({buffer, tabLength})
displayBuffer.on 'changed', changeHandler
describe "when folds are created and destroyed", ->
describe "when a fold spans multiple lines", ->
it "replaces the lines spanned by the fold with a placeholder that references the fold object", ->
fold = displayBuffer.createFold(4, 7)
expect(fold).toBeDefined()
[line4, line5] = displayBuffer.linesForRows(4, 5)
expect(line4.fold).toBe fold
@@ -250,7 +313,7 @@ describe "DisplayBuffer", ->
describe "when there is another display buffer pointing to the same buffer", ->
it "does not create folds in the other display buffer", ->
otherDisplayBuffer = new DisplayBuffer(buffer, { tabLength })
otherDisplayBuffer = new DisplayBuffer({buffer, tabLength})
displayBuffer.createFold(2, 4)
expect(otherDisplayBuffer.foldsStartingAtBufferRow(2).length).toBe 0
@@ -274,7 +337,7 @@ describe "DisplayBuffer", ->
expect(changeHandler).toHaveBeenCalledWith(start: 1, end: 3, screenDelta: -2, bufferDelta: -4)
describe "when the changes is subsequently undone", ->
it "restores destroyed folds", ->
xit "restores destroyed folds", ->
buffer.undo()
expect(displayBuffer.lineForRow(2).text).toBe '2'
expect(displayBuffer.lineForRow(2).fold).toBe fold1
@@ -454,7 +517,8 @@ describe "DisplayBuffer", ->
describe ".clipScreenPosition(screenPosition, wrapBeyondNewlines: false, wrapAtSoftNewlines: false, skipAtomicTokens: false)", ->
beforeEach ->
displayBuffer.setSoftWrapColumn(50)
displayBuffer.setSoftWrap(true)
displayBuffer.setEditorWidthInChars(50)
it "allows valid positions", ->
expect(displayBuffer.clipScreenPosition([4, 5])).toEqual [4, 5]
@@ -601,8 +665,8 @@ describe "DisplayBuffer", ->
oldTailBufferPosition: [8, 4]
newTailScreenPosition: [5, 4]
newTailBufferPosition: [8, 4]
bufferChanged: false
valid: true
textChanged: false
isValid: true
}
markerChangedHandler.reset()
@@ -617,8 +681,8 @@ describe "DisplayBuffer", ->
oldTailBufferPosition: [8, 4]
newTailScreenPosition: [5, 4]
newTailBufferPosition: [8, 4]
bufferChanged: true
valid: true
textChanged: true
isValid: true
}
markerChangedHandler.reset()
@@ -633,8 +697,8 @@ describe "DisplayBuffer", ->
oldTailBufferPosition: [8, 4]
newTailScreenPosition: [8, 4]
newTailBufferPosition: [8, 4]
bufferChanged: false
valid: true
textChanged: false
isValid: true
}
markerChangedHandler.reset()
@@ -649,8 +713,8 @@ describe "DisplayBuffer", ->
oldTailBufferPosition: [8, 4]
newTailScreenPosition: [5, 4]
newTailBufferPosition: [8, 4]
bufferChanged: false
valid: true
textChanged: false
isValid: true
}
it "triggers the 'changed' event whenever the marker tail's position changes in the buffer or on screen", ->
@@ -665,8 +729,8 @@ describe "DisplayBuffer", ->
oldTailBufferPosition: [8, 4]
newTailScreenPosition: [8, 20]
newTailBufferPosition: [11, 20]
bufferChanged: false
valid: true
textChanged: false
isValid: true
}
markerChangedHandler.reset()
@@ -681,24 +745,24 @@ describe "DisplayBuffer", ->
oldTailBufferPosition: [11, 20]
newTailScreenPosition: [8, 23]
newTailBufferPosition: [11, 23]
bufferChanged: true
valid: true
textChanged: true
isValid: true
}
it "triggers the 'changed' event whenever the marker is invalidated or revalidated", ->
xit "triggers the 'changed' event whenever the marker is invalidated or revalidated", ->
buffer.deleteRow(8)
expect(markerChangedHandler).toHaveBeenCalled()
expect(markerChangedHandler.argsForCall[0][0]).toEqual {
oldHeadScreenPosition: [5, 10]
oldHeadBufferPosition: [8, 10]
newHeadScreenPosition: [5, 10]
newHeadBufferPosition: [8, 10]
newHeadBufferPosition: [8, 0]
oldTailScreenPosition: [5, 4]
oldTailBufferPosition: [8, 4]
newTailScreenPosition: [5, 4]
newTailBufferPosition: [8, 4]
bufferChanged: true
valid: false
newTailBufferPosition: [8, 0]
textChanged: true
isValid: false
}
markerChangedHandler.reset()
@@ -714,15 +778,15 @@ describe "DisplayBuffer", ->
oldTailBufferPosition: [8, 4]
newTailScreenPosition: [5, 4]
newTailBufferPosition: [8, 4]
bufferChanged: true
valid: true
textChanged: true
isValid: true
}
it "does not call the callback for screen changes that don't change the position of the marker", ->
displayBuffer.createFold(10, 11)
expect(markerChangedHandler).not.toHaveBeenCalled()
it "updates markers before emitting buffer change events, but does not notify their observers until the change event", ->
xit "updates markers before emitting buffer change events, but does not notify their observers until the change event", ->
marker2 = displayBuffer.markBufferRange([[8, 1], [8, 1]])
marker2.on 'changed', marker2ChangedHandler = jasmine.createSpy("marker2ChangedHandler")
displayBuffer.on 'changed', changeHandler = jasmine.createSpy("changeHandler").andCallFake -> onDisplayBufferChange()
@@ -839,3 +903,15 @@ describe "DisplayBuffer", ->
marker2.on 'destroyed', destroyedHandler
buffer.getMarker(marker2.id).destroy()
expect(destroyedHandler).toHaveBeenCalled()
describe "DisplayBufferMarker.copy(attributes)", ->
it "creates a copy of the marker with the given attributes merged in", ->
initialMarkerCount = displayBuffer.getMarkerCount()
marker1 = displayBuffer.markScreenRange([[5, 4], [5, 10]], a: 1, b: 2)
expect(displayBuffer.getMarkerCount()).toBe initialMarkerCount + 1
marker2 = marker1.copy(b: 3)
expect(marker2.getBufferRange()).toEqual marker1.getBufferRange()
expect(displayBuffer.getMarkerCount()).toBe initialMarkerCount + 2
expect(marker1.getAttributes()).toEqual a: 1, b: 2
expect(marker2.getAttributes()).toEqual a: 1, b: 3
+62
Ver Arquivo
@@ -0,0 +1,62 @@
{Site} = require 'telepath'
Environment = require './environment'
describe "EditSession replication", ->
[env1, env2, editSession1, editSession2] = []
beforeEach ->
env1 = new Environment(siteId: 1)
env2 = env1.clone(siteId: 2)
envConnection = env1.connect(env2)
doc2 = null
env1.run ->
editSession1 = project.openSync('sample.js')
editSession1.setScrollTop(5)
editSession1.setScrollLeft(5)
editSession1.setCursorScreenPosition([0, 5])
editSession1.addSelectionForBufferRange([[1, 2], [3, 4]])
doc1 = editSession1.getState()
doc2 = doc1.clone(env2.site)
envConnection.connect(doc1, doc2)
env2.run ->
editSession2 = deserialize(doc2)
afterEach ->
env1.destroy()
env2.destroy()
it "replicates the selections of existing replicas", ->
expect(editSession2.getRemoteSelectedBufferRanges()).toEqual editSession1.getSelectedBufferRanges()
editSession1.getLastSelection().setBufferRange([[2, 3], [4, 5]])
expect(editSession2.getRemoteSelectedBufferRanges()).toEqual editSession1.getSelectedBufferRanges()
editSession1.addCursorAtBufferPosition([5, 6])
expect(editSession2.getRemoteSelectedBufferRanges()).toEqual editSession1.getSelectedBufferRanges()
editSession1.consolidateSelections()
expect(editSession2.getRemoteSelectedBufferRanges()).toEqual editSession1.getSelectedBufferRanges()
it "introduces a local cursor for a new replica at the position of the last remote cursor", ->
expect(editSession2.getCursors().length).toBe 1
expect(editSession2.getSelections().length).toBe 1
expect(editSession2.getCursorBufferPosition()).toEqual [3, 4]
expect(editSession2.getSelectedBufferRanges()).toEqual [[[3, 4], [3, 4]]]
expect(editSession1.getRemoteCursors().length).toBe 1
expect(editSession1.getRemoteSelections().length).toBe 1
[cursor] = editSession1.getRemoteCursors()
[selection] = editSession1.getRemoteSelections()
expect(cursor.getBufferPosition()).toEqual [3, 4]
expect(selection.getBufferRange()).toEqual [[3, 4], [3, 4]]
it "replicates the scroll position", ->
expect(editSession2.getScrollTop()).toBe editSession1.getScrollTop()
expect(editSession2.getScrollLeft()).toBe editSession1.getScrollLeft()
editSession1.setScrollTop(10)
expect(editSession2.getScrollTop()).toBe 10
editSession2.setScrollLeft(20)
expect(editSession1.getScrollLeft()).toBe 20
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+37
Ver Arquivo
@@ -0,0 +1,37 @@
{Site} = require 'telepath'
Editor = require '../src/editor'
Environment = require './environment'
describe "Editor replication", ->
[env1, env2, editSession1, editSession2, editor1, editor2] = []
beforeEach ->
env1 = new Environment(siteId: 1)
env2 = env1.clone(siteId: 2)
envConnection = env1.connect(env2)
doc2 = null
env1.run ->
editSession1 = project.openSync('sample.js')
editSession1.setSelectedBufferRange([[1, 2], [3, 4]])
doc1 = editSession1.getState()
doc2 = doc1.clone(env2.site)
envConnection.connect(doc1, doc2)
editor1 = new Editor(editSession1)
editor1.attachToDom()
env2.run ->
editSession2 = deserialize(doc2)
editor2 = new Editor(editSession2)
editor2.attachToDom()
afterEach ->
env1.destroy()
env2.destroy()
it "displays the cursors and selections from all replicas", ->
expect(editor1.getSelectionViews().length).toBe 2
expect(editor2.getSelectionViews().length).toBe 2
expect(editor1.getCursorViews().length).toBe 2
expect(editor2.getCursorViews().length).toBe 2
@@ -1,27 +1,21 @@
RootView = require 'root-view'
EditSession = require 'edit-session'
Buffer = require 'text-buffer'
Editor = require 'editor'
Range = require 'range'
Project = require 'project'
$ = require 'jquery'
{$$} = require 'space-pen'
_ = require 'underscore'
fsUtils = require 'fs-utils'
{_, $, $$, fs, Editor, Range, RootView} = require 'atom'
path = require 'path'
temp = require 'temp'
describe "Editor", ->
[buffer, editor, editSession, cachedLineHeight, cachedCharWidth] = []
beforeEach ->
atom.activatePackage('text-tmbundle', sync: true)
atom.activatePackage('javascript-tmbundle', sync: true)
editSession = project.open('sample.js')
atom.activatePackage('language-text', sync: true)
atom.activatePackage('language-javascript', sync: true)
editSession = project.openSync('sample.js')
buffer = editSession.buffer
editor = new Editor(editSession)
editor.lineOverdraw = 2
editor.isFocused = true
editor.enableKeymap()
editor.calculateHeightInLines = ->
Math.ceil(@height() / @lineHeight)
editor.attachToDom = ({ heightInLines, widthInChars } = {}) ->
heightInLines ?= @getBuffer().getLineCount()
@height(getLineHeight() * heightInLines)
@@ -39,7 +33,7 @@ describe "Editor", ->
cachedCharWidth
calcDimensions = ->
editorForMeasurement = new Editor(editSession: project.open('sample.js'))
editorForMeasurement = new Editor(editSession: project.openSync('sample.js'))
editorForMeasurement.attachToDom()
cachedLineHeight = editorForMeasurement.lineHeight
cachedCharWidth = editorForMeasurement.charWidth
@@ -72,6 +66,15 @@ describe "Editor", ->
expect(editor).not.toMatchSelector ':focus'
expect(editor.hiddenInput).toMatchSelector ':focus'
it "does not scroll the editor (regression)", ->
editor.attachToDom(heightInLines: 2)
editor.selectAll()
editor.hiddenInput.blur()
editor.focus()
expect(editor.hiddenInput).toMatchSelector ':focus'
expect($(editor[0]).scrollTop()).toBe 0
describe "when the hidden input is focused / unfocused", ->
it "assigns the isFocused flag on the editor and also adds/removes the .focused css class", ->
editor.attachToDom()
@@ -84,9 +87,9 @@ describe "Editor", ->
describe "when the activeEditSession's file is modified on disk", ->
it "triggers an alert", ->
filePath = "/tmp/atom-changed-file.txt"
fsUtils.writeSync(filePath, "")
editSession = project.open(filePath)
filePath = path.join(temp.dir, 'atom-changed-file.txt')
fs.writeSync(filePath, "")
editSession = project.openSync(filePath)
editor.edit(editSession)
editor.insertText("now the buffer is modified")
@@ -95,7 +98,7 @@ describe "Editor", ->
spyOn(atom, "confirm")
fsUtils.writeSync(filePath, "a file change")
fs.writeSync(filePath, "a file change")
waitsFor "file to trigger contents-changed event", ->
fileChangeHandler.callCount > 0
@@ -112,26 +115,26 @@ describe "Editor", ->
[newEditSession, newBuffer] = []
beforeEach ->
newEditSession = project.open('two-hundred.txt')
newEditSession = project.openSync('two-hundred.txt')
newBuffer = newEditSession.buffer
it "updates the rendered lines, cursors, selections, scroll position, and event subscriptions to match the given edit session", ->
editor.attachToDom(heightInLines: 5, widthInChars: 30)
editor.setCursorBufferPosition([3, 5])
editor.setCursorBufferPosition([6, 13])
editor.scrollToBottom()
editor.scrollLeft(150)
previousScrollHeight = editor.verticalScrollbar.prop('scrollHeight')
previousScrollTop = editor.scrollTop()
previousScrollLeft = editor.scrollLeft()
newEditSession.setScrollTop(120)
newEditSession.setScrollTop(900)
newEditSession.setSelectedBufferRange([[40, 0], [43, 1]])
editor.edit(newEditSession)
{ firstRenderedScreenRow, lastRenderedScreenRow } = editor
expect(editor.lineElementForScreenRow(firstRenderedScreenRow).text()).toBe newBuffer.lineForRow(firstRenderedScreenRow)
expect(editor.lineElementForScreenRow(lastRenderedScreenRow).text()).toBe newBuffer.lineForRow(editor.lastRenderedScreenRow)
expect(editor.scrollTop()).toBe 120
expect(editor.scrollTop()).toBe 900
expect(editor.scrollLeft()).toBe 0
expect(editor.getSelectionView().regions[0].position().top).toBe 40 * editor.lineHeight
editor.insertText("hello")
@@ -144,14 +147,14 @@ describe "Editor", ->
expect(editor.verticalScrollbar.prop('scrollHeight')).toBe previousScrollHeight
expect(editor.scrollTop()).toBe previousScrollTop
expect(editor.scrollLeft()).toBe previousScrollLeft
expect(editor.getCursorView().position()).toEqual { top: 3 * editor.lineHeight, left: 5 * editor.charWidth }
expect(editor.getCursorView().position()).toEqual { top: 6 * editor.lineHeight, left: 13 * editor.charWidth }
editor.insertText("goodbye")
expect(editor.lineElementForScreenRow(3).text()).toMatch /^ vgoodbyear/
expect(editor.lineElementForScreenRow(6).text()).toMatch /^ currentgoodbye/
it "triggers alert if edit session's buffer goes into conflict with changes on disk", ->
filePath = "/tmp/atom-changed-file.txt"
fsUtils.writeSync(filePath, "")
tempEditSession = project.open(filePath)
filePath = path.join(temp.dir, 'atom-changed-file.txt')
fs.writeSync(filePath, "")
tempEditSession = project.openSync(filePath)
editor.edit(tempEditSession)
tempEditSession.insertText("a buffer change")
@@ -159,7 +162,7 @@ describe "Editor", ->
contentsConflictedHandler = jasmine.createSpy("contentsConflictedHandler")
tempEditSession.on 'contents-conflicted', contentsConflictedHandler
fsUtils.writeSync(filePath, "a file change")
fs.writeSync(filePath, "a file change")
waitsFor ->
contentsConflictedHandler.callCount > 0
@@ -245,11 +248,11 @@ describe "Editor", ->
filePath = null
beforeEach ->
filePath = "/tmp/something.txt"
fsUtils.writeSync(filePath, filePath)
filePath = path.join(temp.dir, 'something.txt')
fs.writeSync(filePath, filePath)
afterEach ->
fsUtils.remove(filePath) if fsUtils.exists(filePath)
fs.remove(filePath) if fs.exists(filePath)
it "emits event when buffer's path is changed", ->
eventHandler = jasmine.createSpy('eventHandler')
@@ -260,7 +263,7 @@ describe "Editor", ->
it "emits event when editor receives a new buffer", ->
eventHandler = jasmine.createSpy('eventHandler')
editor.on 'editor:path-changed', eventHandler
editor.edit(project.open(filePath))
editor.edit(project.openSync(filePath))
expect(eventHandler).toHaveBeenCalled()
it "stops listening to events on previously set buffers", ->
@@ -268,15 +271,15 @@ describe "Editor", ->
oldBuffer = editor.getBuffer()
editor.on 'editor:path-changed', eventHandler
editor.edit(project.open(filePath))
editor.edit(project.openSync(filePath))
expect(eventHandler).toHaveBeenCalled()
eventHandler.reset()
oldBuffer.saveAs("/tmp/atom-bad.txt")
oldBuffer.saveAs(path.join(temp.dir, 'atom-bad.txt'))
expect(eventHandler).not.toHaveBeenCalled()
eventHandler.reset()
editor.getBuffer().saveAs("/tmp/atom-new.txt")
editor.getBuffer().saveAs(path.join(temp.dir, 'atom-new.txt'))
expect(eventHandler).toHaveBeenCalled()
it "loads the grammar for the new path", ->
@@ -286,15 +289,13 @@ describe "Editor", ->
describe "font family", ->
beforeEach ->
expect(editor.css('font-family')).not.toBe 'Courier'
expect(editor.css('font-family')).toBe 'Courier'
it "when there is no config in fontFamily don't set it", ->
expect($("head style.font-family")).not.toExist()
atom.config.set('editor.fontFamily', null)
expect(editor.css('font-family')).toBe ''
describe "when the font family changes", ->
afterEach ->
editor.clearFontFamily()
it "updates the font family of editors and recalculates dimensions critical to cursor positioning", ->
editor.attachToDom(12)
lineHeightBefore = editor.lineHeight
@@ -303,7 +304,6 @@ describe "Editor", ->
config.set("editor.fontFamily", "PCMyungjo")
expect(editor.css('font-family')).toBe 'PCMyungjo'
expect($("head style.editor-font-family").text()).toMatch "{font-family: PCMyungjo}"
expect(editor.charWidth).not.toBe charWidthBefore
expect(editor.getCursorView().position()).toEqual { top: 5 * editor.lineHeight, left: 6 * editor.charWidth }
@@ -317,8 +317,7 @@ describe "Editor", ->
expect(editor.css('font-size')).not.toBe "10px"
it "sets the initial font size based on the value from config", ->
expect($("head style.font-size")).toExist()
expect($("head style.font-size").text()).toMatch "{font-size: #{config.get('editor.fontSize')}px}"
expect(editor.css('font-size')).toBe "#{config.get('editor.fontSize')}px"
describe "when the font size changes", ->
it "updates the font sizes of editors and recalculates dimensions critical to cursor positioning", ->
@@ -404,11 +403,8 @@ describe "Editor", ->
beforeEach ->
editor.setFontFamily('sans-serif')
afterEach ->
editor.clearFontFamily()
it "positions the cursor to the clicked row and column", ->
{top, left} = editor.pixelOffsUtilsetForScreenPosition([3, 30])
{top, left} = editor.pixelOffsetForScreenPosition([3, 30])
editor.renderedLines.trigger mousedownEvent(pageX: left, pageY: top)
expect(editor.getCursorScreenPosition()).toEqual [3, 30]
@@ -440,6 +436,29 @@ describe "Editor", ->
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [3, 12], originalEvent: {detail: 1}, shiftKey: true)
expect(editor.getSelectedBufferRange()).toEqual [[3, 10], [3, 12]]
describe "when clicking between a word and a non-word", ->
it "selects the word", ->
expect(editor.getCursorScreenPosition()).toEqual(row: 0, column: 0)
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [1, 21], originalEvent: {detail: 1})
editor.renderedLines.trigger 'mouseup'
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [1, 21], originalEvent: {detail: 2})
editor.renderedLines.trigger 'mouseup'
expect(editor.getSelectedText()).toBe "function"
editor.setCursorBufferPosition([0, 0])
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [1, 22], originalEvent: {detail: 1})
editor.renderedLines.trigger 'mouseup'
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [1, 22], originalEvent: {detail: 2})
editor.renderedLines.trigger 'mouseup'
expect(editor.getSelectedText()).toBe "items"
editor.setCursorBufferPosition([0, 0])
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [0, 28], originalEvent: {detail: 1})
editor.renderedLines.trigger 'mouseup'
editor.renderedLines.trigger mousedownEvent(editor: editor, point: [0, 28], originalEvent: {detail: 2})
editor.renderedLines.trigger 'mouseup'
expect(editor.getSelectedText()).toBe "{"
describe "triple/quardruple/etc-click", ->
it "selects the line under the cursor", ->
expect(editor.getCursorScreenPosition()).toEqual(row: 0, column: 0)
@@ -884,13 +903,14 @@ describe "Editor", ->
expect(editor.getSelection().isEmpty()).toBeTruthy()
expect(cursorView).toBeVisible()
it "moves the hiddenInput to the same position with cursor's view", ->
editor.setCursorScreenPosition(row: 2, column: 2)
expect(editor.getCursorView().offset()).toEqual(editor.hiddenInput.offset())
describe "when the editor is using a variable-width font", ->
beforeEach ->
editor.setFontFamily('sans-serif')
afterEach ->
editor.clearFontFamily()
it "correctly positions the cursor", ->
editor.setCursorBufferPosition([3, 30])
expect(editor.getCursorView().position()).toEqual {top: 3 * editor.lineHeight, left: 178}
@@ -1013,7 +1033,7 @@ describe "Editor", ->
describe "when soft-wrap is enabled", ->
beforeEach ->
editor.setSoftWrap(true)
editSession.setSoftWrap(true)
it "does not scroll the buffer horizontally", ->
editor.width(charWidth * 30)
@@ -1042,10 +1062,12 @@ describe "Editor", ->
describe "when the text exceeds the editor width and the scroll-view is horizontally scrolled", ->
it "wraps the text and renders properly", ->
editor.attachToDom(heightInLines: 30, widthInChars: 30)
editor.setWidthInChars(100)
editor.setText("Fashion axe umami jean shorts retro hashtag carles mumblecore. Photo booth skateboard Austin gentrify occupy ethical. Food truck gastropub keffiyeh, squid deep v pinterest literally sustainable salvia scenester messenger bag. Neutra messenger bag flexitarian four loko, shoreditch VHS pop-up tumblr seitan synth master cleanse. Marfa selvage ugh, raw denim authentic try-hard mcsweeney's trust fund fashion axe actually polaroid viral sriracha. Banh mi marfa plaid single-origin coffee. Pickled mumblecore lomo ugh bespoke.")
editor.scrollLeft(editor.charWidth * 30)
editor.trigger "editor:toggle-soft-wrap"
expect(editor.scrollLeft()).toBe 0
expect(editor.activeEditSession.getSoftWrapColumn()).not.toBe 100
describe "text rendering", ->
describe "when all lines in the buffer are visible on screen", ->
@@ -1086,8 +1108,8 @@ describe "Editor", ->
expect(span0.children('span:eq(2)')).toMatchSelector '.meta.brace.curly.js'
expect(span0.children('span:eq(2)').text()).toBe "{"
line12 = editor.renderedLines.find('.line:eq(11)')
expect(line12.find('span:eq(2)')).toMatchSelector '.keyword'
line12 = editor.renderedLines.find('.line:eq(11)').children('span:eq(0)')
expect(line12.children('span:eq(1)')).toMatchSelector '.keyword'
it "wraps hard tabs in a span", ->
editor.setText('\t<- hard tab')
@@ -1102,12 +1124,13 @@ describe "Editor", ->
expect(span0_0).toMatchSelector '.leading-whitespace'
expect(span0_0.text()).toBe ' '
it "wraps trailing whitespace in a span", ->
editor.setText('trailing whitespace -> ')
line0 = editor.renderedLines.find('.line:first')
span0_last = line0.children('span:eq(0)').children('span:last')
expect(span0_last).toMatchSelector '.trailing-whitespace'
expect(span0_last.text()).toBe ' '
describe "when the line has trailing whitespace", ->
it "wraps trailing whitespace in a span", ->
editor.setText('trailing whitespace -> ')
line0 = editor.renderedLines.find('.line:first')
span0_last = line0.children('span:eq(0)').children('span:last')
expect(span0_last).toMatchSelector '.trailing-whitespace'
expect(span0_last.text()).toBe ' '
describe "when lines are updated in the buffer", ->
it "syntax highlights the updated lines", ->
@@ -1416,7 +1439,7 @@ describe "Editor", ->
describe "when autoscrolling at the end of the document", ->
it "renders lines properly", ->
editor.edit(project.open('two-hundred.txt'))
editor.edit(project.openSync('two-hundred.txt'))
editor.attachToDom(heightInLines: 5.5)
expect(editor.renderedLines.find('.line').length).toBe 8
@@ -1479,10 +1502,13 @@ describe "Editor", ->
expect(editor.renderedLines.find('.line:first').text()).toBe "a line that ends with a carriage return#{cr}#{eol}"
describe "when wrapping is on", ->
beforeEach ->
editSession.setSoftWrap(true)
it "doesn't show the end of line invisible at the end of lines broken due to wrapping", ->
editor.setSoftWrapColumn(6)
editor.setText "a line that wraps"
editor.attachToDom()
editor.setWidthInChars(6)
config.set "editor.showInvisibles", true
space = editor.invisibles?.space
expect(space).toBeTruthy()
@@ -1492,9 +1518,9 @@ describe "Editor", ->
expect(editor.renderedLines.find('.line:last').text()).toBe "wraps#{eol}"
it "displays trailing carriage return using a visible non-empty value", ->
editor.setSoftWrapColumn(6)
editor.setText "a line that\r\n"
editor.attachToDom()
editor.setWidthInChars(6)
config.set "editor.showInvisibles", true
space = editor.invisibles?.space
expect(space).toBeTruthy()
@@ -1619,20 +1645,22 @@ describe "Editor", ->
expect(editor.renderedLines.find('.line:eq(10) .indent-guide').length).toBe 1
expect(editor.renderedLines.find('.line:eq(10) .indent-guide').text()).toBe "#{eol} "
expect(editor.renderedLines.find('.line:eq(10) .invisible-character').text()).toBe eol
editor.setCursorBufferPosition([9])
editor.indent()
expect(editor.renderedLines.find('.line:eq(10) .indent-guide').length).toBe 2
expect(editor.renderedLines.find('.line:eq(10) .indent-guide').text()).toBe "#{eol} "
expect(editor.renderedLines.find('.line:eq(10) .invisible-character').text()).toBe eol
describe "when soft-wrap is enabled", ->
beforeEach ->
editSession.setSoftWrap(true)
editor.attachToDom()
setEditorHeightInLines(editor, 20)
setEditorWidthInChars(editor, 50)
editor.setSoftWrap(true)
expect(editor.activeEditSession.softWrapColumn).toBe 50
expect(editor.activeEditSession.getSoftWrapColumn()).toBe 50
it "wraps lines that are too long to fit within the editor's width, adjusting cursor positioning accordingly", ->
expect(editor.renderedLines.find('.line').length).toBe 16
@@ -1665,19 +1693,15 @@ describe "Editor", ->
expect(editor.bufferPositionForScreenPosition(editor.getCursorScreenPosition())).toEqual [3, 60]
it "does not wrap the lines of any newly assigned buffers", ->
otherEditSession = project.open()
otherEditSession = project.openSync()
otherEditSession.buffer.setText([1..100].join(''))
editor.edit(otherEditSession)
expect(editor.renderedLines.find('.line').length).toBe(1)
it "unwraps lines and cancels window resize listener when softwrap is disabled", ->
it "unwraps lines when softwrap is disabled", ->
editor.toggleSoftWrap()
expect(editor.renderedLines.find('.line:eq(3)').text()).toBe ' var pivot = items.shift(), current, left = [], right = [];'
spyOn(editor, 'setSoftWrapColumn')
$(window).trigger 'resize'
expect(editor.setSoftWrapColumn).not.toHaveBeenCalled()
it "allows the cursor to move down to the last line", ->
_.times editor.getLastScreenRow(), -> editor.moveCursorDown()
expect(editor.getCursorScreenPosition()).toEqual [editor.getLastScreenRow(), 0]
@@ -1700,15 +1724,15 @@ describe "Editor", ->
editor.moveCursorRight()
expect(editor.getCursorScreenPosition()).toEqual [11, 0]
it "calls .setSoftWrapColumn() when the editor is attached because now its dimensions are available to calculate it", ->
otherEditor = new Editor(editSession: project.open('sample.js'))
spyOn(otherEditor, 'setSoftWrapColumn')
it "calls .setWidthInChars() when the editor is attached because now its dimensions are available to calculate it", ->
otherEditor = new Editor(editSession: project.openSync('sample.js'))
spyOn(otherEditor, 'setWidthInChars')
otherEditor.setSoftWrap(true)
expect(otherEditor.setSoftWrapColumn).not.toHaveBeenCalled()
otherEditor.activeEditSession.setSoftWrap(true)
expect(otherEditor.setWidthInChars).not.toHaveBeenCalled()
otherEditor.simulateDomAttachment()
expect(otherEditor.setSoftWrapColumn).toHaveBeenCalled()
expect(otherEditor.setWidthInChars).toHaveBeenCalled()
otherEditor.remove()
describe "gutter rendering", ->
@@ -1744,7 +1768,8 @@ describe "Editor", ->
describe "when wrapping is on", ->
it "renders a • instead of line number for wrapped portions of lines", ->
editor.setSoftWrapColumn(50)
editSession.setSoftWrap(true)
editor.setWidthInChars(50)
expect(editor.gutter.find('.line-number').length).toEqual(8)
expect(editor.gutter.find('.line-number:eq(3)').intValue()).toBe 4
expect(editor.gutter.find('.line-number:eq(4)').html()).toBe '&nbsp;•'
@@ -1805,7 +1830,7 @@ describe "Editor", ->
describe "when the switching from an edit session for a long buffer to an edit session for a short buffer", ->
it "updates the line numbers to reflect the shorter buffer", ->
emptyEditSession = project.open(null)
emptyEditSession = project.openSync(null)
editor.edit(emptyEditSession)
expect(editor.gutter.lineNumbers.find('.line-number').length).toBe 1
@@ -1857,13 +1882,55 @@ describe "Editor", ->
# doesn't allow regular editors to set grammars
expect(-> editor.setGrammar()).toThrow()
describe "when config.editor.showLineNumbers is false", ->
it "doesn't render any line numbers", ->
expect(editor.gutter.lineNumbers).toBeVisible()
config.set("editor.showLineNumbers", false)
expect(editor.gutter.lineNumbers).not.toBeVisible()
describe "using gutter's api", ->
it "can get all the line number elements", ->
elements = editor.gutter.getLineNumberElements()
len = editor.gutter.lastScreenRow - editor.gutter.firstScreenRow + 1
expect(elements).toHaveLength(len)
it "can get a single line number element", ->
element = editor.gutter.getLineNumberElement(3)
expect(element).toBeTruthy()
it "returns falsy when there is no line element", ->
expect(editor.gutter.getLineNumberElement(42)).toHaveLength 0
it "can add and remove classes to all the line numbers", ->
wasAdded = editor.gutter.addClassToAllLines('heyok')
expect(wasAdded).toBe true
elements = editor.gutter.getLineNumberElementsForClass('heyok')
expect($(elements)).toHaveClass('heyok')
editor.gutter.removeClassFromAllLines('heyok')
expect($(editor.gutter.getLineNumberElements())).not.toHaveClass('heyok')
it "can add and remove classes from a single line number", ->
wasAdded = editor.gutter.addClassToLine(3, 'heyok')
expect(wasAdded).toBe true
element = editor.gutter.getLineNumberElement(2)
expect($(element)).not.toHaveClass('heyok')
it "can fetch line numbers by their class", ->
editor.gutter.addClassToLine(1, 'heyok')
editor.gutter.addClassToLine(3, 'heyok')
elements = editor.gutter.getLineNumberElementsForClass('heyok')
expect(elements.length).toBe 2
expect($(elements[0])).toHaveClass 'line-number-1'
expect($(elements[0])).toHaveClass 'heyok'
expect($(elements[1])).toHaveClass 'line-number-3'
expect($(elements[1])).toHaveClass 'heyok'
describe "gutter line highlighting", ->
beforeEach ->
editor.attachToDom(heightInLines: 5.5)
@@ -1883,7 +1950,7 @@ describe "Editor", ->
describe "when there is wrapping", ->
beforeEach ->
editor.attachToDom(30)
editor.setSoftWrap(true)
editSession.setSoftWrap(true)
setEditorWidthInChars(editor, 20)
it "highlights the line where the initial cursor position is", ->
@@ -1946,7 +2013,7 @@ describe "Editor", ->
describe "when there is wrapping", ->
beforeEach ->
editor.setSoftWrap(true)
editSession.setSoftWrap(true)
setEditorWidthInChars(editor, 20)
it "highlights the line where the initial cursor position is", ->
@@ -1967,7 +2034,7 @@ describe "Editor", ->
describe "folding", ->
beforeEach ->
editSession = project.open('two-hundred.txt')
editSession = project.openSync('two-hundred.txt')
buffer = editSession.buffer
editor.edit(editSession)
editor.attachToDom()
@@ -2024,7 +2091,7 @@ describe "Editor", ->
it "adds/removes the 'selected' class to the fold's line element and hides the cursor if it is on the fold line", ->
editor.createFold(2, 4)
editor.setSelectedBufferRange([[1, 0], [2, 0]], preserveFolds: true, reverse: true)
editor.setSelectedBufferRange([[1, 0], [2, 0]], preserveFolds: true, isReversed: true)
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.selected')
editor.setSelectedBufferRange([[1, 0], [1, 1]], preserveFolds: true)
@@ -2104,11 +2171,11 @@ describe "Editor", ->
beforeEach ->
filePath = project.resolve('git/working-dir/file.txt')
originalPathText = fsUtils.read(filePath)
editor.edit(project.open(filePath))
originalPathText = fs.read(filePath)
editor.edit(project.openSync(filePath))
afterEach ->
fsUtils.writeSync(filePath, originalPathText)
fs.writeSync(filePath, originalPathText)
it "restores the contents of the editor to the HEAD revision", ->
editor.setText('')
@@ -2139,10 +2206,21 @@ describe "Editor", ->
expect(editor.pixelPositionForBufferPosition([2,7])).toEqual top: 0, left: 0
describe "when the editor is attached and visible", ->
it "returns the top and left pixel positions", ->
beforeEach ->
editor.attachToDom()
it "returns the top and left pixel positions", ->
expect(editor.pixelPositionForBufferPosition([2,7])).toEqual top: 40, left: 70
it "caches the left position", ->
editor.renderedLines.css('font-size', '16px')
expect(editor.pixelPositionForBufferPosition([2,8])).toEqual top: 40, left: 80
# make characters smaller
editor.renderedLines.css('font-size', '15px')
expect(editor.pixelPositionForBufferPosition([2,8])).toEqual top: 40, left: 80
describe "when clicking in the gutter", ->
beforeEach ->
editor.attachToDom()
@@ -2219,14 +2297,15 @@ describe "Editor", ->
[filePath] = []
beforeEach ->
filePath = path.join(fsUtils.absolute("/tmp"), "grammar-change.txt")
fsUtils.writeSync(filePath, "var i;")
tmpdir = fs.absolute(temp.dir)
filePath = path.join(tmpdir, "grammar-change.txt")
fs.writeSync(filePath, "var i;")
afterEach ->
fsUtils.remove(filePath) if fsUtils.exists(filePath)
fs.remove(filePath) if fs.exists(filePath)
it "updates all the rendered lines when the grammar changes", ->
editor.edit(project.open(filePath))
editor.edit(project.openSync(filePath))
expect(editor.getGrammar().name).toBe 'Plain Text'
syntax.setGrammarOverrideForPath(filePath, 'source.js')
editor.reloadGrammar()
@@ -2246,7 +2325,7 @@ describe "Editor", ->
expect(editor.getGrammar().name).toBe 'JavaScript'
it "emits an editor:grammar-changed event when updated", ->
editor.edit(project.open(filePath))
editor.edit(project.openSync(filePath))
eventHandler = jasmine.createSpy('eventHandler')
editor.on('editor:grammar-changed', eventHandler)
@@ -2567,15 +2646,16 @@ describe "Editor", ->
it "saves the state of the rendered lines, the display buffer, and the buffer to a file of the user's choosing", ->
saveDialogCallback = null
spyOn(atom, 'showSaveDialog').andCallFake (callback) -> saveDialogCallback = callback
spyOn(fsUtils, 'writeSync')
spyOn(fs, 'writeSync')
editor.trigger 'editor:save-debug-snapshot'
statePath = path.join(temp.dir, 'state')
expect(atom.showSaveDialog).toHaveBeenCalled()
saveDialogCallback('/tmp/state')
expect(fsUtils.writeSync).toHaveBeenCalled()
expect(fsUtils.writeSync.argsForCall[0][0]).toBe '/tmp/state'
expect(typeof fsUtils.writeSync.argsForCall[0][1]).toBe 'string'
saveDialogCallback(statePath)
expect(fs.writeSync).toHaveBeenCalled()
expect(fs.writeSync.argsForCall[0][0]).toBe statePath
expect(typeof fs.writeSync.argsForCall[0][1]).toBe 'string'
describe "when the escape key is pressed on the editor", ->
it "clears multiple selections if there are any, and otherwise allows other bindings to be handled", ->
@@ -2597,7 +2677,7 @@ describe "Editor", ->
describe "when the editor's text is changed", ->
it "redraws the editor when it is next shown", ->
window.rootView = new RootView
rootView.open('sample.js')
rootView.openSync('sample.js')
rootView.attachToDom()
editor = rootView.getActiveView()
@@ -2651,7 +2731,7 @@ describe "Editor", ->
describe "when the editor is removed", ->
it "fires a editor:will-be-removed event", ->
window.rootView = new RootView
rootView.open('sample.js')
rootView.openSync('sample.js')
rootView.attachToDom()
editor = rootView.getActiveView()
@@ -2670,3 +2750,12 @@ describe "Editor", ->
for rowNumber in [1..5]
expect(editor.lineElementForScreenRow(rowNumber).text()).toBe buffer.lineForRow(rowNumber)
describe "when the window is resized", ->
it "updates the active edit session with the current soft wrap column", ->
editor.attachToDom()
setEditorWidthInChars(editor, 50)
expect(editor.activeEditSession.getSoftWrapColumn()).toBe 50
setEditorWidthInChars(editor, 100)
$(window).trigger 'resize'
expect(editor.activeEditSession.getSoftWrapColumn()).toBe 100
+59
Ver Arquivo
@@ -0,0 +1,59 @@
path = require 'path'
{Site} = require 'telepath'
{fs} = require 'atom'
Project = require '../src/project'
module.exports =
class Environment
constructor: ({@site, @state, siteId, projectPath}={}) ->
@site ?= new Site(siteId ? 1)
if @state?
@run => @project = deserialize(@state.get('project'))
else
@state = @site.createDocument({})
@project = new Project(projectPath ? path.join(__dirname, 'fixtures'))
@state.set(project: @project.getState())
clone: (params) ->
site = new Site(params.siteId)
new Environment(site: site, state: @state.clone(site))
destroy: ->
@project.destroy()
getState: -> @state
run: (fn) ->
uninstall = @install()
fn()
uninstall()
install: ->
oldSite = window.site
oldProject = window.project
window.site = @site
window.project = @project
->
window.site = oldSite
window.project = oldProject
connect: (otherEnv) ->
new EnvironmentConnection(this, otherEnv)
connectDocuments: (docA, docB, envB) ->
class EnvironmentConnection
constructor: (@envA, @envB) ->
@envA.getState().connect(@envB.getState())
connect: (docA, docB) ->
unless docA.site is @envA.site
throw new Error("Document and environment sites do not match (doc: site #{docA.site.id}, env: site #{@envA.site.id})")
unless docB.site is @envB.site
throw new Error("Document and environment sites do not match (doc: site #{docB.site.id}, env: site #{@envB.site.id})")
connection = docA.connect(docB)
connection.abFilter = (fn) => @envB.run(fn)
connection.baFilter = (fn) => @envA.run(fn)
connection
+132
Ver Arquivo
@@ -0,0 +1,132 @@
{File, fs} = require 'atom'
path = require 'path'
describe 'File', ->
[filePath, file] = []
beforeEach ->
filePath = path.join(__dirname, 'fixtures', 'atom-file-test.txt') # Don't put in /tmp because /tmp symlinks to /private/tmp and screws up the rename test
fs.remove(filePath) if fs.exists(filePath)
fs.writeSync(filePath, "this is old!")
file = new File(filePath)
afterEach ->
file.off()
fs.remove(filePath) if fs.exists(filePath)
describe "when the file has not been read", ->
describe "when the contents of the file change", ->
it "triggers 'contents-changed' event handlers", ->
file.on 'contents-changed', changeHandler = jasmine.createSpy('changeHandler')
fs.writeSync(file.getPath(), "this is new!")
waitsFor "change event", ->
changeHandler.callCount > 0
describe "when the file has already been read", ->
beforeEach ->
file.readSync()
describe "when the contents of the file change", ->
it "triggers 'contents-changed' event handlers", ->
changeHandler = null
changeHandler = jasmine.createSpy('changeHandler')
file.on 'contents-changed', changeHandler
fs.writeSync(file.getPath(), "this is new!")
waitsFor "change event", ->
changeHandler.callCount > 0
runs ->
changeHandler.reset()
fs.writeSync(file.getPath(), "this is newer!")
waitsFor "second change event", ->
changeHandler.callCount > 0
describe "when the file is removed", ->
it "triggers 'remove' event handlers", ->
removeHandler = null
removeHandler = jasmine.createSpy('removeHandler')
file.on 'removed', removeHandler
fs.remove(file.getPath())
waitsFor "remove event", ->
removeHandler.callCount > 0
describe "when a file is moved (via the filesystem)", ->
newPath = null
beforeEach ->
newPath = path.join(path.dirname(filePath), "atom-file-was-moved-test.txt")
afterEach ->
if fs.exists(newPath)
fs.remove(newPath)
waitsFor "remove event", (done) -> file.on 'removed', done
it "it updates its path", ->
jasmine.unspy(window, "setTimeout")
moveHandler = null
moveHandler = jasmine.createSpy('moveHandler')
file.on 'moved', moveHandler
fs.move(filePath, newPath)
waitsFor "move event", ->
moveHandler.callCount > 0
runs ->
expect(file.getPath()).toBe newPath
it "maintains 'contents-changed' events set on previous path", ->
jasmine.unspy(window, "setTimeout")
moveHandler = null
moveHandler = jasmine.createSpy('moveHandler')
file.on 'moved', moveHandler
changeHandler = null
changeHandler = jasmine.createSpy('changeHandler')
file.on 'contents-changed', changeHandler
fs.move(filePath, newPath)
waitsFor "move event", ->
moveHandler.callCount > 0
runs ->
expect(changeHandler).not.toHaveBeenCalled()
fs.writeSync(file.getPath(), "this is new!")
waitsFor "change event", ->
changeHandler.callCount > 0
describe "when a file is deleted and the recreated within a small amount of time (git sometimes does this)", ->
it "triggers a contents change event if the contents change", ->
jasmine.unspy(File.prototype, 'detectResurrectionAfterDelay')
jasmine.unspy(window, "setTimeout")
changeHandler = jasmine.createSpy("file changed")
removeHandler = jasmine.createSpy("file removed")
file.on 'contents-changed', changeHandler
file.on 'removed', removeHandler
expect(changeHandler).not.toHaveBeenCalled()
fs.remove(filePath)
expect(changeHandler).not.toHaveBeenCalled()
waits 20
runs ->
fs.writeSync(filePath, "HE HAS RISEN!")
expect(changeHandler).not.toHaveBeenCalled()
waitsFor "resurrection change event", ->
changeHandler.callCount == 1
runs ->
expect(removeHandler).not.toHaveBeenCalled()
fs.writeSync(filePath, "Hallelujah!")
changeHandler.reset()
waitsFor "post-resurrection change event", ->
changeHandler.callCount > 0
-1
Ver Arquivo
@@ -1 +0,0 @@
I am evil because there's a UTF-8 character right here: ă
-1
Ver Arquivo
@@ -1 +0,0 @@
I am evil because there are spaces in my name
-1
Ver Arquivo
@@ -1 +0,0 @@
I am evil because there's a newline in my name
-1
Ver Arquivo
@@ -1 +0,0 @@
I am evil because there's a " in my filename. Why you do that!?
-1
Ver Arquivo
@@ -1 +0,0 @@
I am evil because there's a UTF-8 character in my name
-1
Ver Arquivo
@@ -1 +0,0 @@
* First list item
+2 -1
Ver Arquivo
@@ -1 +1,2 @@
ignored.txt
poop
ignored.txt
+1
Ver Arquivo
@@ -0,0 +1 @@
ref: refs/heads/master
+6
Ver Arquivo
@@ -0,0 +1,6 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
Arquivo binário não exibido.

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais