Comparar commits

...

1361 Commits

Autor SHA1 Mensagem Data
Ben Ogle 6cd1029253 Fix casing on polymer modules 2014-10-30 13:58:09 -07:00
Ben Ogle 4356d86214 Add polymer-expressions 2014-10-30 13:58:09 -07:00
Ben Ogle f8820c53fa Add all polymer projects into the global space 2014-10-30 13:58:09 -07:00
Ben Ogle 00ed26e8ab Move requiring of html-require into atom.coffee 2014-10-30 13:58:09 -07:00
Ben Ogle dfcce37a0a Add HTMLRequire 2014-10-30 13:58:08 -07:00
Ben Ogle 15a1982e8c Merge pull request #4012 from atom/bo-move-view-registry
Move the ViewRegistry to atom.views
2014-10-30 13:56:52 -07:00
Ben Ogle fcca61c2b2 📝 Update docs 2014-10-30 13:56:03 -07:00
Ben Ogle ee4116536d Move the ViewRegistry to atom.views 2014-10-30 13:42:27 -07:00
Kevin Sawicki c217c6544a Prepare 0.142 2014-10-30 13:35:40 -07:00
Kevin Sawicki 205095a198 ⬆️ encoding-selector@0.5 2014-10-30 11:03:35 -07:00
Kevin Sawicki 4326898d5f ⬆️ grammar-selector@0.37 2014-10-30 11:02:15 -07:00
Kevin Sawicki b8285a00b0 Require path after setting start time 2014-10-30 10:49:08 -07:00
Kevin Sawicki 025967193a Add path require to top 2014-10-30 10:48:51 -07:00
Kevin Sawicki 75627f50a2 Normalize process.resourcesPath on load
This ensures the drive letter is consistent on Windows for when
package paths are compared to the resources path to determine
whether to use the metadata cache for a bundled package.

Closes #3932
2014-10-30 10:31:37 -07:00
Kevin Sawicki 9fca1d26f1 ⬆️ dev-live-reload@0.35 2014-10-30 10:22:26 -07:00
Kevin Sawicki 6e827434fd Log a warning when a enabled theme isn't installed 2014-10-30 10:04:38 -07:00
Kevin Sawicki b3f6b3af4b Merge pull request #3968 from lee-dohm/default-themes
Load the default themes when configured themes don't exist
2014-10-30 09:38:11 -07:00
Kevin Sawicki 63a33bd1e7 Merge pull request #3997 from atom/ks-remove-feedback-package
Remove feedback package
2014-10-30 09:26:17 -07:00
Kevin Sawicki a153f1e244 Move items around in help menu a bit 2014-10-30 09:11:06 -07:00
Kevin Sawicki 037a7f435c Add search issues to help menu 2014-10-30 09:11:06 -07:00
Kevin Sawicki 7641f1d1e4 Sync help menus on Linux/Windows 2014-10-30 09:11:06 -07:00
Kevin Sawicki 05c1ae71e1 Add report issue to Help menu 2014-10-30 09:11:05 -07:00
Kevin Sawicki cefabd4eb8 Add FAQ to help menu 2014-10-30 09:11:05 -07:00
Kevin Sawicki 9f80be4570 Add roadmap to help menu 2014-10-30 09:11:05 -07:00
Kevin Sawicki 61f75b0764 Add discussions to Help menu 2014-10-30 09:11:05 -07:00
Kevin Sawicki ae2f4ac36e Remove feedback package 2014-10-30 09:11:05 -07:00
Lee Dohm d20e91897a Load the default themes when configured themes don't exist 2014-10-29 19:42:42 -07:00
Kevin Sawicki 2e0bb66a9a Remove unneeded add encoding attr call 2014-10-29 16:03:57 -07:00
Kevin Sawicki d205c4d664 Add data attribute for encoding
Mirrors the grammar data attribute
2014-10-29 16:03:10 -07:00
Kevin Sawicki 8db5ea7bc7 ⬆️ encoding-selector@0.4 2014-10-29 14:59:26 -07:00
Nathan Sobo 3c7eecbb6a Dispose of scoped config subscriptions when TextEditorComponent unmounts
Fixes #3998
2014-10-29 15:04:39 -06:00
Kevin Sawicki 8dab3d90b3 ⬆️ grammar-selector@0.36 2014-10-29 13:58:29 -07:00
Kevin Sawicki 44bc470a00 ⬆️ encoding-selector@0.3 2014-10-29 13:39:26 -07:00
Kevin Sawicki 498631725a Store menu template even if window isn't focused
update may be called before the window gains focus to store its
template so it is updated correcltly once the window gains focus.
2014-10-29 13:06:57 -07:00
Kevin Sawicki 945345b0c7 📝 Update documentation styleguide 2014-10-29 11:59:25 -07:00
Kevin Sawicki 6576ec5cde Merge pull request #3987 from atom/ks-encodings
Add support for changing editor encoding
2014-10-29 11:58:31 -07:00
Kevin Sawicki ce8143f8e6 Add TextEditor::onDidChangeEncoding spec 2014-10-29 11:33:01 -07:00
Kevin Sawicki e993175205 💄 2014-10-29 11:33:01 -07:00
Kevin Sawicki 4242ac0911 🔨 Add jschardet license override 2014-10-29 11:33:01 -07:00
Kevin Sawicki f22e741a9b Bundle encoding-selector package 2014-10-29 11:33:01 -07:00
Kevin Sawicki a41b582032 ⬆️ text-buffer@3.4 2014-10-29 11:33:01 -07:00
Kevin Sawicki a24279d0b9 ⬆️ pathwatcher@2.3.2 2014-10-29 11:33:01 -07:00
Kevin Sawicki 5985175b07 📝 Fix typo 2014-10-29 11:33:01 -07:00
Kevin Sawicki d2ef888f22 Add TextEditor::onDidChangeEncoding 2014-10-29 11:33:01 -07:00
Kevin Sawicki 35925ed349 Add encoding getter and setter 2014-10-29 11:33:01 -07:00
Kevin Sawicki 490ec1aac7 ⬆️ pathwatcher@2.3.1 2014-10-29 11:33:01 -07:00
Kevin Sawicki 25eea7d19b Remove TextEditor::setEncoding 2014-10-29 11:33:01 -07:00
Kevin Sawicki 4c9e71770a Add initial TextEditor::setEncoding 2014-10-29 11:33:00 -07:00
Kevin Sawicki 4032d96b13 ⬆️ image-view@0.40 2014-10-29 11:32:49 -07:00
Kevin Sawicki c5aa3eb441 ⬆️ image-view@0.39 2014-10-29 11:27:55 -07:00
Kevin Sawicki 68bb765304 ⬆️ settings-view@0.154 2014-10-29 11:03:58 -07:00
Kevin Sawicki bd7996e071 Remove open profile 2014-10-29 10:55:46 -07:00
Kevin Sawicki 1eaba0cb52 ⬆️ fuzzy-finder@0.60 2014-10-29 10:36:09 -07:00
Kevin Sawicki 0c590d6170 Load CoffeeScript when using a custom resource path
Load CoffeeScript early whenever the resource path a subdirectory
from process.resourcesPath

Close #3993
2014-10-29 10:21:23 -07:00
Kevin Sawicki 3df72ec173 ⬆️ apm@0.109 2014-10-29 09:51:59 -07:00
Kevin Sawicki 1456bf0d91 📝 runnung -> running 2014-10-29 09:01:18 -07:00
Kevin Sawicki edec6b9b0a 🐎 Use cached pair character information
Tokenized lines break out atomic tokens so trust the hasPairCharacter
value on the token instead of rechecking it.
2014-10-28 18:15:13 -07:00
Kevin Sawicki 9abc4580f4 Don't recompute pair boolean when building token
Pass in hasPairedCharacter to the Token constructor when it is
being broken out from the parent token instead of recomputing it.
2014-10-28 18:15:13 -07:00
Nathan Sobo 54260230c6 ⬆️ git-diff to prevent updating diffs on destroyed editors 2014-10-28 19:08:30 -06:00
Kevin Sawicki 9bd11fc2f7 Merge pull request #3989 from Bengt/patch-1
Add initial instructions to build rpm from sources, ...
2014-10-28 17:10:22 -07:00
Bengt Lüers 81586d22f4 Add initial instructions to build rpm from sources, add packaging dependency for Fedora 2014-10-29 01:09:21 +01:00
Kevin Sawicki dc824485aa Pass character codes around in TextUtils
Previously the character codes were looked up for each type of character pair.
2014-10-28 16:55:36 -07:00
Kevin Sawicki d1fcfabf0b Move comment above module.exports
Make it parseable by donna

Refs atom/donna#2
2014-10-28 16:20:11 -07:00
Nathan Sobo ea8a3a78da Don’t hide pane items that are already hidden 2014-10-28 11:23:35 -06:00
Kevin Sawicki 62f5d0f7f3 ⬆️ go-to-line@0.26 2014-10-27 16:18:21 -07:00
Kevin Sawicki b3f4d03a82 Add Red Hat install instructions
0.140 include an .rpm file on the releases page and this adds back
the install text added by @ardeshirj in #3797
2014-10-27 16:08:21 -07:00
Kevin Sawicki c2d51858b1 ⬆️ markdown-preview@0.107 2014-10-27 15:25:14 -07:00
Kevin Sawicki a5bca03a46 Prepare 0.141 2014-10-27 15:12:44 -07:00
Nathan Sobo 02d20e3155 Call legacy SpacePen remove hooks before unmounting TextEditorComponent 2014-10-27 15:29:59 -06:00
Nathan Sobo 2910e017bb Unmount TextEditorComponent when TextEditor is destroyed
We don’t want to do it when the element is detached because it might
be caused by moving the editor rather than destroying it. Unmounting
the component entirely and then remounting it causes the hidden input
to not be recycled, interfering with focus restoration. Watching for
destruction of the model is a good way to ensure we always tear down
the view at the right time without doing it prematurely.
2014-10-27 15:12:30 -06:00
Kevin Sawicki 248e164de2 ⬆️ language-ruby@0.41 2014-10-27 13:31:16 -07:00
Nathan Sobo 4d796f614c Update Tokenized/DisplayBuffer prior to TextBuffer::onDidChange handlers
Fixes #3789
2014-10-27 13:56:23 -06:00
Kevin Sawicki a8be05bb3b Clear focused window property on window closed
Closes #3806
2014-10-27 11:30:41 -07:00
Kevin Sawicki 101904e261 Upgrade to bracket-matcher@0.62 2014-10-27 11:15:53 -07:00
Nathan Sobo c0622e8bb5 ⬆️ language-coffee-script to fix jasmine snippet quotes 2014-10-27 11:55:24 -06:00
Kevin Sawicki ce5b755438 📝 Mention profile picture 2014-10-27 10:45:15 -07:00
Nathan Sobo 86781e6f9a Assign pane container before emitting onDidAddPane events
Fixes #3972
2014-10-27 11:39:42 -06:00
Kevin Sawicki a7f4a5b08e ⬆️ markdown-preview@0.106 2014-10-27 10:38:43 -07:00
Nathan Sobo 2b8167da53 Merge pull request #3974 from atom/ns-throw-on-destroyed-editors
Throw on non-release builds if translating positions on destroyed editor
2014-10-27 11:32:48 -06:00
Kevin Sawicki bb0ee8a78b ⬆️ atom-dark-syntax@0.20 2014-10-27 09:42:54 -07:00
Kevin Sawicki d1115d4c7c ⬆️ atom-light-syntax@0.21 2014-10-27 09:40:31 -07:00
Kevin Sawicki a71d7115bf ⬆️ language-sass@0.24 2014-10-27 09:37:27 -07:00
Kevin Sawicki af14a26625 Merge pull request #3965 from brunetton/master
📝 fix TextEditor::delete() doc
2014-10-27 09:13:04 -07:00
Kevin Sawicki dadd56f7a0 ⬆️ language-php@0.17 2014-10-27 09:12:30 -07:00
Kevin Sawicki 0e99b70650 🐧 Add troubleshooting for system gyp error
Closes #2824
2014-10-27 08:45:15 -07:00
Nathan Sobo 2965398062 Throw on non-release builds if translating positions on destroyed editor
It’s possible that bundled packages stray into this corner case, so I’d
like us to catch and fix misbehaving packages before exposing users to 
any exceptions. Once we go one release with this turned on, we can
enable the exception for all builds.
2014-10-27 07:38:18 -06:00
Bruno Duyé 55ace0fe99 📝 fix TextEditor::delete() doc 2014-10-25 19:35:19 +02:00
Nathan Sobo 03f7511229 ⬆️ find and replace for focus transfer fix 2014-10-24 16:14:52 -06:00
Kevin Sawicki 5f7976cada ⬆️ apm 0.108 2014-10-24 14:14:10 -07:00
Kevin Sawicki fa074431f9 Merge pull request #3953 from atom/ks-support-combining-characters
Support unicode combining characters
2014-10-24 14:13:40 -07:00
Kevin Sawicki b9239ffc57 Add spec for cursor position after pair char 2014-10-24 13:31:43 -07:00
Kevin Sawicki 06698c880f Access value on token 2014-10-24 13:31:43 -07:00
Kevin Sawicki 05dc9aad89 💄 2014-10-24 13:31:43 -07:00
Kevin Sawicki e5660e5e83 🐎 Only use String::substr for pair chars 2014-10-24 13:31:43 -07:00
Kevin Sawicki e928447eab Stored paired characters in width cache
Previously characters were treated individually even when multiple
characters would render as a single character on screen.
2014-10-24 13:31:43 -07:00
Kevin Sawicki 9b0f622ffb 📝 Mention combined characters in spec description 2014-10-24 13:31:42 -07:00
Kevin Sawicki b6cc7273a1 Add combined characters to spec 2014-10-24 13:31:42 -07:00
Kevin Sawicki 232be1f876 📝 Mention combined characters 2014-10-24 13:31:42 -07:00
Kevin Sawicki ddeec5d4d5 Treat combined characters as paired characters 2014-10-24 13:31:42 -07:00
Ben Ogle dc83f8bac7 Merge pull request #3944 from atom/bo-defer-config-load
Give scoped user settings a priority
2014-10-24 13:10:49 -07:00
Ben Ogle ae2a7769ed Upgrade scoped-property-store for priority option 2014-10-24 13:08:00 -07:00
Ben Ogle d0d6af7e55 Specs for priority 2014-10-24 13:07:14 -07:00
Ben Ogle 137df72a60 Give the user settings a priority
Base index 1000
2014-10-24 13:07:14 -07:00
Ben Ogle 2e187d3ec1 Upgrade scandal@1.0.3 for isBinary Fix 2014-10-24 11:48:03 -07:00
Ben Ogle 9f74250333 Upgrade whitespace to use scoped properties 2014-10-24 11:18:09 -07:00
Nathan Sobo de70a181c5 Upgrade text-buffer to avoid many position translation errors
Refs #3192
2014-10-24 10:55:51 -06:00
Kevin Sawicki 0272b2f281 ⬆️ spell-check@0.43 2014-10-24 09:15:09 -07:00
Kevin Sawicki 365b7bfaf9 Merge pull request #3950 from avdv/patch-1
Update linux.md
2014-10-24 09:11:35 -07:00
Claudio Bley 937ef321bd Update linux.md
You need to have python2 installed on Arch.

Otherwise you get build ENOENT errors using npm-gyp.
2014-10-24 14:08:10 +02:00
Kevin Sawicki 80a302df9e ⬆️ apm 0.107 2014-10-23 17:55:21 -07:00
Kevin Sawicki 381ee353a3 Upgrade to git-diff@0.41 2014-10-23 16:06:14 -07:00
Kevin Sawicki de3703d1ea 📝 Mark CommandRegistry and atom.commands public 2014-10-23 14:08:09 -07:00
Kevin Sawicki 0b8c4a0c7f ⬆️ image-view@0.38 2014-10-23 12:20:13 -07:00
Kevin Sawicki d299692237 Use correct 64-bith arch 2014-10-23 12:02:52 -07:00
Kevin Sawicki eaf435bd9a Merge pull request #3942 from atom/ks-fedora-dockerfile
Add Dockerfile to build an RPM on CI
2014-10-23 11:36:31 -07:00
Kevin Sawicki 8d71cbd510 📝 Mention fedora/debian checks 2014-10-23 11:10:18 -07:00
Kevin Sawicki 534ace6250 Use x64_64 as arch in rpm name 2014-10-23 11:09:48 -07:00
Kevin Sawicki 89157cdf29 Restore master only uploads 2014-10-23 10:49:05 -07:00
Kevin Sawicki ef2795ea0d Use bash 2014-10-23 10:35:18 -07:00
Kevin Sawicki 11b5bcff74 Use BUILD_ATOM_RPM_ACCESS_TOKEN 2014-10-23 10:10:05 -07:00
Kevin Sawicki d7019509e3 Return early when no token set 2014-10-23 10:01:26 -07:00
Kevin Sawicki 0417458fbb Log when token is missing 2014-10-23 09:56:44 -07:00
Kevin Sawicki ff32fff483 Add missing mkdir assignment 2014-10-23 09:28:47 -07:00
Kevin Sawicki f776678b83 Recreate rpm dir after deleting 2014-10-23 09:20:28 -07:00
Kevin Sawicki edacf02222 📝 Tweak image description 2014-10-23 09:11:13 -07:00
Kevin Sawicki 4b3d3701d5 Add rpm segment in mkrpm script 2014-10-23 09:10:16 -07:00
Kevin Sawicki dcbd1723b7 ⬆️ language-less@0.18 2014-10-23 08:58:35 -07:00
Kevin Sawicki 6c00dbd5ec ⬆️ language-less@0.17 2014-10-23 08:45:49 -07:00
Cheng Zhao 14fd4a9f7d 'enabled' is also a valid item attribute, fixes #3880 2014-10-23 10:34:15 +08:00
Kevin Sawicki b65c6da948 Add rm assignment to right task 2014-10-22 18:09:47 -07:00
Kevin Sawicki 1c1adf5beb Add missing rm assignment 2014-10-22 17:57:15 -07:00
Kevin Sawicki c1197d6390 Map BUILD_ATOM_LINUX_ACCESS_TOKEN to ATOM_ACCESS_TOKEN 2014-10-22 17:50:23 -07:00
Kevin Sawicki 7713720ba7 Drop x flag 2014-10-22 17:47:29 -07:00
Kevin Sawicki 4f1ec786f0 Add missing _ in env var 2014-10-22 17:47:13 -07:00
Kevin Sawicki 27ff02ad0e script/dockerbuild -> script/rpmbuild 2014-10-22 17:41:25 -07:00
Kevin Sawicki 738cdb6e66 Add missing _ in env var 2014-10-22 17:38:06 -07:00
Kevin Sawicki 0818e6d736 Log stack for now 2014-10-22 17:35:39 -07:00
Kevin Sawicki 6b57030bda Test uploads on this branch 2014-10-22 17:33:26 -07:00
Kevin Sawicki b64a5c93e3 Pass through needed env vars 2014-10-22 17:32:52 -07:00
Kevin Sawicki 317001b435 Do everything from dockerbuild script 2014-10-22 17:27:13 -07:00
Kevin Sawicki 4e3d15592e Upload .rpm file when available 2014-10-22 17:26:58 -07:00
Kevin Sawicki f4c40c2932 Publish build from dockerbuild 2014-10-22 17:26:35 -07:00
Kevin Sawicki 9cfc451a79 Remove RPM directory before rebuilding 2014-10-22 17:26:23 -07:00
Kevin Sawicki 198d3e90c7 Add initial rpm cibuild script 2014-10-22 17:04:59 -07:00
Kevin Sawicki 00da8a9df6 Build into rpm directory 2014-10-22 17:03:30 -07:00
Kevin Sawicki 293bd3ad3d Add initial script/dockerbuild 2014-10-22 17:03:19 -07:00
Kevin Sawicki bd0564e30d Move rpm Dockerfile to root 2014-10-22 17:03:05 -07:00
Kevin Sawicki 953940c757 Move debian Dockerfile to build folder 2014-10-22 16:53:22 -07:00
Kevin Sawicki 4ff6366d2b Add initial script/cibuild-atom-rpm 2014-10-22 16:18:05 -07:00
Kevin Sawicki 4db441f4df Add initial Fedora Dockerfile 2014-10-22 16:12:29 -07:00
Kevin Sawicki 71ef21bb70 📝 Link to roadmap issue 2014-10-22 12:59:57 -07:00
Kevin Sawicki de5e443329 Merge pull request #3925 from jfrazelle/dockerfile
Add Dockerfile.
2014-10-22 11:12:52 -07:00
Kevin Sawicki 6e15d68163 Prepare 0.140 2014-10-22 10:38:01 -07:00
Jessica Frazelle 6a3c7bcd50 Add Dockerfile.
I'm just going to leave this here.

You see I was trying to containerize a node webkit app, so I
thought why not atom. Except halfway through I realized it
actually isn't a node webkit app. I finished it anyways
because I had already started. It mounts the X11 socket
so it's a containerized desktop app.
You can do what you want with it.

But since this is OSS, I am going to give you my opinion
anyway. So here it is:
You should take this and use it as a build script, because
it seems like building this is a real PITA.

Ok that's all, enjoy.
Also this file was written in vim.
No, I'm not sorry.

Signed-off-by: Jessica Frazelle <jess@docker.com>
2014-10-22 10:27:25 -07:00
Kevin Sawicki dfc0df42b2 ⬆️ underscore-plus@1.6.1 2014-10-22 10:21:08 -07:00
Kevin Sawicki 452c78b735 Use local variable over calling method again 2014-10-22 09:31:45 -07:00
Kevin Sawicki 42f67033cc Merge pull request #3916 from suda/master
Setting ATOM_HOME
2014-10-22 09:31:11 -07:00
Kevin Sawicki 5c417cf9cc ⬆️ language-sass@0.23 2014-10-21 17:31:40 -07:00
Kevin Sawicki 81143af4b4 Upgrade to markdown-preview@0.105 2014-10-21 16:41:39 -07:00
Kevin Sawicki 5c048a4f13 ⬆️ less-cache@0.17 2014-10-21 15:57:00 -07:00
Kevin Sawicki 2ac9cc9ed1 ⬆️ less-cache@0.16 2014-10-21 15:51:16 -07:00
Kevin Sawicki e8f8ead53f ⬆️ donna@1.0.6 2014-10-21 15:19:18 -07:00
Kevin Sawicki f3d8c5d7ec ⬆️ language-javascript@0.42 2014-10-21 15:14:18 -07:00
Ben Ogle 7d179ef40f Revert "back to 1.0.1"
This reverts commit 375b8efc22.
2014-10-21 14:41:12 -07:00
Ben Ogle 375b8efc22 back to 1.0.1 2014-10-21 14:34:00 -07:00
Kevin Sawicki 086a011a63 Upgrade to settings-view@0.153 2014-10-21 14:30:16 -07:00
Ben Ogle 46ff52b13a UPgrade donna again 2014-10-21 14:16:30 -07:00
Ben Ogle 0ed4d07c33 Upgrade to donna@1.0.4 2014-10-21 14:13:48 -07:00
Kevin Sawicki efe3d65291 Only upload on master 2014-10-21 14:11:06 -07:00
Kevin Sawicki 8576486d06 Prepare docs when building all branches 2014-10-21 14:10:44 -07:00
Kevin Sawicki e5abca138d ⬆️ language-gfm@0.53 2014-10-21 13:50:40 -07:00
Kevin Sawicki fa24154e24 ⬆️ grunt-download-atom-shell@0.10 2014-10-21 13:50:16 -07:00
Kevin Sawicki 45c05d3b7d Merge pull request #3917 from atom/ks-packages-slug
Inline package metadata in main package.json file
2014-10-21 13:49:39 -07:00
Kevin Sawicki bf4ac1d3eb 💄 2014-10-21 13:28:09 -07:00
Kevin Sawicki 892cdae622 Return false when resource path does not match resources path 2014-10-21 13:28:09 -07:00
Kevin Sawicki f33d7ba27f 📝 store -> stored 2014-10-21 13:28:09 -07:00
Kevin Sawicki 06436ef530 📝 Remove extra to 2014-10-21 13:28:09 -07:00
Kevin Sawicki 815244bba0 Delete from local cache reference 2014-10-21 13:28:08 -07:00
Kevin Sawicki 0303ebb5e5 Add resolved main path to package cache 2014-10-21 13:28:08 -07:00
Kevin Sawicki eab791d47e Cache paths are relative to resource path 2014-10-21 13:28:08 -07:00
Kevin Sawicki 6ad96d98b8 Bypass cache when in dev mode 2014-10-21 13:28:08 -07:00
Kevin Sawicki ed4ebefdc1 Use resourcePath on PackageManager 2014-10-21 13:28:08 -07:00
Kevin Sawicki a1828fa3a6 Remove package's package.json from cache
This file is inlined in the main package.json
2014-10-21 13:28:08 -07:00
Kevin Sawicki 345c0f670c Ignore extensions from bundled packages
These are generated in their own cache
2014-10-21 13:28:08 -07:00
Kevin Sawicki d78e6fa711 Build path manually 2014-10-21 13:28:08 -07:00
Kevin Sawicki c3a6475308 Remove unused properties from metadata
Saves another ~50k
2014-10-21 13:28:08 -07:00
Kevin Sawicki 2cc9f6bee8 Use absolute keymap/menu paths 2014-10-21 13:28:08 -07:00
Kevin Sawicki 0c6fba2ce2 Remove inlined files from app directory 2014-10-21 13:28:08 -07:00
Kevin Sawicki fa72db87a2 Update task description 2014-10-21 13:28:07 -07:00
Kevin Sawicki a0d7bbdb92 Don't pretty print package.json
It is now ~400k pretty printed and ~300k without
2014-10-21 13:28:07 -07:00
Kevin Sawicki 4c3e1ef82b 💄 2014-10-21 13:28:07 -07:00
Kevin Sawicki 1056418f97 Only use cache for bundled packages 2014-10-21 13:28:07 -07:00
Kevin Sawicki 37040ad485 Use _atomPackage key from main metadata 2014-10-21 13:28:07 -07:00
Kevin Sawicki dee9cccae7 Use proper relative paths in cache 2014-10-21 13:28:07 -07:00
Kevin Sawicki 50e27854cc Cache package metadata in main package.json file 2014-10-21 13:28:07 -07:00
Ben Ogle c931071c91 Merge pull request #3910 from atom/bo-descriptor-object
Add a ScopeDescriptor object
2014-10-21 13:27:17 -07:00
Ben Ogle 498c8d21b2 Fix comments n junk 2014-10-21 13:27:01 -07:00
Ben Ogle 263b792eee Merge pull request #3907 from atom/bo-scoped-schema
Add support for scoped defaults in config schemas
2014-10-21 13:12:18 -07:00
Ben Ogle ffd3990a6b Split with the new method 2014-10-21 11:57:01 -07:00
Ben Ogle 31490ca31e Last of scopeDescriptor -> scopes from tokens 2014-10-21 11:49:49 -07:00
Ben Ogle 37159bb478 Oops, don’t call the method twice 2014-10-21 11:44:58 -07:00
Ben Ogle 16ad957609 scopeDescriptor -> scopes
Now that we have a real ScopeDescriptor object, 
these should change back!
2014-10-21 11:38:43 -07:00
Ben Ogle 137eeab4cf Return scopes arrays from deprecated methods
backward compatibility
2014-10-21 11:19:58 -07:00
Kevin Sawicki ce2076f30a Merge pull request #3909 from atom/ks-extension-cache-for-packages
Add extension cache for installed packages
2014-10-21 11:12:31 -07:00
Kevin Sawicki 8479d564f5 Enable extensions for installed packages 2014-10-21 11:02:24 -07:00
Kevin Sawicki ec6004615a Load extensions in ModuleCache.create 2014-10-21 10:59:29 -07:00
Kevin Sawicki 7e7441dc23 Merge pull request #3906 from atom/ks-change-menu-on-focus
Swap out application menus on focus
2014-10-21 10:36:14 -07:00
Kevin Sawicki 2a09d25eb1 📝 Add template 2014-10-21 10:22:50 -07:00
Kevin Sawicki d5508b338b Compare templates before swapping them out 2014-10-21 10:22:50 -07:00
Kevin Sawicki 86bd43bf73 Store each window's menu template
Restore it when the window gains focus
2014-10-21 10:22:50 -07:00
Kevin Sawicki 3075b74b64 Close the template
Menu.buildFromTemplate modifies it so copy before hand
so it can be reused
2014-10-21 10:22:50 -07:00
Kevin Sawicki 11d7437ecc Add setActiveTemplate helper 2014-10-21 10:22:49 -07:00
Cheng Zhao df439f5ada Merge pull request #3915 from atom/atom-shell-v0.18.2
Upgrade to atom-shell@0.18.2
2014-10-21 23:02:18 +08:00
Wojtek Siudzinski dc28ddbdc8 Setting ATOM_HOME 2014-10-21 16:55:10 +02:00
Nathan Sobo 49e98d368a Log a warning if a package has an incompatible main module
I’ve been tripped up by this twice now, so it would be good to provide
some feedback when it happens.
2014-10-21 08:54:16 -06:00
Cheng Zhao 02e91aa4cd ⬆️ atom-shell@0.18.2 2014-10-21 22:46:40 +08:00
Ben Ogle 14c8e9cedc Fix specs 2014-10-20 18:40:32 -07:00
Kevin Sawicki 4867e3ef14 Upgrade to tabs@0.55 2014-10-20 18:03:11 -07:00
Ben Ogle 3a70b98ae1 ScopeDescriptor::create -> fromObject 2014-10-20 17:59:28 -07:00
Ben Ogle 08f35531ba Update descriptor docs 2014-10-20 17:49:14 -07:00
Ben Ogle ce2959c0b9 Return ScopeDescriptor objects 2014-10-20 17:49:02 -07:00
Ben Ogle 4c4b82fe6c Add new ScopeDescriptor object 2014-10-20 17:29:46 -07:00
Kevin Sawicki f4c3050050 Upgrade to snippets@0.56 2014-10-20 17:14:42 -07:00
Ben Ogle 2b148b7720 Accept escaped dots in config settings keys
Fixes #3898
2014-10-20 16:58:57 -07:00
Ben Ogle c40dd16466 Upgrade to underscore-plus 1.6 2014-10-20 16:57:46 -07:00
Ben Ogle 7ffe5d1385 Add support for scoped defaults in config schemas 2014-10-20 14:52:12 -07:00
Kevin Sawicki c2ef68a435 Go back to using a concurrency of 2 2014-10-20 14:21:20 -07:00
Kevin Sawicki aa117774b3 Experiment with longer timeout on Mac CI 2014-10-20 13:52:39 -07:00
Kevin Sawicki 6b44369458 Log time taken to upload 2014-10-20 13:37:19 -07:00
Kevin Sawicki 177b3a6d14 Use all the available cores on CI 2014-10-20 13:35:09 -07:00
Ben Ogle 4d1e488ef4 Add contributing to packages to the index 2014-10-20 13:34:15 -07:00
Ben Ogle 0a39c28a79 update contributing to packages to not mention amp develop 2014-10-20 13:34:15 -07:00
Kevin Sawicki e019347ca4 Output total spec time 2014-10-20 13:28:30 -07:00
Ben Ogle b425df1d58 Merge pull request #3837 from atom/bo-panel-api
Add panel API
2014-10-20 13:25:48 -07:00
Ben Ogle 055c632ee9 Call save() in restoreDefault() for scopedSettings 2014-10-20 12:29:46 -07:00
Ben Ogle 2ac1862e5f Remove toHide matcher. 2014-10-20 12:12:21 -07:00
Ben Ogle 5a82afd333 💄 2014-10-20 12:03:48 -07:00
Kevin Sawicki 13f81a452d Upgrade to language-less@0.16 2014-10-20 10:16:22 -07:00
Kevin Sawicki c8144b7e1b Upgrade to language-yaml@0.19 2014-10-20 09:40:36 -07:00
Nathan Sobo b3b78fa926 Merge pull request #3883 from atom/ns-core-specs-from-anywhere
Allow core specs from command line in atom repository regardless of its location
2014-10-20 10:29:13 -06:00
Nathan Sobo 824c00dab3 Add environment variable to the usage string instead of at end 2014-10-20 10:12:32 -06:00
Nathan Sobo 8d331e94d2 Preserve alphabetical sort order for options 2014-10-20 10:07:40 -06:00
Nathan Sobo bc2dd9f52c Drop unnecessary encoding argument 2014-10-20 10:06:19 -06:00
Nathan Sobo 5dd9f9c5ad Fix typo in comment 2014-10-20 10:05:53 -06:00
Kevin Sawicki 3f1afec15b 📝 Link to CSON description 2014-10-20 09:01:17 -07:00
Kevin Sawicki e4705d45c4 Merge pull request #3769 from Maxhodges/keymap-advice
Warn new users we are using a little known format (cson), not the more popular json doc notation.
2014-10-20 08:58:12 -07:00
Kevin Sawicki c0846ab8a6 Upgrade to deprecation-cop@0.11 2014-10-20 08:55:36 -07:00
Kevin Sawicki bfbb262844 Merge pull request #3886 from fenuks/patch-1
Add GenericName to .desktop file
2014-10-20 08:32:13 -07:00
fenuks 5669aa39ce 🐧 Add GenericName to .desktop file, fixes #3885 2014-10-18 20:07:54 +02:00
Nathan Sobo d1f9133ef4 Merge pull request #3830 from atom/ns-extract-style-manager
Extract style manager from theme manager
2014-10-17 18:11:16 -06:00
Nathan Sobo 362c9c8588 Document ATOM_DEV_RESOURCE_PATH environment variable in atom —help 2014-10-17 18:00:45 -06:00
Nathan Sobo c63cde1cd3 Set resource path based on spec directory when running atom core specs
Fixes #3872
2014-10-17 18:00:21 -06:00
Nathan Sobo 6d937831b9 Clarify spec-directory documentation in atom executable 2014-10-17 17:18:43 -06:00
Nathan Sobo 0eacbed162 Document the resource-path option to atom executable 2014-10-17 17:18:30 -06:00
Ben Ogle 6e034c6319 Call the attach hooks after adding a view to a panel. 2014-10-17 16:04:11 -07:00
Kevin Sawicki a4f6c674ef Upgrade to timecop@0.23 2014-10-17 15:51:57 -07:00
Kevin Sawicki 405af7fb16 Track time taken to read window state
Refs atom/timecop#6
2014-10-17 15:44:59 -07:00
Ben Ogle 995e89b5f6 📝 Move panels API for the sake of the docs 2014-10-17 15:42:16 -07:00
Kevin Sawicki 6b90b83867 ⬆️ apm@0.106 2014-10-17 15:34:03 -07:00
Ben Ogle 66d469ee10 Deprecate workspace pane methods 2014-10-17 15:31:56 -07:00
Ben Ogle 657cbc9c17 📝 Doc the new panel methods 2014-10-17 15:24:20 -07:00
Ben Ogle 29ea506f93 Doc Panel class 2014-10-17 15:23:20 -07:00
Ben Ogle 155d144788 Fix spec 2014-10-17 15:23:06 -07:00
Kevin Sawicki 892f341feb ⬆️ apm@0.105 2014-10-17 14:45:52 -07:00
Kevin Sawicki d5808b5c85 Merge pull request #3867 from atom/ks-select-past-last-line
Fix selecting past the last line
2014-10-17 14:38:18 -07:00
Kevin Sawicki d6feb686c1 Mention single click 2014-10-17 14:00:26 -07:00
Kevin Sawicki 5069a5b48b Add spec for clicking past last line 2014-10-17 14:00:25 -07:00
Kevin Sawicki 8c136b18c2 Set targetLeft to Infinity when past last row 2014-10-17 14:00:25 -07:00
Kevin Sawicki f81bc4b870 Never break when past the last row 2014-10-17 14:00:25 -07:00
Adam Boesch 111b956f93 Fix cursor not being able to move within the last line of text. 2014-10-17 14:00:25 -07:00
Adam Boesch 88a95ad06b Fix cursor so clicking the below the last line of text puts the cursor at
the end of the last line.
2014-10-17 14:00:25 -07:00
Kevin Sawicki 04bd602c23 Upgrade to language-c@0.29 2014-10-17 13:59:05 -07:00
Ben Ogle de78e53b35 Add priority system to the panels 2014-10-17 13:44:40 -07:00
Kevin Sawicki fb1a866447 Prepare 0.139 2014-10-17 13:18:59 -07:00
Kevin Sawicki 8925d309b0 Only build debian package for now 2014-10-17 12:59:42 -07:00
Ben Ogle b94485eafd Set the heights of atom panels for location left and right. 2014-10-17 12:08:24 -07:00
Cheng Zhao a83acd0e8a Merge pull request #3874 from atom/atom-shell-v0.18.1
⬆️ atom-shell@0.18.1
2014-10-17 19:43:04 +08:00
Cheng Zhao 4e2c500b64 ⬆️ atom-shell@0.18.1 2014-10-17 19:14:07 +08:00
Kevin Sawicki 03f863d558 ⬆️ language-toml@0.14 2014-10-16 18:48:04 -07:00
Kevin Sawicki b8ad484db0 ⬆️ language-ruby@0.40 2014-10-16 17:32:29 -07:00
Ben Ogle f0fd7c2682 Add hide/show ability for panels 2014-10-16 17:32:24 -07:00
Ben Ogle 3f170a8b5e Add matcher toHide() 2014-10-16 17:31:30 -07:00
Ben Ogle 37a7cfaf9a Remove location junk from panel creation 2014-10-16 17:31:13 -07:00
Ben Ogle 5683491029 Rename custom element so as not to clash 2014-10-16 17:30:54 -07:00
Ben Ogle 4ca630a7da orientation -> location 2014-10-16 16:54:08 -07:00
Ben Ogle 99aedbab89 Panel container probably not public 2014-10-16 16:49:18 -07:00
Ben Ogle 52c05eade7 Render proper atom-panels as children of containers 2014-10-16 16:48:56 -07:00
Kevin Sawicki 1ddb956a94 Cache versions that do not match the range 2014-10-16 16:32:52 -07:00
Kevin Sawicki 2570c20da0 Merge pull request #3860 from atom/ks-join-line-single-space
Join lines with a single space
2014-10-16 16:31:59 -07:00
Ben Ogle 299710f08a Integrate the pane containers into the workspace 2014-10-16 16:17:44 -07:00
Ben Ogle 83e5873f3b Panel containers have the orientation 2014-10-16 16:16:49 -07:00
Kevin Sawicki 4889e03cf2 Always move to end of current line 2014-10-16 16:13:38 -07:00
Kevin Sawicki 7f6cc8a100 📝 Correct typos 2014-10-16 16:13:38 -07:00
Kevin Sawicki e8e0ee1e34 📝 form -> from 2014-10-16 16:13:37 -07:00
Kevin Sawicki 8e3d8eda31 Removed added newline 2014-10-16 16:13:37 -07:00
Kevin Sawicki afd1fa995f 💄 2014-10-16 16:13:37 -07:00
Kevin Sawicki a03c9b6d68 Add trailing whitespace to line 2014-10-16 16:13:37 -07:00
Kevin Sawicki cdd31d69a8 Add spec for joining from empty line 2014-10-16 16:13:37 -07:00
Kevin Sawicki f94983d4d9 Scan buffer to remove trailing whitespace 2014-10-16 16:13:37 -07:00
Adam Boesch ffa528001c Fix join lines so that only a single space will exist between two lines that are joined. 2014-10-16 16:13:37 -07:00
Kevin Sawicki 305b9bc030 Add missing require 2014-10-16 16:13:23 -07:00
Kevin Sawicki 6ed3ef3f60 Only require coffee file when available
Closes #3864
2014-10-16 15:41:23 -07:00
Ben Ogle 5c2e55861c Add panel containers 2014-10-16 15:33:28 -07:00
Nathan Sobo c0843d467d Opt out of command registration for textInput events
There seems to be issues capturing them when they are programmatically
dispatched via dispatchEvent. This was causing problems for the vim-mode
specs. This event belongs among the native events that aren’t treated
as commands anyway.
2014-10-16 15:58:14 -06:00
Ben Ogle 734a79b7ec Add initial panel API.
It can only add things to the left right now.
2014-10-16 13:44:03 -07:00
Ben Ogle 55a5e66701 Merge pull request #3831 from atom/bo-scoped-docs
Add docs for scope selectors and scope descriptors.
2014-10-16 13:26:53 -07:00
Ben Ogle da86c86577 Integrate feedback 2014-10-16 13:26:07 -07:00
Ben Ogle 072c537b6b Upgrade language-gfm 2014-10-16 13:23:35 -07:00
Ben Ogle 1577a28ad4 Add links to the new doc in the API docs 2014-10-16 13:23:34 -07:00
Ben Ogle ee23131688 Rename scopes -> Scope selectors in config::set docs 2014-10-16 13:23:34 -07:00
Ben Ogle 7d8b5bc1fc Add scopes and scope descriptors docs 2014-10-16 13:23:34 -07:00
Ben Ogle 0243597ee8 ⬆️ Upgrade python language to use 4 space tabs 2014-10-16 13:21:41 -07:00
Ben Ogle 50a5609c6b Merge pull request #3847 from atom/bo-scoped-defaults
Add scoped defaults
2014-10-16 11:04:15 -07:00
Kevin Sawicki e76ea838e1 ⬆️ apm 0.104 2014-10-16 09:10:58 -07:00
Kevin Sawicki ed5c011963 :up_arrow: link@0.26 2014-10-15 18:19:44 -07:00
Ben Ogle 0bc1407e7d 📝 Add doc strings 2014-10-15 18:16:44 -07:00
Ben Ogle 7aa00f3417 ⬆️ scoped-property-store 2014-10-15 18:13:15 -07:00
Nathan Sobo 06e9dbf48a 💄 Remove confusing parentheses usage 2014-10-15 19:11:13 -06:00
Kevin Sawicki ff5acb6a34 Upgrade to language-coffee-script@0.36 2014-10-15 18:07:47 -07:00
Nathan Sobo 231295cb2c Add dummy commands prior to package activation so they appear in palette
Fixes #3846
2014-10-15 18:55:38 -06:00
Kevin Sawicki c8a18dfaf8 ⬆️ git-diff@0.40 2014-10-15 17:25:45 -07:00
Kevin Sawicki b339baa923 ⬆️ language-go@0.19 2014-10-15 17:07:20 -07:00
Kevin Sawicki 92d08b47ad Add config for font zooming when Ctrl+Scrolling 2014-10-15 16:59:43 -07:00
Kevin Sawicki 5c3a7a99fc Merge pull request #3737 from russlescai/rl-mousewheel-ctrl-zoom-with-fixes
Adjust font size using Control key with Mouse Scroll Wheel.
2014-10-15 16:52:46 -07:00
Kevin Sawicki ea932a01f9 Build in ~/rpmbuild 2014-10-15 16:42:42 -07:00
Kevin Sawicki d261df0906 Add missing buildDir variable 2014-10-15 16:38:21 -07:00
Kevin Sawicki fac167379f Copy rpm file to build directory 2014-10-15 16:37:16 -07:00
Kevin Sawicki f6d9af8d1a Build rpm in temp folder 2014-10-15 16:34:18 -07:00
Kevin Sawicki a128cf5eb3 Remove rpm install instructions
Will add back once the first rpm release is made
2014-10-15 16:31:25 -07:00
Kevin Sawicki e9c2ee9675 Report errors from mkrpm 2014-10-15 16:31:13 -07:00
Kevin Sawicki e85d33b2a6 Merge pull request #3797 from ardeshirj/mkrpm
mkrpm grunt task
2014-10-15 16:30:16 -07:00
Ben Ogle a42b3ff171 Support a scopeSelector in getSettings() 2014-10-15 16:26:03 -07:00
Ardeshir Javaherchi 86fdbfbb15 🐧 Update to atom.desktop in mkrpm and remove extra variables 2014-10-15 15:53:32 -07:00
Ben Ogle 757abfe3db Config::restoreDefaults handles scopes 2014-10-15 15:33:38 -07:00
Ardeshir Javaherchi cde7940e40 Merge branch 'master' into mkrpm 2014-10-15 15:21:01 -07:00
Ben Ogle d7d6e506da ScopeChainForScopeDescriptor 2014-10-15 15:11:41 -07:00
Ben Ogle 593fc1e77a name -> source 2014-10-15 15:11:27 -07:00
Ben Ogle ae857203fd Support scoped settings in getDefault 2014-10-15 15:11:19 -07:00
Kevin Sawicki a1c418e995 ⬆️ Upgrade to apm 0.103 2014-10-15 15:09:11 -07:00
Kevin Sawicki f07f096f56 Use Range class that memoizes 2014-10-15 14:47:24 -07:00
Ben Ogle 62c1972c95 isDefault supports scoped settings 2014-10-15 14:44:16 -07:00
Nathan Sobo 314c525d2d Assign properties in addition to attributes for convenience 2014-10-15 15:14:13 -06:00
Nathan Sobo 04b3eef768 Fix theme-manager-specs 2014-10-15 15:14:13 -06:00
Nathan Sobo 506753a535 Subscribe to <atom-styles> element to shim events in ThemeManager
This is better than subscribing to atom.styles because the events it
emits contain the *actual* style elements we insert into the DOM.
2014-10-15 15:14:13 -06:00
Nathan Sobo a8b9e1b790 Handle style element updates in StylesElement 2014-10-15 15:14:13 -06:00
Nathan Sobo be51ccf786 Add StylesElement::onDidAdd/RemoveStyleElement 2014-10-15 15:14:13 -06:00
Nathan Sobo 65e077abd1 Use StyleManager and StylesElement to manage all stylesheet elements
For now, loading remains in the theme manager, but all application of
stylesheets is routed through atom.styles.
2014-10-15 15:14:13 -06:00
Nathan Sobo 79598aaae9 Add StyleElement
This will be used to handle stylesheet rendering when we move management
of loading stylesheets to the StyleManager instead of the theme manager.
This sets us up for being able to render specific stylesheets in shadow
roots in addition to just having global stylesheets.
2014-10-15 15:14:13 -06:00
Nathan Sobo 62a43c6fb9 Revise StyleManager API 2014-10-15 15:14:12 -06:00
Nathan Sobo 1fe1147901 Add group parameter to StyleManager::addStyleSheet
This can be used to sequence style elements at the correct location in
the cascade even if they are loaded later than elements in a subsequent
group.
2014-10-15 15:14:12 -06:00
Nathan Sobo 1c97dcd195 Add sourcePath parameter to StyleManager::addStyleSheet 2014-10-15 15:14:12 -06:00
Nathan Sobo d3371dbcd2 Start on StyleManager
This will take over raw stylesheet management from the theme manager
now that it’s becoming more complex with the need to target specific
host elements. Instead of actually adding nodes to the head of the
document, it will instead simply manage a set of stylesheets we want to
apply and leave actual DOM manipulation to <atom-styles> custom elements
that can render the set of active stylesheets in the appropriate
locations.
2014-10-15 15:14:12 -06:00
Kevin Sawicki b2b4860983 Merge pull request #3761 from atom/ks-require-cache
Cache requires across installed packages
2014-10-15 14:00:10 -07:00
Kevin Sawicki 57fc3deaed Assert that resolved atom shell module paths exist 2014-10-15 13:12:42 -07:00
Kevin Sawicki 677949d61c Check that all builtins resolve without hitting fs 2014-10-15 13:09:47 -07:00
Kevin Sawicki e09d7159bc Add spec for no compatible module version available 2014-10-15 13:09:47 -07:00
Kevin Sawicki e02af51a04 🐎 Extend range to memoize matched versions 2014-10-15 13:09:47 -07:00
Kevin Sawicki d2c7a2caca Return early when cache to add is missing 2014-10-15 13:09:47 -07:00
Kevin Sawicki 739a629552 💄 2014-10-15 13:09:47 -07:00
Kevin Sawicki 88f0183352 Remove unneeded quotes 2014-10-15 13:09:47 -07:00
Kevin Sawicki 7f01a163e5 💄 2014-10-15 13:09:47 -07:00
Kevin Sawicki fc44662ba3 Add spec for resolving compatible module paths 2014-10-15 13:09:47 -07:00
Kevin Sawicki 5052aaca95 Don't leave empty paths with a trailing slash 2014-10-15 13:09:46 -07:00
Kevin Sawicki 826681b6c2 Add relative path cache spec 2014-10-15 13:09:46 -07:00
Kevin Sawicki 8334bba484 Add initial ModuleCache spec 2014-10-15 13:09:46 -07:00
Kevin Sawicki a0ae526017 Check candidates after ranges
This way builtins are checked for correctly when the
range isn’t found
2014-10-15 13:09:46 -07:00
Kevin Sawicki 6a6c7b1852 Calculate load time in index.js
Do it previously in window-bootstrap caused several things to not be
included such as requiring coffee script and atom shell modules.

Now it is a much more accurate representation of on load time.
2014-10-15 13:09:46 -07:00
Kevin Sawicki 42040f8a9d Return early when no candidates exist 2014-10-15 13:09:46 -07:00
Kevin Sawicki 9d1db0f3de Remove unneeded trailing slash check
Package names don’t have these anyway and file paths
won’t be ending with them.
2014-10-15 13:09:46 -07:00
Kevin Sawicki f0b922f643 Use String::startsWith 2014-10-15 13:09:46 -07:00
Kevin Sawicki bb92b8697d Add isCorePath helper 2014-10-15 13:09:46 -07:00
Kevin Sawicki 4c17c9eae6 fs-plust -> fs-plus 2014-10-15 13:09:46 -07:00
Kevin Sawicki 289f17b119 Require coffee before module cache in dev mode 2014-10-15 13:09:46 -07:00
Kevin Sawicki dfd7bcae7f Use process.resourcesPath to find Atom shell root 2014-10-15 13:09:46 -07:00
Kevin Sawicki 0cfd37acd0 Special case reactionary in cache 2014-10-15 13:09:45 -07:00
Kevin Sawicki 105fc302ea Upgrade to text-buffer@3.2.9 2014-10-15 13:09:45 -07:00
Kevin Sawicki f4ddc05b9c Remove call to removed function 2014-10-15 13:09:45 -07:00
Kevin Sawicki 948f96dd6f Only load fs-plus when creating a cache 2014-10-15 13:09:45 -07:00
Kevin Sawicki db627f5cde 🐎 Join paths manually
path.join calls path.normalize and with the number of paths
being pushed through the cache it is faster to require them
manually since they are already normalized
2014-10-15 13:09:45 -07:00
Kevin Sawicki a6866656b7 Inline isAbsolute method
This allows fs-plus to be required through the cache
2014-10-15 13:09:45 -07:00
Kevin Sawicki 40c5289e2b Defer requires until the cache is populated 2014-10-15 13:09:45 -07:00
Kevin Sawicki 7dffc58c5b Use Module's filename instead of id 2014-10-15 13:09:45 -07:00
Kevin Sawicki 67d430d100 Add crash-reporter to cache 2014-10-15 13:09:45 -07:00
Kevin Sawicki d745b9ef5f Register module cache as early as possible 2014-10-15 13:09:45 -07:00
Kevin Sawicki b9d89cbf5d Inline valid extensions to check for 2014-10-15 13:09:45 -07:00
Kevin Sawicki 934c0720d8 Require ipc when needed 2014-10-15 13:09:44 -07:00
Kevin Sawicki 06ac206707 Add clipboard to cache 2014-10-15 13:09:44 -07:00
Kevin Sawicki 6e1bdbbed7 Verify that file path is absolute or relative 2014-10-15 13:09:44 -07:00
Kevin Sawicki 3e3de50eb3 💄 2014-10-15 13:09:44 -07:00
Kevin Sawicki d7a8dfb209 Add Atom Shell builtins to cache 2014-10-15 13:09:44 -07:00
Kevin Sawicki b0aea54544 Check cache before atom require short-circuit 2014-10-15 13:09:44 -07:00
Kevin Sawicki 41598af2b2 Add pre-resolved path to require('atom') 2014-10-15 13:09:44 -07:00
Kevin Sawicki f495db41e7 getCachedModulePath -> resolveModulePath 2014-10-15 13:09:44 -07:00
Kevin Sawicki 76187f176c Add core cache of pre-resolved paths
This reduces the number of calls to Module._findPath for
relative paths since they can be resolved without stating
2014-10-15 13:09:44 -07:00
Kevin Sawicki d7cb1550bf Remove semicolon 2014-10-15 13:09:44 -07:00
Kevin Sawicki 086be13ac4 Add Module._findPath debug timing and count 2014-10-15 13:09:44 -07:00
Kevin Sawicki f0cffcbd84 Add addPathToCache helper for apm to warm using 2014-10-15 13:09:44 -07:00
Kevin Sawicki d1f3d7d51e Mention plain return 2014-10-15 13:09:43 -07:00
Kevin Sawicki bdc0341eb3 undefined -> return 2014-10-15 13:09:43 -07:00
Kevin Sawicki 171411823f 🐎 Resolve uncached core dependencies
Trust modules under the resource path to be there without stat-ing and
verifying.
2014-10-15 13:09:43 -07:00
Kevin Sawicki 7926531330 Whitelist folders path from core
There are several folders bundled in the app that aren't needed in the
require cache list so it is simpler to opt-in the folders that should
be part of the cache.
2014-10-15 13:09:43 -07:00
Kevin Sawicki 440866d79e Remove invalid range logging 2014-10-15 13:09:43 -07:00
Kevin Sawicki d9c758b940 Remove no main module logging 2014-10-15 13:09:43 -07:00
Kevin Sawicki 827a8ba107 First dependency version added wins 2014-10-15 13:09:43 -07:00
Kevin Sawicki 65a1fafaf7 Ensure CoffeeScript is registered when caching
This ensures folders with .coffee files are includes in the
folders array
2014-10-15 13:09:43 -07:00
Kevin Sawicki 9bd6891ac2 Use realpath so path.relative works right 2014-10-15 13:09:43 -07:00
Kevin Sawicki 8a0755340f Remove extra ) 2014-10-15 13:09:43 -07:00
Kevin Sawicki bdebe575b7 💄 Use regular require paths 2014-10-15 13:09:43 -07:00
Kevin Sawicki 472a48092d Export cache for debugging purposes 2014-10-15 13:09:42 -07:00
Kevin Sawicki d877872c71 Use right require path 2014-10-15 13:09:42 -07:00
Kevin Sawicki 0a297d7642 Load module cache in index.js 2014-10-15 13:09:42 -07:00
Kevin Sawicki 87d2026e63 Generate module cache during build 2014-10-15 13:09:42 -07:00
Kevin Sawicki 20f6489232 Disable debug mode 2014-10-15 13:09:42 -07:00
Kevin Sawicki 2c737b8927 Move debug property into cache object 2014-10-15 13:09:42 -07:00
Kevin Sawicki 0df5045edb Move registered property into cache object 2014-10-15 13:09:42 -07:00
Kevin Sawicki b91c25186f Use hasOwnProperty 2014-10-15 13:09:42 -07:00
Kevin Sawicki 7b8a293f30 Inline path to listSync call 2014-10-15 13:09:42 -07:00
Kevin Sawicki 26df31aa1f 💄 Group exported methods 2014-10-15 13:09:42 -07:00
Kevin Sawicki 36ff22e30a generateDependencies -> create 2014-10-15 13:09:42 -07:00
Kevin Sawicki 93c5b4be7b Generate cache for bundled packages 2014-10-15 13:09:42 -07:00
Kevin Sawicki 495fa43753 Allow passing in metadata to ModuleCache.add 2014-10-15 13:09:41 -07:00
Kevin Sawicki 2954aacb1c Ignore invalid ranges
They cannot be cache since multiple commits/branches may
map to the same version number which would lead to
unpredictable results.
2014-10-15 13:09:41 -07:00
Kevin Sawicki 1bf8f516c3 Cache parsed ranges 2014-10-15 13:09:41 -07:00
Kevin Sawicki e0a84232c3 💄 2014-10-15 13:09:41 -07:00
Kevin Sawicki 8c204bb60e Restore cache 2014-10-15 13:09:41 -07:00
Kevin Sawicki 245c77869f Add require time and load count tracking 2014-10-15 13:09:41 -07:00
Kevin Sawicki 508a30efb1 Return when package.json can't be required 2014-10-15 13:09:41 -07:00
Kevin Sawicki 5ad54bbe92 Wire up cache to Module._resolveFilename 2014-10-15 13:09:41 -07:00
Kevin Sawicki 4da6513fb5 Add initial cache of resource path module 2014-10-15 13:09:41 -07:00
Kevin Sawicki 1154490a97 Store main path of module
This is the key in Module._cache
2014-10-15 13:09:41 -07:00
Kevin Sawicki 0e7e24ca6b relative -> relativePath 2014-10-15 13:09:40 -07:00
Kevin Sawicki 944ac14be7 Make dependencies an array of objects 2014-10-15 13:09:40 -07:00
Kevin Sawicki 7aa28920cf Use fs.listSync 2014-10-15 13:09:40 -07:00
Kevin Sawicki 6ce6553456 Add initial task to generate dependencies 2014-10-15 13:09:40 -07:00
Kevin Sawicki b4470a14cb Explicitly register cache 2014-10-15 13:09:40 -07:00
Kevin Sawicki 5b629e6b29 💄 2014-10-15 13:09:40 -07:00
Kevin Sawicki 7304b97547 Parse resource path for relativizing cache paths 2014-10-15 13:09:40 -07:00
Kevin Sawicki f523c5eb73 Do hasOwnProperty check first 2014-10-15 13:09:40 -07:00
Kevin Sawicki 5981cfb8c9 Ignore native modules since they are already cached 2014-10-15 13:09:40 -07:00
Kevin Sawicki d1e966349f Add initial cache lookup method 2014-10-15 13:09:40 -07:00
Kevin Sawicki dc19fa4baa 📝 Add a couple notes 2014-10-15 13:09:40 -07:00
Kevin Sawicki 84e90d140f Wire initial module cache 2014-10-15 13:09:40 -07:00
Kevin Sawicki ea557ab109 Prepare 0.138 2014-10-15 13:07:58 -07:00
Kevin Sawicki bfbc0b1c46 Upgrade to settings-view@0.152 2014-10-15 11:28:37 -07:00
Paul Betts d3b9a14f98 Merge pull request #3836 from atom/dont-fail-if-no-deltas
Don't fail create-installer if ATOM_ACCESS_TOKEN isn't set
2014-10-15 11:08:00 -07:00
Paul Betts 85ca8350e5 Twerk error message 2014-10-15 11:04:32 -07:00
Kevin Sawicki ad6fc94a5c ⬆️ Upgrade to grammar-selector@0.35 2014-10-15 09:18:54 -07:00
Kevin Sawicki 07a1b28e67 Upgrade to incompatible-packages@0.10 2014-10-15 09:12:10 -07:00
Kevin Sawicki 966adbdf20 Upgrade to tree-view@0.131 2014-10-15 09:01:45 -07:00
Kevin Sawicki bbfac9430e Use -> instead of => 2014-10-14 18:06:40 -07:00
Kevin Sawicki 7bc3fffa1a Merge pull request #3822 from suda/master
Replaced xcopy with robocopy
2014-10-14 17:32:42 -07:00
Kevin Sawicki 7b9aa23129 📝 deps -> dependencies 2014-10-14 17:28:19 -07:00
Kevin Sawicki 9ef4b84afb 📝 Add missing : 2014-10-14 17:27:57 -07:00
Kevin Sawicki 01625bc892 Merge pull request #3828 from zigal/patch-1
📝 adding an emoji for upgrading deps
2014-10-14 17:27:16 -07:00
Paul Betts feb97eb7b2 Don't fail create-installer if ATOM_ACCESS_TOKEN isn't set
This lets users create one-off installers locally without having to download
every other release to create deltas.
2014-10-14 16:17:32 -07:00
zigal a2781b2a84 📝 adding an emoji for upgrading deps 2014-10-14 20:14:59 +02:00
Nathan Sobo c9869580d4 Use more specific selectors for Workspace::horizontal/::vertical outlets
Fixes #3793
2014-10-14 12:03:42 -06:00
Cheng Zhao f4b67190bd Merge pull request #3825 from atom/atom-shell-v0.18.0
Upgrade to Chrome 38.0.2125.102
2014-10-14 22:28:12 +08:00
Cheng Zhao fcf230ccb5 --harmony_collections is no more needed 2014-10-14 22:01:32 +08:00
Cheng Zhao e7be5adaf1 Upgrade to apm@0.102.0 2014-10-14 21:42:30 +08:00
Cheng Zhao 1377ec5583 Upgrade to atom-shell@0.18.0 2014-10-14 21:42:12 +08:00
Wojtek Siudzinski f382edd431 Replaced xcopy with robocopy 2014-10-14 08:51:55 +02:00
Kevin Sawicki 4821c1aa5a Upgrade to language-xml@0.24 2014-10-13 23:07:57 -04:00
Kevin Sawicki 8f97e5f81b Upgrade to language-xml@0.23 2014-10-13 23:03:31 -04:00
Ben Ogle c16d84527d fix specs related to title 2014-10-13 17:48:06 -07:00
Ben Ogle 5c8e20a01d 💄 2014-10-13 17:30:40 -07:00
Ben Ogle ae0b3b47e3 Merge pull request #3814 from Parasithe/master
Add Atom in the title bar
2014-10-13 17:27:16 -07:00
Ben Ogle d73c34af25 Merge pull request #3817 from atom/bo-rename-scopes
Rename scopes -> scopeDescriptor
2014-10-13 17:25:49 -07:00
Ben Ogle 3ba44b955d Deprecate Token::scopes 2014-10-13 17:12:35 -07:00
Ben Ogle b1e9e6b312 Deprecate the use of scopes. 2014-10-13 16:52:49 -07:00
Ben Ogle 22e43600d2 Fix Token::isEqual() to accept scopes for now. 2014-10-13 16:51:10 -07:00
Ben Ogle b9f13d05a8 📝 Update docs for Config::get 2014-10-13 16:50:42 -07:00
Ben Ogle b2cc190a3b Actually get the cursor 2014-10-13 16:35:50 -07:00
Ben Ogle 274bbeec27 Fix deprecate reference 2014-10-13 16:32:17 -07:00
Ben Ogle c0091b4601 scopes -> scopeDescriptor
!!!
2014-10-13 16:30:41 -07:00
Ben Ogle 8cf36af1dc scopesForPosition -> scopeDescriptorForPosition 2014-10-13 16:18:36 -07:00
Ben Ogle 80f52aa3ef Reorganize scopes section 2014-10-13 16:17:01 -07:00
Ben Ogle 56c6c3516a scopesForBufferPosition -> scopeDescriptorForBufferPosition 2014-10-13 16:16:44 -07:00
Ben Ogle f7ab04404c Remove scopesAtCursor from TextEditor class 2014-10-13 16:15:58 -07:00
Ben Ogle b0de88de74 grammarScopeDescriptor -> rootScopeDescriptor 2014-10-13 16:15:05 -07:00
Ben Ogle 6ab002d4be Cursor::getScopes -> Cursor::getScopeDescriptor 2014-10-13 16:14:31 -07:00
Ben Ogle 0588e14850 Only notify when changed key path is really sub path of observed path
Closes #3775
2014-10-13 14:25:55 -07:00
Parasithe 82bf5da9aa Add Atom in the title bar 2014-10-13 17:06:05 -04:00
Paul Betts 9481260f6f Merge pull request #3738 from atom/delta-releases
Squirrel for Windows: Delta Packages
2014-10-13 14:03:22 -07:00
Ben Ogle b8fdaa2dc5 Upgrade markdown-preview 2014-10-13 13:33:30 -07:00
Ben Ogle b57f5a7afa Merge pull request #3812 from atom/bo-speedup-scoped-config
Speedup scoped config
2014-10-13 13:26:45 -07:00
Kevin Sawicki a2a4379974 Merge pull request #3803 from matttbe/master
🐧 .desktop file without capital letter
2014-10-13 15:57:12 -04:00
Ben Ogle 7f1947f7b2 💄 2014-10-13 12:47:19 -07:00
Ben Ogle 55c9b42a74 Clarity 2014-10-13 12:45:43 -07:00
Ben Ogle 9a41b5050e Cache the editor.tabLength config value 2014-10-13 12:34:06 -07:00
Ben Ogle 8ed751f5da Cache scoped settings in the display buffer 2014-10-13 12:22:25 -07:00
Kevin Sawicki 3abe6eb098 Upgrade to language-css@0.21 2014-10-13 11:21:00 -04:00
Kevin Sawicki 4aa7a1ebd8 Upgrade to tree-view@0.130 2014-10-13 11:04:25 -04:00
Kevin Sawicki 4997be54df Upgrade to welcome@0.19 2014-10-13 10:45:11 -04:00
Kevin Sawicki 93902b54e4 Only parse package.json when it is a file
Closes #3784
2014-10-13 10:42:47 -04:00
Kevin Sawicki 1d89150242 Upgrade to settings-view@0.151 2014-10-13 10:32:50 -04:00
Kevin Sawicki ec5819a684 Upgrade to language-python@0.20 2014-10-13 10:12:38 -04:00
Matthieu Baerts d6f43f1858 🐧 .desktop file without capital letter
The .desktop file of Atom was named Atom.desktop but it should be
renamed to atom.desktop because a .desktop should not contain capital
letters as any other .desktop files in /usr/share/applications.

Note that without that, it can be not easy to link the window with the
.desktop file and then a dock/panel could not link a launcher with its
window.
2014-10-12 18:47:06 +02:00
Ardeshir Javaherchi 503393122f 📝 Add Red Hat Linux to README file 2014-10-11 17:07:05 -07:00
Ardeshir Javaherchi b5c6d76999 Add grunt mkrpm task to create rpm package 2014-10-11 17:04:14 -07:00
Nathan Sobo b149d47b09 Dispose of subscriptions on SpacePen views in callRemoveHooks
Fixes atom/bracket-matcher#75
2014-10-11 07:25:28 -07:00
Ben Ogle f81f24fea6 Upgrade scoped property settings for mo beta
🐎, less temp objects, more straight forward
2014-10-10 14:16:31 -07:00
Ben Ogle 201345ec5d Allow for optimization of config::get 2014-10-10 12:21:41 -07:00
Ben Ogle 95ee29ea39 Upgrade to scoped-property-store@0.13.0 for 🐎 2014-10-10 12:07:37 -07:00
Kevin Sawicki 4c6803cf6a Merge pull request #3773 from mkoniecz/master
fakeroot is also necessary
2014-10-09 08:56:10 -07:00
Nathan Sobo d3512514d8 Merge pull request #3746 from atom/ns-custom-tag-names
Use custom tag names in core
2014-10-09 07:58:54 -07:00
Nathan Sobo 014e2e6fce Make atom-workspace tag have ‘display: block’ style 2014-10-09 07:39:14 -07:00
Nathan Sobo 1eb3d8bf99 Use ‘atom-text-editor’ custom tag name for TextEditorElement 2014-10-09 07:39:14 -07:00
Nathan Sobo 8e06e88efa Use ‘atom-workspace-axis’ custom tag name instead of ‘div’ 2014-10-09 07:39:14 -07:00
Nathan Sobo 8941b97ed2 Use ‘atom-workspace’ custom tag name for WorkspaceElement 2014-10-09 07:39:14 -07:00
Nathan Sobo eedf4894ae Use ‘atom-pane-container’ custom tag name for PaneContainerElement 2014-10-09 07:39:14 -07:00
Nathan Sobo ddf36a013c Use ‘atom-pane-axis’ custom tag name for PaneAxisElement 2014-10-09 07:39:14 -07:00
Nathan Sobo ee9284e228 Use ‘atom-pane’ custom tag name for PaneElement 2014-10-09 07:39:13 -07:00
Mateusz Konieczny e6e039293a fakeroot is also necessary 2014-10-09 13:11:06 +02:00
Max Hodges 6c56f2f985 Update keymap.cson 2014-10-09 16:01:41 +09:00
Max Hodges a4b959f2b8 Update keymap.cson 2014-10-09 13:26:14 +09:00
Max Hodges c59b7f6ead new users should be warned about cson
improper trailing and leading spaces can cause your bindings to fail.Since cson has very little adoption relative to json, I think it's important to warn new users that they need to understand CoffeeScript notation or else a single space could break their file. I spent one full hour today trying to get an auto-indent mapping to work. The solution involved adding one leading space!
2014-10-09 13:15:55 +09:00
Ben Ogle 17bfc29c5b Merge pull request #3718 from atom/bo-scoped-user-config
Add scoped settings to user config
2014-10-08 16:37:20 -07:00
Ben Ogle c154b8f4ec 💄 edit spec descriptions 2014-10-08 16:01:42 -07:00
Ben Ogle a28fed8bae 📝 Expose TextEditor::observeGrammar 2014-10-08 16:01:42 -07:00
Ben Ogle c2081fa569 💄 test 2014-10-08 16:01:42 -07:00
Ben Ogle 841412bd01 Fix spec 2014-10-08 16:01:42 -07:00
Ben Ogle f2d480fc72 getGrammarScopeDescriptor -> getRootScopeDescriptor 2014-10-08 16:01:42 -07:00
Ben Ogle d7cd0de0f8 Upgrade scoped-property-store 2014-10-08 16:01:42 -07:00
Ben Ogle 8910dd1a11 Update to not new format from propertiesForSource 2014-10-08 16:01:42 -07:00
Ben Ogle c315631efd Remove scopeDescriptor from getTabLength 2014-10-08 16:01:42 -07:00
Ben Ogle 26524e87b0 💄 tests 2014-10-08 16:01:42 -07:00
Ben Ogle 2a73d7052d 💄 Clean up spec names 2014-10-08 16:01:42 -07:00
Ben Ogle a3bbbc19b5 Read and write scoped settings from the user’s config 2014-10-08 16:01:42 -07:00
Ben Ogle b44a5dd1f0 Use jasmine json 2014-10-08 16:01:41 -07:00
Ben Ogle f662b3d745 💄 Normalize the names of related subscription things 2014-10-08 16:01:41 -07:00
Ben Ogle d3b00f67f2 Fix spec 2014-10-08 16:01:41 -07:00
Ben Ogle 2605044f19 Scope editor.showIndentGuide 2014-10-08 16:01:41 -07:00
Ben Ogle fbe4cf5677 Invisibles will be set in a call to updateInvisibles() 2014-10-08 16:01:41 -07:00
Ben Ogle ca4c40936a Scope editor.autoIndent 2014-10-08 16:01:41 -07:00
Ben Ogle 6958e0af10 Scope editor.normalizeIndentOnPaste 2014-10-08 16:01:41 -07:00
Ben Ogle 237c668ef0 Scope editor.invisibles and editor.showInvisibles 2014-10-08 16:01:41 -07:00
Ben Ogle c1ff53b02c getCurrentScopeDescriptor -> getGrammarScopeDescriptor 2014-10-08 16:01:41 -07:00
Ben Ogle 938f216cab Scope softWrap, softWrapAtPreferredLineLength, preferredLineLength
`editor.*` config settings
2014-10-08 16:01:41 -07:00
Ben Ogle fbcaabacab Fix weird spec 2014-10-08 16:01:41 -07:00
Ben Ogle 857fd5eaf4 Retokenize when setTabLength() was called. 2014-10-08 16:01:40 -07:00
Ben Ogle 8cd217e50a Handle changes to the tabLength setting 2014-10-08 16:01:40 -07:00
Ben Ogle 339cb02269 Scope editor.tabLength 2014-10-08 16:01:40 -07:00
Ben Ogle 416898e278 Scope usage of editor.nonWordCharacters 2014-10-08 16:01:40 -07:00
Nathan Sobo 6b9345a97d Avoid double clone of menu item now that helper does it 2014-10-08 15:56:13 -07:00
Nathan Sobo d1b2147921 Store specificity based on the cloned item instead of the original 2014-10-08 15:55:41 -07:00
Nathan Sobo 9914c49773 Clone menu items before merging them in in menu-helpers 2014-10-08 15:27:09 -07:00
Nathan Sobo 079ea4862a Merge pull request #3735 from atom/ns-text-editor-custom-element
Convert text editor to custom element
2014-10-08 14:12:35 -07:00
Ben Ogle 9ff435a203 Upgrade find and replace 2014-10-08 13:50:39 -07:00
Ben Ogle 0067e44681 Do not access space-pen view when no elements 2014-10-08 13:48:50 -07:00
Ben Ogle 34a8c6f3bc Use disposables for keymap and menu deactivation 2014-10-08 13:48:50 -07:00
Ben Ogle 9bf7540657 Call dispose not off 2014-10-08 13:48:50 -07:00
Nathan Sobo bc790ee838 Only try selector based listeners if target has .webkitMatchesSelector 2014-10-08 13:21:15 -07:00
Kevin Sawicki 810c851ab3 Upgrade to tree-view@0.129 2014-10-08 13:12:12 -07:00
Kevin Sawicki d015343616 Upgrade to language-css@0.20 2014-10-08 13:11:26 -07:00
Nathan Sobo fab0ac814d Fix checkout-head-revision command 2014-10-08 12:13:13 -07:00
Nathan Sobo eaa3a27328 Add text-editor-element-spec and fix handling of focus and attributes 2014-10-08 12:13:13 -07:00
Nathan Sobo 1e4f4e0882 Move editor commands to global command registry 2014-10-08 12:13:13 -07:00
Nathan Sobo 2d7aa2efda Forward .abortKeyBinding() on CommandRegistry events to original event 2014-10-08 12:13:13 -07:00
Nathan Sobo c63d22b4d1 Update wrap-guide to fix specs 2014-10-08 12:13:13 -07:00
Nathan Sobo 1ca479877e Null guard ::element in TextEditorView::component synthetic property 2014-10-08 12:13:13 -07:00
Nathan Sobo 49dd9b0c07 Update settings-view to fix specs 2014-10-08 12:13:13 -07:00
Nathan Sobo 49e22a41b2 Assign attributes passed to TextEditorView constructor 2014-10-08 12:13:13 -07:00
Nathan Sobo 4eff0f82d8 Destroy model if TextEditorView is explicitly removed for compatibility 2014-10-08 12:13:13 -07:00
Nathan Sobo 003b67ee19 Add TextEditorElement and make TextEditorView a wrapper around it
This is the next step on converting all internal views to custom
elements instead of using SpacePen. The TextEditorElement instances
are associated with ::__spacePenView fields that are used for supporting
legacy access paths via atom.workspaceView.
2014-10-08 12:13:13 -07:00
Nathan Sobo 541c140a19 Merge pull request #3734 from atom/ns-commands-backward-compatibility
Make command registry backward compatible with jQuery::on and ::trigger
2014-10-08 12:10:51 -07:00
Nathan Sobo 19c0540eec Add workspace commands via command registry again
Now that legacy jQuery command listeners are properly integrated with
the command registry, these commands can be moved back.
2014-10-08 11:57:46 -07:00
Nathan Sobo c39f2019db Remove unused __handledByCommandRegistry property 2014-10-08 11:56:50 -07:00
Nathan Sobo f869edee2f Forward preventDefault to original event 2014-10-08 11:56:50 -07:00
Nathan Sobo bb6294cb7c Upgrade keymap to fix simulated command dispatch for detached nodes 2014-10-08 11:56:50 -07:00
Nathan Sobo 5d538fb1b0 💄 spec 2014-10-08 11:56:50 -07:00
Nathan Sobo b78ac53224 Remove logging 2014-10-08 11:56:50 -07:00
Nathan Sobo fb5d826d84 Force native event handler to be registered for activation commands
We use onWillDispatch internally to manage activation commands,
activating packages *before* the activation command starts dispatching.
This means we need to explicitly tell the command registry to subscribe
to the command in question.
2014-10-08 11:56:50 -07:00
Nathan Sobo a75faec64e 💄 2014-10-08 11:56:50 -07:00
Nathan Sobo cdb4ed1327 Integrate jQuery::on and ::trigger with command registry dispatch 2014-10-08 11:56:50 -07:00
Nathan Sobo 0d55a377fb Support inline listeners
This extends the command registry to support listeners registered on
individual elements in addition to selectors. The analogy is inline
styles vs selector-based styles. I’m hoping this will be the foundation
of integrating cleanly with legacy commands registered via our
jQuery::command extension.
2014-10-08 11:56:50 -07:00
Nathan Sobo 2084c45404 💄 spec description 2014-10-08 11:56:50 -07:00
Nathan Sobo 550f0d2a72 Merge pull request #3721 from atom/ns-pure-custom-element-pane-items
Allow pure custom element pane item views
2014-10-08 11:35:36 -07:00
Nathan Sobo ec6614c919 Delegate pane focus methods from workspace to pane container
Fixes #3754
2014-10-08 10:43:40 -07:00
Kevin Sawicki 8db2c4d70a Merge pull request #3750 from mlloreda/patch-1
💄 Remove unnecessary conditional
2014-10-08 08:21:09 -07:00
Miguel Lloreda bcbf01c852 💄 Remove unnecessary conditional
`mkdir -p` is an idempotent operation.
2014-10-07 21:39:36 -04:00
Kevin Sawicki 058ff116b6 Upgrade to language-css@0.19 2014-10-07 14:31:12 -07:00
Kevin Sawicki 33dc3fd684 Upgrade to language-todo@0.13 2014-10-07 14:30:00 -07:00
Nathan Sobo 481c99d852 Use native DOM APIs to remove pane item views 2014-10-07 13:01:56 -06:00
Nathan Sobo 2e6b1cf902 Attach, show and hide pane item views with native DOM APIs
We continue to invoke SpacePen attach hooks on any shim wrappers
for backward compatibility, but SpacePen wrappers are no longer required
for attoch/hide/show as they were previously. Next: removal.
2014-10-07 12:59:12 -06:00
Kevin Sawicki c4e54df100 Prepare 0.137 2014-10-07 09:00:03 -07:00
Paul Betts 20b94c8a4c We've got a valid ReleasesDir, don't clear it 2014-10-06 18:21:23 -07:00
Paul Betts c9ee9b46ed Kill trailing whitespace 2014-10-06 18:12:51 -07:00
Paul Betts 74d1afa8ef Download previous releases so that Squirrel will build updates for them 2014-10-06 18:06:04 -07:00
Russell Lescai 38a6f52ef7 Rearranged onMouseWheel function for tidier merge. 2014-10-07 11:16:25 +10:30
Paul Betts 182f1324a4 Version bump Squirrel for Windows to 0.5.3 2014-10-06 17:35:38 -07:00
Russell Lescai 33e2829697 Adjust font size using Control key with Mouse Scroll Wheel. 2014-10-07 10:18:12 +10:30
Kevin Sawicki 0b2599565e Upgrade to apm 0.101 2014-10-06 13:29:39 -07:00
Nathan Sobo 34bd103c3d Move remaining workspace commands back to $::command temporarily 2014-10-06 13:19:47 -06:00
Nathan Sobo b00441bee7 Register workspace commands via $::command until compatibility is better
This is a temporary measure.

Currently, commands registered via atom.commands.add don’t mesh properly
with the dispatch of commands registered via jQuery. Didn’t think this
was a big deal until I realized that it broke the ability to preempt
commands on ancestor nodes by calling stopPropagation, which might break
packages.
2014-10-06 13:16:36 -06:00
Kevin Sawicki e33e5df467 Upgrade to language-gfm@0.51 2014-10-06 11:16:55 -07:00
Ben Ogle 212fbd915d Add tabLength 3
Closes #3724
2014-10-06 10:46:31 -07:00
Kevin Sawicki 8bd3e848e0 Upgrade to language-ruby@0.39 2014-10-06 10:05:10 -07:00
Kevin Sawicki 400c8f3dcd Upgrade to language-yaml@0.18 2014-10-06 09:24:12 -07:00
Kevin Sawicki fff752d944 Upgrade to language-css@0.18 2014-10-06 08:51:06 -07:00
Kevin Sawicki f843d07403 Add missing CommandInstaller require
Closes #3729
2014-10-06 08:47:44 -07:00
Nathan Sobo d7efa9bb37 Add PaneElement::attached to prevent shape change 2014-10-03 17:51:44 -06:00
Kevin Sawicki d12a2cf284 Unfocus spec 2014-10-03 15:23:54 -07:00
Kevin Sawicki a807619906 Only call show on active item when attached
Closes atom/settings-view#258
2014-10-03 15:23:21 -07:00
Nathan Sobo e3245ec4b8 Remove logging from spec 2014-10-03 15:56:12 -06:00
Kevin Sawicki 4231d69421 Upgrade to apm 0.100 2014-10-03 14:06:12 -07:00
Ben Ogle 64cc7f98ea Merge pull request #3697 from atom/bo-config-scoped-properties
Add scoped settings to config
2014-10-03 14:01:03 -07:00
Ben Ogle 062fa29895 addRawScopedValue -> setRawScopedValue 2014-10-03 11:57:50 -07:00
Ben Ogle 4e3c8406ee Clean up docs 2014-10-03 11:57:35 -07:00
Ben Ogle 47d5b46a1d Fix warnings from schema incorrectness 2014-10-03 11:42:45 -07:00
Ben Ogle a711e908d5 💄 2014-10-03 10:46:57 -07:00
Ben Ogle 27da0669f3 Moar 📝 2014-10-03 10:46:57 -07:00
Ben Ogle 16fd53c123 Add schemas for scoped configs 2014-10-03 10:46:57 -07:00
Ben Ogle 2475e1a9a6 📝 Update docs for scoped settings 2014-10-03 10:46:57 -07:00
Ben Ogle f724c7fca8 Implement observing on scoped properties 2014-10-03 10:46:57 -07:00
Ben Ogle f8a3ae6104 Pull observing out into special methods for global config 2014-10-03 10:46:57 -07:00
Ben Ogle 899929a1ce addScopedDefaults -> addScopedSettings 2014-10-03 10:46:57 -07:00
Ben Ogle e5d67bb2ff Can remove the clearing of scoped properties
Config is being created on each spec run!
2014-10-03 10:46:57 -07:00
Ben Ogle 3732bdf1e9 Ugh, add settingsForScopeDescriptor back
It’s used by language mode and autocomplete for different things
2014-10-03 10:46:57 -07:00
Ben Ogle aedf02a3e3 Remove +default junk 2014-10-03 10:46:57 -07:00
Ben Ogle d47dbede29 Fix specs 2014-10-03 10:46:57 -07:00
Ben Ogle b1f8c6a6e8 Remove special method for language mode 2014-10-03 10:46:57 -07:00
Ben Ogle a8fad6a0fb Use disposables for removing properties 2014-10-03 10:46:13 -07:00
Ben Ogle e2ac19c17f Use config rather than syntax for scoped properties 2014-10-03 10:46:13 -07:00
Ben Ogle 82990cfc77 rename method 2014-10-03 10:46:13 -07:00
Ben Ogle d72b179b3b Use config in spec helper 2014-10-03 10:46:13 -07:00
Ben Ogle 9a957fe0a4 Fix specs for settings view. 2014-10-03 10:46:13 -07:00
Ben Ogle 21feab322f Add deprecations to the syntax scoped property methods 2014-10-03 10:46:13 -07:00
Ben Ogle dd05c6cec1 Syntax calls into atom.config for scoped properties 2014-10-03 10:46:13 -07:00
Ben Ogle f61a7d0c62 Remove unused method 2014-10-03 10:46:13 -07:00
Ben Ogle 7a5054027e Shift the args before coercing the value 2014-10-03 10:46:13 -07:00
Ben Ogle 778d9fafc5 fix value and default value object checks 2014-10-03 10:46:13 -07:00
Ben Ogle 38e889b7d8 Reorganize private methods into section 2014-10-03 10:46:13 -07:00
Ben Ogle 356f4bec7c Basic scoped settings in Config works 2014-10-03 10:46:13 -07:00
Ben Ogle 8533286114 Move internal things into an internal section 2014-10-03 10:46:13 -07:00
Kevin Sawicki 98d31a1d30 💄 Remove some lint 2014-10-02 17:54:23 -07:00
Kevin Sawicki 59aa3a446c Upgrade to apm 0.99 2014-10-02 16:57:16 -07:00
Kevin Sawicki 679031ce83 Upgrade to text-buffer@3.2.8 2014-10-02 16:50:53 -07:00
Kevin Sawicki 3860091c62 Upgrade to scoped-property-store@0.11 2014-10-02 16:46:25 -07:00
Kevin Sawicki 06af3f38c0 Upgrade to tree-view@0.128 2014-10-02 16:37:57 -07:00
Kevin Sawicki da6f664903 Upgrade to snippets@0.55 2014-10-02 16:08:54 -07:00
Nathan Sobo 4c124b8174 Merge pull request #3633 from atom/ns-workspace-custom-elements
Use custom elements for workspace views
2014-10-02 16:00:31 -06:00
Kevin Sawicki 4a818d76d6 Upgrade to language-go@0.18 2014-10-02 14:15:02 -07:00
Kevin Sawicki 811758aec7 Prepare 0.136 2014-10-02 10:56:20 -07:00
Kevin Sawicki a1dc7daf48 unless -> if 2014-10-02 10:04:26 -07:00
Kevin Sawicki fd66348658 Use isFinite instead of isNaN 2014-10-02 10:02:57 -07:00
Kevin Sawicki 0de17d1b84 Call process.kill with a number
This appears to have changed in node 0.11.14 to be stricter

Closes #3708
2014-10-02 09:56:17 -07:00
Nathan Sobo 6ce5356505 Fix handling of submenus in conversion of legacy context menu format 2014-10-02 10:47:03 -06:00
Nathan Sobo eff70b07d9 Update docs for context menus 2014-10-02 10:36:29 -06:00
Kevin Sawicki 368c06a95c Upgrade to git-utils@2.1.5 2014-10-02 09:33:46 -07:00
Kevin Sawicki 913e4e4248 Add missing Grim prefix to deprecate calls
Closes #3706
2014-10-02 08:47:23 -07:00
Nathan Sobo 5cb31c874f Properly emit item argument in pane:before-item-destroyed legacy event 2014-10-01 17:58:09 -06:00
Nathan Sobo b24e1fa405 Merge branch 'master' into ns-workspace-custom-elements 2014-10-01 17:15:09 -06:00
Nathan Sobo e44f4fbc84 Fix renaming error throwing exception in checkout-head-revision command 2014-10-01 17:04:34 -06:00
Ben Ogle 28ee1f3598 Fix spec 2014-10-01 14:53:31 -07:00
Ben Ogle 72f40ae647 Fix 📝 2014-10-01 14:25:07 -07:00
Ben Ogle 7f5428e2a4 Update config schema to use some new features. 2014-10-01 12:21:33 -07:00
Nathan Sobo f004f8c45d Merge branch 'master' into ns-workspace-custom-elements
Conflicts:
	spec/pane-view-spec.coffee
	spec/workspace-view-spec.coffee
	src/workspace-view.coffee
	src/workspace.coffee
2014-10-01 11:49:23 -06:00
Nathan Sobo 4c94233895 Merge pull request #3691 from atom/ns-pluralize-project-api
Pluralize Project API
2014-10-01 11:14:30 -06:00
Kevin Sawicki 05ccf8adc3 Prepare 0.135 2014-10-01 10:11:01 -07:00
Nathan Sobo 99b8e159bd Add Project::onDidChangePaths event 2014-10-01 10:48:39 -06:00
Nathan Sobo 33c1ce863e Pluralize Project API
This changes all APIs concerning paths and repositories on the project
to be plural, preparing us to switch to multi-folder projects. It
doesn’t make any changes to actually support multiple folders. Instead
we just wrap the previous return values in singleton arrays.

* constructor ‘path’ params -> ‘paths’
* getRootDirectory -> getDirectories
* getPath -> getPaths
* setPath -> setPaths
* getRepo -> getRepositories
2014-10-01 10:48:39 -06:00
Ben Ogle 0fafc21bc8 Merge pull request #3690 from atom/bo-fix-config-issue
Fix config resetting all values when one changes.
2014-10-01 09:47:29 -07:00
Ben Ogle 57603b3a00 Fix config resetting all values when one changes.
Closes atom/settings-view#257
2014-10-01 09:37:25 -07:00
Kevin Sawicki cd8c6690aa Upgrade to image-view@0.37 2014-10-01 08:40:08 -07:00
Kevin Sawicki 8806eef231 Upgrade to language-xml@0.22 2014-10-01 08:32:59 -07:00
Kevin Sawicki de434fcfbf Upgrade to fs-plus@2.3.1 2014-10-01 08:31:58 -07:00
Cheng Zhao 754429978e Merge pull request #3688 from atom/atom-shell-v0.17.0
Upgrade to atom-shell@0.17.1
2014-10-01 22:04:34 +08:00
Cheng Zhao fdb4cd7e53 Disable DirectWrite, fixes #3540 2014-10-01 21:37:50 +08:00
Cheng Zhao bf19d098d5 Upgrade to atom-shell@0.17.1 2014-10-01 21:27:51 +08:00
Cheng Zhao 5e0c7d3a70 Upgrade to apm@0.98.0 2014-10-01 20:20:43 +08:00
Cheng Zhao c66df2c05a Upgrade to atom-shell@0.17.0 2014-10-01 20:14:32 +08:00
Kevin Sawicki df161d7d9b Upgrade to settings-view@0.149 2014-09-30 16:57:06 -07:00
Kevin Sawicki ebf026def4 📝 Make HEAD all caps in title 2014-09-30 16:13:46 -07:00
Kevin Sawicki a12fb94d77 Specific VCS in config title
Closes atom/settings-view#41
2014-09-30 16:13:46 -07:00
Nathan Sobo 70a804bdb4 Rename Workspace::registerOpener to ::addOpener for consistency 2014-09-30 17:09:35 -06:00
Nathan Sobo 0242e1c4ef Merge pull request #3658 from atom/ns-context-menu-cleanup
Clean up context menu API
2014-09-30 16:38:58 -06:00
Kevin Sawicki f84cb83e1e Use -> arrows 2014-09-30 14:02:10 -07:00
Nathan Sobo 72538891dd Merge remote-tracking branch 'origin/master' into ns-context-menu-cleanup
Conflicts:
	src/menu-manager.coffee
2014-09-30 14:53:10 -06:00
Nathan Sobo 73f6904ab7 Merge pull request #3671 from atom/ns-require-stylesheet-disposable
Return a Disposable from ThemeManager::requireStylesheet
2014-09-30 14:50:56 -06:00
Nathan Sobo 8ebfa495b5 Merge pull request #3670 from atom/ns-register-opener-disposable
Return a Disposable from Workspace::registerOpener
2014-09-30 14:50:46 -06:00
Kevin Sawicki ef1e05fb89 Prepare 0.134 2014-09-30 13:36:38 -07:00
Kevin Sawicki 1f4359d429 Treat debugger statements as lint errors 2014-09-30 13:25:55 -07:00
Nathan Sobo 276102e197 Require grim 2014-09-30 14:24:47 -06:00
Nathan Sobo 99a14c07f5 Return a Disposable from Workspace::registerOpener 2014-09-30 14:13:50 -06:00
Nathan Sobo 8f9f422406 📝 Update return value docs 2014-09-30 14:03:03 -06:00
Nathan Sobo 211a1c75e2 Return a disposable from ThemeManager::requireStylesheet 2014-09-30 14:02:04 -06:00
Nathan Sobo fd3cb1a232 💄 theme-manager-spec 2014-09-30 14:01:41 -06:00
Nathan Sobo f205fe81ce Actually update first-mate. Previous (51475fe231) updated atom-keymap.
Both were needed to introduce disposables, but I mixed up the commit
message in the previous commit.
2014-09-30 13:58:01 -06:00
Ben Ogle c74b1b971d Use isPlainObject() 2014-09-30 12:44:44 -07:00
Ben Ogle 54af7eced1 Handle empty config files + reset settings before applying user config
Closes #3664
2014-09-30 12:39:07 -07:00
Nathan Sobo 10f7a671c8 Merge pull request #3667 from atom/ns-deserializer-manager-disposables
Return disposables from DeserializerManager::add
2014-09-30 13:10:35 -06:00
Nathan Sobo 51475fe231 Upgrade first-mate to return Disposable from GrammarRegistry::addGrammar 2014-09-30 13:09:40 -06:00
Nathan Sobo 33a5ca30dc Use DeserializerManager::add disposable instead of ::remove in specs 2014-09-30 12:58:10 -06:00
Nathan Sobo df1ae64f62 Deprecate DeserializerManager::remove 2014-09-30 12:58:10 -06:00
Nathan Sobo 83710ed254 📝 Rename classes param to deserializers and update docs 2014-09-30 12:58:10 -06:00
Nathan Sobo 8cb8f09803 Return a Disposable instance from DeserializerManager::add 2014-09-30 12:58:10 -06:00
Kevin Sawicki ff0a7be48a Upgrade to settings-view@0.148 2014-09-30 11:18:50 -07:00
Nathan Sobo b2cc28fb5b Rename commandOptions to commandDetail on context menu items 2014-09-30 12:15:56 -06:00
Nathan Sobo f6938183cc Add pane splitting context menu items for all panes
The same menu items remain for `.overlayer` to force them to be ordered
before package context menu items.
2014-09-30 12:06:27 -06:00
Nathan Sobo 4a0c5aaa70 Prevent adjacent menu separators 2014-09-30 12:06:27 -06:00
Nathan Sobo eb929cb7a2 Honor item specificity while still preserving addition order
Rather than using order to specify item precedence, we now construct
a set of menu items for each element traversing upward from the target.
When merging items for a given element, we pass the specificity to the
merge function, which uses it to decide whether or not to clobber
existing items. When assembling the overall menu, we don’t ever clobber
to ensure that items added for elements closer to the target always win
over items matching further up the tree.
2014-09-30 12:06:27 -06:00
Nathan Sobo cf80b92f9a Remove logging 2014-09-30 12:06:27 -06:00
Nathan Sobo 1187b50d90 Put platform items back on .overlayer so they sort before package items 2014-09-30 12:06:27 -06:00
Nathan Sobo 36d5359ef4 Restore original context menu ordering
Previously I used CSS specificity to order the most specific / recently
added menu items for a given element *first* when building up the
context menu. When a duplicate label was found for a given menu I would
refrain from inserting it. Now instead I order things the opposite way.
The most specific / recently added items come later and items with the
same label are clobbered by later items.
2014-09-30 12:06:26 -06:00
Nathan Sobo 915cfe15f5 Clear context menus between specs 2014-09-30 12:06:26 -06:00
Nathan Sobo f082f93ead Update specs for new ContextMenuManager API/behavior
When selectors have the same specificity, menu items added *later*
appear higher in the list.
2014-09-30 12:06:26 -06:00
Nathan Sobo f9bf42db64 Remove commented line 2014-09-30 12:06:26 -06:00
Nathan Sobo ff76e36f7d Only display ‘Inspect Element’ item in dev mode 2014-09-30 12:06:26 -06:00
Nathan Sobo 740778e129 Auto-detect context menu items in the old format 2014-09-30 12:06:26 -06:00
Nathan Sobo 483e746439 Use new format for platform menus 2014-09-30 12:06:26 -06:00
Nathan Sobo aec6df828e fixup! Call context menu item ::created hooks with the click event 2014-09-30 12:06:09 -06:00
Nathan Sobo 703197bcca Deprecate old style calls to ContextMenuManager::add 2014-09-30 12:06:09 -06:00
Nathan Sobo 2142c8e63e :public: Document new ContextMenuManager::add API 2014-09-30 12:06:09 -06:00
Nathan Sobo 782f9c609e Add shouldDisplay hook for context menu items
If present, if a falsy value is returned from this function for a given
context menu invocation, the item will not be displayed.
2014-09-30 12:06:09 -06:00
Nathan Sobo 3a567b3c5b Call context menu item ::created hooks with the click event 2014-09-30 12:06:08 -06:00
Nathan Sobo c5b395579b Add devMode flag to individual items 2014-09-30 12:06:08 -06:00
Nathan Sobo f8225a6441 Make arguments atom.contextMenu.add consistent with atom.menu.add 2014-09-30 12:06:08 -06:00
Nathan Sobo 504c4c7af6 Extract MenuHelpers from MenuManager for reuse by ContextMenuManager 2014-09-30 12:06:08 -06:00
Nathan Sobo 5e6e3c8d72 Merge pull request #3655 from atom/ns-menu-disposables
Return disposables from MenuManager::add and add specs
2014-09-30 12:05:11 -06:00
Nathan Sobo dfc502b9a0 Merge pull request #3663 from atom/bo-subscribe-editor-commands
Subscribe to commands in TextEditorComponent so they are unsubscribed!
2014-09-30 10:56:05 -06:00
Ben Ogle a8d93f9cf4 Spec for unsubscribing from commands 2014-09-30 09:45:55 -07:00
Ben Ogle 50cf5f3e95 Subscribe to editor commands
We need to unsubscribe when the editor is removed!

Closes #3651
2014-09-30 09:33:50 -07:00
Kevin Sawicki 5a9b34b31a ! -> ~ 2014-09-30 09:32:03 -07:00
Kevin Sawicki 3efaeff669 🍎 Install via move instead of copy
This fixes the issue with the icon not showing up on OS X Mavericks
when building.

It seems that copying it to /Application file by file causes the icon to not
show up while moving it atomically there does.
2014-09-30 09:15:55 -07:00
Ben Ogle 443df29236 Upgrade find and replace to have cmd-d undo and skip 2014-09-29 17:26:51 -07:00
Ben Ogle 05b3f16eb2 Merge pull request #3613 from atom/bo-config-types
Support JSON Schema in Config
2014-09-29 17:23:54 -07:00
Ben Ogle b54deccfae String type must be strict.
It makes sense to coerce from more general -> more specific data types.
eg. string -> int, etc. But coercing the other way is problematic
in the case of chaining because the more general type will swallow the
specific type. eg. Setting `false` on type: [‘string’, ‘boolean’] will 
coerce the boolean to a string, and will never allow the value to be
a boolean.
2014-09-29 16:09:49 -07:00
Ben Ogle 9808264b7f Fix onDidChange usage 2014-09-29 16:09:49 -07:00
Ben Ogle f3ed3dc357 Fix doc to match implementation 2014-09-29 16:09:49 -07:00
Ben Ogle 33b25c7312 Use new config callback arguments 2014-09-29 16:09:49 -07:00
Ben Ogle 454f9c4c65 Rename config-defaults -> config-schema 2014-09-29 16:09:49 -07:00
Ben Ogle 1b506673bb 📝 update 2014-09-29 16:09:49 -07:00
Ben Ogle 5651ebbb48 always set, only emit when values differ 2014-09-29 16:09:49 -07:00
Ben Ogle a7185a894f Fix specs 2014-09-29 16:09:49 -07:00
Ben Ogle 16c7fd3d70 Add spec for update event on load 2014-09-29 16:09:49 -07:00
Ben Ogle 98290b31ab Rework defaults and user loading to notify per path 2014-09-29 16:09:48 -07:00
Ben Ogle 08b138997d Change the onDidChange / observe arguments
Support passing no keypath
2014-09-29 16:09:48 -07:00
Ben Ogle 1f7aee00ac function names to the imperative mood
http://en.wikipedia.org/wiki/Imperative_mood
2014-09-29 16:09:48 -07:00
Ben Ogle 3977596084 Validators -> enforcers 2014-09-29 16:09:48 -07:00
Ben Ogle 804d0d9911 Doc 💄 2014-09-29 16:09:48 -07:00
Ben Ogle 04d045227a rename to config-defaults 2014-09-29 16:09:48 -07:00
Ben Ogle 4e1d13ceea is plain object 2014-09-29 16:09:48 -07:00
Ben Ogle ef19e925e9 Strings accept numbers too 2014-09-29 16:09:48 -07:00
Ben Ogle 2c1fa19e27 Update spec strings 2014-09-29 16:09:48 -07:00
Ben Ogle 11fad1bd12 Moar 📝 2014-09-29 16:09:48 -07:00
Ben Ogle 1408d69641 Fix up message strings 2014-09-29 16:09:48 -07:00
Ben Ogle 38d2303857 Clean up docs in creating a package 2014-09-29 16:09:48 -07:00
Ben Ogle 96207ffbdb Update error messages to read good 2014-09-29 16:09:47 -07:00
Ben Ogle fcf2143e70 isPlainObject 2014-09-29 16:09:47 -07:00
Ben Ogle 3a8f842de3 Remove uses of toggle 2014-09-29 16:09:47 -07:00
Ben Ogle 452e34db90 Remove deprecations for push / remove / unshift at keypath 2014-09-29 16:09:47 -07:00
Ben Ogle 8b39ce77b1 We’ll always have validators for a type. No check 2014-09-29 16:09:47 -07:00
Ben Ogle 604158647a line height can be a string or a number 2014-09-29 16:09:47 -07:00
Ben Ogle 22fb5adda9 Remove deprecated calls for config.observe .. callNow: false in core 2014-09-29 16:09:47 -07:00
Ben Ogle e607d45f0d Remove instances of getPositiveInt() 2014-09-29 16:09:47 -07:00
Ben Ogle 94d470002b Update doc strings 2014-09-29 16:09:47 -07:00
Ben Ogle 33d4ace8e9 📝 more docs for Config 2014-09-29 16:09:47 -07:00
Ben Ogle 800dee09ba Make boolean schema validator a little tighter 2014-09-29 16:09:47 -07:00
Ben Ogle 6b4ce902ba Undefined in Config::set always unsets the value 2014-09-29 16:09:46 -07:00
Ben Ogle c6f7c75c8a Update method doc strings for clarity 2014-09-29 16:09:46 -07:00
Ben Ogle cb1f8e02aa Return the value from restoreDefault 2014-09-29 16:09:46 -07:00
Ben Ogle 885a19492c Rearrange managing settings section 2014-09-29 16:09:46 -07:00
Ben Ogle 8f738aae53 Fix up Config doc string 2014-09-29 16:09:46 -07:00
Ben Ogle f09e58b434 Update config docs 2014-09-29 16:09:46 -07:00
Ben Ogle 98e828b337 Move default schema into config-default-schema.coffee 2014-09-29 16:09:46 -07:00
Ben Ogle 03a9a67ba8 Move spec 2014-09-29 16:08:04 -07:00
Ben Ogle beb96cc025 💄 2014-09-29 16:08:04 -07:00
Ben Ogle ae76bd6c96 Do not allow infinity in number types 2014-09-29 16:08:04 -07:00
Ben Ogle 694dd05e7b Make warn messages way better. 2014-09-29 16:08:04 -07:00
Ben Ogle 662fc443dc Fix specs 2014-09-29 16:08:04 -07:00
Ben Ogle 0fc773c1fc Warn when loading bogus values from the user's config 2014-09-29 16:08:03 -07:00
Ben Ogle aa5b0ce41f Remove linter errors, warn when bad value 2014-09-29 16:08:03 -07:00
Ben Ogle 832b4ae4d8 Fix specs 2014-09-29 16:08:03 -07:00
Ben Ogle af1bdaf901 Dont fail when there are thigns to set with array and object types 2014-09-29 16:08:03 -07:00
Ben Ogle 969ca048e8 Fix specs 2014-09-29 16:08:03 -07:00
Ben Ogle 0d2fdec326 Fix specs in config 2014-09-29 16:08:03 -07:00
Ben Ogle f57dbfd9f5 Deprecate configDefaults in packages. 2014-09-29 16:08:03 -07:00
Ben Ogle fc3ba775c8 Support schemas in packages 2014-09-29 16:08:03 -07:00
Ben Ogle 9b07158337 Add items schemas to arrays in workspaceView 2014-09-29 16:08:03 -07:00
Ben Ogle 0bb8821644 Editor config uses a schema 2014-09-29 16:08:03 -07:00
Ben Ogle 5fdf3f894c Load the config from Atom class so as not to duplicate 2014-09-29 16:07:02 -07:00
Ben Ogle 5bf09716ef convert the workspace config to use a schema 2014-09-29 16:06:27 -07:00
Ben Ogle 9fff544955 Fix specs 2014-09-29 16:05:24 -07:00
Ben Ogle 6a29630c82 Deprecate the getInt and getPositiveInt methods 2014-09-29 16:05:24 -07:00
Ben Ogle 74ba3c6a49 Add config section to creating a package 2014-09-29 16:05:24 -07:00
Ben Ogle 601c603bbe 📝 2014-09-29 16:05:24 -07:00
Ben Ogle 9fbbd1e59b Back to getSchema 2014-09-29 16:05:24 -07:00
Ben Ogle ba4df1b002 Pass a message to the errors thrown by validators 2014-09-29 16:05:24 -07:00
Ben Ogle 2c1190b552 Validate enum keywords 2014-09-29 16:05:24 -07:00
Ben Ogle 9ff976021e Rename typeFilters to schemaValidators; add typeless validators 2014-09-29 16:05:24 -07:00
Ben Ogle 5e9a269278 getSchema -> schemaForKeyPath 2014-09-29 16:05:24 -07:00
Ben Ogle 18e0adbfa8 Fix linter error 2014-09-29 16:05:24 -07:00
Ben Ogle f7f28e7995 Handle minimum and maximum keywords on number types 2014-09-29 16:05:24 -07:00
Ben Ogle ac67430926 Handle bad values in number type 2014-09-29 16:05:23 -07:00
Ben Ogle 409b5536e1 Support arrays 2014-09-29 16:05:23 -07:00
Ben Ogle 2526ba0efb Add an object filter 2014-09-29 16:05:23 -07:00
Ben Ogle 1a8c5ba551 Handle validation of schema types 2014-09-29 16:05:23 -07:00
Ben Ogle f909d32826 Support more types 2014-09-29 16:05:23 -07:00
Ben Ogle d0bb49dea0 Add type filter system to config 2014-09-29 16:05:23 -07:00
Ben Ogle 02e87555f4 Handle schema loading 2014-09-29 16:05:23 -07:00
Ben Ogle a84dd69f55 Deprecate unused / unnecessary methods 2014-09-29 16:05:23 -07:00
Ben Ogle a79c015774 Update ::observe and add ::onDidChange 2014-09-29 16:05:23 -07:00
Ben Ogle 9e46ab1b48 Reorder config methods for easier digestion 2014-09-29 16:05:23 -07:00
Kevin Sawicki 69f24a157a Upgrade to language-coffee-script@0.35 2014-09-29 13:41:00 -07:00
Kevin Sawicki ea75636e44 Use long options 2014-09-29 13:26:36 -07:00
Kevin Sawicki e7ad9ae15a Add --deep codesign option for 10.9.5 2014-09-29 13:22:55 -07:00
Kevin Sawicki 0499ee65a4 Upgrade to tabs@0.54 2014-09-29 11:07:40 -07:00
Kevin Sawicki c56babec8d Add split commands to editor context menu
Refs atom/tabs#85
2014-09-29 11:07:19 -07:00
Nathan Sobo f6f891fa14 Construct test instance of MenuManager in spec 2014-09-29 11:45:01 -06:00
Nathan Sobo 19ff2bd986 Set the project path is the represented file path if undefined for item
This prevents exceptions on the browser process from passing a null
argument over IPC.
2014-09-29 11:21:33 -06:00
Nathan Sobo be7d093a4a Merge remote-tracking branch 'origin/master' into ns-workspace-custom-elements
Conflicts:
	package.json
2014-09-29 11:13:45 -06:00
Nathan Sobo 2f93032a37 Don’t add duplicate items to the same menu 2014-09-29 11:11:36 -06:00
Nathan Sobo c058b44a1b 💄 spec description 2014-09-29 11:11:10 -06:00
Nathan Sobo 81a7f65832 📝 Update docs 2014-09-29 10:37:19 -06:00
Nathan Sobo bbeb0b5919 Return disposables from MenuManager which can be used to remove menus 2014-09-29 10:34:50 -06:00
Kevin Sawicki 60d34576d5 Upgrade to bracket-matcher@0.61 2014-09-29 09:20:35 -07:00
Ben Ogle 1539a90ee7 📝 2014-09-26 17:31:47 -07:00
Ben Ogle b958286d22 Click to expand stack traces 2014-09-26 17:31:09 -07:00
Kevin Sawicki 6ce13a9c3e Prepare 0.133 2014-09-26 15:30:40 -07:00
Kevin Sawicki d1ba8b0140 Only test on Mac OS X for now 2014-09-26 15:17:35 -07:00
Kevin Sawicki f4b23b801d Only sign setup.exe when present 2014-09-26 14:53:20 -07:00
Kevin Sawicki 14c8c463fb Don't build installers yet 2014-09-26 14:39:16 -07:00
Nathan Sobo b5fc4aec84 Re-render component when EditorView is reattached
Fixes #3640
2014-09-26 15:15:23 -06:00
Nathan Sobo 0ebedeec3a Merge remote-tracking branch 'origin/master' into ns-workspace-custom-elements
Conflicts:
	package.json
	src/workspace.coffee
2014-09-26 14:49:28 -06:00
Ben Ogle 1f2fc4bf00 Merge pull request #3619 from lee-dohm/scroll-past-end
Add ability to scroll past the end of the file
2014-09-26 11:47:58 -07:00
Ben Ogle 3601d113ad Deactivate and unload all packages 2014-09-26 11:21:42 -07:00
Kevin Sawicki 6a81f3c6ce Upgrade to language-sass@0.22 2014-09-26 08:34:46 -07:00
Lee Dohm 00baedbdf9 Add specs for editor.scrollPastEnd behavior 2014-09-25 23:05:47 -07:00
Lee Dohm 2c3bec7468 Add ability to scroll past the end of the file
Fixes #3592
2014-09-25 23:04:54 -07:00
Nathan Sobo aa1eb94fa7 Ignore redundant calls to $::attachToDom 2014-09-25 22:17:26 -06:00
Nathan Sobo 8723e69f1c Upgrade status-bar to fix specs 2014-09-25 21:58:44 -06:00
Nathan Sobo b1c5442f93 Upgrade command-palette to fix specs 2014-09-25 21:28:52 -06:00
Nathan Sobo 756a389ccf Don't require Workspace in WorkspaceView 2014-09-25 21:28:09 -06:00
Nathan Sobo 5a72d12026 Don’t use jQuery to attach window listeners in spec-helper
This prevents the command palette spec from failing because it’s
explicitly asserting that no listener registered on the window without
a description should show up in the palette, but core:close is also
registered on the workspace.
2014-09-25 20:57:09 -06:00
Nathan Sobo 06e0919597 Revert "Make $::view return __spacePenView from the first element if present"
This reverts commit edaf1e2ced.
2014-09-25 20:45:18 -06:00
Nathan Sobo 0afe2a55e9 Handle direct construction of WorkspaceView in a better way 2014-09-25 20:40:11 -06:00
Nathan Sobo 3442157e16 Fix command-installer-spec 2014-09-25 20:39:04 -06:00
Nathan Sobo 039d87caa0 Allow WorkspaceView to be instantiated directly for compatibility 2014-09-25 20:17:04 -06:00
Nathan Sobo edaf1e2ced Make $::view return __spacePenView from the first element if present 2014-09-25 20:16:40 -06:00
Kevin Sawicki 409816ef07 Upgrade to settings-view@0.147 2014-09-25 16:26:11 -07:00
Ben Ogle 8871d45227 Merge pull request #3603 from atom/bo-rename-editor
Rename Editor -> TextEditor
2014-09-25 15:27:13 -07:00
Ben Ogle c5fa8fdf11 Fix spec 2014-09-25 15:15:50 -07:00
Ben Ogle e060e08f93 Deactivate and unload lang packages after use 2014-09-25 15:14:30 -07:00
Ben Ogle 039afff1de Unload the coffee grammar after using 2014-09-25 15:14:29 -07:00
Ben Ogle d33bd291dd Deactivate / unload packages after use
This was messing with other specs!
2014-09-25 15:14:29 -07:00
Ben Ogle b422c7a678 Recommend GitRepository. Ugh 2014-09-25 15:14:29 -07:00
Ben Ogle 55d243215a Deprecate requiring EditorView 2014-09-25 15:14:29 -07:00
Ben Ogle 0bc2b45200 Rename spec files 2014-09-25 15:14:29 -07:00
Ben Ogle 683d0d1b16 Editor -> TextEditor 2014-09-25 15:14:29 -07:00
Ben Ogle 82c53b539a editor.coffee -> text-editor.coffee 2014-09-25 15:14:29 -07:00
Ben Ogle c2f44efe31 editor-view -> text-editor-view 2014-09-25 15:14:29 -07:00
Ben Ogle b3038eb968 editor-component -> text-editor-component 2014-09-25 15:14:29 -07:00
Kevin Sawicki 3694111211 Upgrade to bracket-matcher@0.60 2014-09-25 15:09:34 -07:00
Paul Betts bf2d307cbe Merge pull request #3635 from atom/edit-accelerators
Fix Copy / Cut's accelerators on Win32
2014-09-25 13:47:33 -07:00
Paul Betts 38016b205c Fix Copy / Cut's accelerators
Copy/Cut/Paste always have the same accelerator in every app
2014-09-25 13:40:09 -07:00
Nathan Sobo 4b746deb73 Move shell command installation entirely into CommandInstaller 2014-09-25 13:11:15 -06:00
Nathan Sobo 442223f97b 💄 spec language 2014-09-25 12:44:53 -06:00
Nathan Sobo 4207752a08 Rename deprecatedViewEvents to deprecateViewEvents 2014-09-25 12:42:12 -06:00
Nathan Sobo a5781d65c3 Remove methods carried over from old view 2014-09-25 12:36:44 -06:00
Nathan Sobo 9d2bb71109 More cleanup 2014-09-25 12:35:08 -06:00
Nathan Sobo eaa90e6158 Clean up debugging 2014-09-25 12:33:05 -06:00
Kevin Sawicki b4dcd019c1 Merge pull request #3631 from atom/ks-set-default-path-to-open-on-linux
Set default path to open on linux
2014-09-25 10:57:52 -07:00
Nathan Sobo 187e300167 Apply workaround for clearing of focus upon loading of window
After the first window focus event, the focus is getting cleared back
to document.body regardless of the prior active element. Refocusing
workspace on a delay after the first window focus event works around
the problem.
2014-09-25 11:56:29 -06:00
Nathan Sobo 670f3e4946 Add WorkspaceElement 2014-09-25 11:41:09 -06:00
Kevin Sawicki 13a5bfd1dd Set default path on both files and folders 2014-09-25 09:45:54 -07:00
Kevin Sawicki 9e0c4d1fb6 Only set default path when opening files 2014-09-25 09:35:25 -07:00
Kevin Sawicki cabcf19297 🐧 Default to project path in open dialog 2014-09-25 09:33:17 -07:00
Kevin Sawicki 9aa7331e6e Upgrade to tabs@0.53 2014-09-25 09:10:27 -07:00
Kevin Sawicki 3daf505f3e Upgrade to settings-view@0.146 2014-09-24 16:03:05 -07:00
Nathan Sobo ae488fc7fe Update document edited status in workspace model
This also fixes a previous oversight where the status wasn’t updated
when switching between pane items with different modified status.
2014-09-24 17:00:25 -06:00
Paul Betts cd92f882bf Merge pull request #3447 from atom/squirrel-installer
Build a Squirrel installer as part of CI build
2014-09-24 15:50:30 -07:00
Kevin Sawicki 707ac0b043 Upgrade to metrics@0.36 2014-09-24 15:45:19 -07:00
Paul Betts 4a812707d8 Merge remote-tracking branch 'origin/master' into squirrel-installer 2014-09-24 15:31:52 -07:00
Nathan Sobo 28deb9dec5 Maintain document.title in the workspace model, not the view 2014-09-24 16:26:54 -06:00
Paul Betts f2ef7beae6 Include all PAK files 2014-09-24 15:07:41 -07:00
Kevin Sawicki c64a4dd70f Upgrade to tree-view@0.127 2014-09-24 14:58:57 -07:00
Nathan Sobo 186335d619 Mock out document.title with Object.defineProperty
Previously the WorkspaceView::setTitle was mocked in specs to prevent
the title from changing. But I would like to move the title update logic
without breaking assertions, so now we can assert directly on
document.title.
2014-09-24 15:56:50 -06:00
Paul Betts 3ab0b16923 Add a loading GIF that will display during initial install 2014-09-24 14:51:25 -07:00
Paul Betts fac72fbf10 Update to Squirrel 0.4.95 2014-09-24 14:51:24 -07:00
Nathan Sobo 1c58438124 Move PaneContainerView::confirmClose to the model layer 2014-09-24 15:46:01 -06:00
Nathan Sobo 3e0477ffcb Move shell command installation to workspace model 2014-09-24 15:28:35 -06:00
Nathan Sobo 368ef59b85 Remove stray log 2014-09-24 15:28:34 -06:00
Nathan Sobo 465d2afd95 Remove the old root view properly 2014-09-24 15:28:34 -06:00
Nathan Sobo 32f0eb4f76 Don’t emit repeated attached events for the same PaneView 2014-09-24 15:28:34 -06:00
Nathan Sobo 60a551b308 Only dispose PaneElement subscriptions when pane is destroyed
Not when the element is detached, because it might be reattached.
2014-09-24 15:28:34 -06:00
Nathan Sobo f76f7e17d3 Upgrade space-pen for simulated dom attachment bug fix 2014-09-24 15:28:34 -06:00
Nathan Sobo da87f321e8 Add PaneAxisElement 2014-09-24 15:28:34 -06:00
Nathan Sobo 11ede2d436 Upgrade autosave to fix specs 2014-09-24 15:28:34 -06:00
Nathan Sobo 2cc6c9e4c0 💄 2014-09-24 15:28:34 -06:00
Nathan Sobo 887a7bcaf4 Restore $.fn.element property
We define element in certain space-pen views, but this makes it
available for all jQuery objects. Can’t remove it from the prototype.
2014-09-24 15:28:34 -06:00
Nathan Sobo df37d77895 Remove Pane::getViewClass as we now use a view provider 2014-09-24 15:28:34 -06:00
Nathan Sobo cf8dc29cc5 Use Pane::onDidAddItem instead of ::observeItems
The former includes the index at which the item was added and the latter
does not.
2014-09-24 15:28:33 -06:00
Nathan Sobo de29ca6906 Keep existing PaneView SpacePen API working as before
We will eventually deprecate all access to views via
`atom.workspaceView`, which is the only way to get a reference to
instances of PaneView. Draining the swamp!
2014-09-24 15:28:33 -06:00
Nathan Sobo 4ba3162f3e Handle pane commands on PaneElement via command registry 2014-09-24 15:28:33 -06:00
Nathan Sobo 2710c06313 WIP: First stab at custom element for panes
Still need to create a SpacePen shim for access via `atom.workspaceView`
property so we’re backward compatible with packages, but it basically
works.
2014-09-24 15:28:33 -06:00
Nathan Sobo 7d71eeedf4 Break command dispatch as soon as currentTarget is null 2014-09-24 15:28:02 -06:00
Nathan Sobo 6d55bab4c8 Fix CommandRegistry::get/restoreSnapshot
I didn’t realize that deepClone was not handling functions correctly.
I’ve implemented clone manually to the exact depth needed instead.
2014-09-24 15:26:38 -06:00
Nathan Sobo d506ccbaad Merge pull request #3611 from atom/ns-activation-commands
Activation commands
2014-09-24 15:06:52 -06:00
Kevin Sawicki 8275ddd882 Catch errors thrown watching config file
Closes #3617
2014-09-24 13:54:27 -07:00
Nathan Sobo b7765d9416 Process commands invoked with jQuery trigger in CommandRegistry
Especially in specs, trigger has been used to invoke events. jQuery does
not invoke native listeners in this situation, so we use ::on to listen
for them instead. If we didn’t handle the event with a native capture
handler, we’ll still support invoking via trigger.
2014-09-24 14:34:29 -06:00
Nathan Sobo 47f8f7eb11 Switch specs to use activationCommands instead of activationEvents
The activationEvents are converted to the same format as
activationCommands, and that property will be deprecated.
2014-09-24 14:34:29 -06:00
Nathan Sobo 63181a17c8 Support activationCommands field in package.json
This field mandates selectors in its structure and closely matches the
API of `atom.commands.add`. It will supplant `activationEvents` moving
forward.
2014-09-24 14:34:28 -06:00
Nathan Sobo c71457e9d4 Default selector to .workspace when subscribing to activation events 2014-09-24 14:34:28 -06:00
Nathan Sobo 7d31b17273 Use the CommandRegistry to register activation event listeners
Commands registered with the command registry will always be handled
first, so as long as we disable any listeners in the registry that were
already invoked for the current command, we don’t need to disable jQuery
methods before replaying the command after activating the package.

This commit adds the ability to call .disableInvokedListeners on the
event passed to the command listeners. This returns a function which
can be called to reenable them.
2014-09-24 14:34:28 -06:00
Nathan Sobo 066f6bf03c Forward stop[Immediate]Propagation to original event in CommandRegistry
Previously, stopping propagation would work on the synthetic bubbling
phase of the command registry itself, but the original event would
continue to propagate which is counterintuitive.
2014-09-24 14:34:28 -06:00
Nathan Sobo 40f8b990d0 Handle dispatching non-existent commands 2014-09-24 14:34:28 -06:00
Nathan Sobo a492596f7f Allow atom.commands to participate in activationEvents
* Activation events can be handled via atom.commands
* Pre-existing listeners registered via atom.commands are disabled when
  replaying events for the activated package.
2014-09-24 14:34:28 -06:00
Nathan Sobo 2df5957f9b Restore commands after each spec
This commit adds the ability to get and restore snapshots of command
listeners. Whatever commands are installed before specs begin are
preserved, but commands added during specs are always cleared away.
2014-09-24 14:34:28 -06:00
Nathan Sobo a7196ec906 Dispatch activation commands with native DOM apis in specs 2014-09-24 14:34:28 -06:00
Nathan Sobo c094b7a0ef Extract package-manager-specs from atom-specs 2014-09-24 14:34:28 -06:00
Nathan Sobo 09b5ac887a Return whether a dispatched command matched a listener 2014-09-24 14:34:28 -06:00
Nathan Sobo 67ff8f4382 Don’t clear commands after specs
Commands are typically registered once at eval time. Clearing them
means that commands aren’t available except in the first spec.
2014-09-24 14:34:27 -06:00
Nathan Sobo 0c9fd46030 Add CommandRegistry::dispatch for tests 2014-09-24 14:34:27 -06:00
Nathan Sobo cf4a7c22ee Upgrade command-palette for spec fixes 2014-09-24 14:33:37 -06:00
Kevin Sawicki 30f04360dd Prepare 0.132 2014-09-24 11:03:20 -07:00
Kevin Sawicki 371e25af69 Disable deprecations unless in dev/spec mode
These are currently adding ~200ms to startup so temporarily disable
until the grim performance is improved and/or core and bundled packages
are updated to not call deprecated APIs.
2014-09-24 10:24:27 -07:00
Nathan Sobo 7fdffdd201 Upgrade atom-keymap 2014-09-24 11:04:56 -06:00
Kevin Sawicki 475fd07790 Resolve buildDir before it is used in other join calls 2014-09-24 09:48:56 -07:00
Kevin Sawicki 9e99cf03ea Upgrade to bracket-matcher@0.59 2014-09-24 09:18:58 -07:00
Kevin Sawicki b2c74ac249 Upgrade to apm 0.97 2014-09-23 17:24:51 -07:00
Kevin Sawicki daa2c77321 Merge pull request #3610 from postcasio/master
Don't override antialiasing in markdown
2014-09-23 17:07:37 -07:00
Kevin Sawicki 3f15338cad Upgrade to language-todo@0.12 2014-09-23 15:47:22 -07:00
Kevin Sawicki 00f67122c4 📝 Mark atom.commands experimental
The CommandRegistry class is still experimental and 404-ing in the
API docs on atom.io
2014-09-23 14:19:10 -07:00
Kevin Sawicki df3f884ada Resolve build and install directory paths
Closes #3600
2014-09-23 13:09:22 -07:00
Kevin Sawicki 85bf163f76 Merge pull request #3599 from atom/ks-remove-lintian-errors
Remove lintian errors
2014-09-23 12:59:35 -07:00
Kevin Sawicki c6d6fb3b7a Add libc6 to Depends section 2014-09-23 12:19:54 -07:00
Kevin Sawicki 26f3bde0e6 Add more lintian overrides 2014-09-23 12:19:54 -07:00
Kevin Sawicki 97b742cb1d Add initial lintian overrides 2014-09-23 12:19:54 -07:00
Kevin Sawicki 4c3ac8e6ec Add python dependency 2014-09-23 12:19:54 -07:00
Kevin Sawicki 0be03c8d9c Copy LICENSE.md to /usr/share/doc/atom/copyright 2014-09-23 12:19:54 -07:00
Kevin Sawicki 0bdddc955f Remove executable bit from .node files 2014-09-23 12:19:54 -07:00
Kevin Sawicki ad9b5e5b8d Add extended description 2014-09-23 12:19:54 -07:00
Kevin Sawicki c178ac3aa6 Run dpkg-deb using fakeroot 2014-09-23 12:19:54 -07:00
Kevin Sawicki 6b23479c3f Use FILE_MODE variable 2014-09-23 12:19:54 -07:00
Kevin Sawicki c4e3b76070 Quote deleted directory 2014-09-23 12:19:53 -07:00
Nathan Sobo 3dbaa0679b Merge pull request #3587 from atom/ns-workspace-view-providers
Add view provider API to Workspace
2014-09-23 13:08:00 -06:00
Nathan Sobo 366714aa3d Upgrade atom-keymap for dvorak-qwerty fix 2014-09-23 13:00:53 -06:00
Nathan Sobo 1077a59450 Upgrade snippets to support multiple cursors 2014-09-23 12:38:47 -06:00
Ben Ogle 3bc115a7a0 Merge pull request #3606 from atom/bo-model-placeholder-text
Model EditorView::setPlaceholderText
2014-09-23 11:20:23 -07:00
Kevin Sawicki 71b3ab3ae6 Prepare 0.131 2014-09-23 10:51:23 -07:00
Ben Ogle 169a5de6a3 not.toBeDefined -> toBeUndefined 2014-09-23 10:38:38 -07:00
Kevin Sawicki 90ff3f585d Always pass specs on Windows CI 2014-09-23 10:03:14 -07:00
Kevin Sawicki 2a7b73898e Upgrade to bracket-matcher@0.58 2014-09-23 09:08:26 -07:00
Kevin Sawicki 7375b32fb3 Upgrade to bracket-matcher@0.57 2014-09-23 08:51:34 -07:00
postcasio a615c3e081 Don't override antialiasing in markdown 2014-09-23 15:35:54 +01:00
Ben Ogle d4f7e710f4 Reorder properties by usage 2014-09-22 17:28:20 -07:00
Kevin Sawicki 02d34b3ba9 Use .ico file from repo 2014-09-22 17:25:17 -07:00
Kevin Sawicki 69217b2d8f Use .ico file from tag 2014-09-22 17:24:17 -07:00
Ben Ogle 4606ce2d50 Model setPlaceholderText
Less dependence on the editorView!
2014-09-22 17:21:42 -07:00
Kevin Sawicki 1dc5593380 📝 Single # in comments 2014-09-22 17:20:38 -07:00
Kevin Sawicki 42e0f83259 Add missing space 2014-09-22 17:18:15 -07:00
Kevin Sawicki 428532cd24 Remove stray if 2014-09-22 17:17:15 -07:00
Kevin Sawicki 7581832658 💄 2014-09-22 17:13:05 -07:00
Kevin Sawicki c61c07f07d Use path.extname 2014-09-22 17:09:55 -07:00
Kevin Sawicki abe7dde205 Use grunt.file.readJSON 2014-09-22 17:07:52 -07:00
Kevin Sawicki 4bc49b82ef 💄 2014-09-22 17:07:00 -07:00
Kevin Sawicki de1fd977e0 Use grunt APIs for read, write, and delete 2014-09-22 17:06:23 -07:00
Kevin Sawicki 32143cfbdb Upgrade to symbols-view@0.66 2014-09-22 16:58:25 -07:00
Ben Ogle 2e4fda323e Merge pull request #3605 from atom/bo-fix-cursor-events
Make cursor / selection events consistent
2014-09-22 16:44:42 -07:00
Ben Ogle 021208d933 Update Cursor::onDidChangePosition doc string 2014-09-22 16:12:51 -07:00
Ben Ogle 688b209000 Update doc string in Selection::onDidChangeRange 2014-09-22 16:12:19 -07:00
Ben Ogle 91a443e7cb Update onDidChangeSelectionRange doc string 2014-09-22 16:09:32 -07:00
Ben Ogle c62fb26001 onDidChangeSelectionRange emits object with ranges + selection 2014-09-22 16:08:12 -07:00
Ben Ogle 3134364362 Add cursor to the docs 2014-09-22 15:50:47 -07:00
Ben Ogle e5c03e139a Only pass event to the editor 2014-09-22 15:50:40 -07:00
Ben Ogle 5083c18c84 Add cursor to onDidChangeCursorPosition event object 2014-09-22 15:37:41 -07:00
Kevin Sawicki 4260eaa329 Merge pull request #3585 from deiga/patch-1
Add matching of Atom.app more stable
2014-09-22 15:06:50 -07:00
Kevin Sawicki dc3a3225b3 Remove logging from specs 2014-09-22 15:00:06 -07:00
Kevin Sawicki 95087b8996 Git -> GitRepository 2014-09-22 14:54:01 -07:00
Kevin Sawicki a06fba75b8 Upgrade to bracket-matcher@0.56 2014-09-22 14:50:25 -07:00
Ben Ogle d727e440aa Merge pull request #3601 from atom/bo-rename-git
Rename Git -> GitRepository
2014-09-22 13:43:04 -07:00
Paul Betts afce21f37d Merge remote-tracking branch 'origin/master' into squirrel-installer 2014-09-22 11:19:54 -07:00
Ben Ogle 6e8cfba440 nof 2014-09-22 11:07:53 -07:00
Ben Ogle 7a429b024e Use GitRepository rather than Git 2014-09-22 11:07:41 -07:00
Ben Ogle 84425f238a Rename git -> git-repository 2014-09-22 11:07:19 -07:00
Ben Ogle c62b7cc710 Deprecate requiring Git 2014-09-22 11:01:14 -07:00
Kevin Sawicki 39d3724860 Handle error events in spawned processes
Refs #3600
2014-09-22 10:57:42 -07:00
Kevin Sawicki 9eed8a206a Upgrade to first-mate@2.1.2 2014-09-22 10:47:56 -07:00
Paul Betts 5230d040eb Clear the releases dir for now 2014-09-22 10:47:27 -07:00
Kevin Sawicki ec0bcd90a6 Upload correct verison of .deb file 2014-09-22 10:38:56 -07:00
Kevin Sawicki 08871989e2 Correct process arch value 2014-09-22 10:35:52 -07:00
Kevin Sawicki c94b03f13d Run mkdeb task right before publishing 2014-09-22 10:33:29 -07:00
Kevin Sawicki 481653ff60 🍎 Insert newline with alt-enter and shift-enter
Closes #3588
2014-09-22 10:26:24 -07:00
Nathan Sobo ddb85abe77 Don’t add the same editor to two different panes in spec 2014-09-19 16:30:37 -06:00
Nathan Sobo 55cce48af1 Throw an exception if the same pane item is added twice in the workspace 2014-09-19 16:24:13 -06:00
Nathan Sobo d3239473b3 📝 Document Workspace::addViewProvider 2014-09-19 16:24:13 -06:00
Nathan Sobo fa103d42d0 Delegate Workspace::addViewProvider to its ::viewRegistry 2014-09-19 16:24:13 -06:00
Nathan Sobo ecbf2b708c Make ::getView essential because otherwise the section is empty 2014-09-19 16:24:13 -06:00
Nathan Sobo d344adc21e Allow view providers to specify a createView factory method
If present, it will be called with the model object instead of
instantiating the view constructor directly and assigning a model on it.
This gives users more flexibility when constructing views.
2014-09-19 16:24:13 -06:00
Nathan Sobo 74d772f069 Rename view/modelClass to view/modelConstructor in view provider specs
It’s a more technically correct term. You use a class keyword to declare
these things, but the actual objects you pass around to talk about them
are constructor functions.
2014-09-19 16:24:13 -06:00
Nathan Sobo e2e804483f Return disposable from ViewRegistry::addViewProvider 2014-09-19 16:24:13 -06:00
Nathan Sobo e084e13ea3 📝 Document Workspace::getView 2014-09-19 16:24:13 -06:00
Nathan Sobo b5499247b3 Use view providers to build views if a matching provider is available 2014-09-19 16:24:13 -06:00
Nathan Sobo 54378b11d4 Isolate ViewRegistry specs 2014-09-19 16:24:12 -06:00
Nathan Sobo 21802ddb7c Upgrade background-tips to fix spec failure 2014-09-19 16:24:12 -06:00
Nathan Sobo 20e08323c1 Use the ViewRegistry to construct pane item views 2014-09-19 16:24:12 -06:00
Nathan Sobo 0877721ce9 Construct PaneAxisViews and PaneViews via ViewRegistry 2014-09-19 16:24:12 -06:00
Nathan Sobo 2b86297a0b Extract a ViewRegistry that can be shared amongst Workspace objects 2014-09-19 16:24:12 -06:00
Nathan Sobo 53bd1c8958 Use Workspace::getView to build PaneContainerView 2014-09-19 16:24:12 -06:00
Nathan Sobo 7f41be3103 Use atom.workspace.getView to construct WorkspaceViews
It returns the root DOM node of the workspace. Eventually this will
be a custom element but for now it’s just a DOM node with a
__spacePenView reference on it.
2014-09-19 16:24:12 -06:00
Nathan Sobo 7baa3b6f09 Start on Workspace::getView 2014-09-19 16:24:12 -06:00
Nathan Sobo bac99222f3 Force scrollbars to be GPU layers when acceleration is enabled
Fixes #3559

For some reason, Chromium 37 is not compositing scrollbars correctly on
secondary monitors in OS X. They’re invisible when the lines layer
extends beneath the scrollbars unless we apply this style.
2014-09-19 15:10:04 -06:00
Kevin Sawicki d6842dc8a2 Upgrade to language-xml@0.21 2014-09-19 09:56:11 -07:00
Kevin Sawicki 8b651328d2 Upgrade to settings-view@0.145 2014-09-19 09:45:25 -07:00
Kevin Sawicki 17838f832d 📝 Add installing on debian steps 2014-09-19 09:36:30 -07:00
Kevin Sawicki 9e686c11e4 Upgrade to apm 0.96 2014-09-19 09:29:45 -07:00
Timo Sand 8932eba0bf Add matching of Atom.app more stable
I have this file on my Mac `/Users/timosand/Library/Application Support/com.github.atom.ShipIt/update.85PyXs3/Atom.app` and my `mdfind` returns it. It seems to be a common one, so I thought to remove it from the list to be sure that it selects the right Atom.app
2014-09-19 07:48:21 +03:00
Ben Ogle 5cc62b2429 Merge pull request #3583 from atom/bo-final-docs-pass
Final docs pass
2014-09-18 18:45:18 -07:00
Ben Ogle e5096d8190 Data -> Details 2014-09-18 18:40:46 -07:00
Ben Ogle 2af699f35e Rename cursor sections 2014-09-18 17:27:08 -07:00
Kevin Sawicki b1f48338cd Upgrade to apm 0.95 2014-09-18 17:26:46 -07:00
Ben Ogle 7632e5dd40 Reorg decoration 2014-09-18 17:24:24 -07:00
Ben Ogle 9f1aabed0a Reorg Editor a bit based on conversations
Move heavier used sections near the top of the file. Make some of the
single extended methods public.
2014-09-18 17:20:18 -07:00
Ben Ogle 33827d1dc8 Upgrade text-buffer for better docs 2014-09-18 16:59:06 -07:00
Ben Ogle 29f53d4432 PaneView is private 2014-09-18 16:52:56 -07:00
Ben Ogle f407ca3a0c saveAll is private 2014-09-18 16:52:11 -07:00
Ben Ogle 2d3ea244ee Opener stuff is essential 2014-09-18 16:51:59 -07:00
Ben Ogle 97931ff259 Move observePaneItems and onDidChangePaneItem to essential 2014-09-18 16:51:30 -07:00
Ben Ogle d02c3e0d62 WorkspaceView is extended 2014-09-18 16:45:13 -07:00
Ben Ogle e2d9e5bd74 Make focusing other pane views from workspaceView private 2014-09-18 16:44:49 -07:00
Kevin Sawicki 0b03c89010 Upgrade to settings-view@0.144 2014-09-18 16:43:47 -07:00
Ben Ogle 69f54b90dc Clean up atom details section 2014-09-18 16:43:13 -07:00
Ben Ogle 7c483f989f Clean up marker 2014-09-18 16:43:00 -07:00
Kevin Sawicki c89bafb66e Refresh horizontal scrollbar DOM node
Previously the vertical scrollbar's DOM node was used as the
horizontal node causing the horizontal scrollbar to not refresh
properly

Closes #3511
2014-09-18 16:26:40 -07:00
Kevin Sawicki ee093d1709 Merge pull request #3582 from atom/ks-dont-allow-focused-specs-on-ci
Fail focused specs on CI
2014-09-18 16:16:17 -07:00
Ben Ogle 155d4ce733 Merge pull request #3569 from atom/bo-proper-doc-marker
Rename DisplayBufferMarker to Marker
2014-09-18 16:14:35 -07:00
Kevin Sawicki 021278e902 Always auto indent at least one hard tab
Previously when the delta between the suggested and current indent level
was greater than zero but less than one, no text would be inserted since
Editor::buildIndentString returns an empty string for levels less than one
when using hard tabs.

Closes #3575
2014-09-18 15:36:31 -07:00
Kevin Sawicki 597942c4ac Fail focused specs on CI
This ensures focused specs never end up as green builds
2014-09-18 15:18:42 -07:00
Kevin Sawicki 7f3279e789 Unfocus spec 2014-09-18 14:50:36 -07:00
Ben Ogle 325cc95f48 Fix specs 2014-09-18 13:53:13 -07:00
Ben Ogle 068c2c359f displayBufferMarker -> marker 2014-09-18 13:53:13 -07:00
Ben Ogle 39343b0c52 Fix reference to display-buffer-marker 2014-09-18 13:53:13 -07:00
Ben Ogle 6121147fc1 Upgrade text-buffer to have a private marker 2014-09-18 13:53:12 -07:00
Ben Ogle 65b41fa502 Move buffer-display-marker -> marker 2014-09-18 13:53:12 -07:00
Ben Ogle 9af2325f17 Rename DisplayBufferMarker -> Marker
Gnar!! 😎
2014-09-18 13:53:12 -07:00
Ben Ogle fb7b9041ab Shore up the docs around marker creation and invalidation 2014-09-18 13:53:12 -07:00
Ben Ogle bf44cf89db DisplayBufferMarker::matchesAttributes -> ::matchesProperties 2014-09-18 13:53:12 -07:00
Ben Ogle cef8b95ef3 Deprecate s|getAttributes for s|getProperties 2014-09-18 13:53:12 -07:00
Ben Ogle bd19899dd8 Add DisplayBufferMarker::getInvalidationStrategy 2014-09-18 13:53:12 -07:00
Ben Ogle e3ce6f8a20 Organize DisplayBufferMarker into sections. Add docs from Marker 2014-09-18 13:53:12 -07:00
Kevin Sawicki a88299284e Upgrade to language-ruby@0.38 2014-09-18 13:51:34 -07:00
Kevin Sawicki 0bf0829e77 Upgrade to settings-view@0.143 2014-09-18 13:40:16 -07:00
Kevin Sawicki 46adbea0c2 Merge pull request #3567 from atom/ks-deprecate-custom-dom-events
Deprecate custom DOM events
2014-09-18 13:30:59 -07:00
Kevin Sawicki 62a5c1c58d Don't dispose emitter, specs fail 2014-09-18 11:51:45 -07:00
Kevin Sawicki c291c705ec Add missing support to deprecation message 2014-09-18 11:51:45 -07:00
Kevin Sawicki 95253758f3 Dispose emitter after emitting did-destroy 2014-09-18 11:51:45 -07:00
Kevin Sawicki 1a24c79c7f Deprecate beep event 2014-09-18 11:51:45 -07:00
Kevin Sawicki 522a66c876 📝 Wrap ::onDidAddPaneItem in {} 2014-09-18 11:51:45 -07:00
Kevin Sawicki 67610829f4 Add Atom::onDidBeep 2014-09-18 11:51:44 -07:00
Kevin Sawicki fe30cf2135 Deprecate editor:detached 2014-09-18 11:51:44 -07:00
Kevin Sawicki 280a3c30e6 Deprecate editor:attached 2014-09-18 11:51:44 -07:00
Kevin Sawicki 0b82e83806 Move deprecatedViewEvents to deprecated section 2014-09-18 11:51:44 -07:00
Kevin Sawicki 6d2719c783 Deprecate editor:will-be-removed 2014-09-18 11:51:44 -07:00
Kevin Sawicki 31dd109343 Add Editor::onDidDestroy 2014-09-18 11:51:44 -07:00
Kevin Sawicki a5b7764b38 Deprecate pane:attached 2014-09-18 11:51:44 -07:00
Kevin Sawicki ddc88ec3ed Deprecate when pane:active-item-modified-status-changed 2014-09-18 11:51:44 -07:00
Kevin Sawicki 088d4f439f Deprecate pane:active-item-title-changed on PaneView 2014-09-18 11:51:44 -07:00
Kevin Sawicki b1994b28b3 Deprecate pane:active-item-title-changed 2014-09-18 11:51:44 -07:00
Kevin Sawicki cf303a73b7 Deprecate custom events on PaneView 2014-09-18 11:51:44 -07:00
Kevin Sawicki 1b25ea8a8d Deprecate custom events on EditorView 2014-09-18 11:51:44 -07:00
Kevin Sawicki 291b989ff0 Deprecate pane:item-moved 2014-09-18 11:51:43 -07:00
Kevin Sawicki 1850197f55 Deprecate pane:item-removed 2014-09-18 11:51:43 -07:00
Kevin Sawicki c2c0962e3b Deprecate pane:item-added 2014-09-18 11:51:43 -07:00
Kevin Sawicki 099953c58b Deprecate uri-opened 2014-09-18 11:51:43 -07:00
Kevin Sawicki 33fdb0b518 Deprecate pane:became-inactive 2014-09-18 11:51:43 -07:00
Kevin Sawicki 5148deded1 Deprecate pane:became-active 2014-09-18 11:51:43 -07:00
Kevin Sawicki fdddccf094 💄 2014-09-18 11:51:43 -07:00
Kevin Sawicki 4521eeaeb1 Deprecate pane:active-item-changed 2014-09-18 11:51:43 -07:00
Kevin Sawicki 7344ba644e Deprecate pane-container:active-pane-item-changed 2014-09-18 11:51:43 -07:00
Kevin Sawicki ce887fe877 Deprecate selection:changed 2014-09-18 11:51:43 -07:00
Kevin Sawicki ee701f3b8b Deprecate cursor:moved 2014-09-18 11:51:43 -07:00
Kevin Sawicki c5f593cf08 deprecatedViewEvents -> setupViewEventDeprecations 2014-09-18 11:51:43 -07:00
Kevin Sawicki 4b4dc7224e Deprecate pane:removed event 2014-09-18 11:51:42 -07:00
Kevin Sawicki 31dd9bed6a Map over cmdArgs when quoting 2014-09-18 11:37:37 -07:00
Kevin Sawicki 44860ba572 Filter null/undefined arguments on Windows
These won't be able to be properly quoted
2014-09-18 11:36:41 -07:00
Kevin Sawicki c37e4649b5 Only call replace on string arguments
Prevents errors being thrown when trying to call replace on non-string
arguments.
2014-09-18 11:31:29 -07:00
Kevin Sawicki 3fb22f123a Don't throw errors when folding comments
Previously trying to fold single line comments at the start/end
of files would throw errors since the +1 and -1 used in the
index ranges would cause the loop to advance past the last row
or before the first row.
2014-09-18 11:06:25 -07:00
Kevin Sawicki 616dae2f22 Upgrade to tree-view@0.126 2014-09-18 10:33:08 -07:00
Kevin Sawicki e300677da0 Upgrade to less-cache@0.15 2014-09-18 10:03:33 -07:00
Kevin Sawicki ca9d05f6fa Remove notification stylesheet
These were currently undocumented in the styleguide, had hard-coded colors,
weren't being styled by the default light/dark UI themes, and were unused.

They were also causing conflicts with the notification token scope that
the Objective-C grammar uses.
2014-09-18 09:26:46 -07:00
Kevin Sawicki ba49f5d0b8 Upgrade to symbols-view@0.65 2014-09-18 09:22:56 -07:00
Kevin Sawicki 5d22f96f7b Upgrade to language-coffee-script@0.34 2014-09-18 08:52:19 -07:00
Kevin Sawicki afd6f6144c Upgrade to symbols-view@0.64 2014-09-17 18:16:09 -07:00
Kevin Sawicki 14b3bd5b39 Upgrade to language-coffee-script@0.33 2014-09-17 17:03:33 -07:00
Ben Ogle 7bf60a09dd Make ScrollView Extended 2014-09-17 17:02:41 -07:00
Ben Ogle 8448b265d5 Merge pull request #3549 from atom/bo-visibility-split
Add sections and split methods into essential / extended API
2014-09-17 16:51:50 -07:00
Ben Ogle a85a5e8495 Add public back for the deserializers 2014-09-17 16:20:08 -07:00
Ben Ogle 736342b527 Fix the title duplication 2014-09-17 15:59:22 -07:00
Ben Ogle fad83fff1c Change name of section in cursor 2014-09-17 15:57:24 -07:00
Ben Ogle 6f2b1a4b21 Reorganize Selection into sections 2014-09-17 15:57:13 -07:00
Ben Ogle 37ddf096a7 Reorganize ThemeManager into sections 2014-09-17 15:39:16 -07:00
Kevin Sawicki 27584cf069 Upgrade to grammar-selector@0.34 2014-09-17 15:20:31 -07:00
Kevin Sawicki 12181bcb02 Upgrade to language-coffee-script@0.32 2014-09-17 14:44:26 -07:00
Ben Ogle 0963077a32 Reorganize Project class into sections 2014-09-17 14:26:15 -07:00
Kevin Sawicki a476bb220a Upgrade to language-coffee-script@0.31 2014-09-17 14:26:12 -07:00
Ben Ogle cfffae936c Deprecate pathForRepositoryUrl for eventual removal 2014-09-17 14:23:46 -07:00
Nathan Sobo aa8bfd8e5f Remove stray console.log 2014-09-17 15:03:04 -06:00
Nathan Sobo d36c738b07 Merge pull request #3469 from atom/ns-command-registry
Add command registry
2014-09-17 14:55:19 -06:00
Kevin Sawicki bfdb5bd150 Upgrade to tabs@0.52 2014-09-17 13:52:21 -07:00
Kevin Sawicki 8b34f85f34 Upgrade to grammar-selector@0.33 2014-09-17 13:45:55 -07:00
Kevin Sawicki ad17b2d1c3 Upgrade to apm 0.94 2014-09-17 11:29:24 -07:00
Kevin Sawicki e4d50f4b38 Merge pull request #3565 from atom/ks-support-variation-sequences
Support variation sequences
2014-09-17 10:58:43 -07:00
Kevin Sawicki 146e8c2a0b 💄 Remove extra newline 2014-09-17 10:40:12 -07:00
Kevin Sawicki f1fd13b0b2 Return as soon as first paired character is found
Previously the character count of the entire string was taken even
though it was only checking for the presence of a paired character.

Now hasPairedCharacter returns as early as possible and the now
unused getCharacterCount has been removed.
2014-09-17 10:35:33 -07:00
Kevin Sawicki e343b0e0fc Don't treat consecutive variation selectors as a sequence 2014-09-17 10:17:27 -07:00
Kevin Sawicki c1aa5c9e48 📝 Mention variation sequence in comment 2014-09-17 10:17:27 -07:00
Kevin Sawicki 3acddf3e71 📝 Drop text 2014-09-17 10:17:26 -07:00
Kevin Sawicki df68ae26a2 Add specs for variation sequences 2014-09-17 10:17:26 -07:00
Kevin Sawicki fb7061f500 📝 Mention variation sequence in specs 2014-09-17 10:17:26 -07:00
Kevin Sawicki 878da262d2 Add support for Unicode variation sequences
These are character pairs that should be treated as tokens with a
buffer delta of 2 and a screen delta of 1.
2014-09-17 10:17:26 -07:00
Kevin Sawicki b6faffe2db Merge pull request #3555 from atom/ks-include-leading-trailing-classes-for-hard-tabs
Add leading/trailing whitespace classes to hard tab tokens
2014-09-17 10:15:34 -07:00
Kevin Sawicki 36f60c517e Assert other whitespace class is not present 2014-09-17 09:50:55 -07:00
Kevin Sawicki 348f865cab Add spec for all whitespace lines 2014-09-17 09:47:49 -07:00
Kevin Sawicki 18f54e6780 💄 Put leading spec first 2014-09-17 09:42:31 -07:00
Kevin Sawicki b281737838 Add leading/trailing classes to hard tab tokens
Previously the leading-whitespace and trailing-whitespace classes
were never added to tokens that were hard tabs.
2014-09-17 09:42:31 -07:00
Kevin Sawicki 72b92fc3e5 Only add command on platforms where it can be run
Closes #3561
2014-09-17 08:54:16 -07:00
Kevin Sawicki 03fcda8807 Upgrade to grammar-selector@0.32 2014-09-16 18:49:31 -07:00
Kevin Sawicki b6b7ce31a8 Upgrade to language-javascript@0.40 2014-09-16 18:10:32 -07:00
Ben Ogle 13cc97e44f Reorganize PackageManager into sections 2014-09-16 17:05:23 -07:00
Kevin Sawicki 3794cb606f Upgrade to grammar-selector@0.31 2014-09-16 16:56:36 -07:00
Kevin Sawicki 2dbaa52417 Upgrade to grammar-selector@0.30 2014-09-16 16:53:25 -07:00
Ben Ogle 6467f3c425 Reorganize cursor into sections 2014-09-16 16:50:17 -07:00
Kevin Sawicki ad288478d5 Upgrade to language-sql@0.11 2014-09-16 16:46:04 -07:00
Kevin Sawicki dd063c09d0 Upgrade to pathwatcher@2.1.3 2014-09-16 16:41:37 -07:00
Ben Ogle 5252b5314b WorkspaceView Public -> Essential 2014-09-16 16:30:46 -07:00
Ben Ogle 4c93045384 Reorganize WorkspaceView into sections 2014-09-16 16:30:13 -07:00
Ben Ogle fb1ac72b6e installShellCommands is not public 2014-09-16 16:23:30 -07:00
Kevin Sawicki 51aaffb2e5 Upgrade to status-bar@0.45 2014-09-16 16:22:07 -07:00
Ben Ogle 7ff5938454 Convert visibility in SelectListView 2014-09-16 16:18:47 -07:00
Ben Ogle 053d483b2b Rearrange SelectListView with sections 2014-09-16 16:06:37 -07:00
Paul Betts 1080eb2d11 CI version numbers are Magical(tm) 2014-09-16 16:00:57 -07:00
Paul Betts 246575390a Use ERB templates from Underscore-Plus 2014-09-16 15:41:57 -07:00
Paul Betts bc6c85ceca Sign the installer too 2014-09-16 15:21:44 -07:00
Paul Betts a0b405fe6f Populate atom.nuspec with the current Atom version 2014-09-16 15:16:42 -07:00
Paul Betts 54b89cebcc Merge remote-tracking branch 'origin/master' into squirrel-installer
Conflicts:
	build/Gruntfile.coffee
2014-09-16 14:50:29 -07:00
Ben Ogle b444fbd22c Git module is extended 2014-09-16 14:44:49 -07:00
Ben Ogle f1a5e8e1a8 Reorganize Git into sections 2014-09-16 14:41:23 -07:00
Kevin Sawicki 0098ac67ef Upgrade to markdown-preview@0.103 2014-09-16 14:23:38 -07:00
Ben Ogle cc64a2c3b4 Move things into the construction and destruction section 2014-09-16 14:10:49 -07:00
Ben Ogle b9a63d5030 Add bit about editorView being sparse 2014-09-16 14:07:04 -07:00
Kevin Sawicki c747ab411c Upgrade to tabs@0.51 2014-09-16 14:04:01 -07:00
Ben Ogle f80334d617 Task has better examples 2014-09-16 14:03:33 -07:00
Ben Ogle 679c52ffd1 Task is extended 2014-09-16 14:03:17 -07:00
Ben Ogle 1ee1eb3580 Syntax is extended 2014-09-16 13:43:56 -07:00
Ben Ogle 050ec6ca64 MenuManager is extended 2014-09-16 13:42:55 -07:00
Ben Ogle 69ba6e3e7e DeserializerManager is extended 2014-09-16 13:42:26 -07:00
Ben Ogle 6379f87b8a ContextMenuManager is Extended 2014-09-16 13:40:37 -07:00
Ben Ogle f3f4e8f7a3 Config is Essential 2014-09-16 13:39:43 -07:00
Ben Ogle dbca4f1b8c Clipboard is extended 2014-09-16 13:36:48 -07:00
Ben Ogle 1933488914 Buffered process classes are extended 2014-09-16 13:35:19 -07:00
Ben Ogle 6e7dae032d All dev tool methods are extended 2014-09-16 13:34:11 -07:00
Ben Ogle 88d0d291d4 Convert visibility in the messaging the user section 2014-09-16 13:31:53 -07:00
Ben Ogle 488b1819ae Convert visibility in the managing the window section 2014-09-16 13:31:18 -07:00
Ben Ogle b1df925d02 Convert visibility in metadata section 2014-09-16 13:30:47 -07:00
Ben Ogle dbf8094fdb Reorder the sections so public methods are closer to the top 2014-09-16 13:26:58 -07:00
Ben Ogle cf927e6405 Create Messaging the user + Deserializing sections 2014-09-16 13:23:09 -07:00
Ben Ogle 6a16a9b83f move Atom::open to the window management section 2014-09-16 13:22:21 -07:00
Ben Ogle ebb6ebca2a Move windowloadTime into metadata section 2014-09-16 13:21:35 -07:00
Ben Ogle 816bb9b38d Deserializers are private 2014-09-16 13:21:19 -07:00
Ben Ogle e260064df2 Add getLoadSettings to atom metadata section 2014-09-16 11:52:59 -07:00
Ben Ogle a3e4ccbb83 Create atom metadata section 2014-09-16 11:52:11 -07:00
Ben Ogle e84eba058a Move deprecated methods to the bottom of the file 2014-09-16 11:44:00 -07:00
Ben Ogle c25a04fd53 Move fullscreen stuff into the managing window section 2014-09-16 11:42:07 -07:00
Ben Ogle 9e68e47432 💄 2014-09-16 11:37:30 -07:00
Ben Ogle 53806d7d63 Managing the dev tool section 2014-09-16 11:37:21 -07:00
Ben Ogle c0dd53104a Make a managing the atom window section
de-public the get/setWindowDimensions in favor of 
the (get|set)(Size|Position)
2014-09-16 11:37:11 -07:00
Ben Ogle 39d7e12ebb Fix deprecation method calls 2014-09-16 11:35:14 -07:00
Ben Ogle 779619a4f2 Construction and destruction section 2014-09-16 10:58:36 -07:00
Ben Ogle b3ec8ed03f Make Atom::initialize private 2014-09-16 10:58:27 -07:00
Ben Ogle f84666943c Properties section 2014-09-16 10:58:08 -07:00
Ben Ogle 9eb51dfd0a Make Atom.loadOrCreate Private 2014-09-16 10:56:48 -07:00
Ben Ogle ac516102ca Atom is Essential 2014-09-16 10:56:26 -07:00
Ben Ogle 5b8e30580d Reorg Event Subscription section 2014-09-16 10:52:33 -07:00
Ben Ogle 44fd6cc335 Workspace is Essential 2014-09-16 10:51:34 -07:00
Ben Ogle e01d96862f Update docs in decoration 2014-09-16 10:51:34 -07:00
Ben Ogle d349ec55f9 Use new methods 2014-09-16 10:51:34 -07:00
Ben Ogle bbe69347ee Clean up the syntax scopes section 2014-09-16 10:51:34 -07:00
Ben Ogle 6270f2ff55 Add missing argument to docs 2014-09-16 10:51:33 -07:00
Ben Ogle 1ef2aa63d6 Clean up visibilities where I made an error 2014-09-16 10:51:33 -07:00
Ben Ogle ff188723cd Create a saving section 2014-09-16 10:51:33 -07:00
Ben Ogle b661cdd229 💄 2014-09-16 10:51:33 -07:00
Ben Ogle 499888a386 Reorg marker section 2014-09-16 10:51:33 -07:00
Ben Ogle 86bbf4276b Reorg the Decorations section 2014-09-16 10:51:33 -07:00
Ben Ogle 48d02cf934 Reorganize the Folds section 2014-09-16 10:51:33 -07:00
Ben Ogle 9dacdaf2ef Reorganize the Syntatic Queries section 2014-09-16 10:51:33 -07:00
Ben Ogle af184fe2ff Convert visibility on the grammars section 2014-09-16 10:51:33 -07:00
Ben Ogle d827d4ad34 Change visibility on the Editor Coordinates section 2014-09-16 10:51:33 -07:00
Ben Ogle 4238052dc3 Move text mutation transactions into the mutating text section 2014-09-16 10:51:33 -07:00
Ben Ogle 5790221c15 Reorg undo section 2014-09-16 10:51:32 -07:00
Ben Ogle 5f807df1b0 Reorganize the indentation section 2014-09-16 10:51:32 -07:00
Ben Ogle 30ced48d23 Reorganize Soft Wrap Behavior section 2014-09-16 10:51:32 -07:00
Ben Ogle d17c6e409f Reorganize Tab Behavior section 2014-09-16 10:51:32 -07:00
Ben Ogle 81165e0e41 Add docs for the Editor::scan methods 2014-09-16 10:51:32 -07:00
Ben Ogle 49f5817b87 Convert visibility of the removing text section 2014-09-16 10:51:32 -07:00
Ben Ogle 6b71ea1875 Convert visibility in the Inserting Text section 2014-09-16 10:51:32 -07:00
Ben Ogle 6287f90a39 Convert visibility in the Mutating text section 2014-09-16 10:51:32 -07:00
Ben Ogle 783c1dd449 Convert visibility in the mutating text section 2014-09-16 10:51:32 -07:00
Ben Ogle 719ab078cc Convert file details section to essential extended 2014-09-16 10:51:32 -07:00
Ben Ogle 2491090c91 Move Essential methods above the extended versions 2014-09-16 10:51:32 -07:00
Ben Ogle f12b70e3b7 Editor::onDidChangeScreenLines -> onDidChange 2014-09-16 10:51:32 -07:00
Ben Ogle 4a20f13162 Upgrade scandal to handle negate syntax
!*.coffee
2014-09-16 10:25:25 -07:00
Kevin Sawicki 73253d37bc Prepare 0.130 2014-09-16 10:19:32 -07:00
Kevin Sawicki 16c9c41978 Upgrade to tree-view@0.125 2014-09-16 10:02:45 -07:00
Kevin Sawicki c7ca3e66fd Prepare 0.129 2014-09-16 09:27:02 -07:00
Nathan Sobo eb97154c94 Merge remote-tracking branch 'origin/master' into ns-command-registry 2014-09-16 10:27:00 -06:00
Nathan Sobo 1f95d8069a Document CommandRegistry 2014-09-16 10:08:17 -06:00
Kevin Sawicki dc88f080a3 Upgrade to tree-view@0.124 2014-09-16 09:00:30 -07:00
Nathan Sobo a069f34ad6 Fix CommandRegistry::findCommands spec
Don’t assert against commands registered on the window with jQuery
2014-09-16 09:23:52 -06:00
Nathan Sobo 33ad0a9b93 Delegate ::onDidChangeActivePane and ::observeActivePane 2014-09-16 09:19:07 -06:00
Kevin Sawicki 5c77b06d2a Add Editor:onDidSave 2014-09-15 18:25:29 -07:00
Kevin Sawicki 82a906cce5 Add Workspace::onDidChangeActivePaneItem
Closes #3546
2014-09-15 16:39:53 -07:00
Kevin Sawicki 94e285611c getActiveItem -> getActivePaneItem 2014-09-15 16:31:01 -07:00
Nathan Sobo ebe116d724 Update parent view is-focused and mini classes on editor mount
Fixes #3526
2014-09-15 16:03:36 -06:00
Nathan Sobo 647f6c5b24 Upgrade keybinding resolver to fix deprecation warnings in specs 2014-09-15 15:44:17 -06:00
Nathan Sobo 01a3e0cfba Merge pull request #3545 from atom/ns-revert-soft-wrapped
Rename soft-wrapped back to soft-wrap
2014-09-15 14:49:10 -06:00
Nathan Sobo 3faf566a48 Rename editor:toggle-soft-wrapped back to editor:toggle-soft-wrap 2014-09-15 14:34:35 -06:00
Nathan Sobo a0edb92e16 Rename editor.softWrapped config option back to editor.softWrap 2014-09-15 14:34:35 -06:00
Kevin Sawicki 69480385e6 Upgrade to tree-view@0.123 2014-09-15 13:02:21 -07:00
Kevin Sawicki 804f290cd3 Memoize comment scope selector 2014-09-15 13:01:37 -07:00
Ben Ogle 274a36e263 Upgrade UI themes to fix tabs 2014-09-15 11:18:51 -07:00
Nathan Sobo 4a14580429 Merge pull request #3338 from atom/ns-change-ctrl-a-binding
Change ctrl-a binding to editor:move-to-first-character-of-line on Mac
2014-09-15 12:15:59 -06:00
Kevin Sawicki 17a6256483 Upgrade to find-and-replace@0.138 2014-09-15 11:10:35 -07:00
Kevin Sawicki 7d61330b9f Upgrade to tree-view@0.122 2014-09-15 11:07:49 -07:00
Kevin Sawicki 5e52357674 Upgrade to markdown-preview@0.102 2014-09-15 11:05:39 -07:00
Kevin Sawicki 6ee82d4937 Upgrade to tree-view@0.121 2014-09-15 10:56:01 -07:00
Kevin Sawicki 863362ffed 📝 Outdent ordered list 2014-09-15 08:51:10 -07:00
Kevin Sawicki cea7d89129 📝 🐧 Tweak Linux instructions 2014-09-15 08:50:16 -07:00
Kevin Sawicki 5e65339332 Merge pull request #3535 from Bengt/patch-1
Elaborate getting a current working copy.
2014-09-15 08:44:06 -07:00
Kevin Sawicki 8c2bcf3943 Catch and log deactivate errors
Closes #3538
2014-09-15 08:34:54 -07:00
Kevin Sawicki 10762d6440 Upgrade to language-gfm@0.50 2014-09-15 08:21:19 -07:00
Kevin Sawicki f872583c81 Upgrade to tree-view@0.120 2014-09-14 09:37:26 -07:00
Bengt Lüers ca8153b56b Elaborate getting a current working copy.
The `git checkout` step from #3098 got removed by some merge, so here it is again.
2014-09-14 15:15:52 +02:00
Kevin Sawicki 54c1dd5225 Upgrade to language-php@0.16 2014-09-12 15:10:04 -07:00
Kevin Sawicki d858c6c357 Merge pull request #3528 from atom/ks-add-debian-asset
Add Debian asset to releases
2014-09-12 13:45:47 -07:00
Kevin Sawicki 6d1d6de8ff Restore only uploading from master 2014-09-12 13:28:10 -07:00
Kevin Sawicki 97e7d24f43 Add missing task helpers require 2014-09-12 13:22:15 -07:00
Kevin Sawicki 1bfda1fc61 Copy .deb file to proper upload path 2014-09-12 13:22:15 -07:00
Kevin Sawicki b1a6772105 Don't include version in .deb asset name 2014-09-12 13:22:15 -07:00
Kevin Sawicki bf76a3f1e7 Only publish on Linux for now 2014-09-12 13:22:15 -07:00
Kevin Sawicki 8dcd454401 Remove token logging 2014-09-12 13:22:15 -07:00
Kevin Sawicki 3a2c155afc Log token 2014-09-12 13:22:15 -07:00
Kevin Sawicki e00ff30cd7 Extensions should be an array 2014-09-12 13:22:14 -07:00
Kevin Sawicki 38eda4ca14 Remove duplidate tasks in CI tasks array 2014-09-12 13:22:14 -07:00
Kevin Sawicki dc0bdef36c Don't run specs on Linux CI for now 2014-09-12 13:22:14 -07:00
Kevin Sawicki 9717d973a7 Upload .deb asset during publish 2014-09-12 13:22:14 -07:00
Kevin Sawicki 24206d45a7 Run mkdeb task on Linux CI 2014-09-12 13:22:14 -07:00
Kevin Sawicki a1e177c7dc Set ATOM_ACCESS_TOKEN 2014-09-12 13:22:14 -07:00
Kevin Sawicki 735d1a912e Log debug output 2014-09-12 13:22:14 -07:00
Kevin Sawicki e060d0b562 Add initial Linux CI build script 2014-09-12 13:22:14 -07:00
Kevin Sawicki 68e11fed11 Add .node-version file with 0.10.21 2014-09-12 13:22:14 -07:00
Kevin Sawicki c72ce45820 Log installed node version 2014-09-12 13:22:14 -07:00
Kevin Sawicki 04cc11fa81 Don't read env var files on Linux 2014-09-12 13:22:14 -07:00
Kevin Sawicki f14ad99558 Remove linux check 2014-09-12 13:22:14 -07:00
Kevin Sawicki a060eff478 Use skinny arrows 2014-09-12 11:23:15 -07:00
Ben Ogle 1c57a8b0cd Update event-kit with better organization in docs 2014-09-12 11:19:37 -07:00
Ben Ogle 7c1cab7789 Don’t recurse into dependencies of dependencies.
We always want the top level module!
2014-09-12 10:49:53 -07:00
Kevin Sawicki 591d9068d8 Upgrade to tree-view@0.119 2014-09-12 10:43:15 -07:00
Kevin Sawicki c24bf5bd0c Upgrade to find-and-replace@0.137 2014-09-12 10:34:59 -07:00
Kevin Sawicki 050a79e5b9 Upgrade to find-and-replace@0.136 2014-09-12 10:29:01 -07:00
Kevin Sawicki ee8b01e46a Upgrade to find-and-replace@0.135 2014-09-12 10:10:04 -07:00
Kevin Sawicki ceb48b7f4f Upgrade to tree-view@0.118 2014-09-12 09:51:01 -07:00
Kevin Sawicki 61e01c3984 Upgrade to language-ruby@0.37 2014-09-12 09:11:42 -07:00
Cheng Zhao 901ba72557 Show the open dialog as child window on Windows and Linux.
On Mac the open dialog is still showed as independent dialog, this matches
most native apps' behavior.

Fixes #3401.
2014-09-12 21:43:01 +08:00
Kevin Sawicki 8cffb8006a Upgrade to language-gfm@0.49 2014-09-11 21:41:15 -07:00
Ben Ogle 0643aa66c9 Upgrade atom-keymap for new docs organization 2014-09-11 18:23:39 -07:00
Ben Ogle d0033b2d40 Upgrade tello for bugfix 2014-09-11 18:23:39 -07:00
Kevin Sawicki 8847b35931 Upgrade to tree-view@0.117 2014-09-11 18:11:16 -07:00
Kevin Sawicki 9a534f0b6d Upgrade to tree-view@0.116 2014-09-11 17:35:07 -07:00
Kevin Sawicki 137b926f54 Upgrade to archive-view@0.37 2014-09-11 17:15:49 -07:00
Ben Ogle 24d1a45fd9 Upgrade to pathwather with better doc organization 2014-09-11 16:29:52 -07:00
Kevin Sawicki ea6f124724 Merge pull request #3519 from atom/ks-remeasure-after-themes-load
Wait for themes to load before measuring
2014-09-11 16:22:07 -07:00
Kevin Sawicki c161e93b96 💄 Add ? 2014-09-11 16:08:04 -07:00
Kevin Sawicki e6252546c4 Set initialLoadComplete to true in specs 2014-09-11 15:49:44 -07:00
Kevin Sawicki 4a1f048d52 Refresh scrollbars when no stylesheet is specified 2014-09-11 15:44:30 -07:00
Kevin Sawicki dc5eb95a39 Wait for initial stylesheet load to complete
Instead of measuring on each stylesheet load at startup,
wait for the initial load of all the stylesheets to complete
and then do the necessary measurments.
2014-09-11 15:32:02 -07:00
Kevin Sawicki 844fd29dad Remove unused param 2014-09-11 15:32:02 -07:00
Kevin Sawicki 7b1a38bf8b Upgrade to wrap-guide@0.22 2014-09-11 15:31:47 -07:00
Ben Ogle 54ef5acdc6 Upgrade first-mate with new docs 2014-09-11 14:59:24 -07:00
Ben Ogle c8ccf1e0d7 Merge pull request #3518 from atom/bo-font-settings-in-model
Deprecate font-size, font-family, line-height, invisibles, indent guide methods on EditorView
2014-09-11 14:21:34 -07:00
Kevin Sawicki aee496346b Prepare 0.128 2014-09-11 14:10:44 -07:00
Ben Ogle 6a2c161bf2 Deprecate setShowInvisibles 2014-09-11 14:10:33 -07:00
Ben Ogle 5ef31e00a2 Deprecate EditorView::setShowIndentGuide 2014-09-11 14:10:17 -07:00
Ben Ogle f8ba40bcfe Deprecate font-size, font-family, line-height methods on EditorView. 2014-09-11 14:00:34 -07:00
Ben Ogle 834176f7b7 Merge pull request #3514 from atom/bo-remove-method-deprecations
Remove event deprecations from core
2014-09-11 13:45:26 -07:00
Ben Ogle 3f3284a8db Move the deprecations 2014-09-11 13:33:50 -07:00
Kevin Sawicki ff308d366c Upgrade to language-ruby@0.36 2014-09-11 13:27:47 -07:00
Nathan Sobo 98a51005c3 Upgrade command-palette to use atom.commands global 2014-09-11 14:25:53 -06:00
Nathan Sobo fb6a184b0e Include commands registered via jQuery in CommandRegistry::findCommands 2014-09-11 14:18:57 -06:00
Nathan Sobo 8b7b946429 Set root node to workspace view when it’s constructed
Makes it easier to deal with specs
2014-09-11 14:18:57 -06:00
Nathan Sobo e4264035d8 fixup! Clear atom.commands after each spec 2014-09-11 14:18:00 -06:00
Nathan Sobo 8f9cf3c790 Set the atom.commands root node to document.body in beforeEach 2014-09-11 14:17:45 -06:00
Nathan Sobo 99cf8fabc0 Clear atom.commands after each spec 2014-09-11 14:13:48 -06:00
Nathan Sobo 3e0e19d51b Add CommandRegistry::findCommands 2014-09-11 13:48:35 -06:00
Nathan Sobo 155fb675ec 💄 group dispatch specs 2014-09-11 13:48:35 -06:00
Nathan Sobo ab8ac369df Move a few workspace commands to the command registry 2014-09-11 13:48:35 -06:00
Nathan Sobo a348ecf034 Allow CommandRegistry::rootNode to be reassigned 2014-09-11 13:48:35 -06:00
Nathan Sobo dac127c30b Assign atom.commands to a CommandRegistry instance 2014-09-11 13:48:35 -06:00
Nathan Sobo 7580d64d2e Allow CommandRegistry::rootNode to be assigned after construction 2014-09-11 13:48:35 -06:00
Nathan Sobo 43d3082d4e Allow multiple commands to be registered by passing an object 2014-09-11 13:48:35 -06:00
Nathan Sobo aee33fc126 Pass selector first to CommandRegistry::add 2014-09-11 13:48:35 -06:00
Nathan Sobo 4de0865d28 Allow listeners to be removed via a Disposable returned from ::add 2014-09-11 13:48:34 -06:00
Nathan Sobo fe27ebec1b Handle .stopImmediatePropagation() being called on command events 2014-09-11 13:48:34 -06:00
Nathan Sobo fbaf956e1f Handle .stopPropagation() being called on command events 2014-09-11 13:48:34 -06:00
Nathan Sobo 5eb22520f1 Order multiple matching listeners by selector specificity 2014-09-11 13:48:34 -06:00
Nathan Sobo a075aa2b07 Perform synthetic bubbling through event target ancestors 2014-09-11 13:48:34 -06:00
Nathan Sobo decc983420 Start on CommandRegistry 2014-09-11 13:48:34 -06:00
Ben Ogle 04c0824822 Fix / clean up specs 2014-09-11 11:28:21 -07:00
Ben Ogle f38fb2a924 nof 2014-09-11 11:11:15 -07:00
Nathan Sobo 04caea9bb0 Upgrade autosave to suppress autosave when opening menus inside editor 2014-09-11 11:56:36 -06:00
Ben Ogle f39114a95c Subscribe to items via event methods.
Add deprecation warnings when they don’t return a disposable
2014-09-11 10:48:03 -07:00
Nathan Sobo 435e081402 Upgrade autosave to autosave all items on window blur 2014-09-11 11:20:19 -06:00
Nathan Sobo 36aa3834d3 Only call ::checkForVisibilityChange on editor attachment, not ::pollDOM
I’m pretty sure ::pollDOM is subsumed by ::checkForVisibilityChange
because there’s no reason the editor would be considered visible prior
to being attached.
2014-09-11 10:38:36 -06:00
Nathan Sobo 50a751b8e6 Merge pull request #3517 from smashwilson/ensure-measurements
Force visibility-change checking in EditorView's afterAttach method
2014-09-11 10:35:23 -06:00
Ash Wilson 40570c0b99 Force visibility-change checking in EditorView.
When an `EditorView` becomes attached, if hardware acceleration is enabled,
the call to `pollDOM` is a no-op because there's already a refresh pending.
This can cause problems, because then the initial measurements don't happen
and (for example) the lineHeight is left as null - it'll be set on the next
rendering, but not before subscribers to `workspaceView.eachEditorView` are
notified.
2014-09-11 11:14:41 -04:00
Ben Ogle 025c6111b3 Move global editor stylesheet updating into the ThemeManager 2014-09-10 18:01:45 -07:00
Ben Ogle 667315aff5 Add ThemeManager::onDidUpdateStylesheet 2014-09-10 18:01:27 -07:00
Ben Ogle c1f8065caf Use the new split*() methods on Pane model in WorkspaceView specs 2014-09-10 17:41:38 -07:00
Ben Ogle 70e1d14f96 Add KeymapManager::onDidLoadBundledKeymaps 2014-09-10 17:28:47 -07:00
Ben Ogle 7625e5352d Use event methods in EditorComponent 2014-09-10 17:28:26 -07:00
Ben Ogle 6e3c945fa2 Use event methods for theme subscriptions 2014-09-10 17:26:08 -07:00
Ben Ogle f8b17b6b3c Add Returns line to all the event subscription methods 2014-09-10 17:07:21 -07:00
Nathan Sobo d55f5cba78 Upgrade first-mate for event subscription methods 2014-09-10 17:24:55 -06:00
Nathan Sobo f0a19e3f67 Upgrade atom-keymap for event subscription methods 2014-09-10 16:41:05 -06:00
Ben Ogle 465c13e292 Update packages that use atomdoc to force update of atomdoc 2014-09-10 15:36:48 -07:00
Ben Ogle be1d4ee5dc Use explicit versions of donna and tello in build package.json 2014-09-10 14:37:40 -07:00
Nathan Sobo 238cf60882 Upgrade pathwatcher for explicit event subscription methods 2014-09-10 14:58:21 -06:00
Ben Ogle 60a3cebfab Fix section name in git class 2014-09-10 12:13:04 -07:00
Ben Ogle 8f8165e289 Fix doc strings in Atom class 2014-09-10 12:12:36 -07:00
Ben Ogle d3b3fdefc9 Merge pull request #3507 from atom/bo-rename-events
Rename the rest of the internal events to the onDid* pattern
2014-09-10 12:11:26 -07:00
Ben Ogle 49937b2956 Revert "Add Project::onDidChangePath()"
This reverts commit ed4acb02d8.

Conflicts:
	src/project.coffee
2014-09-10 11:56:38 -07:00
Ben Ogle 40b32930cf Revert "Add Project::onDidCreateBuffer"
This reverts commit 4070e5fb25.
2014-09-10 11:55:41 -07:00
Ben Ogle 61fa1c4230 Revert "Add Project::observeBuffers"
This reverts commit b6fe72ef9e.

Conflicts:
	src/project.coffee
2014-09-10 11:55:26 -07:00
Ben Ogle 6a0a842de4 Update section comments 2014-09-10 11:52:57 -07:00
Kevin Sawicki c141448e9f Wrap HTML elements in $ so matchers still work 2014-09-10 11:19:05 -07:00
Kevin Sawicki 61166bf365 Don't track focus for spec windows 2014-09-10 11:14:08 -07:00
Kevin Sawicki 9c24e5a23d Prepare 0.127 2014-09-10 11:02:57 -07:00
Ben Ogle 2e219f288d Add sections for docs clarity 2014-09-09 15:55:47 -07:00
Ben Ogle 09fbd46869 Remove event docs 2014-09-09 15:43:35 -07:00
Ben Ogle 10ceb34426 Fix docs 2014-09-09 15:43:12 -07:00
Ben Ogle 5ba5215f5d Add event subscription methods to ThemeManager 2014-09-09 15:35:00 -07:00
Ben Ogle 3bf348e51f Add ThemeManager::onDidReloadAll 2014-09-09 15:24:55 -07:00
Ben Ogle 0afd8a1392 Add Package::onDidDeactivate 2014-09-09 15:09:18 -07:00
Ben Ogle 55b5debd7f Add PackageManager::onDidLoadAll 2014-09-09 15:04:13 -07:00
Ben Ogle 229277f764 Add PackageManager::onDidActivateAll() 2014-09-09 15:03:45 -07:00
Ben Ogle af1b0b5736 Fix Doc String 2014-09-09 14:45:41 -07:00
Ben Ogle ae4f92cc52 Add onDidChangeStatuses 2014-09-09 14:45:31 -07:00
Ben Ogle dddd17c11b Fix observeBuffers 2014-09-09 14:29:14 -07:00
Ben Ogle 05f54d427d Add Git::onDidChangeStatus 2014-09-09 14:28:30 -07:00
Ben Ogle ffbb18a0f8 Remove event comments, add method section comment 2014-09-09 14:16:10 -07:00
Ben Ogle b6fe72ef9e Add Project::observeBuffers 2014-09-09 14:13:26 -07:00
Ben Ogle 4070e5fb25 Add Project::onDidCreateBuffer 2014-09-09 14:12:49 -07:00
Ben Ogle ed4acb02d8 Add Project::onDidChangePath() 2014-09-09 13:58:23 -07:00
Ben Ogle ab96e5b5fd 💄 Fix doc string 2014-09-09 13:58:01 -07:00
Paul Betts 7b9b044394 Let's not create an installer unless asked, it takes foreeeeevvvverr 2014-09-03 20:30:15 -07:00
Paul Betts 23cb0eda2f How embarassing 2014-09-03 20:15:28 -07:00
Paul Betts a354d9f880 Add create-installer to default tasks 2014-09-03 20:01:16 -07:00
Paul Betts 7526038f9a Create a task which builds an installer 2014-09-03 20:01:16 -07:00
Paul Betts c0973f8c0f Create the first hack at an installer spec 2014-09-03 19:01:08 -07:00
Paul Betts dededd80dd Add Squirrel.Windows 0.4.92 2014-09-03 16:57:22 -07:00
Nathan Sobo 7a0a808af1 Change ctrl-a binding to editor:move-to-first-character-of-line
Considering that the entire Atom core team has ctrl-a bound to move to
the first character and it's also the the default behavior of Sublime,
this seems like a more sensible and useful default option even though
it deviates from text editing norms on OS X.
2014-08-19 12:14:16 -06:00
227 arquivos alterados com 12784 adições e 5742 exclusões
+1
Ver Arquivo
@@ -0,0 +1 @@
v0.10.21
+13 -15
Ver Arquivo
@@ -12,19 +12,21 @@ propose changes to this document in a pull request.
## Submitting Issues
* Check the [debugging guide](https://atom.io/docs/latest/debugging) for tips
on debugging. You might be able to find the cause of the problem and fix
on debugging. You might be able to find the cause of the problem and fix
things yourself.
* Include the version of Atom you are using and the OS.
* Include screenshots and animated GIFs whenever possible; they are immensely
helpful.
* Include the behavior you expected and other places you've seen that behavior
such as Emacs, vi, Xcode, etc.
* Check the dev tools (`alt-cmd-i`) for errors to include. If the dev tools
* Check the dev tools (`alt-cmd-i`) for errors to include. If the dev tools
are open _before_ the error is triggered, a full stack trace for the error
will be logged. If you can reproduce the error, use this approach to get the
full stack trace and include it in the issue.
* On Mac, check Console.app for stack traces to include if reporting a crash.
* Perform a cursory search to see if a similar issue has already been submitted.
* Please setup a [profile picture](https://help.github.com/articles/how-do-i-set-up-my-profile-picture)
to make yourself recognizable and so we can all get to know each other better.
### Package Repositories
@@ -62,6 +64,8 @@ For more information on how to work with Atom's official packages, see
* Use `path.join()` to concatenate filenames.
* Use `os.tmpdir()` rather than `/tmp` when you need to reference the
temporary directory.
* Using a plain `return` when returning explicitly at the end of a function.
* Not `return null`, `return undefined`, `null`, or `undefined`
## Git Commit Messages
@@ -82,6 +86,7 @@ For more information on how to work with Atom's official packages, see
* :green_heart: `:green_heart:` when fixing the CI build
* :white_check_mark: `:white_check_mark:` when adding tests
* :lock: `:lock:` when dealing with security
* :arrow_up: `:arrow_up:` when upgrading dependencies
## CoffeeScript Styleguide
@@ -96,30 +101,23 @@ For more information on how to work with Atom's official packages, see
## Documentation Styleguide
* Use [TomDoc](http://tomdoc.org).
* Use [AtomDoc](https://github.com/atom/atomdoc).
* Use [Markdown](https://daringfireball.net/projects/markdown).
* Reference methods and classes in markdown with the custom `{}` notation:
* Reference classes with `{ClassName}`
* Reference instance methods with `{ClassName::methodName}`
* Reference class methods with `{ClassName.methodName}`
* Delegate to comments elsewhere with `{Delegates to: ClassName.methodName}`
style notation.
### Example
```coffee
# Public: Disable the package with the given name.
#
# This method emits multiple events:
#
# * `package-will-be-disabled` - before the package is disabled.
# * `package-disabled` - after the package is disabled.
#
# name - The {String} name of the package to disable.
# options - The {Object} with disable options (default: {}):
# :trackTime - `true` to track the amount of time disabling took.
# :ignoreErrors - `true` to catch and ignore errors thrown.
# callback - The {Function} to call after the package has been disabled.
# * `name` The {String} name of the package to disable.
# * `options` (optional) The {Object} with disable options (default: {}):
# * `trackTime` A {Boolean}, `true` to track the amount of time taken.
# * `ignoreErrors` A {Boolean}, `true` to catch and ignore errors thrown.
# * `callback` The {Function} to call after the package has been disabled.
#
# Returns `undefined`.
disablePackage: (name, options, callback) ->
+22
Ver Arquivo
@@ -0,0 +1,22 @@
# VERSION: 0.1
# DESCRIPTION: Image to build Atom and create a .rpm file
# Base docker image
FROM fedora:20
# Install dependencies
RUN yum install -y \
make \
gcc \
gcc-c++ \
glibc-devel \
git-core \
libgnome-keyring-devel \
rpmdevtools
# Install node
RUN curl -sL https://rpm.nodesource.com/setup | bash -
RUN yum install -y nodejs
ADD . /atom
WORKDIR /atom
+25
Ver Arquivo
@@ -4,6 +4,9 @@ Atom is a hackable text editor for the 21st century, built on [atom-shell](http:
Visit [atom.io](https://atom.io) to learn more.
Visit [issue #3684](https://github.com/atom/atom/issues/3684) to learn more
about the Atom 1.0 roadmap.
## Installing
### Mac OS X
@@ -25,6 +28,28 @@ You can also download a `.zip` file from the [releases page](https://github.com/
The Windows version does not currently automatically update so you will need to
manually upgrade to future releases by re-downloading the `.zip` file.
### Debian Linux (Ubuntu)
Currently only a 64-bit version is available.
1. Download `atom-amd64.deb` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
2. Run `sudo dpkg --install atom-amd64.deb` on the downloaded package.
3. Launch Atom using the installed `atom` command.
The Linux version does not currently automatically update so you will need to
repeat these steps to upgrade to future releases.
### Red Hat Linux (Fedora, CentOS, Red Hat)
Currently only a 64-bit version is available.
1. Download `atom.x86_64.rpm` from the [Atom releases page](https://github.com/atom/atom/releases/latest).
2. Run `sudo yum localinstall atom.x86_64.rpm` on the downloaded package.
3. Launch Atom using the installed `atom` command.
The Linux version does not currently automatically update so you will need to
repeat these steps to upgrade to future releases.
## Building
* [Linux](docs/build-instructions/linux.md)
+2 -2
Ver Arquivo
@@ -1,11 +1,11 @@
{
"name": "atom-bundled-apm",
"description": "Atom's bundled APM",
"description": "Atom's bundled apm",
"repository": {
"type": "git",
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"atom-package-manager": "0.93.2"
"atom-package-manager": "0.109.0"
}
}
+2 -4
Ver Arquivo
@@ -50,7 +50,7 @@ if [ $OS == 'Mac' ]; then
# If ATOM_PATH isn't a executable file, use spotlight to search for Atom
if [ ! -x "$ATOM_PATH/$ATOM_APP_NAME" ]; then
ATOM_PATH=$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | head -1 | xargs dirname)
ATOM_PATH=$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | grep -v ShipIt | head -1 | xargs dirname)
fi
# Exit if Atom can't be found
@@ -71,9 +71,7 @@ elif [ $OS == 'Linux' ]; then
ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
DOT_ATOM_DIR="$HOME/.atom"
if [ ! -d "$DOT_ATOM_DIR" ]; then
mkdir -p "$DOT_ATOM_DIR"
fi
mkdir -p "$DOT_ATOM_DIR"
: ${TMPDIR:=/tmp}
+1 -1
Ver Arquivo
@@ -7,7 +7,7 @@ describe "editorView.", ->
beforeEach ->
atom.workspaceViewParentSelector = '#jasmine-content'
atom.workspaceView = new WorkspaceView
atom.workspaceView = atom.views.getView(atom.workspace).__spacePenView
atom.workspaceView.attachToDom()
atom.workspaceView.width(1024)
+13 -4
Ver Arquivo
@@ -39,6 +39,7 @@ module.exports = (grunt) ->
tmpDir = os.tmpdir()
appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom'
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
buildDir = path.resolve(buildDir)
installDir = grunt.option('install-dir')
home = if process.platform is 'win32' then process.env.USERPROFILE else process.env.HOME
@@ -62,6 +63,8 @@ module.exports = (grunt) ->
installDir ?= process.env.INSTALL_PREFIX ? '/usr/local'
killCommand ='pkill -9 atom'
installDir = path.resolve(installDir)
coffeeConfig =
glob_to_multiple:
expand: true
@@ -117,7 +120,10 @@ module.exports = (grunt) ->
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'))
metadataPath = path.join(directory, 'package.json')
continue unless grunt.file.isFile(metadataPath)
{engines, theme} = grunt.file.readJSON(metadataPath)
if engines?.atom?
coffeeConfig.glob_to_multiple.src.push("#{directory}/**/*.coffee")
lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less")
@@ -227,10 +233,13 @@ module.exports = (grunt) ->
grunt.registerTask('test', ['shell:kill-atom', 'run-specs'])
grunt.registerTask('docs', ['markdown:guides', 'build-docs'])
ciTasks = ['output-disk-space', 'download-atom-shell', 'build']
ciTasks.push('dump-symbols') unless process.platform is 'win32'
ciTasks.push('set-version', 'check-licenses', 'lint', 'test', 'codesign', 'publish-build')
ciTasks.push('dump-symbols') if process.platform isnt 'win32'
ciTasks.push('set-version', 'check-licenses', 'lint')
ciTasks.push('mkdeb') if process.platform is 'linux'
ciTasks.push('test') if process.platform is 'darwin'
ciTasks.push('codesign')
ciTasks.push('publish-build')
grunt.registerTask('ci', ciTasks)
defaultTasks = ['download-atom-shell', 'build', 'set-version']
+50
Ver Arquivo
@@ -0,0 +1,50 @@
# VERSION: 0.1
# DESCRIPTION: Create the atom editor in a container
# AUTHOR: Jessica Frazelle <jessie@docker.com>
# COMMENTS:
# This file describes how to build the atom editor
# in a container with all dependencies installed.
# Tested on Debian Jessie.
# USAGE:
# # Download atom Dockerfile
# wget http://raw.githubusercontent.com/atom/atom/master/Dockerfile
#
# # Build atom image
# docker build -t atom .
#
# docker run -v /tmp/.X11-unix:/tmp/.X11-unix \
# -e DISPLAY=unix$DISPLAY atom
#
DOCKER-VERSION 1.3
# Base docker image
FROM debian:jessie
MAINTAINER Jessica Frazelle <jessie@docker.com>
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
curl \
git \
libasound2 \
libgconf-2-4 \
libgnome-keyring-dev \
libgtk2.0-0 \
libnss3 \
libxtst6 \
--no-install-recommends
# install node
RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN apt-get install -y nodejs
# clone atom
RUN git clone https://github.com/atom/atom /src
WORKDIR /src
RUN git fetch && git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
RUN script/build && script/grunt install
# Autorun atom
CMD /usr/local/bin/atom --foreground --log-file /var/log/atom.log && tail -f /var/log/atom.log
+4 -3
Ver Arquivo
@@ -7,8 +7,7 @@
},
"dependencies": {
"async": "~0.2.9",
"donna": "~1.0",
"tello": "~0.2",
"donna": "1.0.6",
"formidable": "~1.0.14",
"fs-plus": "2.x",
"github-releases": "~0.2.0",
@@ -19,7 +18,7 @@
"grunt-contrib-csslint": "~0.1.2",
"grunt-contrib-less": "~0.8.0",
"grunt-cson": "0.10.0",
"grunt-download-atom-shell": "~0.8.0",
"grunt-download-atom-shell": "~0.10.0",
"grunt-lesslint": "0.13.0",
"grunt-markdown": "~0.4.0",
"grunt-peg": "~1.1.0",
@@ -35,6 +34,8 @@
"request": "~2.27.0",
"rimraf": "~2.2.2",
"runas": "~1.0.1",
"tello": "1.0.3",
"temp": "~0.8.1",
"underscore-plus": "1.x",
"unzip": "~0.1.9",
"vm-compatibility-layer": "~0.1.0"
+1 -1
Ver Arquivo
@@ -153,7 +153,7 @@ module.exports = (grunt) ->
fs.writeFileSync path.join(appDir, 'node_modules', 'symbols-view', 'vendor', 'ctags-win32.exe.ignore'), ''
fs.writeFileSync path.join(shellAppDir, 'atom.exe.gui'), ''
dependencies = ['compile', "generate-license:save"]
dependencies = ['compile', 'generate-license:save', 'generate-module-cache', 'compile-packages-slug']
dependencies.push('copy-info-plist') if process.platform is 'darwin'
dependencies.push('set-exe-icon') if process.platform is 'win32'
grunt.task.run(dependencies...)
+12 -2
Ver Arquivo
@@ -1,4 +1,5 @@
path = require 'path'
fs = require 'fs-plus'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
@@ -25,12 +26,21 @@ module.exports = (grunt) ->
switch process.platform
when 'darwin'
cmd = 'codesign'
args = ['-f', '-v', '-s', 'Developer ID Application: GitHub', grunt.config.get('atom.shellAppDir')]
args = ['--deep', '--force', '--verbose', '--sign', 'Developer ID Application: GitHub', grunt.config.get('atom.shellAppDir')]
spawn {cmd, args}, (error) -> callback(error)
when 'win32'
spawn {cmd: 'taskkill', args: ['/F', '/IM', 'atom.exe']}, ->
cmd = process.env.JANKY_SIGNTOOL ? 'signtool'
args = [path.join(grunt.config.get('atom.shellAppDir'), 'atom.exe')]
spawn {cmd, args}, (error) -> callback(error)
spawn {cmd, args}, (error) ->
return callback(error) if error?
setupExePath = path.join(grunt.config.get('atom.shellAppDir'), '..', 'Releases', 'setup.exe')
if fs.isFileSync(setupExePath)
args = [setupExePath]
spawn {cmd, args}, (error) -> callback(error)
else
callback()
else
callback()
@@ -0,0 +1,54 @@
path = require 'path'
CSON = require 'season'
fs = require 'fs-plus'
_ = require 'underscore-plus'
module.exports = (grunt) ->
{spawn, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'compile-packages-slug', 'Add bundled package metadata information to the main package.json file', ->
appDir = fs.realpathSync(grunt.config.get('atom.appDir'))
modulesDirectory = path.join(appDir, 'node_modules')
packages = {}
for moduleDirectory in fs.listSync(modulesDirectory)
continue if path.basename(moduleDirectory) is '.bin'
metadataPath = path.join(moduleDirectory, 'package.json')
metadata = grunt.file.readJSON(metadataPath)
continue unless metadata?.engines?.atom?
moduleCache = metadata._atomModuleCache ? {}
rm metadataPath
_.remove(moduleCache.extensions?['.json'] ? [], 'package.json')
for property in ['_from', '_id', 'dist', 'readme', 'readmeFilename']
delete metadata[property]
pack = {metadata, keymaps: {}, menus: {}}
if metadata.main
mainPath = require.resolve(path.resolve(moduleDirectory, metadata.main))
pack.main = path.relative(appDir, mainPath)
for keymapPath in fs.listSync(path.join(moduleDirectory, 'keymaps'), ['.cson', '.json'])
relativePath = path.relative(appDir, keymapPath)
pack.keymaps[relativePath] = CSON.readFileSync(keymapPath)
rm keymapPath
for menuPath in fs.listSync(path.join(moduleDirectory, 'menus'), ['.cson', '.json'])
relativePath = path.relative(appDir, menuPath)
pack.menus[relativePath] = CSON.readFileSync(menuPath)
rm menuPath
packages[metadata.name] = pack
for extension, paths of moduleCache.extensions
delete moduleCache.extensions[extension] if paths.length is 0
metadata = grunt.file.readJSON(path.join(appDir, 'package.json'))
metadata._atomPackages = packages
grunt.file.write(path.join(appDir, 'package.json'), JSON.stringify(metadata))
+46
Ver Arquivo
@@ -0,0 +1,46 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
module.exports = (grunt) ->
{spawn, rm} = require('./task-helpers')(grunt)
grunt.registerTask 'create-installer', 'Create the Windows installer', ->
return unless process.platform is 'win32'
done = @async()
buildDir = grunt.config.get('atom.buildDir')
atomDir = path.join(buildDir, 'Atom')
releasesDir = path.join(buildDir, 'Releases')
atomGitHubToken = process.env.ATOM_ACCESS_TOKEN
packageInfo = grunt.file.readJSON(path.join(atomDir, 'resources', 'app', 'package.json'))
inputTemplate = grunt.file.read(path.join('build', 'windows', 'atom.nuspec.erb'))
# NB: Build server has some sort of stamp on the version number
packageInfo.version = packageInfo.version.replace(/-.*$/, '')
targetNuspecPath = path.join(buildDir, 'atom.nuspec')
grunt.file.write(targetNuspecPath, _.template(inputTemplate, packageInfo))
# We use the previous releases to build deltas for the current release,
# sync down the existing releases directory by rolling through GitHub releases
cmd = 'build/windows/SyncGitHubReleases.exe'
args = ['-r', releasesDir, '-u', 'https://github.com/atom/atom', '-t', atomGitHubToken]
spawn {cmd, args}, (error, result, code) ->
if error?
grunt.log.error "ATOM_ACCESS_TOKEN environment variable not set or invalid, can't download old releases; continuing anyways"
cmd = 'build/windows/nuget.exe'
args = ['pack', targetNuspecPath, '-BasePath', atomDir, '-OutputDirectory', buildDir]
spawn {cmd, args}, (error, result, code) ->
return done(error) if error?
pkgs = pkg for pkg in fs.readdirSync(buildDir) when path.extname(pkg) is '.nupkg'
cmd = 'build/windows/update.com'
args = ['--releasify', path.join(buildDir, pkgs), '-r', releasesDir, '-g', 'build/windows/install-spinner.gif']
spawn {cmd, args}, (error, result, code) -> done(error)
+1
Ver Arquivo
@@ -11,6 +11,7 @@ module.exports = (grunt) ->
modulesPath = path.resolve(__dirname, '..', '..', 'node_modules')
classes = {}
fs.traverseTreeSync modulesPath, (modulePath) ->
return false if modulePath.match(/node_modules/g).length > 1 # dont need the dependencies of the dependencies
return true unless path.basename(modulePath) is 'package.json'
return true unless fs.isFileSync(modulePath)
@@ -0,0 +1,39 @@
path = require 'path'
fs = require 'fs-plus'
ModuleCache = require '../../src/module-cache'
module.exports = (grunt) ->
grunt.registerTask 'generate-module-cache', 'Generate a module cache for all core modules and packages', ->
appDir = grunt.config.get('atom.appDir')
{packageDependencies} = grunt.file.readJSON('package.json')
for packageName, version of packageDependencies
ModuleCache.create(path.join(appDir, 'node_modules', packageName))
ModuleCache.create(appDir)
metadata = grunt.file.readJSON(path.join(appDir, 'package.json'))
metadata._atomModuleCache.folders.forEach (folder) ->
if '' in folder.paths
folder.paths = [
''
'exports'
'spec'
'src'
'src/browser'
'static'
'vendor'
]
# Reactionary does not have an explicit react dependency
metadata._atomModuleCache.folders.push
paths: [
'node_modules/reactionary-atom-fork/lib'
]
dependencies: {
'react-atom-fork': metadata.dependencies['react-atom-fork']
}
grunt.file.write(path.join(appDir, 'package.json'), JSON.stringify(metadata))
+10 -5
Ver Arquivo
@@ -3,6 +3,7 @@ path = require 'path'
_ = require 'underscore-plus'
fs = require 'fs-plus'
runas = null
temp = require 'temp'
module.exports = (grunt) ->
{cp, mkdir, rm} = require('./task-helpers')(grunt)
@@ -22,12 +23,16 @@ module.exports = (grunt) ->
else if process.platform is 'darwin'
rm installDir
mkdir path.dirname(installDir)
cp shellAppDir, installDir
tempFolder = temp.path()
mkdir tempFolder
cp shellAppDir, tempFolder
fs.renameSync(tempFolder, installDir)
else
binDir = path.join(installDir, 'bin')
shareDir = path.join(installDir, 'share', 'atom')
iconName = path.join(shareDir,'resources','app','resources','atom.png')
iconName = path.join(shareDir,'resources', 'app', 'resources', 'atom.png')
mkdir binDir
cp 'atom.sh', path.join(binDir, 'atom')
@@ -35,11 +40,11 @@ module.exports = (grunt) ->
mkdir path.dirname(shareDir)
cp shellAppDir, shareDir
# Create Atom.desktop if installation not in temporary folder
# Create atom.desktop if installation not in temporary folder
tmpDir = if process.env.TMPDIR? then process.env.TMPDIR else '/tmp'
if installDir.indexOf(tmpDir) isnt 0
desktopFile = path.join('resources', 'linux', 'Atom.desktop.in')
desktopInstallFile = path.join(installDir, 'share', 'applications', 'Atom.desktop')
desktopFile = path.join('resources', 'linux', 'atom.desktop.in')
desktopInstallFile = path.join(installDir, 'share', 'applications', 'atom.desktop')
{description} = grunt.file.readJSON('package.json')
iconName = path.join(shareDir, 'resources', 'app', 'resources', 'atom.png')
+15
Ver Arquivo
@@ -60,3 +60,18 @@ module.exports =
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
'jschardet@1.1.0':
license: 'LGPL'
source: 'README.md in the repository'
sourceText: """
JsChardet
=========
Port of python's chardet (http://chardet.feedparser.org/).
License
-------
LGPL
"""
+1 -1
Ver Arquivo
@@ -39,7 +39,7 @@ module.exports = (grunt) ->
getInstalledSize buildDir, (error, installedSize) ->
data = {name, version, description, section, arch, maintainer, installDir, iconName, installedSize}
controlFilePath = fillTemplate(path.join('resources', 'linux', 'debian', 'control'), data)
desktopFilePath = fillTemplate(path.join('resources', 'linux', 'Atom.desktop'), data)
desktopFilePath = fillTemplate(path.join('resources', 'linux', 'atom.desktop'), data)
icon = path.join('resources', 'atom.png')
cmd = path.join('script', 'mkdeb')
+48
Ver Arquivo
@@ -0,0 +1,48 @@
fs = require 'fs'
path = require 'path'
_ = require 'underscore-plus'
module.exports = (grunt) ->
{spawn, rm, mkdir} = require('./task-helpers')(grunt)
fillTemplate = (filePath, data) ->
template = _.template(String(fs.readFileSync("#{filePath}.in")))
filled = template(data)
outputPath = path.join(grunt.config.get('atom.buildDir'), path.basename(filePath))
grunt.file.write(outputPath, filled)
outputPath
grunt.registerTask 'mkrpm', 'Create rpm package', ->
done = @async()
if process.arch is 'ia32'
arch = 'i386'
else if process.arch is 'x64'
arch = 'amd64'
else
return done("Unsupported arch #{process.arch}")
{name, version, description} = grunt.file.readJSON('package.json')
buildDir = grunt.config.get('atom.buildDir')
rpmDir = path.join(buildDir, 'rpm')
rm rpmDir
mkdir rpmDir
installDir = grunt.config.get('atom.installDir')
shareDir = path.join(installDir, 'share', 'atom')
iconName = path.join(shareDir, 'resources', 'app', 'resources', 'atom.png')
data = {name, version, description, installDir, iconName}
specFilePath = fillTemplate(path.join('resources', 'linux', 'redhat', 'atom.spec'), data)
desktopFilePath = fillTemplate(path.join('resources', 'linux', 'atom.desktop'), data)
cmd = path.join('script', 'mkrpm')
args = [specFilePath, desktopFilePath, buildDir]
spawn {cmd, args}, (error) ->
if error?
done(error)
else
grunt.log.ok "Created rpm package in #{rpmDir}"
done()
+53 -15
Ver Arquivo
@@ -20,18 +20,27 @@ module.exports = (gruntObject) ->
{cp} = require('./task-helpers')(grunt)
grunt.registerTask 'publish-build', 'Publish the built app', ->
return if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH isnt 'master'
tasks = ['upload-assets']
tasks.unshift('build-docs', 'prepare-docs') if process.platform is 'darwin'
tasks = []
tasks.push('build-docs', 'prepare-docs') if process.platform is 'darwin'
tasks.push('upload-assets') if process.env.JANKY_SHA1 and process.env.JANKY_BRANCH is 'master'
grunt.task.run(tasks)
grunt.registerTask 'prepare-docs', 'Move api.json to atom-api.json', ->
docsOutputDir = grunt.config.get('docsOutputDir')
buildDir = grunt.config.get('atom.buildDir')
cp path.join(docsOutputDir, 'api.json'), path.join(buildDir, 'atom-api.json')
cp path.join(docsOutputDir, 'api.json'), path.join(buildDir, 'atom-api.json')
grunt.registerTask 'upload-assets', 'Upload the assets to a GitHub release', ->
done = @async()
doneCallback = @async()
startTime = Date.now()
done = (args...) ->
elapsedTime = Math.round((Date.now() - startTime) / 100) / 10
grunt.log.ok("Upload time: #{elapsedTime}s")
doneCallback(args...)
unless token
return done(new Error('ATOM_ACCESS_TOKEN environment variable not set'))
buildDir = grunt.config.get('atom.buildDir')
assets = getAssets()
@@ -45,16 +54,45 @@ module.exports = (gruntObject) ->
uploadAssets(release, buildDir, assets, done)
getAssets = ->
if process.platform is 'darwin'
[
{assetName: 'atom-mac.zip', sourcePath: 'Atom.app'}
{assetName: 'atom-mac-symbols.zip', sourcePath: 'Atom.breakpad.syms'}
{assetName: 'atom-api.json', sourcePath: 'atom-api.json'}
]
else
[
{assetName: 'atom-windows.zip', sourcePath: 'Atom'}
]
switch process.platform
when 'darwin'
[
{assetName: 'atom-mac.zip', sourcePath: 'Atom.app'}
{assetName: 'atom-mac-symbols.zip', sourcePath: 'Atom.breakpad.syms'}
{assetName: 'atom-api.json', sourcePath: 'atom-api.json'}
]
when 'win32'
[
{assetName: 'atom-windows.zip', sourcePath: 'Atom'}
]
when 'linux'
buildDir = grunt.config.get('atom.buildDir')
if process.arch is 'ia32'
arch = 'i386'
else
arch = 'amd64'
{version} = grunt.file.readJSON('package.json')
# Check for a Debian build
sourcePath = "#{buildDir}/atom-#{version}-#{arch}.deb"
assetName = "atom-#{arch}.deb"
# Check for a Fedora build
unless fs.isFileSync(sourcePath)
rpmName = fs.readdirSync("#{buildDir}/rpm")[0]
sourcePath = "#{buildDir}/rpm/#{rpmName}"
if process.arch is 'ia32'
arch = 'i386'
else
arch = 'x86_64'
assetName = "atom.#{arch}.rpm"
{cp} = require('./task-helpers')(grunt)
cp sourcePath, path.join(buildDir, assetName)
[
{assetName, sourcePath}
]
logError = (message, error, details) ->
grunt.log.error(message)
+1 -1
Ver Arquivo
@@ -32,7 +32,7 @@ module.exports = (grunt) ->
packageJsonPath = path.join(appDir, 'package.json')
packageJson = require(packageJsonPath)
packageJson.version = version
packageJsonString = JSON.stringify(packageJson, null, 2)
packageJsonString = JSON.stringify(packageJson)
fs.writeFileSync(packageJsonPath, packageJsonString)
if process.platform is 'darwin'
+6 -5
Ver Arquivo
@@ -4,6 +4,8 @@ path = require 'path'
_ = require 'underscore-plus'
async = require 'async'
concurrency = 2
module.exports = (grunt) ->
{isAtomPackage, spawn} = require('./task-helpers')(grunt)
@@ -61,7 +63,7 @@ module.exports = (grunt) ->
continue unless isAtomPackage(packagePath)
packageSpecQueue.push(packagePath)
packageSpecQueue.concurrency = 1
packageSpecQueue.concurrency = concurrency - 1
packageSpecQueue.drain = -> callback(null, failedPackages)
runCoreSpecs = (callback) ->
@@ -84,7 +86,7 @@ module.exports = (grunt) ->
fs.unlinkSync('ci.log')
else
# TODO: Restore concurrency on Windows
packageSpecQueue.concurrency = 2
packageSpecQueue.concurrency = concurrency
callback(null, error)
@@ -102,14 +104,13 @@ module.exports = (grunt) ->
method [runCoreSpecs, runPackageSpecs], (error, results) ->
[coreSpecFailed, failedPackages] = results
elapsedTime = Math.round((Date.now() - startTime) / 100) / 10
grunt.verbose.writeln("Total spec time: #{elapsedTime}s")
grunt.log.ok("Total spec time: #{elapsedTime}s using #{concurrency} cores")
failures = failedPackages
failures.push "atom core" if coreSpecFailed
grunt.log.error("[Error]".red + " #{failures.join(', ')} spec(s) failed") if failures.length > 0
if process.platform is 'win32' and process.env.JANKY_SHA1
# Package specs are still flaky on Windows CI
done(!coreSpecFailed)
done()
else
done(!coreSpecFailed and failedPackages.length == 0)
+2 -1
Ver Arquivo
@@ -53,8 +53,9 @@ module.exports = (grunt) ->
proc = childProcess.spawn(options.cmd, options.args, options.opts)
proc.stdout.on 'data', (data) -> stdout.push(data.toString())
proc.stderr.on 'data', (data) -> stderr.push(data.toString())
proc.on 'error', (processError) -> error ?= processError
proc.on 'close', (exitCode, signal) ->
error = new Error(signal) if exitCode != 0
error ?= new Error(signal) if exitCode != 0
results = {stderr: stderr.join(''), stdout: stdout.join(''), code: exitCode}
grunt.log.error results.stderr if exitCode != 0
callback(error, results, exitCode)
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
+32
Ver Arquivo
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id><%= name %></id>
<version><%= version %></version>
<authors>The Atom Community</authors>
<owners>The Atom Community</owners>
<iconUrl>https://raw.githubusercontent.com/atom/atom/master/resources/win/atom.ico</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description><%= description %></description>
</metadata>
<files>
<file src="locales\**" target="lib\net45\locales" />
<file src="resources\**" target="lib\net45\resources" />
<file src="*.pak" target="lib\net45" />
<file src="atom.exe" target="lib\net45\atom.exe" />
<file src="atom.exe.gui" target="lib\net45\atom.exe.gui" />
<file src="chromiumcontent.dll" target="lib\net45\chromiumcontent.dll" />
<file src="d3dcompiler_43.dll" target="lib\net45\d3dcompiler_43.dll" />
<file src="ffmpegsumo.dll" target="lib\net45\ffmpegsumo.dll" />
<file src="icudtl.dat" target="lib\net45\icudtl.dat" />
<file src="libEGL.dll" target="lib\net45\libEGL.dll" />
<file src="libGLESv2.dll" target="lib\net45\libGLESv2.dll" />
<file src="LICENSE" target="lib\net45\LICENSE" />
<file src="msvcp120.dll" target="lib\net45\msvcp120.dll" />
<file src="msvcr120.dll" target="lib\net45\msvcr120.dll" />
<file src="vccorlib120.dll" target="lib\net45\vccorlib120.dll" />
<file src="version" target="lib\net45\version" />
<file src="xinput1_3.dll" target="lib\net45\xinput1_3.dll" />
</files>
</package>
Arquivo binário não exibido.

Depois

Largura:  |  Altura:  |  Tamanho: 43 KiB

+3
Ver Arquivo
@@ -10,5 +10,8 @@
},
"no_interpolation_in_single_quotes": {
"level": "error"
},
"no_debugger": {
"level": "error"
}
}
-9
Ver Arquivo
@@ -48,15 +48,6 @@ but you can programmatically write to it with `atom.config.set`:
atom.config.set("core.showInvisibles", true)
```
You should never mutate the value of a config key, because that would circumvent
the notification of observers. You can however use methods like `pushAtKeyPath`,
`unshiftAtKeyPath`, and `removeAtKeyPath` to manipulate mutable config values.
```coffeescript
atom.config.pushAtKeyPath("core.disabledPackages", "wrap-guide")
atom.config.removeAtKeyPath("core.disabledPackages", "terminal")
```
You can also use `setDefaults`, which will assign default values for keys that
are always overridden by values assigned with `set`. Defaults are not written
out to the the `config.json` file to prevent it from becoming cluttered.
+6 -6
Ver Arquivo
@@ -6,25 +6,25 @@ Keymap files are encoded as JSON or CSON files containing nested hashes. They
work much like stylesheets, but instead of applying style properties to elements
matching the selector, they specify the meaning of keystrokes on elements
matching the selector. Here is an example of some bindings that apply when
keystrokes pass through elements with the class `.editor`:
keystrokes pass through `atom-text-editor` elements:
```coffee
'.editor':
'atom-text-editor':
'cmd-delete': 'editor:delete-to-beginning-of-line'
'alt-backspace': 'editor:delete-to-beginning-of-word'
'ctrl-A': 'editor:select-to-first-character-of-line'
'ctrl-shift-e': 'editor:select-to-end-of-line'
'cmd-left': 'editor:move-to-first-character-of-line'
'.editor:not(.mini)'
'atom-text-editor:not(.mini)'
'cmd-alt-[': 'editor:fold-current-row'
'cmd-alt-]': 'editor:unfold-current-row'
```
Beneath the first selector are several bindings, mapping specific *keystroke
patterns* to *commands*. When an element with the `.editor` class is focused and
patterns* to *commands*. When an element with the `atom-text-editor` class is focused and
`cmd-delete` is pressed, an custom DOM event called
`editor:delete-to-beginning-of-line` is emitted on the `.editor` element.
`editor:delete-to-beginning-of-line` is emitted on the `atom-text-editor` element.
The second selector group also targets editors, but only if they don't have the
`.mini` class. In this example, the commands for code folding don't really make
@@ -91,7 +91,7 @@ the current keystroke sequence and continue searching from its parent. If you
want to remove a binding from a keymap you don't control, such as keymaps in
Atom core or in packages, use the `unset!` directive.
For example, the following code removes the keybinding for `a` in the Tree View,
For example, the following code removes the keybinding for `a` in the Tree View,
which is normally used to trigger the `tree-view:add-file` command:
```coffee
@@ -0,0 +1,87 @@
# Scoped Settings, Scopes and Scope Descriptors
Atom supports language-specific settings. You can soft wrap only Markdown files, or set the tab length to 4 in Python files.
Language-specific settings are a subset of something more general we call "scoped settings". Scoped settings allow targeting down to a specific syntax token type. For example, you could conceivably set a setting to target only Ruby comments, only code inside Markdown files, or even only JavaScript function names.
## Scope names in syntax tokens
Each token in the editor has a collection of scope names. For example, the aformentioned JavaScript function name might have the scope names `function` and `name`. An open paren might have the scope names `punctuation`, `parameters`, `begin`.
Scope names work just like CSS classes. In fact, in the editor, scope names are attached to a token's DOM node as CSS classes.
Take this piece of JavaScript:
```js
function functionName() {
console.log('Log it out');
}
```
In the dev tools, the first line's markup looks like this.
![screen shot 2014-10-14 at 11 21 35 am](https://cloud.githubusercontent.com/assets/69169/4634321/2b1b923c-53cf-11e4-9268-6e57bcb14ec8.png)
All the class names on the spans are scope names. Any scope name can be used to target a setting's value.
## Scope Selectors
Scope selectors allow you to target specific tokens just like a CSS selector targets specific nodes in the DOM. Some examples:
```coffee
'.source.js' # selects all javascript tokens
'.source.js .function.name' # selects all javascript function names
'.function.name' # selects all function names in any language
```
[Config::set][config-set] accepts a `scopeSelector`. If you'd like to set a setting for JavaScript function names, you can give it the js function name `scopeSelector`:
```coffee
atom.config.set('.source.js .function.name', 'my-package.my-setting', 'special value')
```
## Scope Descriptors
A scope descriptor is an [Object][scope-descriptor] that wraps an `Array` of
`String`s. The Array describes a path from the root of the syntax tree to a
token including _all_ scope names for the entire path.
In our JavaScript example above, a scope descriptor for the function name token would be:
```coffee
['source.js', 'meta.function.js', 'entity.name.function.js']
```
[Config::get][config-get] accepts a `scopeDescriptor`. You can get the value for your setting scoped to JavaScript function names via:
```coffee
scopeDescriptor = ['source.js', 'meta.function.js', 'entity.name.function.js']
value = atom.config.get(scopeDescriptor, 'my-package.my-setting')
```
But, you do not need to generate scope descriptors by hand. There are a couple methods available to get the scope descriptor from the editor:
* [Editor::getRootScopeDescriptor][editor-getRootScopeDescriptor] to get the language's descriptor. eg. `[".source.js"]`
* [Editor::scopeDescriptorForBufferPosition][editor-scopeDescriptorForBufferPosition] to get the descriptor at a specific position in the buffer.
* [Cursor::getScopeDescriptor][cursor-getScopeDescriptor] to get a cursor's descriptor based on position. eg. if the cursor were in the name of the method in our example it would return `["source.js", "meta.function.js", "entity.name.function.js"]`
Let's revisit our example using these methods:
```coffee
editor = atom.workspace.getActiveTextEditor()
cursor = editor.getLastCursor()
valueAtCursor = atom.config.get(cursor.getScopeDescriptor(), 'my-package.my-setting')
valueForLanguage = atom.config.get(editor.getRootScopeDescriptor(), 'my-package.my-setting')
```
[config]:https://atom.io/docs/api/latest/Config
[config-get]:https://atom.io/docs/api/latest/Config#instance-get
[config-set]:https://atom.io/docs/api/latest/Config#instance-set
[config-observe]:https://atom.io/docs/api/latest/Config#instance-observe
[editor-getRootScopeDescriptor]:https://atom.io/docs/api/latest/TextEditor#instance-getRootScopeDescriptor
[editor-scopeDescriptorForBufferPosition]:https://atom.io/docs/api/latest/TextEditor#instance-scopeDescriptorForBufferPosition
[cursor-getScopeDescriptor]:https://atom.io/docs/api/latest/Cursor#instance-getScopeDescriptor
[scope-descriptor]:https://atom.io/docs/api/latest/ScopeDescriptor
+2 -2
Ver Arquivo
@@ -11,7 +11,7 @@ have methods that are view-specific. For example, you could call both general
and view-specific on the global `atom.workspaceView` instance:
```coffeescript
atom.workspaceView.find('.editor.active') # standard jQuery method
atom.workspaceView.find('atom-text-editor.active') # standard jQuery method
atom.workspaceView.getActiveEditor() # view-specific method
```
@@ -20,7 +20,7 @@ If you retrieve a jQuery wrapper for an element associated with a view, use the
```coffeescript
# this is a plain jQuery object; you can't call view-specific methods
editorElement = atom.workspaceView.find('.editor.active')
editorElement = atom.workspaceView.find('atom-text-editor.active')
# get the view object by calling `.view()` to call view-specific methods
editorView = editorElement.view()
+57 -20
Ver Arquivo
@@ -16,43 +16,64 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
### Ubuntu / Debian
* `sudo apt-get install build-essential git libgnome-keyring-dev`
* `sudo apt-get install build-essential git libgnome-keyring-dev fakeroot`
* Instructions for [Node.js](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os).
### Fedora
### Fedora / CentOS / RHEL
* `sudo yum --assumeyes install make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel`
* `sudo yum --assumeyes install make gcc gcc-c++ glibc-devel git-core libgnome-keyring-devel rpmdevtools`
* Instructions for [Node.js](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#fedora).
### Arch
* `sudo pacman -S base-devel git nodejs libgnome-keyring`
* `sudo pacman -S base-devel git nodejs libgnome-keyring python2`
* `export PYTHON=/usr/bin/python2` before building Atom.
## Instructions
If you have problems with permissions don't forget to prefix with `sudo`
From the cloned repository directory:
1. Clone the Atom repository:
1. Build:
```sh
git clone https://github.com/atom/atom
cd atom
```
```sh
$ script/build
```
This will create the atom application at `$TMPDIR/atom-build/Atom`.
2. Install the `atom` and `apm` commands to `/usr/local/bin` by executing:
2. Checkout the latest Atom release:
```sh
$ sudo script/grunt install
```
3. *Optionally*, you may generate a `.deb` package at `$TMPDIR/atom-build`:
```sh
git fetch
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
```
```sh
$ script/grunt mkdeb
```
3. Build Atom:
Use the newly installed atom by restarting any running atom instances.
```sh
script/build
```
This will create the atom application at `$TMPDIR/atom-build/Atom`.
4. Install the `atom` and `apm` commands to `/usr/local/bin` by executing:
```sh
sudo script/grunt install
```
To use the newly installed Atom, quit and restart all running Atom instances.
5. *Optionally*, you may generate distributable packages of Atom at `$TMPDIR/atom-build`. Currenty, `.deb` and `.rpm` package types are supported. To create a `.deb` package run:
```sh
script/grunt mkdeb
```
To create an `.rpm` package run
```sh
script/grunt mkrpm
```
## Advanced Options
@@ -70,7 +91,7 @@ script/build --build-dir /build/atom/here
## Troubleshooting
### Exception: "TypeError: Unable to watch path"
### TypeError: Unable to watch path
If you get following error with a big traceback right after Atom starts:
@@ -100,6 +121,22 @@ have Node.js installed, or node isn't identified as Node.js on your machine.
If it's the latter, entering `sudo ln -s /usr/bin/nodejs /usr/bin/node` into
your terminal may fix the issue.
### AttributeError: 'module' object has no attribute 'script_main'
If you get following error with a big traceback while building Atom:
```
sys.exit(gyp.script_main()) AttributeError: 'module' object has no attribute 'script_main' gyp ERR!
```
you need to uninstall the system version of gyp.
On Fedora you would do the following:
```sh
sudo yum remove gyp
```
#### You can also use Alternatives
On some variants (mostly Debian based distros) it's preferable for you to use
+3 -3
Ver Arquivo
@@ -36,7 +36,7 @@
## Why do I have to use GitHub for Windows?
You don't. You can use your existing Git! GitHub for Windows's Git Shell is just
easier to set up.
easier to set up.
If you _prefer_ using your existing Git installation, make sure git's cmd directory is in your PATH env variable (e.g. `C:\Program Files (x86)\Git\cmd`) before you open your powershell or command window.
Note that you may have to open your command window as administrator. For powershell that doesn't seem to always be the case, though.
@@ -67,11 +67,11 @@ If none of this works, do install Github for Windows and use its Git shell. Make
* https://code.google.com/p/gyp/issues/detail?id=393
* `script/build` stops at installing runas with 'Failed at the runas@0.5.4 install script.'
See the next item.
* `error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found.`
* If you're building atom with Visual Studio 2013 try executing the following
command in your Git shell and then re-run `script/build`:
+16 -14
Ver Arquivo
@@ -9,22 +9,27 @@ in the proper package's repository.
### Cloning
The first step is creating your own clone. You can of course do this manually
with git, or you can use the `apm develop` command to create a clone based on
the package's `repository` field in the `package.json`.
The first step is creating your own clone.
For example, if you want to make changes to the `tree-view` package, run the
following command:
For example, if you want to make changes to the `tree-view` package, fork the repo on your github account, then clone it:
```
> apm develop tree-view
Cloning https://github.com/atom/tree-view ✓
> git clone git@github.com:your-username/tree-view.git
```
Next install all the dependencies:
```
> cd tree-view
> apm install
Installing modules ✓
~/.atom/dev/packages/tree-view -> ~/github/tree-view
```
This clones the `tree-view` repository to `~/github`. If you prefer a different
path, specify it via the `ATOM_REPOS_HOME` environment variable.
Now you can link it to development mode so when you run an Atom window with `atom --dev`, you will use your fork instead of the built in package:
```
> apm link -d
```
### Running in Development Mode
@@ -46,7 +51,4 @@ from the package directory to create and remove dev-mode symlinks.
### Installing Dependencies
Finally, you need to install the cloned package's dependencies by running
`apm install` within the package directory. This step is also performed
automatically the first time you run `apm develop`, but you'll want to keep
dependencies up to date by running `apm update` after pulling upstream changes.
You'll want to keep dependencies up to date by running `apm update` after pulling any upstream changes.
+48 -17
Ver Arquivo
@@ -207,37 +207,44 @@ specific parts of the interface, like adding a file in the tree-view:
```coffeescript
'context-menu':
'.tree-view':
'Add file': 'tree-view:add-file'
'.workspace':
'Inspect Element': 'core:inspect'
'.tree-view': [
{label: 'Add file', command: 'tree-view:add-file'}
]
'atom-workspace': [
{label: 'Inspect Element', command: 'core:inspect'}
]
```
To add your own item to the application menu simply create a top level
`context-menu` key in any menu configuration file in _menus_. This can be a
JSON or [CSON] file.
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.
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.
You can also add separators and submenus to your context menus. To add a
submenu, pass in another object instead of a command. To add a separator, use
`-` for the command of the item.
submenu, provide a `submenu` key instead of a command. To add a separator, add
an item with a single `type: 'separator'` key/value pair.
```coffeescript
'context-menu':
'.workspace':
'Inspect Element': 'core:inspect'
'Separator': '-'
'Text':
'Select All': 'core:select-all'
'Another Separator': '-'
'Deleted Selected Text': 'core:delete'
'atom-workspace': [
{
label: 'Text'
submenu: [
{label: 'Inspect Element', command: 'core:inspect'}
{type: 'separator'}
{label: 'Selector All', command: 'core:select-all'}
{type: 'separator'}
{label: 'Deleted Selected Text', command: 'core:delete'}
]
}
]
```
## Snippets
@@ -321,6 +328,29 @@ extensions your grammar supports:
]
```
## Adding Configuration Settings
You can support config settings in your package that are editable in the
settings view. Specify a `config` key in your package main:
```coffeescript
module.exports =
# Your config schema!
config:
someInt:
type: 'integer'
default: 23
minimum: 1
activate: (state) -> # ...
# ...
```
To define the configuration, we use [json schema][json-schema] which allows you
to indicate the type your value should be, its default, etc.
See the [Config API Docs](https://atom.io/docs/api/latest/Config) for more
details specifying your configuration.
## Bundle External Resources
It's common to ship external resources like images and fonts in the package, to
@@ -392,3 +422,4 @@ all the other available commands.
[first-package]: your-first-package.html
[convert-bundle]: converting-a-text-mate-bundle.html
[convert-theme]: converting-a-text-mate-theme.html
[json-schema]: http://json-schema.org/
+4 -4
Ver Arquivo
@@ -60,10 +60,10 @@ with events in specific contexts. Here's a small example, excerpted from Atom's
built-in keymaps:
```coffee
'.editor':
'atom-text-editor':
'enter': 'editor:newline'
'.mini.editor input':
'atom-text-editor.mini input':
'enter': 'core:confirm'
```
@@ -123,7 +123,7 @@ You can open this file in an editor from the _Atom > Open Your Config_ menu.
- `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
- `softWrapped`: Enable/disable soft wrapping of text within the editor
- `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`
@@ -169,7 +169,7 @@ For example, to change the color of the cursor, you could add the following
rule to your _~/.atom/styles.less_ file:
```less
.editor.is-focused .cursor {
atom-text-editor.is-focused .cursor {
border-color: pink;
}
```
+2
Ver Arquivo
@@ -9,6 +9,7 @@
* [Converting a TextMate Bundle](converting-a-text-mate-bundle.md)
* [Converting a TextMate Theme](converting-a-text-mate-theme.md)
* [Contributing](contributing.md)
* [Contributing to Core Packages](contributing-to-packages.md)
* [Debugging](debugging.md)
### Advanced Topics
@@ -18,3 +19,4 @@
* [Keymaps](advanced/keymaps.md)
* [Serialization](advanced/serialization.md)
* [View System](advanced/view-system.md)
* [Scopes and Scope Descriptors](advanced/scopes-and-scope-descriptors.md)
+3 -3
Ver Arquivo
@@ -91,13 +91,13 @@ _keymaps/ascii-art.cson_ and add a key binding linking `ctrl-alt-a` to the
you don't need it anymore. When finished, the file will look like this:
```coffeescript
'.editor':
'atom-text-editor':
'cmd-alt-a': 'ascii-art:convert'
```
Notice `.editor` on the first line. Just like CSS, keymap selectors *scope* key
Notice `atom-text-editor` on the first line. Just like CSS, keymap selectors *scope* key
bindings so they only apply to specific elements. In this case, our binding is
only active for elements matching the `.editor` selector. If the Tree View has
only active for elements matching the `atom-text-editor` selector. If the Tree View has
focus, pressing `cmd-alt-a` won't trigger the `ascii-art:convert` command. But
if the editor has focus, the `ascii-art:convert` method *will* be triggered.
More information on key bindings can be found in the
+5 -1
Ver Arquivo
@@ -9,7 +9,7 @@
#
# Here's an example taken from Atom's built-in keymap:
#
# '.editor':
# 'atom-text-editor':
# 'enter': 'editor:newline'
#
# '.workspace':
@@ -19,3 +19,7 @@
# You can find more information about keymaps in these guides:
# * https://atom.io/docs/latest/customizing-atom#customizing-key-bindings
# * https://atom.io/docs/latest/advanced/keymaps
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
+3
Ver Arquivo
@@ -13,3 +13,6 @@
# 'prefix': 'log'
# 'body': 'console.log $1'
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
+2 -2
Ver Arquivo
@@ -12,10 +12,10 @@
}
.editor {
atom-text-editor {
}
.editor .cursor {
atom-text-editor .cursor {
}
+11 -2
Ver Arquivo
@@ -1,9 +1,10 @@
{Point, Range} = require 'text-buffer'
{deprecate} = require 'grim'
module.exports =
BufferedNodeProcess: require '../src/buffered-node-process'
BufferedProcess: require '../src/buffered-process'
Git: require '../src/git'
GitRepository: require '../src/git-repository'
Point: Point
Range: Range
@@ -15,7 +16,7 @@ unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE
module.exports.$ = $
module.exports.$$ = $$
module.exports.$$$ = $$$
module.exports.EditorView = require '../src/editor-view'
module.exports.TextEditorView = require '../src/text-editor-view'
module.exports.ScrollView = require '../src/scroll-view'
module.exports.SelectListView = require '../src/select-list-view'
module.exports.Task = require '../src/task'
@@ -24,3 +25,11 @@ unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE
module.exports.Workspace = require '../src/workspace'
module.exports.React = require 'react-atom-fork'
module.exports.Reactionary = require 'reactionary-atom-fork'
Object.defineProperty module.exports, 'Git', get: ->
deprecate "Please require `GitRepository` instead of `Git`: `{GitRepository} = require 'atom'`"
module.exports.GitRepository
Object.defineProperty module.exports, 'EditorView', get: ->
deprecate "Please require `TextEditorView` instead of `EditorView`: `{TextEditorView} = require 'atom'`"
module.exports.TextEditorView
+3 -3
Ver Arquivo
@@ -1,11 +1,11 @@
'.editor':
'atom-text-editor':
# Platform Bindings
'home': 'editor:move-to-first-character-of-line'
'end': 'editor:move-to-end-of-screen-line'
'shift-home': 'editor:select-to-first-character-of-line'
'shift-end': 'editor:select-to-end-of-line'
'.editor:not(.mini)':
'atom-text-editor:not(.mini)':
# Atom Specific
'ctrl-C': 'editor:copy-path'
@@ -18,7 +18,7 @@
'.tool-panel.panel-left, .tool-panel.panel-right':
'escape': 'tool-panel:unfocus'
'.editor !important, .editor.mini !important':
'atom-text-editor !important, atom-text-editor.mini !important':
'escape': 'editor:consolidate-selections'
# allow standard input fields to work correctly
+5 -3
Ver Arquivo
@@ -100,7 +100,7 @@
'cmd-8': 'pane:show-item-8'
'cmd-9': 'pane:show-item-9'
'.editor':
'atom-text-editor':
# Platform Bindings
'alt-left': 'editor:move-to-beginning-of-word'
'alt-right': 'editor:move-to-end-of-word'
@@ -119,7 +119,7 @@
'cmd-shift-right': 'editor:select-to-end-of-line'
'alt-backspace': 'editor:delete-to-beginning-of-word'
'alt-delete': 'editor:delete-to-end-of-word'
'ctrl-a': 'editor:move-to-beginning-of-line'
'ctrl-a': 'editor:move-to-first-character-of-line'
'ctrl-e': 'editor:move-to-end-of-line'
'ctrl-k': 'editor:cut-to-end-of-line'
@@ -134,7 +134,7 @@
'cmd-l': 'editor:select-line'
'ctrl-t': 'editor:transpose'
'.workspace .editor:not(.mini)':
'atom-workspace atom-text-editor:not(.mini)':
# Atom specific
'alt-cmd-z': 'editor:checkout-head-revision'
'cmd-<': 'editor:scroll-to-cursor'
@@ -143,6 +143,8 @@
# Sublime Parity
'cmd-enter': 'editor:newline-below'
'cmd-shift-enter': 'editor:newline-above'
'alt-enter': 'editor:newline'
'shift-enter': 'editor:newline'
'cmd-]': 'editor:indent-selected-rows'
'cmd-[': 'editor:outdent-selected-rows'
'ctrl-cmd-up': 'editor:move-line-up'
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
'.editor':
'atom-text-editor':
'alt-f': 'editor:move-to-end-of-word'
'alt-F': 'editor:select-to-end-of-word'
'alt-b': 'editor:move-to-beginning-of-word'
+2 -2
Ver Arquivo
@@ -79,7 +79,7 @@
'alt-8': 'pane:show-item-8'
'alt-9': 'pane:show-item-9'
'.workspace .editor':
'atom-workspace atom-text-editor':
# Platform Bindings
'ctrl-left': 'editor:move-to-beginning-of-word'
'ctrl-right': 'editor:move-to-end-of-word'
@@ -99,7 +99,7 @@
'ctrl-k ctrl-l': 'editor:lower-case'
'ctrl-l': 'editor:select-line'
'.workspace .editor:not(.mini)':
'atom-workspace atom-text-editor:not(.mini)':
# Atom specific
'alt-ctrl-z': 'editor:checkout-head-revision'
'ctrl-<': 'editor:scroll-to-cursor'
+2 -2
Ver Arquivo
@@ -74,7 +74,7 @@
'ctrl-k ctrl-left': 'window:focus-pane-on-left'
'ctrl-k ctrl-right': 'window:focus-pane-on-right'
'.workspace .editor':
'atom-workspace atom-text-editor':
# Platform Bindings
'ctrl-left': 'editor:move-to-beginning-of-word'
'ctrl-right': 'editor:move-to-end-of-word'
@@ -94,7 +94,7 @@
'ctrl-k ctrl-l': 'editor:lower-case'
'ctrl-l': 'editor:select-line'
'.workspace .editor:not(.mini)':
'atom-workspace atom-text-editor:not(.mini)':
# Atom specific
'alt-ctrl-z': 'editor:checkout-head-revision'
'ctrl-<': 'editor:scroll-to-cursor'
+31 -9
Ver Arquivo
@@ -166,7 +166,7 @@
]
}
{ type: 'separator' }
{ label: 'Toggle Soft Wrap', command: 'editor:toggle-soft-wrapped' }
{ label: 'Toggle Soft Wrap', command: 'editor:toggle-soft-wrap' }
]
}
@@ -190,17 +190,39 @@
submenu: [
{ label: 'Terms of Use', command: 'application:open-terms-of-use' }
{ label: 'Documentation', command: 'application:open-documentation' }
{ label: 'Roadmap', command: 'application:open-roadmap' }
{ label: 'Frequently Asked Questions', command: 'application:open-faq' }
{ type: 'separator' }
{ label: 'Community Discussions', command: 'application:open-discussions' }
{ label: 'Report Issue', command: 'application:report-issue' }
{ label: 'Search Issues', command: 'application:search-issues' }
{ type: 'separator' }
]
}
]
'context-menu':
'.overlayer':
'Undo': 'core:undo'
'Redo': 'core:redo'
'Cut': 'core:cut'
'Copy': 'core:copy'
'Paste': 'core:paste'
'Delete': 'core:delete'
'Select All': 'core:select-all'
'.overlayer': [
{label: 'Undo', command: 'core:undo'}
{label: 'Redo', command: 'core:redo'}
{type: 'separator'}
{label: 'Cut', command: 'core:cut'}
{label: 'Copy', command: 'core:copy'}
{label: 'Paste', command: 'core:paste'}
{label: 'Delete', command: 'core:delete'}
{label: 'Select All', command: 'core:select-all'}
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{type: 'separator'}
]
'atom-pane': [
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{type: 'separator'}
]
+31 -9
Ver Arquivo
@@ -104,7 +104,7 @@
]
}
{ type: 'separator' }
{ label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrapped' }
{ label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrap' }
]
}
@@ -147,17 +147,39 @@
{ label: "VERSION", enabled: false }
{ type: 'separator' }
{ label: '&Documentation', command: 'application:open-documentation' }
{ label: 'Roadmap', command: 'application:open-roadmap' }
{ label: 'Frequently Asked Questions', command: 'application:open-faq' }
{ type: 'separator' }
{ label: 'Community Discussions', command: 'application:open-discussions' }
{ label: 'Report Issue', command: 'application:report-issue' }
{ label: 'Search Issues', command: 'application:search-issues' }
{ type: 'separator' }
]
}
]
'context-menu':
'.overlayer':
'Undo': 'core:undo'
'Redo': 'core:redo'
'Cut': 'core:cut'
'Copy': 'core:copy'
'Paste': 'core:paste'
'Delete': 'core:delete'
'Select All': 'core:select-all'
'.overlayer': [
{label: 'Undo', command: 'core:undo'}
{label: 'Redo', command: 'core:redo'}
{type: 'separator'}
{label: 'Cut', command: 'core:cut'}
{label: 'Copy', command: 'core:copy'}
{label: 'Paste', command: 'core:paste'}
{label: 'Delete', command: 'core:delete'}
{label: 'Select All', command: 'core:select-all'}
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{type: 'separator'}
]
'atom-pane': [
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{type: 'separator'}
]
+33 -11
Ver Arquivo
@@ -33,8 +33,8 @@
{ label: '&Undo', command: 'core:undo' }
{ label: '&Redo', command: 'core:redo' }
{ type: 'separator' }
{ label: '&Cut', command: 'core:cut' }
{ label: 'C&opy', command: 'core:copy' }
{ label: 'Cu&t', command: 'core:cut' }
{ label: '&Copy', command: 'core:copy' }
{ label: 'Copy Pat&h', command: 'editor:copy-path' }
{ label: '&Paste', command: 'core:paste' }
{ label: 'Select &All', command: 'core:select-all' }
@@ -122,7 +122,7 @@
]
}
{ type: 'separator' }
{ label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrapped' }
{ label: 'Toggle Soft &Wrap', command: 'editor:toggle-soft-wrap' }
]
}
@@ -165,17 +165,39 @@
{ label: "VERSION", enabled: false }
{ type: 'separator' }
{ label: '&Documentation', command: 'application:open-documentation' }
{ label: 'Roadmap', command: 'application:open-roadmap' }
{ label: 'Frequently Asked Questions', command: 'application:open-faq' }
{ type: 'separator' }
{ label: 'Community Discussions', command: 'application:open-discussions' }
{ label: 'Report Issue', command: 'application:report-issue' }
{ label: 'Search Issues', command: 'application:search-issues' }
{ type: 'separator' }
]
}
]
'context-menu':
'.overlayer':
'Undo': 'core:undo'
'Redo': 'core:redo'
'Cut': 'core:cut'
'Copy': 'core:copy'
'Paste': 'core:paste'
'Delete': 'core:delete'
'Select All': 'core:select-all'
'.overlayer': [
{label: 'Undo', command: 'core:undo'}
{label: 'Redo', command: 'core:redo'}
{type: 'separator'}
{label: 'Cut', command: 'core:cut'}
{label: 'Copy', command: 'core:copy'}
{label: 'Paste', command: 'core:paste'}
{label: 'Delete', command: 'core:delete'}
{label: 'Select All', command: 'core:select-all'}
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{type: 'separator'}
]
'atom-pane': [
{type: 'separator'}
{label: 'Split Up', command: 'pane:split-up'}
{label: 'Split Down', command: 'pane:split-down'}
{label: 'Split Left', command: 'pane:split-left'}
{label: 'Split Right', command: 'pane:split-right'}
{type: 'separator'}
]
+73 -67
Ver Arquivo
@@ -1,7 +1,7 @@
{
{
"name": "atom",
"productName": "Atom",
"version": "0.126.0",
"version": "0.142.0",
"description": "A hackable text editor for the 21st Century.",
"main": "./src/browser/main.js",
"repository": {
@@ -17,129 +17,135 @@
"url": "http://github.com/atom/atom/raw/master/LICENSE.md"
}
],
"atomShellVersion": "0.16.2",
"atomShellVersion": "0.18.2",
"dependencies": {
"async": "0.2.6",
"atom-keymap": "^2.0.6",
"atom-keymap": "^2.2.1",
"bootstrap": "git+https://github.com/atom/bootstrap.git#6af81906189f1747fd6c93479e3d998ebe041372",
"clear-cut": "0.4.0",
"coffee-script": "1.7.0",
"coffeestack": "0.7.0",
"delegato": "^1",
"emissary": "^1.3.1",
"event-kit": "0.6.0",
"first-mate": "^2.0.5",
"fs-plus": "^2.2.6",
"event-kit": "0.7.2",
"first-mate": "^2.2.0",
"fs-plus": "^2.3.1",
"fstream": "0.1.24",
"fuzzaldrin": "^2.1",
"git-utils": "^2.1.4",
"git-utils": "^2.1.5",
"grim": "0.12.0",
"guid": "0.0.10",
"jasmine-json": "~0.0",
"jasmine-tagged": "^1.1.2",
"less-cache": "0.14.0",
"less-cache": "0.17.0",
"mixto": "^1",
"mkdirp": "0.3.5",
"nslog": "^1.0.1",
"oniguruma": "^3.0.4",
"optimist": "0.4.0",
"pathwatcher": "^2.0.12",
"pathwatcher": "^2.3.2",
"property-accessors": "^1",
"q": "^1.0.1",
"random-words": "0.0.1",
"react-atom-fork": "^0.11.1",
"reactionary-atom-fork": "^1.0.0",
"runas": "1.0.1",
"scandal": "1.0.0",
"scoped-property-store": "^0.9.0",
"scandal": "1.0.3",
"scoped-property-store": "^0.15.0",
"scrollbar-style": "^1.0.2",
"season": "^1.0.2",
"semver": "1.1.4",
"semver": "2.2.1",
"serializable": "^1",
"space-pen": "3.4.6",
"space-pen": "3.8.0",
"temp": "0.7.0",
"text-buffer": "^3.2.2",
"text-buffer": "^3.4",
"theorist": "^1.0.2",
"underscore-plus": "^1.5.1",
"vm-compatibility-layer": "0.1.0"
"underscore-plus": "^1.6.1",
"vm-compatibility-layer": "0.1.0",
"elmer": "^0.0",
"Node-bind": "git://github.com/Polymer/NodeBind.git#0.4.2",
"observe-js": "git://github.com/Polymer/observe-js.git#0.4.2",
"polymer-expressions": "git://github.com/Polymer/polymer-expressions.git#0.4.2",
"TemplateBinding": "git://github.com/Polymer/TemplateBinding.git#0.4.2"
},
"packageDependencies": {
"atom-dark-syntax": "0.19.0",
"atom-dark-ui": "0.34.0",
"atom-light-syntax": "0.20.0",
"atom-light-ui": "0.29.0",
"atom-dark-syntax": "0.20.0",
"atom-dark-ui": "0.35.0",
"atom-light-syntax": "0.21.0",
"atom-light-ui": "0.30.0",
"base16-tomorrow-dark-theme": "0.21.0",
"base16-tomorrow-light-theme": "0.4.0",
"solarized-dark-syntax": "0.22.0",
"solarized-light-syntax": "0.12.0",
"archive-view": "0.36.0",
"archive-view": "0.37.0",
"autocomplete": "0.32.0",
"autoflow": "0.18.0",
"autosave": "0.15.0",
"background-tips": "0.16.0",
"autosave": "0.18.0",
"background-tips": "0.17.0",
"bookmarks": "0.28.0",
"bracket-matcher": "0.55.0",
"command-palette": "0.24.0",
"deprecation-cop": "0.10.0",
"dev-live-reload": "0.34.0",
"bracket-matcher": "0.62.0",
"command-palette": "0.27.0",
"deprecation-cop": "0.11.0",
"dev-live-reload": "0.35.0",
"encoding-selector": "0.5.0",
"exception-reporting": "0.20.0",
"feedback": "0.33.0",
"find-and-replace": "0.134.0",
"fuzzy-finder": "0.58.0",
"git-diff": "0.39.0",
"go-to-line": "0.25.0",
"grammar-selector": "0.29.0",
"image-view": "0.36.0",
"incompatible-packages": "0.9.0",
"keybinding-resolver": "0.19.0",
"link": "0.25.0",
"markdown-preview": "0.101.0",
"metrics": "0.34.0",
"find-and-replace": "0.141.0",
"fuzzy-finder": "0.60.0",
"git-diff": "0.42.0",
"go-to-line": "0.26.0",
"grammar-selector": "0.37.0",
"image-view": "0.40.0",
"incompatible-packages": "0.10.0",
"keybinding-resolver": "0.20.0",
"link": "0.26.0",
"markdown-preview": "0.107.0",
"metrics": "0.36.0",
"open-on-github": "0.30.0",
"package-generator": "0.31.0",
"release-notes": "0.36.0",
"settings-view": "0.142.0",
"snippets": "0.52.0",
"spell-check": "0.42.0",
"status-bar": "0.44.0",
"settings-view": "0.154.0",
"snippets": "0.56.0",
"spell-check": "0.43.0",
"status-bar": "0.46.0",
"styleguide": "0.30.0",
"symbols-view": "0.63.0",
"tabs": "0.50.0",
"timecop": "0.22.0",
"tree-view": "0.115.0",
"symbols-view": "0.66.0",
"tabs": "0.55.0",
"timecop": "0.23.0",
"tree-view": "0.131.0",
"update-package-dependencies": "0.6.0",
"welcome": "0.18.0",
"whitespace": "0.25.0",
"wrap-guide": "0.21.0",
"language-c": "0.28.0",
"language-coffee-script": "0.30.0",
"language-css": "0.17.0",
"language-gfm": "0.48.0",
"welcome": "0.19.0",
"whitespace": "0.26.0",
"wrap-guide": "0.23.0",
"language-c": "0.29.0",
"language-coffee-script": "0.37.0",
"language-css": "0.21.0",
"language-gfm": "0.53.0",
"language-git": "0.9.0",
"language-go": "0.17.0",
"language-go": "0.19.0",
"language-html": "0.26.0",
"language-hyperlink": "0.12.0",
"language-java": "0.11.0",
"language-javascript": "0.39.0",
"language-javascript": "0.42.0",
"language-json": "0.8.0",
"language-less": "0.15.0",
"language-less": "0.18.0",
"language-make": "0.12.0",
"language-mustache": "0.10.0",
"language-objective-c": "0.11.0",
"language-perl": "0.9.0",
"language-php": "0.15.0",
"language-php": "0.17.0",
"language-property-list": "0.7.0",
"language-python": "0.19.0",
"language-ruby": "0.35.0",
"language-python": "0.21.0",
"language-ruby": "0.41.0",
"language-ruby-on-rails": "0.18.0",
"language-sass": "0.21.0",
"language-sass": "0.24.0",
"language-shellscript": "0.8.0",
"language-source": "0.8.0",
"language-sql": "0.10.0",
"language-sql": "0.11.0",
"language-text": "0.6.0",
"language-todo": "0.11.0",
"language-toml": "0.12.0",
"language-xml": "0.20.0",
"language-yaml": "0.17.0"
"language-todo": "0.13.0",
"language-toml": "0.14.0",
"language-xml": "0.24.0",
"language-yaml": "0.19.0"
},
"private": true,
"scripts": {
@@ -1,6 +1,7 @@
[Desktop Entry]
Name=Atom
Comment=<%= description %>
GenericName=Text Editor
Exec=<%= installDir %>/share/atom/atom %U
Icon=<%= iconName %>
Type=Application
+2
Ver Arquivo
@@ -1,8 +1,10 @@
Package: <%= name %>
Version: <%= version %>
Depends: python (>= 2.6), libc6
Section: <%= section %>
Priority: optional
Architecture: <%= arch %>
Installed-Size: <%= installedSize %>
Maintainer: <%= maintainer %>
Description: <%= description %>
Atom is a free and open source text editor that is modern, approachable, and hackable to the core.
+7
Ver Arquivo
@@ -0,0 +1,7 @@
atom: arch-dependent-file-in-usr-share
atom: changelog-file-missing-in-native-package
atom: copyright-file-contains-full-apache-2-license
atom: copyright-should-refer-to-common-license-file-for-apache-2
atom: embedded-library
atom: package-installs-python-bytecode
atom: unstripped-binary-or-object
+29
Ver Arquivo
@@ -0,0 +1,29 @@
Name: <%= name %>
Version: <%= version %>
Release: 0.1%{?dist}
Summary: Atom is a hackable text editor for the 21st century
License: MIT
URL: https://atom.io/
BuildConflicts: gyp
BuildRequires: make, gcc, gcc-c++, glibc-devel, git-core, libgnome-keyring-devel
Requires: libgnome-keyring
AutoReqProv: no # Avoid libchromiumcontent.so missing dependency
%description
<%= description %>
%install
mkdir -p %{buildroot}/usr/local/share/atom
cp -r /tmp/atom-build/Atom/* %{buildroot}/usr/local/share/atom
mkdir -p %{buildroot}/usr/local/bin/
ln -sf /usr/local/share/atom/resources/app/apm/node_modules/.bin/apm %{buildroot}/usr/local/bin/apm
cp atom.sh %{buildroot}/usr/local/bin/atom
chmod 755 atom.sh
mkdir -p %{buildroot}/usr/local/share/applications/
mv atom.desktop %{buildroot}/usr/local/share/applications/
%files
/usr/local/bin/atom
/usr/local/bin/apm
/usr/local/share/atom/
/usr/local/share/applications/atom.desktop
+1 -4
Ver Arquivo
@@ -5,9 +5,6 @@ var path = require('path');
process.chdir(path.dirname(__dirname));
if (process.platform == 'linux')
throw new Error('cibuild can not run on linux yet!');
var homeDir = process.platform == 'win32' ? process.env.USERPROFILE : process.env.HOME;
function loadEnvironmentVariables(filePath) {
@@ -27,7 +24,7 @@ function loadEnvironmentVariables(filePath) {
function readEnvironmentVariables() {
if (process.platform === 'win32')
loadEnvironmentVariables(path.resolve('/jenkins/config/atomcredentials'));
else {
else if (process.platform === 'darwin') {
loadEnvironmentVariables('/var/lib/jenkins/config/atomcredentials');
loadEnvironmentVariables('/var/lib/jenkins/config/xcodekeychain');
}
Arquivo executável
+13
Ver Arquivo
@@ -0,0 +1,13 @@
#!/bin/bash
set -e
export ATOM_ACCESS_TOKEN=$BUILD_ATOM_LINUX_ACCESS_TOKEN
if [ -d /usr/local/share/nodenv ]; then
export NODENV_ROOT=/usr/local/share/nodenv
export PATH=/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:$PATH
export NODENV_VERSION="v0.10.21"
fi
script/cibuild
Arquivo executável
+10
Ver Arquivo
@@ -0,0 +1,10 @@
#!/bin/bash
set -e
docker build -t atom-rpm .
docker run \
--env JANKY_SHA1="$JANKY_SHA1" \
--env JANKY_BRANCH="$JANKY_BRANCH" \
--env ATOM_ACCESS_TOKEN="$BUILD_ATOM_RPM_ACCESS_TOKEN" \
atom-rpm /atom/script/rpmbuild
+1 -1
Ver Arquivo
@@ -15,4 +15,4 @@ if [%2] == [] (
if exist %2 rmdir %2 /s /q
:: cp -rf %1 %2
xcopy %1 %2 /e /h /c /i /y /r
(robocopy %1 %2 /e) ^& IF %ERRORLEVEL% LEQ 1 exit 0
+14 -3
Ver Arquivo
@@ -16,7 +16,7 @@ DEB_PATH="$6"
FILE_MODE=755
TARGET_ROOT="`mktemp -d`"
chmod 755 "$TARGET_ROOT"
chmod $FILE_MODE "$TARGET_ROOT"
TARGET="$TARGET_ROOT/atom-$VERSION-$ARCH"
mkdir -m $FILE_MODE -p "$TARGET/usr"
@@ -31,6 +31,17 @@ cp "$DESKTOP_FILE" "$TARGET/usr/share/applications"
mkdir -m $FILE_MODE -p "$TARGET/usr/share/pixmaps"
cp "$ICON_FILE" "$TARGET/usr/share/pixmaps"
dpkg-deb -b "$TARGET"
# Copy generated LICENSE.md to /usr/share/doc/atom/copyright
mkdir -m $FILE_MODE -p "$TARGET/usr/share/doc/atom"
cp "$TARGET/usr/share/atom/resources/app/LICENSE.md" "$TARGET/usr/share/doc/atom/copyright"
# Add lintian overrides
mkdir -m $FILE_MODE -p "$TARGET/usr/share/lintian/overrides"
cp "$ROOT/resources/linux/debian/lintian-overrides" "$TARGET/usr/share/lintian/overrides/atom"
# Remove executable bit from .node files
find "$TARGET" -type f -name "*.node" -exec chmod a-x {} \;
fakeroot dpkg-deb -b "$TARGET"
mv "$TARGET_ROOT/atom-$VERSION-$ARCH.deb" "$DEB_PATH"
rm -rf $TARGET_ROOT
rm -rf "$TARGET_ROOT"
Arquivo executável
+22
Ver Arquivo
@@ -0,0 +1,22 @@
#!/bin/bash
set -e
SPEC_FILE="$1"
DESKTOP_FILE="$2"
BUILD_DIRECTORY="$3"
RPM_BUILD_ROOT=~/rpmbuild
ARCH=`uname -m`
rpmdev-setuptree
cp -r $BUILD_DIRECTORY/Atom/* $RPM_BUILD_ROOT/BUILD
cp $SPEC_FILE $RPM_BUILD_ROOT/SPECS
cp ./atom.sh $RPM_BUILD_ROOT/BUILD
cp $DESKTOP_FILE $RPM_BUILD_ROOT/BUILD
rpmbuild -ba $SPEC_FILE
cp $RPM_BUILD_ROOT/RPMS/$ARCH/atom-*.rpm $BUILD_DIRECTORY/rpm
rm -rf $RPM_BUILD_ROOT
Arquivo executável
+6
Ver Arquivo
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
script/build
script/grunt mkrpm publish-build --stack
+1 -1
Ver Arquivo
@@ -31,7 +31,7 @@ function verifyNode(cb) {
var nodeMajorVersion = +versionArray[0];
var nodeMinorVersion = +versionArray[1];
if (nodeMajorVersion === 0 && nodeMinorVersion < 10) {
error = "node v0.10 is required to build Atom.";
error = "node v0.10 is required to build Atom, node " + nodeVersion + " is installed.";
cb(error);
}
else {
+3
Ver Arquivo
@@ -76,6 +76,9 @@ class AtomReporter extends View
@addSpecs(specs)
$(document.body).append this
@on 'click', '.stack-trace', ->
$(this).toggleClass('expanded')
reportRunnerResults: (runner) ->
@updateSpecCounts()
@status.addClass('alert-success').removeClass('alert-info') if @failedCount is 0
+33 -521
Ver Arquivo
@@ -6,532 +6,24 @@ ThemeManager = require '../src/theme-manager'
describe "the `atom` global", ->
beforeEach ->
atom.workspaceView = new WorkspaceView
atom.workspaceView = atom.views.getView(atom.workspace).__spacePenView
describe "package lifecycle methods", ->
describe ".loadPackage(name)", ->
it "continues if the package has an invalid package.json", ->
spyOn(console, 'warn')
atom.config.set("core.disabledPackages", [])
expect(-> atom.packages.loadPackage("package-with-broken-package-json")).not.toThrow()
it "continues if the package has an invalid keymap", ->
atom.config.set("core.disabledPackages", [])
expect(-> atom.packages.loadPackage("package-with-broken-keymap")).not.toThrow()
describe ".unloadPackage(name)", ->
describe "when the package is active", ->
it "throws an error", ->
pack = null
waitsForPromise ->
atom.packages.activatePackage('package-with-main').then (p) -> pack = p
runs ->
expect(atom.packages.isPackageLoaded(pack.name)).toBeTruthy()
expect(atom.packages.isPackageActive(pack.name)).toBeTruthy()
expect( -> atom.packages.unloadPackage(pack.name)).toThrow()
expect(atom.packages.isPackageLoaded(pack.name)).toBeTruthy()
expect(atom.packages.isPackageActive(pack.name)).toBeTruthy()
describe "when the package is not loaded", ->
it "throws an error", ->
expect(atom.packages.isPackageLoaded('unloaded')).toBeFalsy()
expect( -> atom.packages.unloadPackage('unloaded')).toThrow()
expect(atom.packages.isPackageLoaded('unloaded')).toBeFalsy()
describe "when the package is loaded", ->
it "no longers reports it as being loaded", ->
pack = atom.packages.loadPackage('package-with-main')
expect(atom.packages.isPackageLoaded(pack.name)).toBeTruthy()
atom.packages.unloadPackage(pack.name)
expect(atom.packages.isPackageLoaded(pack.name)).toBeFalsy()
describe ".activatePackage(id)", ->
describe "atom packages", ->
describe "when called multiple times", ->
it "it only calls activate on the package once", ->
spyOn(Package.prototype, 'activateNow').andCallThrough()
atom.packages.activatePackage('package-with-index')
atom.packages.activatePackage('package-with-index')
waitsForPromise ->
atom.packages.activatePackage('package-with-index')
runs ->
expect(Package.prototype.activateNow.callCount).toBe 1
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')
spyOn(mainModule, 'activate')
pack = null
waitsForPromise ->
atom.packages.activatePackage('package-with-main').then (p) -> pack = p
runs ->
expect(mainModule.activate).toHaveBeenCalled()
expect(pack.mainModule).toBe mainModule
describe "when the metadata does not specify a main module", ->
it "requires index.coffee", ->
indexModule = require('./fixtures/packages/package-with-index/index')
spyOn(indexModule, 'activate')
pack = null
waitsForPromise ->
atom.packages.activatePackage('package-with-index').then (p) -> pack = p
runs ->
expect(indexModule.activate).toHaveBeenCalled()
expect(pack.mainModule).toBe indexModule
it "assigns config defaults from the module", ->
expect(atom.config.get('package-with-config-defaults.numbers.one')).toBeUndefined()
waitsForPromise ->
atom.packages.activatePackage('package-with-config-defaults')
runs ->
expect(atom.config.get('package-with-config-defaults.numbers.one')).toBe 1
expect(atom.config.get('package-with-config-defaults.numbers.two')).toBe 2
describe "when the package metadata includes activation events", ->
[mainModule, promise] = []
beforeEach ->
mainModule = require './fixtures/packages/package-with-activation-events/index'
spyOn(mainModule, 'activate').andCallThrough()
spyOn(Package.prototype, 'requireMainModule').andCallThrough()
promise = atom.packages.activatePackage('package-with-activation-events')
it "defers requiring/activating the main module until an activation event bubbles to the root view", ->
expect(promise.isFulfilled()).not.toBeTruthy()
atom.workspaceView.trigger 'activation-event'
waitsForPromise ->
promise
it "triggers the activation event on all handlers registered during activation", ->
waitsForPromise ->
atom.workspaceView.open()
runs ->
editorView = atom.workspaceView.getActiveView()
eventHandler = jasmine.createSpy("activation-event")
editorView.command 'activation-event', eventHandler
editorView.trigger 'activation-event'
expect(mainModule.activate.callCount).toBe 1
expect(mainModule.activationEventCallCount).toBe 1
expect(eventHandler.callCount).toBe 1
editorView.trigger 'activation-event'
expect(mainModule.activationEventCallCount).toBe 2
expect(eventHandler.callCount).toBe 2
expect(mainModule.activate.callCount).toBe 1
it "activates the package immediately when the events are empty", ->
mainModule = require './fixtures/packages/package-with-empty-activation-events/index'
spyOn(mainModule, 'activate').andCallThrough()
waitsForPromise ->
atom.packages.activatePackage('package-with-empty-activation-events')
runs ->
expect(mainModule.activate.callCount).toBe 1
describe "when the package has no main module", ->
it "does not throw an exception", ->
spyOn(console, "error")
spyOn(console, "warn").andCallThrough()
expect(-> atom.packages.activatePackage('package-without-module')).not.toThrow()
expect(console.error).not.toHaveBeenCalled()
expect(console.warn).not.toHaveBeenCalled()
it "passes the activate method the package's previously serialized state if it exists", ->
pack = null
waitsForPromise ->
atom.packages.activatePackage("package-with-serialization").then (p) -> pack = p
runs ->
expect(pack.mainModule.someNumber).not.toBe 77
pack.mainModule.someNumber = 77
atom.packages.deactivatePackage("package-with-serialization")
spyOn(pack.mainModule, 'activate').andCallThrough()
atom.packages.activatePackage("package-with-serialization")
expect(pack.mainModule.activate).toHaveBeenCalledWith({someNumber: 77})
it "logs warning instead of throwing an exception if the package fails to load", ->
atom.config.set("core.disabledPackages", [])
spyOn(console, "warn")
expect(-> atom.packages.activatePackage("package-that-throws-an-exception")).not.toThrow()
expect(console.warn).toHaveBeenCalled()
describe "keymap loading", ->
describe "when the metadata does not contain a 'keymaps' manifest", ->
it "loads all the .cson/.json files in the keymaps directory", ->
element1 = $$ -> @div class: 'test-1'
element2 = $$ -> @div class: 'test-2'
element3 = $$ -> @div class: 'test-3'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])).toHaveLength 0
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element2[0])).toHaveLength 0
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element3[0])).toHaveLength 0
atom.packages.activatePackage("package-with-keymaps")
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])[0].command).toBe "test-1"
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element2[0])[0].command).toBe "test-2"
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element3[0])).toHaveLength 0
describe "when the metadata contains a 'keymaps' manifest", ->
it "loads only the keymaps specified by the manifest, in the specified order", ->
element1 = $$ -> @div class: 'test-1'
element3 = $$ -> @div class: 'test-3'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])).toHaveLength 0
atom.packages.activatePackage("package-with-keymaps-manifest")
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target:element1[0])[0].command).toBe 'keymap-1'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-n', target:element1[0])[0].command).toBe 'keymap-2'
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-y', target:element3[0])).toHaveLength 0
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.packages.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.packages.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 = 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")
one = atom.themes.stringToId(one)
two = atom.themes.stringToId(two)
three = atom.themes.stringToId(three)
expect(atom.themes.stylesheetElementForId(one)).toBeNull()
expect(atom.themes.stylesheetElementForId(two)).toBeNull()
expect(atom.themes.stylesheetElementForId(three)).toBeNull()
atom.packages.activatePackage("package-with-stylesheets-manifest")
expect(atom.themes.stylesheetElementForId(one)).not.toBeNull()
expect(atom.themes.stylesheetElementForId(two)).not.toBeNull()
expect(atom.themes.stylesheetElementForId(three)).toBeNull()
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 = 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")
one = atom.themes.stringToId(one)
two = atom.themes.stringToId(two)
three = atom.themes.stringToId(three)
expect(atom.themes.stylesheetElementForId(one)).toBeNull()
expect(atom.themes.stylesheetElementForId(two)).toBeNull()
expect(atom.themes.stylesheetElementForId(three)).toBeNull()
atom.packages.activatePackage("package-with-stylesheets")
expect(atom.themes.stylesheetElementForId(one)).not.toBeNull()
expect(atom.themes.stylesheetElementForId(two)).not.toBeNull()
expect(atom.themes.stylesheetElementForId(three)).not.toBeNull()
expect($('#jasmine-content').css('font-size')).toBe '3px'
describe "grammar loading", ->
it "loads the package's grammars", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-grammars')
runs ->
expect(atom.syntax.selectGrammar('a.alot').name).toBe 'Alot'
expect(atom.syntax.selectGrammar('a.alittle').name).toBe 'Alittle'
describe "scoped-property loading", ->
it "loads the scoped properties", ->
waitsForPromise ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
describe "converted textmate packages", ->
it "loads the package's grammars", ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Ruby"
it "loads the translated scoped properties", ->
expect(atom.syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBeUndefined()
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
expect(atom.syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBe '# '
describe ".deactivatePackage(id)", ->
describe "atom packages", ->
it "calls `deactivate` on the package's main module if activate was successful", ->
pack = null
waitsForPromise ->
atom.packages.activatePackage("package-with-deactivate").then (p) -> pack = p
runs ->
expect(atom.packages.isPackageActive("package-with-deactivate")).toBeTruthy()
spyOn(pack.mainModule, 'deactivate').andCallThrough()
atom.packages.deactivatePackage("package-with-deactivate")
expect(pack.mainModule.deactivate).toHaveBeenCalled()
expect(atom.packages.isPackageActive("package-with-module")).toBeFalsy()
spyOn(console, 'warn')
badPack = null
waitsForPromise ->
atom.packages.activatePackage("package-that-throws-on-activate").then (p) -> badPack = p
runs ->
expect(atom.packages.isPackageActive("package-that-throws-on-activate")).toBeTruthy()
spyOn(badPack.mainModule, 'deactivate').andCallThrough()
atom.packages.deactivatePackage("package-that-throws-on-activate")
expect(badPack.mainModule.deactivate).not.toHaveBeenCalled()
expect(atom.packages.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 = null
waitsForPromise ->
atom.packages.activatePackage("package-that-throws-on-activate").then (p) -> badPack = p
runs ->
spyOn(badPack.mainModule, 'serialize').andCallThrough()
atom.packages.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')
waitsForPromise ->
atom.packages.activatePackage('package-with-serialize-error')
waitsForPromise ->
atom.packages.activatePackage('package-with-serialization')
runs ->
atom.packages.deactivatePackages()
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", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-grammars')
runs ->
atom.packages.deactivatePackage('package-with-grammars')
expect(atom.syntax.selectGrammar('a.alot').name).toBe 'Null Grammar'
expect(atom.syntax.selectGrammar('a.alittle').name).toBe 'Null Grammar'
it "removes the package's keymaps", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-keymaps')
runs ->
atom.packages.deactivatePackage('package-with-keymaps')
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target: ($$ -> @div class: 'test-1')[0])).toHaveLength 0
expect(atom.keymaps.findKeyBindings(keystrokes:'ctrl-z', target: ($$ -> @div class: 'test-2')[0])).toHaveLength 0
it "removes the package's stylesheets", ->
waitsForPromise ->
atom.packages.activatePackage('package-with-stylesheets')
runs ->
atom.packages.deactivatePackage('package-with-stylesheets')
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", ->
waitsForPromise ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
atom.packages.deactivatePackage("package-with-scoped-properties")
expect(atom.syntax.getProperty ['.source.omg'], 'editor.increaseIndentPattern').toBeUndefined()
describe "textmate packages", ->
it "removes the package's grammars", ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Ruby"
atom.packages.deactivatePackage('language-ruby')
expect(atom.syntax.selectGrammar("file.rb").name).toBe "Null Grammar"
it "removes the package's scoped properties", ->
waitsForPromise ->
atom.packages.activatePackage('language-ruby')
runs ->
atom.packages.deactivatePackage('language-ruby')
expect(atom.syntax.getProperty(['.source.ruby'], 'editor.commentStart')).toBeUndefined()
describe ".activate()", ->
packageActivator = null
themeActivator = null
describe 'window sizing methods', ->
describe '::getPosition and ::setPosition', ->
it 'sets the position of the window, and can retrieve the position just set', ->
atom.setPosition(22, 45)
expect(atom.getPosition()).toEqual x: 22, y: 45
describe '::getSize and ::setSize', ->
originalSize = 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')
originalSize = atom.getSize()
afterEach ->
atom.packages.unloadPackages()
atom.setSize(originalSize.width, originalSize.height)
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 ".enablePackage() and disablePackage()", ->
describe "with packages", ->
it ".enablePackage() enables a disabled package", ->
packageName = 'package-with-main'
atom.config.pushAtKeyPath('core.disabledPackages', packageName)
atom.packages.observeDisabledPackages()
expect(atom.config.get('core.disabledPackages')).toContain packageName
pack = atom.packages.enablePackage(packageName)
loadedPackages = atom.packages.getLoadedPackages()
activatedPackages = null
waitsFor ->
activatedPackages = atom.packages.getActivePackages()
activatedPackages.length > 0
runs ->
expect(loadedPackages).toContain(pack)
expect(activatedPackages).toContain(pack)
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
it ".disablePackage() disables an enabled package", ->
packageName = 'package-with-main'
waitsForPromise ->
atom.packages.activatePackage(packageName)
runs ->
atom.packages.observeDisabledPackages()
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
pack = atom.packages.disablePackage(packageName)
activatedPackages = atom.packages.getActivePackages()
expect(activatedPackages).not.toContain(pack)
expect(atom.config.get('core.disabledPackages')).toContain packageName
describe "with themes", ->
reloadedHandler = null
beforeEach ->
waitsForPromise ->
atom.themes.activateThemes()
afterEach ->
atom.themes.deactivateThemes()
it ".enablePackage() and .disablePackage() enables and disables a theme", ->
packageName = 'theme-with-package-file'
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
# enabling of theme
pack = atom.packages.enablePackage(packageName)
waitsFor ->
pack in atom.packages.getActivePackages()
runs ->
expect(atom.config.get('core.themes')).toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
reloadedHandler = jasmine.createSpy('reloadedHandler')
reloadedHandler.reset()
atom.themes.on('reloaded', reloadedHandler)
pack = atom.packages.disablePackage(packageName)
waitsFor ->
reloadedHandler.callCount is 1
runs ->
expect(atom.packages.getActivePackages()).not.toContain pack
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
it 'sets the size of the window, and can retrieve the size just set', ->
atom.setSize(100, 400)
expect(atom.getSize()).toEqual width: 100, height: 400
describe ".isReleasedVersion()", ->
it "returns false if the version is a SHA and true otherwise", ->
@@ -555,3 +47,23 @@ describe "the `atom` global", ->
[event, version, notes] = updateAvailableHandler.mostRecentCall.args
expect(notes).toBe 'notes'
expect(version).toBe 'version'
describe "loading default config", ->
it 'loads the default core config', ->
expect(atom.config.get('core.excludeVcsIgnoredPaths')).toBe true
expect(atom.config.get('editor.showInvisibles')).toBe false
it 'loads the templating globals', ->
jasmineContent = document.body.querySelector('#jasmine-content')
Template = require './fixtures/html-template.html'
Model = {message: 'test!', number: 10}
jasmineContent.appendChild(Template.clone())
jasmineContent.querySelector('template').model = Model
waits 0
runs ->
# apparently template rendering is async
expect(jasmineContent.querySelector('.test-message').textContent).toBe 'test!'
expect(jasmineContent.querySelector('.test-number').textContent).toBe '20'
+1 -1
Ver Arquivo
@@ -20,7 +20,7 @@ describe "install(commandPath, callback)", ->
installDone = false
installError = null
installer.install commandFilePath, false, (error) ->
installer.createSymlink commandFilePath, false, (error) ->
installDone = true
installError = error
+210
Ver Arquivo
@@ -0,0 +1,210 @@
CommandRegistry = require '../src/command-registry'
describe "CommandRegistry", ->
[registry, parent, child, grandchild] = []
beforeEach ->
parent = document.createElement("div")
child = document.createElement("div")
grandchild = document.createElement("div")
parent.classList.add('parent')
child.classList.add('child')
grandchild.classList.add('grandchild')
child.appendChild(grandchild)
parent.appendChild(child)
document.querySelector('#jasmine-content').appendChild(parent)
registry = new CommandRegistry
afterEach ->
registry.destroy()
describe "when a command event is dispatched on an element", ->
it "invokes callbacks with selectors matching the target", ->
called = false
registry.add '.grandchild', 'command', (event) ->
expect(this).toBe grandchild
expect(event.type).toBe 'command'
expect(event.eventPhase).toBe Event.BUBBLING_PHASE
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe grandchild
called = true
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(called).toBe true
it "invokes callbacks with selectors matching ancestors of the target", ->
calls = []
registry.add '.child', 'command', (event) ->
expect(this).toBe child
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe child
calls.push('child')
registry.add '.parent', 'command', (event) ->
expect(this).toBe parent
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe parent
calls.push('parent')
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual ['child', 'parent']
it "invokes inline listeners prior to listeners applied via selectors", ->
calls = []
registry.add '.grandchild', 'command', -> calls.push('grandchild')
registry.add child, 'command', -> calls.push('child-inline')
registry.add '.child', 'command', -> calls.push('child')
registry.add '.parent', 'command', -> calls.push('parent')
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual ['grandchild', 'child-inline', 'child', 'parent']
it "orders multiple matching listeners for an element by selector specificity", ->
child.classList.add('foo', 'bar')
calls = []
registry.add '.foo.bar', 'command', -> calls.push('.foo.bar')
registry.add '.foo', 'command', -> calls.push('.foo')
registry.add '.bar', 'command', -> calls.push('.bar') # specificity ties favor commands added later, like CSS
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual ['.foo.bar', '.bar', '.foo']
it "stops bubbling through ancestors when .stopPropagation() is called on the event", ->
calls = []
registry.add '.parent', 'command', -> calls.push('parent')
registry.add '.child', 'command', -> calls.push('child-2')
registry.add '.child', 'command', (event) -> calls.push('child-1'); event.stopPropagation()
dispatchedEvent = new CustomEvent('command', bubbles: true)
spyOn(dispatchedEvent, 'stopPropagation')
grandchild.dispatchEvent(dispatchedEvent)
expect(calls).toEqual ['child-1', 'child-2']
expect(dispatchedEvent.stopPropagation).toHaveBeenCalled()
it "stops invoking callbacks when .stopImmediatePropagation() is called on the event", ->
calls = []
registry.add '.parent', 'command', -> calls.push('parent')
registry.add '.child', 'command', -> calls.push('child-2')
registry.add '.child', 'command', (event) -> calls.push('child-1'); event.stopImmediatePropagation()
dispatchedEvent = new CustomEvent('command', bubbles: true)
spyOn(dispatchedEvent, 'stopImmediatePropagation')
grandchild.dispatchEvent(dispatchedEvent)
expect(calls).toEqual ['child-1']
expect(dispatchedEvent.stopImmediatePropagation).toHaveBeenCalled()
it "forwards .preventDefault() calls from the synthetic event to the original", ->
registry.add '.child', 'command', (event) -> event.preventDefault()
dispatchedEvent = new CustomEvent('command', bubbles: true)
spyOn(dispatchedEvent, 'preventDefault')
grandchild.dispatchEvent(dispatchedEvent)
expect(dispatchedEvent.preventDefault).toHaveBeenCalled()
it "forwards .abortKeyBinding() calls from the synthetic event to the original", ->
registry.add '.child', 'command', (event) -> event.abortKeyBinding()
dispatchedEvent = new CustomEvent('command', bubbles: true)
dispatchedEvent.abortKeyBinding = jasmine.createSpy('abortKeyBinding')
grandchild.dispatchEvent(dispatchedEvent)
expect(dispatchedEvent.abortKeyBinding).toHaveBeenCalled()
it "allows listeners to be removed via a disposable returned by ::add", ->
calls = []
disposable1 = registry.add '.parent', 'command', -> calls.push('parent')
disposable2 = registry.add '.child', 'command', -> calls.push('child')
disposable1.dispose()
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual ['child']
calls = []
disposable2.dispose()
grandchild.dispatchEvent(new CustomEvent('command', bubbles: true))
expect(calls).toEqual []
it "allows multiple commands to be registered under one selector when called with an object", ->
calls = []
disposable = registry.add '.child',
'command-1': -> calls.push('command-1')
'command-2': -> calls.push('command-2')
grandchild.dispatchEvent(new CustomEvent('command-1', bubbles: true))
grandchild.dispatchEvent(new CustomEvent('command-2', bubbles: true))
expect(calls).toEqual ['command-1', 'command-2']
calls = []
disposable.dispose()
grandchild.dispatchEvent(new CustomEvent('command-1', bubbles: true))
grandchild.dispatchEvent(new CustomEvent('command-2', bubbles: true))
expect(calls).toEqual []
describe "::findCommands({target})", ->
it "returns commands that can be invoked on the target or its ancestors", ->
registry.add '.parent', 'namespace:command-1', ->
registry.add '.child', 'namespace:command-2', ->
registry.add '.grandchild', 'namespace:command-3', ->
registry.add '.grandchild.no-match', 'namespace:command-4', ->
expect(registry.findCommands(target: grandchild)[0..2]).toEqual [
{name: 'namespace:command-3', displayName: 'Namespace: Command 3'}
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
describe "::dispatch(target, commandName)", ->
it "simulates invocation of the given command ", ->
called = false
registry.add '.grandchild', 'command', (event) ->
expect(this).toBe grandchild
expect(event.type).toBe 'command'
expect(event.eventPhase).toBe Event.BUBBLING_PHASE
expect(event.target).toBe grandchild
expect(event.currentTarget).toBe grandchild
called = true
registry.dispatch(grandchild, 'command')
expect(called).toBe true
it "returns a boolean indicating whether any listeners matched the command", ->
registry.add '.grandchild', 'command', ->
expect(registry.dispatch(grandchild, 'command')).toBe true
expect(registry.dispatch(grandchild, 'bogus')).toBe false
expect(registry.dispatch(parent, 'command')).toBe false
describe "::getSnapshot and ::restoreSnapshot", ->
it "removes all command handlers except for those in the snapshot", ->
registry.add '.parent', 'namespace:command-1', ->
registry.add '.child', 'namespace:command-2', ->
snapshot = registry.getSnapshot()
registry.add '.grandchild', 'namespace:command-3', ->
expect(registry.findCommands(target: grandchild)[0..2]).toEqual [
{name: 'namespace:command-3', displayName: 'Namespace: Command 3'}
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
registry.restoreSnapshot(snapshot)
expect(registry.findCommands(target: grandchild)[0..1]).toEqual [
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
registry.add '.grandchild', 'namespace:command-3', ->
registry.restoreSnapshot(snapshot)
expect(registry.findCommands(target: grandchild)[0..1]).toEqual [
{name: 'namespace:command-2', displayName: 'Namespace: Command 2'}
{name: 'namespace:command-1', displayName: 'Namespace: Command 1'}
]
+805 -24
Ver Arquivo
@@ -12,7 +12,7 @@ describe "Config", ->
describe ".get(keyPath)", ->
it "allows a key path's value to be read", ->
expect(atom.config.set("foo.bar.baz", 42)).toBe 42
expect(atom.config.set("foo.bar.baz", 42)).toBe true
expect(atom.config.get("foo.bar.baz")).toBe 42
expect(atom.config.get("bogus.key.path")).toBeUndefined()
@@ -37,7 +37,7 @@ describe "Config", ->
describe ".set(keyPath, value)", ->
it "allows a key path's value to be written", ->
expect(atom.config.set("foo.bar.baz", 42)).toBe 42
expect(atom.config.set("foo.bar.baz", 42)).toBe true
expect(atom.config.get("foo.bar.baz")).toBe 42
it "updates observers and saves when a key path is set", ->
@@ -48,7 +48,7 @@ describe "Config", ->
atom.config.set("foo.bar.baz", 42)
expect(atom.config.save).toHaveBeenCalled()
expect(observeHandler).toHaveBeenCalledWith 42, {previous: undefined}
expect(observeHandler).toHaveBeenCalledWith 42
describe "when the value equals the default value", ->
it "does not store the value", ->
@@ -88,6 +88,19 @@ describe "Config", ->
expect(atom.config.getDefault('foo.bar')).toEqual initialDefaultValue
expect(atom.config.getDefault('foo.bar')).not.toBe initialDefaultValue
describe "when scoped settings are used", ->
it "returns the global default when no scoped default set", ->
atom.config.setDefaults("foo", bar: baz: 10)
expect(atom.config.getDefault('.source.coffee', 'foo.bar.baz')).toBe 10
it "returns the scoped default when a scoped default is set", ->
atom.config.setDefaults("foo", bar: baz: 10)
atom.config.addScopedSettings("default", ".source.coffee", foo: bar: baz: 42)
expect(atom.config.getDefault('.source.coffee', 'foo.bar.baz')).toBe 42
atom.config.set('.source.coffee', 'foo.bar.baz', 55)
expect(atom.config.getDefault('.source.coffee', 'foo.bar.baz')).toBe 42
describe ".isDefault(keyPath)", ->
it "returns true when the value of the key path is its default value", ->
atom.config.setDefaults("foo", same: 1, changes: 1)
@@ -99,6 +112,21 @@ describe "Config", ->
expect(atom.config.isDefault('foo.same')).toBe false
expect(atom.config.isDefault('foo.changes')).toBe false
describe "when scoped settings are used", ->
it "returns false when a scoped setting was set by the user", ->
expect(atom.config.isDefault('.source.coffee', 'foo.bar.baz')).toBe true
atom.config.addScopedSettings("default", ".source.coffee", foo: bar: baz: 42)
expect(atom.config.isDefault('.source.coffee', 'foo.bar.baz')).toBe true
atom.config.set('.source.coffee', 'foo.bar.baz', 55)
expect(atom.config.isDefault('.source.coffee', 'foo.bar.baz')).toBe false
describe ".setDefaults(keyPath)", ->
it "sets a default when the setting's key contains an escaped dot", ->
atom.config.setDefaults("foo", 'a\\.b': 1, b: 2)
expect(atom.config.get("foo")).toEqual 'a\\.b': 1, b: 2
describe ".toggle(keyPath)", ->
it "negates the boolean value of the current key path value", ->
atom.config.set('foo.a', 1)
@@ -130,6 +158,66 @@ describe "Config", ->
atom.config.restoreDefault('a.c')
expect(atom.config.get('a.c')).toBeUndefined()
it "calls ::save()", ->
atom.config.setDefaults('a', b: 3)
atom.config.set('a.b', 4)
atom.config.save.reset()
atom.config.restoreDefault('a.c')
expect(atom.config.save.callCount).toBe 1
describe "when scoped settings are used", ->
it "restores the global default when no scoped default set", ->
atom.config.setDefaults("foo", bar: baz: 10)
atom.config.set('.source.coffee', 'foo.bar.baz', 55)
expect(atom.config.get(['.source.coffee'], 'foo.bar.baz')).toBe 55
atom.config.restoreDefault('.source.coffee', 'foo.bar.baz')
expect(atom.config.get(['.source.coffee'], 'foo.bar.baz')).toBe 10
it "restores the scoped default when a scoped default is set", ->
atom.config.setDefaults("foo", bar: baz: 10)
atom.config.addScopedSettings("default", ".source.coffee", foo: bar: baz: 42)
atom.config.set('.source.coffee', 'foo.bar.baz', 55)
atom.config.set('.source.coffee', 'foo.bar.ok', 100)
expect(atom.config.get(['.source.coffee'], 'foo.bar.baz')).toBe 55
atom.config.restoreDefault('.source.coffee', 'foo.bar.baz')
expect(atom.config.get(['.source.coffee'], 'foo.bar.baz')).toBe 42
expect(atom.config.get(['.source.coffee'], 'foo.bar.ok')).toBe 100
it "calls ::save()", ->
atom.config.setDefaults("foo", bar: baz: 10)
atom.config.addScopedSettings("default", ".source.coffee", foo: bar: baz: 42)
atom.config.set('.source.coffee', 'foo.bar.baz', 55)
atom.config.save.reset()
atom.config.restoreDefault('.source.coffee', 'foo.bar.baz')
expect(atom.config.save.callCount).toBe 1
describe ".getSettings()", ->
it "returns all settings including defaults", ->
atom.config.setDefaults("foo", bar: baz: 10)
atom.config.set("foo.ok", 12)
expect(atom.config.getSettings().foo).toEqual
ok: 12
bar:
baz: 10
describe "when scoped settings are used", ->
it "returns all the scoped settings including all the defaults", ->
atom.config.setDefaults("foo", bar: baz: 10)
atom.config.set("foo.ok", 12)
atom.config.addScopedSettings("default", ".source.coffee", foo: bar: baz: 42)
atom.config.addScopedSettings("default", ".source.coffee", foo: bar: omg: 'omg')
expect(atom.config.getSettings(".source.coffee").foo).toEqual
ok: 12
bar:
baz: 42
omg: 'omg'
describe ".pushAtKeyPath(keyPath, value)", ->
it "pushes the given value to the array at the key path and updates observers", ->
atom.config.set("foo.bar.baz", ["a"])
@@ -139,7 +227,7 @@ describe "Config", ->
expect(atom.config.pushAtKeyPath("foo.bar.baz", "b")).toBe 2
expect(atom.config.get("foo.bar.baz")).toEqual ["a", "b"]
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz"), {previous: ['a']}
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz")
describe ".unshiftAtKeyPath(keyPath, value)", ->
it "unshifts the given value to the array at the key path and updates observers", ->
@@ -150,7 +238,7 @@ describe "Config", ->
expect(atom.config.unshiftAtKeyPath("foo.bar.baz", "a")).toBe 2
expect(atom.config.get("foo.bar.baz")).toEqual ["a", "b"]
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz"), {previous: ['b']}
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz")
describe ".removeAtKeyPath(keyPath, value)", ->
it "removes the given value from the array at the key path and updates observers", ->
@@ -161,16 +249,22 @@ describe "Config", ->
expect(atom.config.removeAtKeyPath("foo.bar.baz", "b")).toEqual ["a", "c"]
expect(atom.config.get("foo.bar.baz")).toEqual ["a", "c"]
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz"), {previous: ['a', 'b', 'c']}
expect(observeHandler).toHaveBeenCalledWith atom.config.get("foo.bar.baz")
describe ".getPositiveInt(keyPath, defaultValue)", ->
it "returns the proper current or default value", ->
it "returns the proper coerced value", ->
atom.config.set('editor.preferredLineLength', 0)
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 1
it "returns the proper coerced value", ->
atom.config.set('editor.preferredLineLength', -1234)
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 1
it "returns the default value when a string is passed in", ->
atom.config.set('editor.preferredLineLength', 'abcd')
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
it "returns the default value when null is passed in", ->
atom.config.set('editor.preferredLineLength', null)
expect(atom.config.getPositiveInt('editor.preferredLineLength', 80)).toBe 80
@@ -194,7 +288,7 @@ describe "Config", ->
expect(CSON.writeFileSync.argsForCall[0][0]).toBe(path.join(atom.config.configDirPath, "atom.config.json"))
writtenConfig = CSON.writeFileSync.argsForCall[0][1]
expect(writtenConfig).toBe atom.config.settings
expect(writtenConfig).toEqual global: atom.config.settings
describe "when ~/.atom/config.json doesn't exist", ->
it "writes any non-default properties to ~/.atom/config.cson", ->
@@ -208,9 +302,29 @@ describe "Config", ->
atom.config.save()
expect(CSON.writeFileSync.argsForCall[0][0]).toBe(path.join(atom.config.configDirPath, "atom.config.cson"))
CoffeeScript = require 'coffee-script'
writtenConfig = CSON.writeFileSync.argsForCall[0][1]
expect(writtenConfig).toEqual atom.config.settings
expect(writtenConfig).toEqual global: atom.config.settings
describe "when scoped settings are defined", ->
it 'writes out explicitly set config settings', ->
atom.config.set('.source.ruby', 'foo.bar', 'ruby')
atom.config.set('.source.ruby', 'foo.omg', 'wow')
atom.config.set('.source.coffee', 'foo.bar', 'coffee')
CSON.writeFileSync.reset()
atom.config.save()
writtenConfig = CSON.writeFileSync.argsForCall[0][1]
expect(writtenConfig).toEqualJson
global:
atom.config.settings
'.ruby.source':
foo:
bar: 'ruby'
omg: 'wow'
'.coffee.source':
foo:
bar: 'coffee'
describe ".setDefaults(keyPath, defaults)", ->
it "assigns any previously-unassigned keys to the object at the key path", ->
@@ -226,11 +340,54 @@ describe "Config", ->
it "emits an updated event", ->
updatedCallback = jasmine.createSpy('updated')
atom.config.observe('foo.bar.baz.a', callNow: false, updatedCallback)
atom.config.onDidChange('foo.bar.baz.a', updatedCallback)
expect(updatedCallback.callCount).toBe 0
atom.config.setDefaults("foo.bar.baz", a: 2)
expect(updatedCallback.callCount).toBe 1
describe ".onDidChange(keyPath)", ->
[observeHandler, observeSubscription] = []
describe 'when a keyPath is specified', ->
beforeEach ->
observeHandler = jasmine.createSpy("observeHandler")
atom.config.set("foo.bar.baz", "value 1")
observeSubscription = atom.config.onDidChange "foo.bar.baz", observeHandler
it "does not fire the given callback with the current value at the keypath", ->
expect(observeHandler).not.toHaveBeenCalled()
it "fires the callback every time the observed value changes", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', "value 2")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 2', oldValue: 'value 1', keyPath: 'foo.bar.baz'})
observeHandler.reset()
atom.config.set('foo.bar.baz', "value 1")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 1', oldValue: 'value 2', keyPath: 'foo.bar.baz'})
describe 'when a keyPath is not specified', ->
beforeEach ->
observeHandler = jasmine.createSpy("observeHandler")
atom.config.set("foo.bar.baz", "value 1")
observeSubscription = atom.config.onDidChange observeHandler
it "does not fire the given callback initially", ->
expect(observeHandler).not.toHaveBeenCalled()
it "fires the callback every time any value changes", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', "value 2")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 2', oldValue: 'value 1', keyPath: 'foo.bar.baz'})
observeHandler.reset()
atom.config.set('foo.bar.baz', "value 1")
expect(observeHandler).toHaveBeenCalledWith({newValue: 'value 1', oldValue: 'value 2', keyPath: 'foo.bar.baz'})
observeHandler.reset()
atom.config.set('foo.bar.int', 1)
expect(observeHandler).toHaveBeenCalledWith({newValue: 1, oldValue: undefined, keyPath: 'foo.bar.int'})
describe ".observe(keyPath)", ->
[observeHandler, observeSubscription] = []
@@ -245,26 +402,25 @@ describe "Config", ->
it "fires the callback every time the observed value changes", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', "value 2")
expect(observeHandler).toHaveBeenCalledWith("value 2", {previous: 'value 1'})
expect(observeHandler).toHaveBeenCalledWith("value 2")
observeHandler.reset()
atom.config.set('foo.bar.baz', "value 1")
expect(observeHandler).toHaveBeenCalledWith("value 1", {previous: 'value 2'})
expect(observeHandler).toHaveBeenCalledWith("value 1")
it "fires the callback when the observed value is deleted", ->
observeHandler.reset() # clear the initial call
atom.config.set('foo.bar.baz', undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined, {previous: 'value 1'})
expect(observeHandler).toHaveBeenCalledWith(undefined)
it "fires the callback when the full key path goes into and out of existence", ->
observeHandler.reset() # clear the initial call
atom.config.set("foo.bar", undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined)
expect(observeHandler).toHaveBeenCalledWith(undefined, {previous: 'value 1'})
observeHandler.reset()
atom.config.set("foo.bar.baz", "i'm back")
expect(observeHandler).toHaveBeenCalledWith("i'm back", {previous: undefined})
expect(observeHandler).toHaveBeenCalledWith("i'm back")
it "does not fire the callback once the observe subscription is off'ed", ->
observeHandler.reset() # clear the initial call
@@ -272,6 +428,14 @@ describe "Config", ->
atom.config.set('foo.bar.baz', "value 2")
expect(observeHandler).not.toHaveBeenCalled()
it 'does not fire the callback for a similarly named keyPath', ->
bazCatHandler = jasmine.createSpy("bazCatHandler")
observeSubscription = atom.config.observe "foo.bar.bazCat", bazCatHandler
bazCatHandler.reset()
atom.config.set('foo.bar.baz', "value 10")
expect(bazCatHandler).not.toHaveBeenCalled()
describe ".initializeConfigDirectory()", ->
beforeEach ->
if fs.existsSync(dotAtomPath)
@@ -308,13 +472,38 @@ describe "Config", ->
afterEach ->
fs.removeSync(dotAtomPath)
describe "when the config file contains valid cson", ->
describe "when the config file contains scoped settings", ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'baz'")
fs.writeFileSync atom.config.configFilePath, """
global:
foo:
bar: 'baz'
'.source.ruby':
foo:
bar: 'more-specific'
"""
atom.config.loadUserConfig()
it "updates the config data based on the file contents", ->
expect(atom.config.get("foo.bar")).toBe 'baz'
expect(atom.config.get(['.source.ruby'], "foo.bar")).toBe 'more-specific'
describe "when the config file contains valid cson", ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'baz'")
it "updates the config data based on the file contents", ->
atom.config.loadUserConfig()
expect(atom.config.get("foo.bar")).toBe 'baz'
it "notifies observers for updated keypaths on load", ->
observeHandler = jasmine.createSpy("observeHandler")
observeSubscription = atom.config.observe "foo.bar", observeHandler
atom.config.loadUserConfig()
expect(observeHandler).toHaveBeenCalledWith 'baz'
describe "when the config file contains invalid cson", ->
beforeEach ->
@@ -334,18 +523,59 @@ describe "Config", ->
expect(fs.existsSync(atom.config.configFilePath)).toBe true
expect(CSON.readFileSync(atom.config.configFilePath)).toEqual {}
describe "when a schema is specified", ->
beforeEach ->
schema =
type: 'object'
properties:
bar:
type: 'string'
default: 'def'
int:
type: 'integer'
default: 12
atom.config.setSchema('foo', schema)
describe "when the config file contains values that do not adhere to the schema", ->
warnSpy = null
beforeEach ->
warnSpy = spyOn console, 'warn'
fs.writeFileSync atom.config.configFilePath, """
foo:
bar: 'baz'
int: 'bad value'
"""
atom.config.loadUserConfig()
it "updates the only the settings that have values matching the schema", ->
expect(atom.config.get("foo.bar")).toBe 'baz'
expect(atom.config.get("foo.int")).toBe 12
expect(warnSpy).toHaveBeenCalled()
expect(warnSpy.mostRecentCall.args[0]).toContain "'foo.int' could not be set"
describe ".observeUserConfig()", ->
updatedHandler = null
beforeEach ->
atom.config.setDefaults('foo', bar: 'def')
atom.config.configDirPath = dotAtomPath
atom.config.configFilePath = path.join(atom.config.configDirPath, "atom.config.cson")
expect(fs.existsSync(atom.config.configDirPath)).toBeFalsy()
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'baz'")
fs.writeFileSync atom.config.configFilePath, """
global:
foo:
bar: 'baz'
scoped: false
'.source.ruby':
foo:
scoped: true
"""
atom.config.loadUserConfig()
atom.config.observeUserConfig()
updatedHandler = jasmine.createSpy("updatedHandler")
atom.config.on 'updated', updatedHandler
atom.config.onDidChange updatedHandler
afterEach ->
atom.config.unobserveUserConfig()
@@ -359,6 +589,92 @@ describe "Config", ->
expect(atom.config.get('foo.bar')).toBe 'quux'
expect(atom.config.get('foo.baz')).toBe 'bar'
it "does not fire a change event for paths that did not change", ->
atom.config.onDidChange 'foo.bar', noChangeSpy = jasmine.createSpy()
fs.writeFileSync(atom.config.configFilePath, "foo: { bar: 'baz', omg: 'ok'}")
waitsFor 'update event', -> updatedHandler.callCount > 0
runs ->
expect(noChangeSpy).not.toHaveBeenCalled()
expect(atom.config.get('foo.bar')).toBe 'baz'
expect(atom.config.get('foo.omg')).toBe 'ok'
describe 'when the default value is a complex value', ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "foo: { bar: ['baz', 'ok']}")
waitsFor 'update event', -> updatedHandler.callCount > 0
runs -> updatedHandler.reset()
it "does not fire a change event for paths that did not change", ->
atom.config.onDidChange 'foo.bar', noChangeSpy = jasmine.createSpy()
fs.writeFileSync(atom.config.configFilePath, "foo: { bar: ['baz', 'ok'], omg: 'another'}")
waitsFor 'update event', -> updatedHandler.callCount > 0
runs ->
expect(noChangeSpy).not.toHaveBeenCalled()
expect(atom.config.get('foo.bar')).toEqual ['baz', 'ok']
expect(atom.config.get('foo.omg')).toBe 'another'
describe 'when scoped settings are used', ->
it "fires a change event for scoped settings that are removed", ->
atom.config.onDidChange ['.source.ruby'], 'foo.scoped', scopedSpy = jasmine.createSpy()
fs.writeFileSync atom.config.configFilePath, """
global:
foo:
scoped: false
"""
waitsFor 'update event', -> updatedHandler.callCount > 0
runs ->
expect(scopedSpy).toHaveBeenCalled()
expect(atom.config.get(['.source.ruby'], 'foo.scoped')).toBe false
it "does not fire a change event for paths that did not change", ->
atom.config.onDidChange ['.source.ruby'], 'foo.scoped', noChangeSpy = jasmine.createSpy()
fs.writeFileSync atom.config.configFilePath, """
global:
foo:
bar: 'baz'
'.source.ruby':
foo:
scoped: true
"""
waitsFor 'update event', -> updatedHandler.callCount > 0
runs ->
expect(noChangeSpy).not.toHaveBeenCalled()
expect(atom.config.get(['.source.ruby'], 'foo.bar')).toBe 'baz'
expect(atom.config.get(['.source.ruby'], 'foo.scoped')).toBe true
describe "when the config file changes to omit a setting with a default", ->
it "resets the setting back to the default", ->
fs.writeFileSync(atom.config.configFilePath, "foo: { baz: 'new'}")
waitsFor 'update event', -> updatedHandler.callCount > 0
runs ->
expect(atom.config.get('foo.bar')).toBe 'def'
expect(atom.config.get('foo.baz')).toBe 'new'
describe "when the config file changes to be empty", ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "")
waitsFor 'update event', -> updatedHandler.callCount > 0
it "resets all settings back to the defaults", ->
expect(updatedHandler.callCount).toBe 1
expect(atom.config.get('foo.bar')).toBe 'def'
atom.config.set("hair", "blonde") # trigger a save
expect(atom.config.save).toHaveBeenCalled()
describe "when the config file subsequently changes again to contain configuration", ->
beforeEach ->
updatedHandler.reset()
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'newVal'")
waitsFor 'update event', -> updatedHandler.callCount > 0
it "sets the setting to the value specified in the config file", ->
expect(atom.config.get('foo.bar')).toBe 'newVal'
describe "when the config file changes to contain invalid cson", ->
beforeEach ->
spyOn(console, 'error')
@@ -373,9 +689,474 @@ describe "Config", ->
describe "when the config file subsequently changes again to contain valid cson", ->
beforeEach ->
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'baz'")
fs.writeFileSync(atom.config.configFilePath, "foo: bar: 'newVal'")
waitsFor 'update event', -> updatedHandler.callCount > 0
it "updates the config data and resumes saving", ->
atom.config.set("hair", "blonde")
expect(atom.config.save).toHaveBeenCalled()
describe "when a schema is specified", ->
schema = null
describe '.setSchema(keyPath, schema)', ->
it 'creates a properly nested schema', ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
atom.config.setSchema('foo.bar', schema)
expect(atom.config.getSchema('foo')).toEqual
type: 'object'
properties:
bar:
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
it 'sets defaults specified by the schema', ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
anObject:
type: 'object'
properties:
nestedInt:
type: 'integer'
default: 24
nestedObject:
type: 'object'
properties:
superNestedInt:
type: 'integer'
default: 36
atom.config.setSchema('foo.bar', schema)
expect(atom.config.get("foo.bar.anInt")).toBe 12
expect(atom.config.get("foo.bar.anObject")).toEqual
nestedInt: 24
nestedObject:
superNestedInt: 36
it 'can set a non-object schema', ->
schema =
type: 'integer'
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
expect(atom.config.get("foo.bar.anInt")).toBe 12
expect(atom.config.getSchema('foo.bar.anInt')).toEqual
type: 'integer'
default: 12
describe '.getSchema(keyPath)', ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
atom.config.setSchema('foo.bar', schema)
expect(atom.config.getSchema('foo.bar')).toEqual
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
expect(atom.config.getSchema('foo.bar.anInt')).toEqual
type: 'integer'
default: 12
describe 'when the value has an "integer" type', ->
beforeEach ->
schema =
type: 'integer'
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
it 'coerces a string to an int', ->
atom.config.set('foo.bar.anInt', '123')
expect(atom.config.get('foo.bar.anInt')).toBe 123
it 'does not allow infinity', ->
atom.config.set('foo.bar.anInt', Infinity)
expect(atom.config.get('foo.bar.anInt')).toBe 12
it 'coerces a float to an int', ->
atom.config.set('foo.bar.anInt', 12.3)
expect(atom.config.get('foo.bar.anInt')).toBe 12
it 'will not set non-integers', ->
atom.config.set('foo.bar.anInt', null)
expect(atom.config.get('foo.bar.anInt')).toBe 12
atom.config.set('foo.bar.anInt', 'nope')
expect(atom.config.get('foo.bar.anInt')).toBe 12
describe 'when the minimum and maximum keys are used', ->
beforeEach ->
schema =
type: 'integer'
minimum: 10
maximum: 20
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
it 'keeps the specified value within the specified range', ->
atom.config.set('foo.bar.anInt', '123')
expect(atom.config.get('foo.bar.anInt')).toBe 20
atom.config.set('foo.bar.anInt', '1')
expect(atom.config.get('foo.bar.anInt')).toBe 10
describe 'when the value has an "integer" and "string" type', ->
beforeEach ->
schema =
type: ['integer', 'string']
default: 12
atom.config.setSchema('foo.bar.anInt', schema)
it 'can coerce an int, and fallback to a string', ->
atom.config.set('foo.bar.anInt', '123')
expect(atom.config.get('foo.bar.anInt')).toBe 123
atom.config.set('foo.bar.anInt', 'cats')
expect(atom.config.get('foo.bar.anInt')).toBe 'cats'
describe 'when the value has an "string" and "boolean" type', ->
beforeEach ->
schema =
type: ['string', 'boolean']
default: 'def'
atom.config.setSchema('foo.bar', schema)
it 'can set a string, a boolean, and revert back to the default', ->
atom.config.set('foo.bar', 'ok')
expect(atom.config.get('foo.bar')).toBe 'ok'
atom.config.set('foo.bar', false)
expect(atom.config.get('foo.bar')).toBe false
atom.config.set('foo.bar', undefined)
expect(atom.config.get('foo.bar')).toBe 'def'
describe 'when the value has a "number" type', ->
beforeEach ->
schema =
type: 'number'
default: 12.1
atom.config.setSchema('foo.bar.aFloat', schema)
it 'coerces a string to a float', ->
atom.config.set('foo.bar.aFloat', '12.23')
expect(atom.config.get('foo.bar.aFloat')).toBe 12.23
it 'will not set non-numbers', ->
atom.config.set('foo.bar.aFloat', null)
expect(atom.config.get('foo.bar.aFloat')).toBe 12.1
atom.config.set('foo.bar.aFloat', 'nope')
expect(atom.config.get('foo.bar.aFloat')).toBe 12.1
describe 'when the minimum and maximum keys are used', ->
beforeEach ->
schema =
type: 'number'
minimum: 11.2
maximum: 25.4
default: 12.1
atom.config.setSchema('foo.bar.aFloat', schema)
it 'keeps the specified value within the specified range', ->
atom.config.set('foo.bar.aFloat', '123.2')
expect(atom.config.get('foo.bar.aFloat')).toBe 25.4
atom.config.set('foo.bar.aFloat', '1.0')
expect(atom.config.get('foo.bar.aFloat')).toBe 11.2
describe 'when the value has a "boolean" type', ->
beforeEach ->
schema =
type: 'boolean'
default: true
atom.config.setSchema('foo.bar.aBool', schema)
it 'coerces various types to a boolean', ->
atom.config.set('foo.bar.aBool', 'true')
expect(atom.config.get('foo.bar.aBool')).toBe true
atom.config.set('foo.bar.aBool', 'false')
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', 'TRUE')
expect(atom.config.get('foo.bar.aBool')).toBe true
atom.config.set('foo.bar.aBool', 'FALSE')
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', 1)
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', 0)
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', {})
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', null)
expect(atom.config.get('foo.bar.aBool')).toBe false
it 'reverts back to the default value when undefined is passed to set', ->
atom.config.set('foo.bar.aBool', 'false')
expect(atom.config.get('foo.bar.aBool')).toBe false
atom.config.set('foo.bar.aBool', undefined)
expect(atom.config.get('foo.bar.aBool')).toBe true
describe 'when the value has an "string" type', ->
beforeEach ->
schema =
type: 'string'
default: 'ok'
atom.config.setSchema('foo.bar.aString', schema)
it 'allows strings', ->
atom.config.set('foo.bar.aString', 'yep')
expect(atom.config.get('foo.bar.aString')).toBe 'yep'
it 'will only set strings', ->
expect(atom.config.set('foo.bar.aString', 123)).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', true)).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', null)).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', [])).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
expect(atom.config.set('foo.bar.aString', nope: 'nope')).toBe false
expect(atom.config.get('foo.bar.aString')).toBe 'ok'
describe 'when the value has an "object" type', ->
beforeEach ->
schema =
type: 'object'
properties:
anInt:
type: 'integer'
default: 12
nestedObject:
type: 'object'
properties:
nestedBool:
type: 'boolean'
default: false
atom.config.setSchema('foo.bar', schema)
it 'converts and validates all the children', ->
atom.config.set 'foo.bar',
anInt: '23'
nestedObject:
nestedBool: 'true'
expect(atom.config.get('foo.bar')).toEqual
anInt: 23
nestedObject:
nestedBool: true
it 'will set only the values that adhere to the schema', ->
expect(atom.config.set 'foo.bar',
anInt: 'nope'
nestedObject:
nestedBool: true
).toBe true
expect(atom.config.get('foo.bar.anInt')).toEqual 12
expect(atom.config.get('foo.bar.nestedObject.nestedBool')).toEqual true
describe 'when the value has an "array" type', ->
beforeEach ->
schema =
type: 'array'
default: [1, 2, 3]
items:
type: 'integer'
atom.config.setSchema('foo.bar', schema)
it 'converts an array of strings to an array of ints', ->
atom.config.set 'foo.bar', ['2', '3', '4']
expect(atom.config.get('foo.bar')).toEqual [2, 3, 4]
describe 'when the `enum` key is used', ->
beforeEach ->
schema =
type: 'object'
properties:
str:
type: 'string'
default: 'ok'
enum: ['ok', 'one', 'two']
int:
type: 'integer'
default: 2
enum: [2, 3, 5]
arr:
type: 'array'
default: ['one', 'two']
items:
type: 'string'
enum: ['one', 'two', 'three']
atom.config.setSchema('foo.bar', schema)
it 'will only set a string when the string is in the enum values', ->
expect(atom.config.set('foo.bar.str', 'nope')).toBe false
expect(atom.config.get('foo.bar.str')).toBe 'ok'
expect(atom.config.set('foo.bar.str', 'one')).toBe true
expect(atom.config.get('foo.bar.str')).toBe 'one'
it 'will only set an integer when the integer is in the enum values', ->
expect(atom.config.set('foo.bar.int', '400')).toBe false
expect(atom.config.get('foo.bar.int')).toBe 2
expect(atom.config.set('foo.bar.int', '3')).toBe true
expect(atom.config.get('foo.bar.int')).toBe 3
it 'will only set an array when the array values are in the enum values', ->
expect(atom.config.set('foo.bar.arr', ['one', 'five'])).toBe true
expect(atom.config.get('foo.bar.arr')).toEqual ['one']
expect(atom.config.set('foo.bar.arr', ['two', 'three'])).toBe true
expect(atom.config.get('foo.bar.arr')).toEqual ['two', 'three']
describe "when scoped settings are used", ->
beforeEach ->
schema =
type: 'string'
default: 'ok'
scopes:
'.source.js':
default: 'omg'
atom.config.setSchema('foo.bar.str', schema)
it 'it respects the scoped defaults', ->
expect(atom.config.get('foo.bar.str')).toBe 'ok'
expect(atom.config.get(['.source.js'], 'foo.bar.str')).toBe 'omg'
expect(atom.config.get(['.source.coffee'], 'foo.bar.str')).toBe 'ok'
describe "scoped settings", ->
describe ".get(scopeDescriptor, keyPath)", ->
it "returns the property with the most specific scope selector", ->
atom.config.addScopedSettings("config", ".source.coffee .string.quoted.double.coffee", foo: bar: baz: 42)
atom.config.addScopedSettings("config", ".source .string.quoted.double", foo: bar: baz: 22)
atom.config.addScopedSettings("config", ".source", foo: bar: baz: 11)
expect(atom.config.get([".source.coffee", ".string.quoted.double.coffee"], "foo.bar.baz")).toBe 42
expect(atom.config.get([".source.js", ".string.quoted.double.js"], "foo.bar.baz")).toBe 22
expect(atom.config.get([".source.js", ".variable.assignment.js"], "foo.bar.baz")).toBe 11
expect(atom.config.get([".text"], "foo.bar.baz")).toBeUndefined()
it "favors the most recently added properties in the event of a specificity tie", ->
atom.config.addScopedSettings("config", ".source.coffee .string.quoted.single", foo: bar: baz: 42)
atom.config.addScopedSettings("config", ".source.coffee .string.quoted.double", foo: bar: baz: 22)
expect(atom.config.get([".source.coffee", ".string.quoted.single"], "foo.bar.baz")).toBe 42
expect(atom.config.get([".source.coffee", ".string.quoted.single.double"], "foo.bar.baz")).toBe 22
describe 'when there are global defaults', ->
it 'falls back to the global when there is no scoped property specified', ->
atom.config.setDefaults("foo", hasDefault: 'ok')
expect(atom.config.get([".source.coffee", ".string.quoted.single"], "foo.hasDefault")).toBe 'ok'
describe 'setting priority', ->
describe 'when package settings are added after user settings', ->
it "returns the user's setting because the user's setting has higher priority", ->
atom.config.set(".source.coffee", "foo.bar.baz", 100)
atom.config.addScopedSettings("some-package", ".source.coffee", foo: bar: baz: 1)
expect(atom.config.get([".source.coffee"], "foo.bar.baz")).toBe 100
describe ".set(scope, keyPath, value)", ->
it "sets the value and overrides the others", ->
atom.config.addScopedSettings("config", ".source.coffee .string.quoted.double.coffee", foo: bar: baz: 42)
atom.config.addScopedSettings("config", ".source .string.quoted.double", foo: bar: baz: 22)
atom.config.addScopedSettings("config", ".source", foo: bar: baz: 11)
expect(atom.config.get([".source.coffee", ".string.quoted.double.coffee"], "foo.bar.baz")).toBe 42
expect(atom.config.set(".source.coffee .string.quoted.double.coffee", "foo.bar.baz", 100)).toBe true
expect(atom.config.get([".source.coffee", ".string.quoted.double.coffee"], "foo.bar.baz")).toBe 100
describe ".removeScopedSettingsForName(name)", ->
it "allows properties to be removed by name", ->
disposable1 = atom.config.addScopedSettings("a", ".source.coffee .string.quoted.double.coffee", foo: bar: baz: 42)
disposable2 = atom.config.addScopedSettings("b", ".source .string.quoted.double", foo: bar: baz: 22)
disposable2.dispose()
expect(atom.config.get([".source.js", ".string.quoted.double.js"], "foo.bar.baz")).toBeUndefined()
expect(atom.config.get([".source.coffee", ".string.quoted.double.coffee"], "foo.bar.baz")).toBe 42
describe ".observe(scopeDescriptor, keyPath)", ->
it 'calls the supplied callback when the value at the descriptor/keypath changes', ->
atom.config.observe [".source.coffee", ".string.quoted.double.coffee"], "foo.bar.baz", changeSpy = jasmine.createSpy()
expect(changeSpy).toHaveBeenCalledWith(undefined)
changeSpy.reset()
atom.config.set("foo.bar.baz", 12)
expect(changeSpy).toHaveBeenCalledWith(12)
changeSpy.reset()
disposable1 = atom.config.addScopedSettings("a", ".source .string.quoted.double", foo: bar: baz: 22)
expect(changeSpy).toHaveBeenCalledWith(22)
changeSpy.reset()
disposable2 = atom.config.addScopedSettings("b", ".source.coffee .string.quoted.double.coffee", foo: bar: baz: 42)
expect(changeSpy).toHaveBeenCalledWith(42)
changeSpy.reset()
disposable2.dispose()
expect(changeSpy).toHaveBeenCalledWith(22)
changeSpy.reset()
disposable1.dispose()
expect(changeSpy).toHaveBeenCalledWith(12)
changeSpy.reset()
atom.config.set("foo.bar.baz", undefined)
expect(changeSpy).toHaveBeenCalledWith(undefined)
changeSpy.reset()
describe ".onDidChange(scopeDescriptor, keyPath)", ->
it 'calls the supplied callback when the value at the descriptor/keypath changes', ->
keyPath = "foo.bar.baz"
atom.config.onDidChange [".source.coffee", ".string.quoted.double.coffee"], keyPath, changeSpy = jasmine.createSpy()
atom.config.set("foo.bar.baz", 12)
expect(changeSpy).toHaveBeenCalledWith({oldValue: undefined, newValue: 12, keyPath})
changeSpy.reset()
disposable1 = atom.config.addScopedSettings("a", ".source .string.quoted.double", foo: bar: baz: 22)
expect(changeSpy).toHaveBeenCalledWith({oldValue: 12, newValue: 22, keyPath})
changeSpy.reset()
disposable2 = atom.config.addScopedSettings("b", ".source.coffee .string.quoted.double.coffee", foo: bar: baz: 42)
expect(changeSpy).toHaveBeenCalledWith({oldValue: 22, newValue: 42, keyPath})
changeSpy.reset()
disposable2.dispose()
expect(changeSpy).toHaveBeenCalledWith({oldValue: 42, newValue: 22, keyPath})
changeSpy.reset()
disposable1.dispose()
expect(changeSpy).toHaveBeenCalledWith({oldValue: 22, newValue: 12, keyPath})
changeSpy.reset()
atom.config.set("foo.bar.baz", undefined)
expect(changeSpy).toHaveBeenCalledWith({oldValue: 12, newValue: undefined, keyPath})
changeSpy.reset()
+148 -149
Ver Arquivo
@@ -3,173 +3,172 @@
ContextMenuManager = require '../src/context-menu-manager'
describe "ContextMenuManager", ->
[contextMenu] = []
[contextMenu, parent, child, grandchild] = []
beforeEach ->
{resourcePath} = atom.getLoadSettings()
contextMenu = new ContextMenuManager({resourcePath})
describe "adding definitions", ->
it 'loads', ->
contextMenu.add 'file-path',
'.selector':
'label': 'command'
parent = document.createElement("div")
child = document.createElement("div")
grandchild = document.createElement("div")
parent.classList.add('parent')
child.classList.add('child')
grandchild.classList.add('grandchild')
child.appendChild(grandchild)
parent.appendChild(child)
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
describe "::add(itemsBySelector)", ->
it "can add top-level menu items that can be removed with the returned disposable", ->
disposable = contextMenu.add
'.parent': [{label: 'A', command: 'a'}]
'.child': [{label: 'B', command: 'b'}]
'.grandchild': [{label: 'C', command: 'c'}]
it 'does not add duplicate menu items', ->
contextMenu.add 'file-path',
'.selector':
'label': 'command'
expect(contextMenu.templateForElement(grandchild)).toEqual [
{label: 'C', command: 'c'}
{label: 'B', command: 'b'}
{label: 'A', command: 'a'}
]
contextMenu.add 'file-path',
'.selector':
'label': 'command'
disposable.dispose()
expect(contextMenu.templateForElement(grandchild)).toEqual []
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
expect(contextMenu.definitions['.selector'].length).toBe 1
it "can add submenu items to existing menus that can be removed with the returned disposable", ->
disposable1 = contextMenu.add
'.grandchild': [{label: 'A', submenu: [{label: 'B', command: 'b'}]}]
disposable2 = contextMenu.add
'.grandchild': [{label: 'A', submenu: [{label: 'C', command: 'c'}]}]
it 'allows multiple separators', ->
contextMenu.add 'file-path',
'.selector':
'separator1': '-'
'separator2': '-'
expect(contextMenu.definitions['.selector'].length).toBe 2
expect(contextMenu.definitions['.selector'][0].type).toEqual 'separator'
expect(contextMenu.definitions['.selector'][1].type).toEqual 'separator'
it 'allows duplicate commands with different labels', ->
contextMenu.add 'file-path',
'.selector':
'label': 'command'
contextMenu.add 'file-path',
'.selector':
'another label': 'command'
expect(contextMenu.definitions['.selector'][0].label).toEqual 'label'
expect(contextMenu.definitions['.selector'][0].command).toEqual 'command'
expect(contextMenu.definitions['.selector'][1].label).toEqual 'another label'
expect(contextMenu.definitions['.selector'][1].command).toEqual 'command'
it "loads submenus", ->
contextMenu.add 'file-path',
'.selector':
'parent':
'child-1': 'child-1:trigger'
'child-2': 'child-2:trigger'
'parent-2': 'parent-2:trigger'
expect(contextMenu.definitions['.selector'].length).toBe 2
expect(contextMenu.definitions['.selector'][0].label).toEqual 'parent'
expect(contextMenu.definitions['.selector'][0].submenu.length).toBe 2
expect(contextMenu.definitions['.selector'][0].submenu[0].label).toBe 'child-1'
expect(contextMenu.definitions['.selector'][0].submenu[0].command).toBe 'child-1:trigger'
expect(contextMenu.definitions['.selector'][0].submenu[1].label).toBe 'child-2'
expect(contextMenu.definitions['.selector'][0].submenu[1].command).toBe 'child-2:trigger'
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'
expect(contextMenu.templateForElement(grandchild)).toEqual [{
label: 'A',
submenu: [
{label: 'B', command: 'b'}
{label: 'C', command: 'c'}
]
}]
disposable2.dispose()
expect(contextMenu.templateForElement(grandchild)).toEqual [{
label: 'A',
submenu: [
{label: 'B', command: 'b'}
]
}]
disposable1.dispose()
expect(contextMenu.templateForElement(grandchild)).toEqual []
it "favors the most specific / recently added item in the case of a duplicate label", ->
grandchild.classList.add('foo')
disposable1 = contextMenu.add
'.grandchild': [{label: 'A', command: 'a'}]
disposable2 = contextMenu.add
'.grandchild.foo': [{label: 'A', command: 'b'}]
disposable3 = contextMenu.add
'.grandchild': [{label: 'A', command: 'c'}]
disposable4 = contextMenu.add
'.child': [{label: 'A', command: 'd'}]
expect(contextMenu.templateForElement(grandchild)).toEqual [{label: 'A', command: 'b'}]
disposable2.dispose()
expect(contextMenu.templateForElement(grandchild)).toEqual [{label: 'A', command: 'c'}]
disposable3.dispose()
expect(contextMenu.templateForElement(grandchild)).toEqual [{label: 'A', command: 'a'}]
disposable1.dispose()
expect(contextMenu.templateForElement(grandchild)).toEqual [{label: 'A', command: 'd'}]
it "allows multiple separators, but not adjacent to each other", ->
contextMenu.add
'.grandchild': [
{label: 'A', command: 'a'},
{type: 'separator'},
{type: 'separator'},
{label: 'B', command: 'b'},
{type: 'separator'},
{type: 'separator'},
{label: 'C', command: 'c'}
]
expect(contextMenu.templateForElement(grandchild)).toEqual [
{label: 'A', command: 'a'},
{type: 'separator'},
{label: 'B', command: 'b'},
{type: 'separator'},
{label: 'C', command: 'c'}
]
it "excludes items marked for display in devMode unless in dev mode", ->
disposable1 = contextMenu.add
'.grandchild': [{label: 'A', command: 'a', devMode: true}, {label: 'B', command: 'b', devMode: false}]
expect(contextMenu.templateForElement(grandchild)).toEqual [{label: 'B', command: 'b'}]
contextMenu.devMode = true
expect(contextMenu.templateForElement(grandchild)).toEqual [{label: 'A', command: 'a'}, {label: 'B', command: 'b'}]
it "allows items to be associated with `created` hooks which are invoked on template construction with the item and event", ->
createdEvent = null
item = {
label: 'A',
command: 'a',
created: (event) ->
@command = 'b'
createdEvent = event
}
contextMenu.devModeDefinitions =
'.parent': [
label: 'dev-label'
command: 'dev-command'
]
contextMenu.add('.grandchild': [item])
describe "on a single element", ->
[element] = []
dispatchedEvent = {target: grandchild}
expect(contextMenu.templateForEvent(dispatchedEvent)).toEqual [{label: 'A', command: 'b'}]
expect(item.command).toBe 'a' # doesn't modify original item template
expect(createdEvent).toBe dispatchedEvent
beforeEach ->
element = ($$ -> @div class: 'parent')[0]
it "allows items to be associated with `shouldDisplay` hooks which are invoked on construction to determine whether the item should be included", ->
shouldDisplayEvent = null
shouldDisplay = true
it "creates a menu with a single item", ->
menu = contextMenu.combinedMenuTemplateForElement(element)
item = {
label: 'A',
command: 'a',
shouldDisplay: (event) ->
@foo = 'bar'
shouldDisplayEvent = event
shouldDisplay
}
contextMenu.add('.grandchild': [item])
expect(menu[0].label).toEqual 'parent'
expect(menu[0].command).toEqual 'command-p'
expect(menu[1]).toBeUndefined()
dispatchedEvent = {target: grandchild}
expect(contextMenu.templateForEvent(dispatchedEvent)).toEqual [{label: 'A', command: 'a'}]
expect(item.foo).toBeUndefined() # doesn't modify original item template
expect(shouldDisplayEvent).toBe dispatchedEvent
describe "in devMode", ->
beforeEach -> contextMenu.devMode = true
shouldDisplay = false
expect(contextMenu.templateForEvent(dispatchedEvent)).toEqual []
it "creates a menu with development items", ->
menu = contextMenu.combinedMenuTemplateForElement(element)
it "allows items to be specified in the legacy format for now", ->
contextMenu.add '.parent':
'A': 'a'
'Separator 1': '-'
'B':
'C': 'c'
'Separator 2': '-'
'D': 'd'
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: ->
expect(contextMenu.templateForElement(parent)).toEqual [
{label: 'A', command: 'a'}
{type: 'separator'}
{
label: 'B'
submenu: [
{label: 'C', command: 'c'}
{type: 'separator'}
{label: 'D', command: 'd'}
]
}
]
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
+31 -20
Ver Arquivo
@@ -1,33 +1,44 @@
DeserializerManager = require '../src/deserializer-manager'
describe ".deserialize(state)", ->
deserializer = null
describe "DeserializerManager", ->
manager = null
class Foo
@deserialize: ({name}) -> new Foo(name)
constructor: (@name) ->
beforeEach ->
deserializer = new DeserializerManager()
deserializer.add(Foo)
manager = new DeserializerManager
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 "::add(deserializer)", ->
it "returns a disposable that can be used to remove the manager", ->
disposable = manager.add(Foo)
expect(manager.deserialize({deserializer: 'Foo', name: 'Bar'})).toBeDefined()
disposable.dispose()
spyOn(console, 'warn')
expect(manager.deserialize({deserializer: 'Foo', name: 'Bar'})).toBeUndefined()
describe "when the deserializer has a version", ->
describe "::deserialize(state)", ->
beforeEach ->
Foo.version = 2
manager.add(Foo)
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'
it "calls deserialize on the manager for the given state object, or returns undefined if one can't be found", ->
spyOn(console, 'warn')
object = manager.deserialize({deserializer: 'Foo', name: 'Bar'})
expect(object.name).toBe 'Bar'
expect(manager.deserialize({deserializer: 'Bogus'})).toBeUndefined()
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()
describe "when the manager has a version", ->
beforeEach ->
Foo.version = 2
describe "when the deserialized state has a matching version", ->
it "attempts to deserialize the state", ->
object = manager.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(manager.deserialize({deserializer: 'Foo', version: 3, name: 'Bar'})).toBeUndefined()
expect(manager.deserialize({deserializer: 'Foo', version: 1, name: 'Bar'})).toBeUndefined()
expect(manager.deserialize({deserializer: 'Foo', name: 'Bar'})).toBeUndefined()
+36 -4
Ver Arquivo
@@ -56,6 +56,11 @@ describe "DisplayBuffer", ->
buffer.delete([[8, 0], [10, 0]])
expect(displayBuffer.getScrollTop()).toBe 60
it "updates the display buffer prior to invoking change handlers registered on the buffer", ->
buffer.onDidChange -> expect(displayBuffer2.tokenizedLineForScreenRow(0).text).toBe "testing"
displayBuffer2 = new DisplayBuffer({buffer, tabLength})
buffer.setText("testing")
describe "soft wrapping", ->
beforeEach ->
displayBuffer.setSoftWrapped(true)
@@ -1011,7 +1016,7 @@ describe "DisplayBuffer", ->
buffer.getMarker(marker2.id).destroy()
expect(destroyedHandler).toHaveBeenCalled()
describe "DisplayBufferMarker::copy(attributes)", ->
describe "Marker::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)
@@ -1020,10 +1025,10 @@ describe "DisplayBuffer", ->
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
expect(marker1.getProperties()).toEqual a: 1, b: 2
expect(marker2.getProperties()).toEqual a: 1, b: 3
describe "DisplayBufferMarker::getPixelRange()", ->
describe "Marker::getPixelRange()", ->
it "returns the start and end positions of the marker based on the line height and character widths assigned to the DisplayBuffer", ->
marker = displayBuffer.markScreenRange([[5, 10], [6, 4]])
@@ -1100,6 +1105,33 @@ describe "DisplayBuffer", ->
expect(displayBuffer.setScrollTop(maxScrollTop + 50)).toBe maxScrollTop
expect(displayBuffer.getScrollTop()).toBe maxScrollTop
describe "editor.scrollPastEnd", ->
describe "when editor.scrollPastEnd is false", ->
beforeEach ->
atom.config.set("editor.scrollPastEnd", false)
displayBuffer.manageScrollPosition = true
displayBuffer.setLineHeightInPixels(10)
it "does not add the height of the view to the scroll height", ->
lineHeight = displayBuffer.getLineHeightInPixels()
originalScrollHeight = displayBuffer.getScrollHeight()
displayBuffer.setHeight(50)
expect(displayBuffer.getScrollHeight()).toBe originalScrollHeight
describe "when editor.scrollPastEnd is true", ->
beforeEach ->
atom.config.set("editor.scrollPastEnd", true)
displayBuffer.manageScrollPosition = true
displayBuffer.setLineHeightInPixels(10)
it "adds the height of the view to the scroll height", ->
lineHeight = displayBuffer.getLineHeightInPixels()
originalScrollHeight = displayBuffer.getScrollHeight()
displayBuffer.setHeight(50)
expect(displayBuffer.getScrollHeight()).toEqual(originalScrollHeight + displayBuffer.height - (lineHeight * 3))
describe "::setScrollLeft", ->
beforeEach ->
displayBuffer.manageScrollPosition = true
+2
Ver Arquivo
@@ -0,0 +1,2 @@
<div class="one">text</div>
<span class="two">text</span>
+4
Ver Arquivo
@@ -0,0 +1,4 @@
<template bind="{{}}">
<div class="test-message">{{message}}</div>
<div class="test-number">{{number * 2}}</div>
</template>
+3
Ver Arquivo
@@ -0,0 +1,3 @@
{
"foo": "bar"
}
@@ -0,0 +1,4 @@
module.exports =
activate: ->
deactivate: -> throw new Error('Top that')
serialize: ->
@@ -0,0 +1,13 @@
module.exports =
activateCallCount: 0
activationCommandCallCount: 0
legacyActivationCommandCallCount: 0
activate: ->
@activateCallCount++
atom.commands.add 'atom-workspace', 'activation-command', =>
@activationCommandCallCount++
atom.workspaceView.getActiveView()?.command 'activation-command', =>
@legacyActivationCommandCallCount++
@@ -0,0 +1,2 @@
'activationCommands':
'.workspace': 'activation-command'
@@ -1,13 +0,0 @@
class Foo
atom.deserializers.add(this)
@deserialize: ({data}) -> new Foo(data)
constructor: (@data) ->
module.exports =
activateCallCount: 0
activationEventCallCount: 0
activate: ->
@activateCallCount++
atom.workspaceView.getActiveView()?.command 'activation-event', =>
@activationEventCallCount++
@@ -1 +0,0 @@
'activationEvents': ['activation-event']
@@ -0,0 +1,13 @@
module.exports =
config:
numbers:
type: 'object'
properties:
one:
type: 'integer'
default: 1
two:
type: 'integer'
default: 2
activate: -> # no-op
@@ -1,5 +1,5 @@
{
"name": "no events",
"version": "0.1.0",
"activationEvents": []
"activationCommands": {"atom-workspace": []}
}
+4 -3
Ver Arquivo
@@ -1,7 +1,8 @@
'menu': [
{ 'label': 'Second to Last' }
{'label': 'Second to Last'}
]
'context-menu':
'.test-1':
'Menu item 1': 'command-1'
'.test-1': [
{label: 'Menu item 1', command: 'command-1'}
]
+3 -2
Ver Arquivo
@@ -3,5 +3,6 @@
]
'context-menu':
'.test-1':
'Menu item 2': 'command-2'
'.test-1': [
{label: 'Menu item 2', command: 'command-2'}
]
+3 -2
Ver Arquivo
@@ -3,5 +3,6 @@
]
'context-menu':
'.test-1':
'Menu item 3': 'command-3'
'.test-1': [
{label: 'Menu item 3', command: 'command-3'}
]
@@ -1,6 +1,6 @@
@import "ui-variables";
.editor {
atom-text-editor {
padding-top: @component-padding;
padding-right: @component-padding;
padding-bottom: @component-padding;
+1 -1
Ver Arquivo
@@ -1,3 +1,3 @@
.editor {
atom-text-editor {
padding-top: 1234px;
}
+1 -1
Ver Arquivo
@@ -1,5 +1,5 @@
@padding: 4321px;
.editor {
atom-text-editor {
padding-top: @padding;
}
@@ -1,4 +1,4 @@
.editor {
atom-text-editor {
padding-top: 101px;
padding-right: 101px;
padding-bottom: 101px;
@@ -1,4 +1,4 @@
.editor {
atom-text-editor {
/* padding-top: 103px;
padding-right: 103px;*/
padding-bottom: 103px;
@@ -1,6 +1,6 @@
@number: 102px;
.editor {
atom-text-editor {
/* padding-top: 102px;*/
padding-right: @number;
padding-bottom: @number;
@@ -0,0 +1,4 @@
{
"theme": "syntax",
"stylesheets": ["editor.less"]
}

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