Comparar commits

...

117 Commits

Autor SHA1 Mensagem Data
Nathan Sobo c8b92526ec Group editor.increase/decreaseIndentPattern settings under editor.indent
Since these settings are paired, we don’t want to retrieve settings
from two different scopes for a given usage. This also emits a
deprecation warning when the old settings are used.
2014-12-11 10:49:20 -07:00
Nathan Sobo 92a9c7aef6 Move editor.commentStart/End properties to editor.comment.start/end
And emit a deprecation warning
2014-12-11 10:36:47 -07:00
Nathan Sobo d51a86e804 ⬆️ markdown-preview for deprecation fixes 2014-12-11 09:03:31 -07:00
Ben Ogle 278a507653 Merge pull request #4531 from atom/bo-buffered-process-error
Better BufferedProcess error handling
2014-12-10 18:17:09 -08:00
Nathan Sobo 7422f4378e Add property filters to TextEditor::getDecorations methods
This makes it much easier to write tests that inspect the state of
decorations.
2014-12-10 19:11:50 -07:00
Ben Ogle f2ab14656b BufferedProcess::onDidThrowError -> ::onDidThrowError 2014-12-10 18:08:43 -08:00
Ben Ogle 453abf8b90 Update solarized-dark-syntax to fix ruby 2014-12-10 17:54:01 -08:00
Ben Ogle 7866f0819d Upgrade keybinding-resolver to fix the inability to unhide 2014-12-10 17:53:40 -08:00
Kevin Sawicki 921e3c581d ⬆️ keybinding-resolver@0.22 2014-12-10 17:29:17 -08:00
Max Brunsfeld 58aa87438d ⬆️ snippets@0.58.0
For deprecation fixes
2014-12-10 16:45:14 -08:00
Ben Ogle ad73902382 📝 Add docs 2014-12-10 16:27:05 -08:00
Ben Ogle bf63a9715c Add BufferedProcess::onDidThrowError() 2014-12-10 16:26:57 -08:00
Kevin Sawicki 06c52c6873 ⬆️ language-javascript@0.48 2014-12-10 16:21:33 -08:00
Kevin Sawicki 9ac27bc2f8 Grim.logDeprecationWarnings -> Grim.logDeprecations
Closes #4486
2014-12-10 16:05:36 -08:00
Ben Ogle 98caaf0d70 :up_arrow: fuzzy-finder@0.62.0 2014-12-10 15:30:29 -08:00
Ben Ogle a102d1e134 Upgrade styleguide to fix build 2014-12-10 15:14:36 -08:00
Ben Ogle 6caa86fb04 Upgrade styleguide to include colors 2014-12-10 14:54:12 -08:00
Max Brunsfeld b1e0c8132d ⬆️ tree-view@0.137.0 2014-12-10 14:39:05 -08:00
Kevin Sawicki f3947dd6e0 ⬆️ find-and-replace@0.152 2014-12-10 14:06:18 -08:00
Kevin Sawicki 27dbbabe09 Prepare 0.157 2014-12-10 13:34:06 -08:00
Max Brunsfeld 5950110860 ⬆️ status-bar@0.53.0
For new panel-like API
2014-12-10 12:31:46 -08:00
Kevin Sawicki ab5d71e6b5 ⬆️ encoding-selector@0.10 2014-12-10 12:25:43 -08:00
Kevin Sawicki 1ee2839245 📝 Mention config files 2014-12-10 09:22:51 -08:00
Max Brunsfeld a6f31ed791 Pass event to Cursor::onDidChangePosition callbacks 2014-12-09 17:21:03 -08:00
Max Brunsfeld e04b5a74d7 Fix position in Cursor::moveToBeginningOfPreviousParagraph
Also, remove unused parameters to private Cursor methods
2014-12-09 16:59:50 -08:00
Kevin Sawicki 4acf143f45 📝 Mention cuninst is not destructive 2014-12-09 16:50:28 -08:00
Kevin Sawicki 5ad5ce0841 📝 add or above 2014-12-09 16:40:53 -08:00
Kevin Sawicki 31d1ca12c1 📝 Add chocolatey uninstall doc 2014-12-09 16:37:54 -08:00
Kevin Sawicki ace3325db8 Remove chocolatey doc 2014-12-09 16:34:35 -08:00
Kevin Sawicki b718114fc4 📝 Tweak installer wording 2014-12-09 16:34:16 -08:00
Kevin Sawicki 1df8c77f41 Merge pull request #4322 from tsunamistate/upgrade-readme-windows
Upgrade Windows README
2014-12-09 16:31:56 -08:00
Kevin Sawicki 26e867d65e Remove squirrel logging 2014-12-09 16:02:36 -08:00
Nathan Sobo 2688761c29 ⬆️ keybinding-resolver for deprecation fixes 2014-12-09 16:38:51 -07:00
Nathan Sobo b64d9db198 ⬆️ image-view for deprecation fixes 2014-12-09 16:38:51 -07:00
Max Brunsfeld bc5b786bb2 ⬆️ styleguide@0.32.0
To fix build; avoid using devDependencies
2014-12-09 15:15:43 -08:00
Max Brunsfeld 13025c17f1 ⬆️ styleguide@0.31.0
For deprecation fixes
2014-12-09 14:59:40 -08:00
Max Brunsfeld 8b4b5230ab ⬆️ wrap-guide@0.26.0
For deprecation fixes
2014-12-09 14:57:15 -08:00
Kevin Sawicki 7d6d634ceb Prepare 0.156 2014-12-09 14:07:45 -08:00
Nathan Sobo b386b00bc0 Wait for next animation frame before measuring when stylesheets change
Fixes #4479
2014-12-09 14:56:33 -07:00
Kevin Sawicki 2028045254 ⬆️ incompatible-packages@0.15 2014-12-09 13:42:09 -08:00
Kevin Sawicki ca60dae630 ⬆️ incompatible-packages@0.14 2014-12-09 13:27:49 -08:00
Kevin Sawicki a5605bd408 ⬆️ incompatible-packages@0.13 2014-12-09 13:14:28 -08:00
Max Brunsfeld caf6fdd5ac Merge pull request #4478 from atom/mb-panel-markup
Allow PanelElements to be instantiated with markup
2014-12-09 13:05:35 -08:00
Kevin Sawicki 19872959bc ⬆️ incompatible-packages@0.12 2014-12-09 13:04:37 -08:00
Nathan Sobo 299ea18c58 Don’t try to upgrade CSS rules with no selector text
Fixes #4469
2014-12-09 13:41:33 -07:00
Nathan Sobo 966360e022 Set ::visible to false on panels when they are destroyed 2014-12-09 13:41:33 -07:00
Kevin Sawicki 70a2be849a ⬆️ symbols-view@0.70 2014-12-09 12:04:41 -08:00
Max Brunsfeld 1c7843d9b2 💄 2014-12-09 11:36:04 -08:00
Kevin Sawicki 5291f1c62c ⬆️ symbols-view@0.69 2014-12-09 11:32:47 -08:00
Max Brunsfeld c9e7cfc02c Allow PanelElements to be instantiated with markup 2014-12-09 11:24:59 -08:00
Ben Ogle e93ca3c901 Upgrade notifications to open issues on throwing repo 2014-12-09 11:19:34 -08:00
Kevin Sawicki 48bd330a5e ⬆️ encoding-selector@0.9 2014-12-09 11:17:57 -08:00
Nathan Sobo 6240bc1fc9 ⬆️ fuzzy-finder to fix deprecations 2014-12-09 11:24:35 -07:00
Nathan Sobo 6ccc60342f Remove deprecated Workspace::activePane references 2014-12-09 10:45:54 -07:00
Ben Ogle 03750d0b6c Upgrade notifications to fix activation time 2014-12-08 18:25:27 -08:00
Max Brunsfeld 03e31ad918 Merge pull request #4457 from atom/mb-text-editor-element-methods
Add `TextEditorElement` methods needed to replace deprecated APIs
2014-12-08 17:43:11 -08:00
Kevin Sawicki 610c07870a Prepare 0.155 2014-12-08 17:42:27 -08:00
Max Brunsfeld 5c37d208f5 Don't throw when ::getDefaultCharacterWidth is called while detached 2014-12-08 16:56:46 -08:00
Ben Ogle 88c119f4ad Upgrade find and replace for fixes 2014-12-08 16:54:30 -08:00
Max Brunsfeld d03cfda6c4 📝 new TextEditorElement methods 2014-12-08 16:38:57 -08:00
Max Brunsfeld 8f02b21d08 Add TextEditorElement::onDidAttach, ::onDidDetach 2014-12-08 16:21:59 -08:00
Max Brunsfeld 953f2c61f7 Add TextEditorElement::getDefaultCharacterWidth 2014-12-08 16:14:26 -08:00
Kevin Sawicki 15e95d0d21 ⬆️ apm@0.113 2014-12-08 16:10:50 -08:00
Ben Ogle 391a71fed0 Upgrade notifications to fix several things
* add stack trace toggle
* allow selection and copy / paste
* fix the escaping on the issue template
2014-12-08 15:08:51 -08:00
Kevin Sawicki 67ed490618 ⬆️ grunt-atom-shell-installer@0.13 2014-12-08 14:32:59 -08:00
Max Brunsfeld c812dfef9b Merge pull request #4455 from atom/mb-fix-redo
Don't use a transaction in cursor/selection movement commands
2014-12-08 13:23:19 -08:00
Max Brunsfeld 631bca6c89 Don't use a transaction in cursor/selection movement commands
Previously, a transaction was used to set an undo grouping interval
for every editor command except `undo` and `redo`. The problem is
that currently, moving a marker inside of a transaction causes the
buffer's redo stack to be cleared. For now, just don't use
transactions for commands that don't modify the buffer's contents."
2014-12-08 13:06:59 -08:00
Kevin Sawicki 095c1b74a7 ⬆️ status-bar@0.52 2014-12-08 12:50:15 -08:00
Kevin Sawicki 7e408ad268 ⬆️ status-bar@0.51 2014-12-08 12:45:09 -08:00
Kevin Sawicki 4945fd7aae Don't make atom.services public yet 2014-12-08 12:37:06 -08:00
Kevin Sawicki 0db5549b64 Merge pull request #4454 from andreicristianpetcu/master
use nodejs v0.10.33 and python 2.7.6
2014-12-08 12:17:06 -08:00
Andrei Cristian Petcu 96095f9c30 use nodejs v0.10.33 and python 2.7.6 2014-12-08 21:40:31 +02:00
Kevin Sawicki e2b4fcad65 ⬆️ markdown-preview@0.111 2014-12-08 11:23:38 -08:00
Nathan Sobo 3ea1c80fe7 :arrow-up: bracket-matcher to fix deprecations 2014-12-08 11:43:07 -07:00
Nathan Sobo 525b4ac3eb ⬆️ background-tips to fix deprecations 2014-12-08 11:37:19 -07:00
Nathan Sobo 6ffc750e18 :arrow-up: autocomplete for deprecation fixes 2014-12-08 11:34:35 -07:00
Nathan Sobo 66716db4d1 ⬆️ autosave for deprecation fixes 2014-12-08 11:30:52 -07:00
Nathan Sobo 95d03fc5fa ⬆️ autoflow for deprecation fixes 2014-12-08 11:30:52 -07:00
Kevin Sawicki b816fca75e ⬆️ language-c@0.33 2014-12-08 10:26:51 -08:00
Kevin Sawicki 6f148f681d ⬆️ language-yaml@0.21 2014-12-08 10:14:23 -08:00
Max Brunsfeld a489358f55 ⬆️ tree-view@0.136.0
For deprecation fixes
2014-12-08 10:06:11 -08:00
Kevin Sawicki 1cd0caeb2d ⬆️ language-less@0.21 2014-12-08 09:54:06 -08:00
Kevin Sawicki 310939338c ⬆️ language-sass@0.28 2014-12-08 09:52:49 -08:00
Kevin Sawicki e39d50972d ⬆️ language-python@0.26 2014-12-08 09:50:13 -08:00
Kevin Sawicki 9a5f3ab000 Merge pull request #4430 from steelbrain/patch-1
Updated README.md
2014-12-08 09:43:53 -08:00
Max Brunsfeld 9285f2605f ⬆️ update-package-dependencies@0.7.0
For deprecation fixes
2014-12-08 09:40:12 -08:00
Steel Brain b654209adb Updated README.md 2014-12-07 07:30:18 +05:00
Steel Brain 0c07166a8e Updated README.md
Fixes atom/atom#4427
2014-12-07 06:51:32 +05:00
Kevin Sawicki de36ceb00c Merge pull request #4337 from pwagland/master
Fix atom.sh when running from directory with space
2014-12-05 15:04:03 -08:00
Kevin Sawicki aa292874ec Add reload button to specs window 2014-12-05 15:03:16 -08:00
Ben Ogle 736b6f37e4 Upgrade notifications to make the max height larger 2014-12-05 15:01:19 -08:00
Ben Ogle 8d9098464c Merge pull request #4413 from atom/bo-notification-dismiss
Add dismissing to notifications
2014-12-05 15:00:00 -08:00
Paul Wagland eb6ce74a12 Use xargs -0 instead of sed, as this is easier to understand.
Fixed atom/atom#4337
Fixes atom/atom#4336
2014-12-05 23:53:07 +01:00
Ben Ogle 33ee1cb0de Upgrade notifications to use new APIs 2014-12-05 14:29:00 -08:00
Max Brunsfeld 11a07f41ac Merge pull request #4414 from atom/mb-convert-stack-trace
Fix line numbers in coffeescript stack traces for error hooks
2014-12-05 14:06:22 -08:00
Ben Ogle 5cf97db07c Add getNotifications() 2014-12-05 13:46:01 -08:00
Ben Ogle f095d38978 Add dismissing to notifications 2014-12-05 13:46:01 -08:00
Kevin Sawicki 218f6ab629 Guard against no stylesheet disposable 2014-12-05 13:32:37 -08:00
Ben Ogle 26edd40f14 Upgrade notifications to not show in dev mode 2014-12-05 13:15:53 -08:00
Max Brunsfeld 8241351143 Merge pull request #4407 from atom/ns-add-services-api
Add atom.services API
2014-12-05 13:13:50 -08:00
Max Brunsfeld 286361bf2b Fix line numbers in coffeescript stack traces for error hooks 2014-12-05 12:59:19 -08:00
Kevin Sawicki 3d5437c1e9 Merge pull request #4393 from envygeeks/patch-1
Move Debian alternatives entry up.
2014-12-05 10:47:11 -08:00
Ben Ogle 95b9140dcf Merge pull request #4405 from ryanpcmcquen/patch-1
🐧 add Slackware install method
2014-12-05 10:38:42 -08:00
Kevin Sawicki fc82e5ffd6 ⬆️ find-and-replace@0.150 2014-12-05 10:00:49 -08:00
Kevin Sawicki 20521ad487 ⬆️ git-diff@0.45 2014-12-05 09:48:49 -08:00
Nathan Sobo 99f91fac48 Add atom.services API 2014-12-05 09:46:52 -08:00
Nathan Sobo d4b0b33d86 📝 ability to pass DOM elements to atom.commands.add 2014-12-05 09:44:52 -08:00
Max Brunsfeld 790c125e0b Merge pull request #4406 from atom/mb-editor-text-content
Allow setting editor text content in HTML
2014-12-05 09:44:29 -08:00
Max Brunsfeld 4afe133f85 Allow setting editor text content in HTML 2014-12-05 09:30:33 -08:00
Kevin Sawicki 763e83584d ⬆️ language-python@0.25 2014-12-05 09:29:30 -08:00
Kevin Sawicki 62a671aae6 ⬆️ language-less@0.20 2014-12-05 09:28:29 -08:00
Kevin Sawicki c0eb5d0ebe Prepare 0.154 2014-12-05 09:02:44 -08:00
Ryan P.C. McQuen 396b53b8dc add Slackware install method 2014-12-05 06:34:57 -08:00
Jordon Bedwell 8ad8a61aab Move Debian alternatives entry up.
Move the Debian alternatives entry up so it's below and grouped with
"no such file or directory" since it's an alternate solution to symlinking.
2014-12-04 02:49:05 -06:00
Paul Wagland 5da4846fff Fix atom.sh when running from directory with space
Deal with ATOM_PATH having a space by proper quoting, and not passing
the directory name to dirname.

Fixes atom/atom#4336
2014-11-28 00:37:21 +01:00
Aleksandr Kalko 67f4d51774 Fixed link error 2014-11-26 09:44:50 +02:00
Aleksandr Kalko 1bf4db15b2 Updated README WIndows installing section, added Choclatey installation file 2014-11-26 09:42:32 +02:00
43 arquivos alterados com 614 adições e 167 exclusões
+1 -1
Ver Arquivo
@@ -1 +1 @@
v0.10.21
v0.10.33
+1
Ver Arquivo
@@ -0,0 +1 @@
2.7.6
+18 -9
Ver Arquivo
@@ -2,7 +2,7 @@
Atom is a hackable text editor for the 21st century, built on [atom-shell](http://github.com/atom/atom-shell), and based on everything we love about our favorite editors. We designed it to be deeply customizable, but still approachable using the default configuration.
Visit [atom.io](https://atom.io) to learn more.
Visit [atom.io](https://atom.io) to learn more or visit the [Atom forum](https://discuss.atom.io).
Visit [issue #3684](https://github.com/atom/atom/issues/3684) to learn more
about the Atom 1.0 roadmap.
@@ -17,16 +17,25 @@ Atom will automatically update when a new release is available.
### Windows
Install the [Atom chocolatey package](https://chocolatey.org/packages/Atom).
Download the latest [AtomSetup.exe installer](https://github.com/atom/atom/releases/latest).
1. Install [chocolatey](https://chocolatey.org).
2. Close and reopen your command prompt or PowerShell window.
3. Run `cinst Atom`
4. In the future run `cup Atom` to upgrade to the latest release.
Atom will automatically update when a new release is available.
You can also download a `.zip` file from the [releases page](https://github.com/atom/atom/releases/latest).
The Windows version does not currently automatically update so you will need to
manually upgrade to future releases by re-downloading the `.zip` file.
You can also download an `atom-windows.zip` file from the [releases page](https://github.com/atom/atom/releases/latest).
The `.zip` version will not automatically update.
#### Uninstalling Chocolatey Version
The recommended installation of Atom on Windows used to be using [Chocolatey](https://chocolatey.org/packages/Atom/).
This is no longer recommended now that the Atom Windows installer & auto-updater
exists.
To switch from Chocolatey to the new installer:
* Upgrade to Atom 0.155 or above by running `cup Atom`
* Run `cuninst Atom` to uninstall the Chocolatey version of Atom
* This will not delete any of your installed packages or Atom config files.
* Download the latest [AtomSetup.exe installer](https://github.com/atom/atom/releases/latest).
* Double-click the downloaded file to install Atom
### Debian Linux (Ubuntu)
+1 -1
Ver Arquivo
@@ -6,6 +6,6 @@
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"atom-package-manager": "0.111.1"
"atom-package-manager": "0.113.0"
}
}
+2 -2
Ver Arquivo
@@ -45,12 +45,12 @@ if [ $REDIRECT_STDERR ]; then
fi
if [ $OS == 'Mac' ]; then
ATOM_PATH=${ATOM_PATH:-/Applications} # Set ATOM_PATH unless it is already set
ATOM_PATH="${ATOM_PATH:-/Applications}" # Set ATOM_PATH unless it is already set
ATOM_APP_NAME=Atom.app
# 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'" | grep -v ShipIt | head -1 | xargs dirname)
ATOM_PATH="$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | grep -v ShipIt | head -1 | xargs -0 dirname)"
fi
# Exit if Atom can't be found
+1 -1
Ver Arquivo
@@ -12,7 +12,7 @@
"fs-plus": "2.x",
"github-releases": "~0.2.0",
"grunt": "~0.4.1",
"grunt-atom-shell-installer": "^0.12.0",
"grunt-atom-shell-installer": "^0.13.0",
"grunt-cli": "~0.1.9",
"grunt-coffeelint": "git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe",
"grunt-contrib-coffee": "~0.9.0",
+13 -9
Ver Arquivo
@@ -29,6 +29,10 @@ Ubuntu LTS 12.04 64-bit is the recommended platform.
* `sudo pacman -S base-devel git nodejs libgnome-keyring python2`
* `export PYTHON=/usr/bin/python2` before building Atom.
### Slackware
* `sbopkg -k -i node -i atom`
## Instructions
If you have problems with permissions don't forget to prefix with `sudo`
@@ -121,6 +125,15 @@ 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.
#### You can also use Alternatives
On some variants (mostly Debian based distros) it's preferable for you to use
Alternatives so that changes to the binary paths can be fixed or altered easily:
```sh
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 1 --slave /usr/bin/js js /usr/bin/nodejs
```
### AttributeError: 'module' object has no attribute 'script_main'
If you get following error with a big traceback while building Atom:
@@ -137,15 +150,6 @@ On Fedora you would do the following:
sudo yum remove gyp
```
#### You can also use Alternatives
On some variants (mostly Debian based distros) it's preferable for you to use
Alternatives so that changes to the binary paths can be fixed or altered easily:
```sh
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 1 --slave /usr/bin/js js /usr/bin/nodejs
```
### Linux build error reports in atom/atom
* Use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Alinux&type=Issues)
to get a list of reports about build errors on Linux.
+30 -29
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "atom",
"productName": "Atom",
"version": "0.153.0",
"version": "0.157.0",
"description": "A hackable text editor for the 21st Century.",
"main": "./src/browser/main.js",
"repository": {
@@ -58,6 +58,7 @@
"season": "^1.0.2",
"semver": "2.2.1",
"serializable": "^1",
"service-hub": "^0.1.0",
"space-pen": "3.8.2",
"temp": "0.7.0",
"text-buffer": "^3.8.2",
@@ -72,49 +73,49 @@
"atom-light-ui": "0.36.0",
"base16-tomorrow-dark-theme": "0.22.0",
"base16-tomorrow-light-theme": "0.5.0",
"solarized-dark-syntax": "0.25.0",
"solarized-dark-syntax": "0.26.0",
"solarized-light-syntax": "0.13.0",
"archive-view": "0.40.0",
"autocomplete": "0.33.1",
"autoflow": "0.18.0",
"autosave": "0.18.0",
"background-tips": "0.17.0",
"autocomplete": "0.34.0",
"autoflow": "0.19.0",
"autosave": "0.19.0",
"background-tips": "0.18.0",
"bookmarks": "0.31.0",
"bracket-matcher": "0.63.0",
"bracket-matcher": "0.64.0",
"command-palette": "0.30.0",
"deprecation-cop": "0.18.0",
"dev-live-reload": "0.35.0",
"encoding-selector": "0.8.0",
"encoding-selector": "0.10.0",
"exception-reporting": "0.21.0",
"find-and-replace": "0.149.0",
"fuzzy-finder": "0.60.0",
"git-diff": "0.44.0",
"find-and-replace": "0.152.0",
"fuzzy-finder": "0.62.0",
"git-diff": "0.45.0",
"go-to-line": "0.27.0",
"grammar-selector": "0.37.0",
"image-view": "0.42.0",
"incompatible-packages": "0.10.0",
"keybinding-resolver": "0.20.0",
"image-view": "0.43.0",
"incompatible-packages": "0.15.0",
"keybinding-resolver": "0.23.0",
"link": "0.28.0",
"markdown-preview": "0.110.0",
"markdown-preview": "0.112.0",
"metrics": "0.39.0",
"notifications": "0.6.0",
"notifications": "0.13.0",
"open-on-github": "0.31.0",
"package-generator": "0.33.0",
"release-notes": "0.36.0",
"settings-view": "0.161.0",
"snippets": "0.57.0",
"snippets": "0.58.0",
"spell-check": "0.44.0",
"status-bar": "0.50.0",
"styleguide": "0.30.0",
"symbols-view": "0.68.0",
"status-bar": "0.53.0",
"styleguide": "0.34.0",
"symbols-view": "0.70.0",
"tabs": "0.57.0",
"timecop": "0.24.0",
"tree-view": "0.135.0",
"update-package-dependencies": "0.6.0",
"tree-view": "0.137.0",
"update-package-dependencies": "0.7.0",
"welcome": "0.21.0",
"whitespace": "0.27.0",
"wrap-guide": "0.24.0",
"language-c": "0.32.0",
"wrap-guide": "0.26.0",
"language-c": "0.33.0",
"language-clojure": "0.9.0",
"language-coffee-script": "0.38.1",
"language-css": "0.23.1",
@@ -124,19 +125,19 @@
"language-html": "0.26.1",
"language-hyperlink": "0.12.2",
"language-java": "0.13.0",
"language-javascript": "0.47.0",
"language-javascript": "0.48.0",
"language-json": "0.10.0",
"language-less": "0.19.0",
"language-less": "0.21.0",
"language-make": "0.12.0",
"language-mustache": "0.11.0",
"language-objective-c": "0.12.0",
"language-perl": "0.9.0",
"language-php": "0.18.0",
"language-property-list": "0.7.0",
"language-python": "0.24.1",
"language-python": "0.26.0",
"language-ruby": "0.44.0",
"language-ruby-on-rails": "0.18.0",
"language-sass": "0.27.0",
"language-sass": "0.28.0",
"language-shellscript": "0.10.1",
"language-source": "0.8.0",
"language-sql": "0.11.0",
@@ -144,7 +145,7 @@
"language-todo": "0.14.0",
"language-toml": "0.14.1",
"language-xml": "0.25.0",
"language-yaml": "0.20.1"
"language-yaml": "0.21.0"
},
"private": true,
"scripts": {
+4 -1
Ver Arquivo
@@ -38,7 +38,8 @@ module.exports =
class AtomReporter extends View
@content: ->
@div class: 'spec-reporter', =>
@div outlet: "suites"
@div class: 'padded pull-right', =>
@button outlet: 'reloadButton', class: 'btn btn-small reload-button', 'Reload Specs'
@div outlet: 'coreArea', class: 'symbol-area', =>
@div outlet: 'coreHeader', class: 'symbol-header'
@ul outlet: 'coreSummary', class: 'symbol-summary list-unstyled'
@@ -80,6 +81,8 @@ class AtomReporter extends View
@on 'click', '.stack-trace', ->
$(this).toggleClass('expanded')
@reloadButton.on 'click', -> require('ipc').send('call-window-method', 'restart')
reportRunnerResults: (runner) ->
@updateSpecCounts()
@status.addClass('alert-success').removeClass('alert-info') if @failedCount is 0
+42
Ver Arquivo
@@ -0,0 +1,42 @@
BufferedProcess = require '../src/buffered-process'
describe "BufferedProcess", ->
describe "when a bad command is specified", ->
[oldOnError] = []
beforeEach ->
oldOnError = window.onerror
window.onerror = jasmine.createSpy()
afterEach ->
window.onerror = oldOnError
describe "when there is an error handler specified", ->
it "calls the error handler and does not throw an exception", ->
process = new BufferedProcess
command: 'bad-command-nope'
args: ['nothing']
options: {}
errorSpy = jasmine.createSpy().andCallFake (error) -> error.handle()
process.onWillThrowError(errorSpy)
waitsFor -> errorSpy.callCount > 0
runs ->
expect(window.onerror).not.toHaveBeenCalled()
expect(errorSpy).toHaveBeenCalled()
expect(errorSpy.mostRecentCall.args[0].error.message).toContain 'spawn bad-command-nope ENOENT'
describe "when there is not an error handler specified", ->
it "calls the error handler and does not throw an exception", ->
process = new BufferedProcess
command: 'bad-command-nope'
args: ['nothing']
options: {}
waitsFor -> window.onerror.callCount > 0
runs ->
expect(window.onerror).toHaveBeenCalled()
expect(window.onerror.mostRecentCall.args[0]).toContain 'Failed to spawn command `bad-command-nope`'
expect(window.onerror.mostRecentCall.args[4].name).toBe 'BufferedProcessError'
+6
Ver Arquivo
@@ -1085,6 +1085,12 @@ describe "DisplayBuffer", ->
expect(oldProperties).toEqual decorationProperties
expect(newProperties).toEqual type: 'gutter', class: 'two', id: decoration.id
describe "::getDecorations(properties)", ->
it "returns decorations matching the given optional properties", ->
expect(displayBuffer.getDecorations()).toEqual [decoration]
expect(displayBuffer.getDecorations(class: 'two').length).toEqual 0
expect(displayBuffer.getDecorations(class: 'one').length).toEqual 1
describe "::setScrollTop", ->
beforeEach ->
displayBuffer.manageScrollPosition = true
@@ -1,3 +1,6 @@
'.source.omg':
'editor':
'increaseIndentPattern': '^a'
'decreaseIndentPattern': '^z'
'commentStart': '/*'
'commentEnd': '*/'
+29
Ver Arquivo
@@ -16,3 +16,32 @@ describe "Notification", ->
it "returns the icon specified", ->
notification = new Notification('error', 'message!', icon: 'my-icon')
expect(notification.getIcon()).toBe 'my-icon'
describe "dismissing notifications", ->
describe "when the notfication is dismissable", ->
it "calls a callback when the notification is dismissed", ->
dismissedSpy = jasmine.createSpy()
notification = new Notification('error', 'message', dismissable: true)
notification.onDidDismiss dismissedSpy
expect(notification.isDismissable()).toBe true
expect(notification.isDismissed()).toBe false
notification.dismiss()
expect(dismissedSpy).toHaveBeenCalled()
expect(notification.isDismissed()).toBe true
describe "when the notfication is not dismissable", ->
it "does nothing when ::dismiss() is called", ->
dismissedSpy = jasmine.createSpy()
notification = new Notification('error', 'message')
notification.onDidDismiss dismissedSpy
expect(notification.isDismissable()).toBe false
expect(notification.isDismissed()).toBe true
notification.dismiss()
expect(dismissedSpy).not.toHaveBeenCalled()
expect(notification.isDismissed()).toBe true
+30 -4
Ver Arquivo
@@ -1,3 +1,4 @@
Grim = require 'grim'
{$, $$} = require '../src/space-pen-extensions'
Package = require '../src/package'
@@ -5,6 +6,7 @@ describe "PackageManager", ->
workspaceElement = null
beforeEach ->
workspaceElement = atom.views.getView(atom.workspace)
spyOn(Grim, 'deprecate') # suppress deprecation warnings due to comment strings
describe "::loadPackage(name)", ->
it "continues if the package has an invalid package.json", ->
@@ -367,7 +369,31 @@ describe "PackageManager", ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.config.get ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBe '^a'
it "combines 'editor.commentStart' and 'editor.commentEnd' strings under the 'editor.comment' key path", ->
if atom.packages.isPackageLoaded("package-with-scoped-properties")
atom.packages.unloadPackage("package-with-scoped-properties")
waitsForPromise ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.config.get ['.source.omg'], 'editor.comment.start').toBe '/*'
expect(atom.config.get ['.source.omg'], 'editor.comment.end').toBe '*/'
expect(Grim.deprecate).toHaveBeenCalled()
it "combines 'editor.increaseIndentPattern' and 'editor.decreaseIndentPattern' strings under the 'editor.indent' key path", ->
if atom.packages.isPackageLoaded("package-with-scoped-properties")
atom.packages.unloadPackage("package-with-scoped-properties")
waitsForPromise ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBe '^a'
expect(atom.config.get ['.source.omg'], 'editor.indent.decreasePattern').toBe '^z'
expect(Grim.deprecate).toHaveBeenCalled()
describe "converted textmate packages", ->
it "loads the package's grammars", ->
@@ -386,7 +412,7 @@ describe "PackageManager", ->
atom.packages.activatePackage('language-ruby')
runs ->
expect(atom.config.get(['.source.ruby'], 'editor.commentStart')).toBe '# '
expect(atom.config.get(['.source.ruby'], 'editor.comment.start')).toBe '# '
describe "::deactivatePackage(id)", ->
afterEach ->
@@ -493,9 +519,9 @@ describe "PackageManager", ->
atom.packages.activatePackage("package-with-scoped-properties")
runs ->
expect(atom.config.get ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBe '^a'
atom.packages.deactivatePackage("package-with-scoped-properties")
expect(atom.config.get ['.source.omg'], 'editor.increaseIndentPattern').toBeUndefined()
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBeUndefined()
describe "textmate packages", ->
it "removes the package's grammars", ->
+4
Ver Arquivo
@@ -21,3 +21,7 @@ describe "Panel", ->
panel.show()
expect(panel.isVisible()).toBe true
expect(spy).toHaveBeenCalledWith(true)
panel.destroy()
expect(panel.isVisible()).toBe false
expect(spy).toHaveBeenCalledWith(false)
+5
Ver Arquivo
@@ -105,3 +105,8 @@ describe "StylesElement", ->
document.querySelector('#jasmine-content').appendChild(element)
expect(element.firstChild.sheet.cssRules[0].selectorText).toBe ':host'
it "does not throw exceptions on rules with no selectors", ->
atom.styles.addStyleSheet """
@media screen {font-size: 10px;}
""", context: 'atom-text-editor'
+2 -1
Ver Arquivo
@@ -1908,7 +1908,8 @@ describe "TextEditorComponent", ->
}
""", context: 'atom-text-editor'
nextAnimationFrame()
nextAnimationFrame() # handle stylesheet change event
nextAnimationFrame() # perform requested update
scrollbarCornerNode = componentNode.querySelector('.scrollbar-corner')
expect(verticalScrollbarNode.offsetWidth).toBe 8
+36
Ver Arquivo
@@ -20,6 +20,11 @@ describe "TextEditorElement", ->
element = jasmineContent.firstChild
expect(element.getModel().getPlaceholderText()).toBe 'testing'
it "honors the text content", ->
jasmineContent.innerHTML = "<atom-text-editor>testing</atom-text-editor>"
element = jasmineContent.firstChild
expect(element.getModel().getText()).toBe 'testing'
describe "when the model is assigned", ->
it "adds the 'mini' attribute if .isMini() returns true on the model", ->
element = new TextEditorElement
@@ -99,6 +104,27 @@ describe "TextEditorElement", ->
scrollbarWidth = verticalScrollbarNode.offsetWidth - verticalScrollbarNode.clientWidth
expect(scrollbarWidth).toEqual(8)
describe "::onDidAttach and ::onDidDetach", ->
it "invokes callbacks when the element is attached and detached", ->
element = new TextEditorElement
attachedCallback = jasmine.createSpy("attachedCallback")
detachedCallback = jasmine.createSpy("detachedCallback")
element.onDidAttach(attachedCallback)
element.onDidDetach(detachedCallback)
jasmine.attachToDOM(element)
expect(attachedCallback).toHaveBeenCalled()
expect(detachedCallback).not.toHaveBeenCalled()
attachedCallback.reset()
element.remove()
expect(attachedCallback).not.toHaveBeenCalled()
expect(detachedCallback).toHaveBeenCalled()
describe "::setUpdatedSynchronously", ->
it "controls whether the text editor is updated synchronously", ->
spyOn(window, 'requestAnimationFrame').andCallFake (fn) -> fn()
@@ -119,3 +145,13 @@ describe "TextEditorElement", ->
element.getModel().setText("goodbye")
expect(window.requestAnimationFrame).not.toHaveBeenCalled()
expect(element.shadowRoot.textContent).toContain "goodbye"
describe "::getDefaultCharacterWidth", ->
it "returns null before the element is attached", ->
element = new TextEditorElement
expect(element.getDefaultCharacterWidth()).toBeNull()
it "returns the width of a character in the root scope", ->
element = new TextEditorElement
jasmine.attachToDOM(element)
expect(element.getDefaultCharacterWidth()).toBeGreaterThan(0)
+9 -3
Ver Arquivo
@@ -192,12 +192,18 @@ describe "TextEditor", ->
expect(editor.getCursorBufferPosition()).toEqual [1, 1]
it "emits an event with the old position, new position, and the cursor that moved", ->
editor.onDidChangeCursorPosition positionChangedHandler = jasmine.createSpy()
cursorCallback = jasmine.createSpy('cursor-changed-position')
editorCallback = jasmine.createSpy('editor-changed-cursor-position')
editor.getLastCursor().onDidChangePosition(cursorCallback)
editor.onDidChangeCursorPosition(editorCallback)
editor.setCursorBufferPosition([2, 4])
expect(positionChangedHandler).toHaveBeenCalled()
eventObject = positionChangedHandler.mostRecentCall.args[0]
expect(editorCallback).toHaveBeenCalled()
expect(cursorCallback).toHaveBeenCalled()
eventObject = editorCallback.mostRecentCall.args[0]
expect(cursorCallback.mostRecentCall.args[0]).toEqual(eventObject)
expect(eventObject.oldBufferPosition).toEqual [0, 0]
expect(eventObject.oldScreenPosition).toEqual [0, 0]
+13
Ver Arquivo
@@ -11,6 +11,7 @@ _ = require 'underscore-plus'
{Emitter} = require 'event-kit'
{Model} = require 'theorist'
fs = require 'fs-plus'
{convertStackTrace, convertLine} = require 'coffeestack'
{$} = require './space-pen-extensions'
WindowEventHandler = require './window-event-handler'
@@ -133,6 +134,9 @@ class Atom extends Model
# Public: A {Clipboard} instance
clipboard: null
# A {ServiceHub} instance
services: null
# Public: A {ContextMenuManager} instance
contextMenu: null
@@ -195,9 +199,16 @@ class Atom extends Model
unless @inDevMode() or @inSpecMode()
require('grim').deprecate = ->
sourceMapCache = {}
window.onerror = =>
@lastUncaughtError = Array::slice.call(arguments)
[message, url, line, column, originalError] = @lastUncaughtError
convertedLine = convertLine(url, line, column, sourceMapCache)
{line, column} = convertedLine if convertedLine?
originalError.stack = convertStackTrace(originalError.stack, sourceMapCache) if originalError
eventObject = {message, url, line, column, originalError}
openDevTools = true
@@ -225,6 +236,7 @@ class Atom extends Model
NotificationManager = require './notification-manager'
PackageManager = require './package-manager'
Clipboard = require './clipboard'
ServiceHub = require './service-hub'
GrammarRegistry = require './grammar-registry'
ThemeManager = require './theme-manager'
StyleManager = require './style-manager'
@@ -260,6 +272,7 @@ class Atom extends Model
@contextMenu = new ContextMenuManager({resourcePath, devMode})
@menu = new MenuManager({resourcePath})
@clipboard = new Clipboard()
@services = new ServiceHub
@grammars = @deserializers.deserialize(@state.grammars ? @state.syntax) ? new GrammarRegistry()
-6
Ver Arquivo
@@ -8,8 +8,6 @@ class AutoUpdater
setFeedUrl: (@updateUrl) ->
quitAndInstall: ->
console.log 'restarting new atom.exe'
if SquirrelUpdate.existsSync()
SquirrelUpdate.restartAtom()
else
@@ -46,7 +44,6 @@ class AutoUpdater
@downloadUpdate (error, update) =>
if error?
console.log "Failed to download: #{error.message} - #{error.code} - #{error.stdout}"
@emit 'update-not-available'
return
@@ -56,12 +53,9 @@ class AutoUpdater
@installUpdate (error) =>
if error?
console.log "Failed to update: #{error.message} - #{error.code} - #{error.stdout}"
@emit 'update-not-available'
return
console.log "Updated to #{update.version}"
@emit 'update-available'
@emit 'update-downloaded', {}, update.releaseNotes, update.version, new Date(), 'https://atom.io', => @quitAndInstall()
+41
Ver Arquivo
@@ -1,5 +1,6 @@
_ = require 'underscore-plus'
ChildProcess = require 'child_process'
{Emitter} = require 'event-kit'
# Extended: A wrapper which provides standard error/output line buffering for
# Node's ChildProcess.
@@ -17,6 +18,10 @@ ChildProcess = require 'child_process'
# ```
module.exports =
class BufferedProcess
###
Section: Construction
###
# Public: Runs the given command by spawning a new child process.
#
# * `options` An {Object} with the following keys:
@@ -39,6 +44,7 @@ class BufferedProcess
# * `exit` The callback {Function} which receives a single argument
# containing the exit status (optional).
constructor: ({command, args, options, stdout, stderr, exit}={}) ->
@emitter = new Emitter
options ?= {}
# Related to joyent/node#2318
if process.platform is "win32"
@@ -94,6 +100,41 @@ class BufferedProcess
processExited = true
triggerExitCallback()
@process.on 'error', (error) =>
handled = false
handle = -> handled = true
@emitter.emit 'will-throw-error', {error, handle}
if error.code is 'ENOENT' and error.syscall.indexOf('spawn') is 0
error = new Error("Failed to spawn command `#{command}`. Make sure `#{command}` is installed and on your PATH", error.path)
error.name = 'BufferedProcessError'
throw error unless handled
###
Section: Event Subscription
###
# Public: Will call your callback when an error will be raised by the process.
# Usually this is due to the command not being available or not on the PATH.
# You can call `handle()` on the object passed to your callback to indicate
# that you have handled this error.
#
# * `callback` {Function} callback
# * `errorObject` {Object}
# * `error` {Object} the error object
# * `handle` {Function} call this to indicate you have handled the error.
# The error will not be thrown if this function is called.
#
# Returns a {Disposable}
onWillThrowError: (callback) ->
@emitter.on 'will-throw-error', callback
###
Section: Helper Methods
###
# Helper method to pass data line by line.
#
# * `stream` The Stream to read from.
+9 -6
Ver Arquivo
@@ -54,9 +54,10 @@ class CommandRegistry
#
# ## Arguments: Registering One Command
#
# * `selector` A {String} containing a CSS selector matching elements on which
# you want to handle the commands. The `,` combinator is not currently
# supported.
# * `target` A {String} containing a CSS selector or a DOM element. If you
# pass a selector, the command will be globally associated with all matching
# elements. The `,` combinator is not currently supported. If you pass a
# DOM element, the command will be associated with just that element.
# * `commandName` A {String} containing the name of a command you want to
# handle such as `user:insert-date`.
# * `callback` A {Function} to call when the given command is invoked on an
@@ -67,9 +68,11 @@ class CommandRegistry
#
# ## Arguments: Registering Multiple Commands
#
# * `selector` A {String} containing a CSS selector matching elements on which
# you want to handle the commands. The `,` combinator is not currently
# supported.
# * `target` A {String} containing a CSS selector or a DOM element. If you
# pass a selector, the commands will be globally associated with all
# matching elements. The `,` combinator is not currently supported.
# If you pass a DOM element, the command will be associated with just that
# element.
# * `commands` An {Object} mapping command names like `user:insert-date` to
# listener {Function}s.
#
+14 -8
Ver Arquivo
@@ -81,14 +81,20 @@ module.exports =
type: 'object'
properties:
# These settings are used in scoped fashion only. No defaults.
commentStart:
type: ['string', 'null']
commentEnd:
type: ['string', 'null']
increaseIndentPattern:
type: ['string', 'null']
decreaseIndentPattern:
type: ['string', 'null']
comment:
type: 'object'
properties:
start:
type: ['string', 'null']
end:
type: ['string', 'null']
indent:
type: 'object'
properties:
increasePattern:
type: ['string', 'null']
decreasePattern:
type: ['string', 'null']
foldEndPattern:
type: ['string', 'null']
+1 -1
Ver Arquivo
@@ -740,7 +740,7 @@ class Config
notifyFailure: (errorMessage, error) ->
message = "#{errorMessage}"
detail = error.stack
atom.notifications.addError(message, {detail, closable: true})
atom.notifications.addError(message, {detail, dismissable: true})
console.error message
console.error detail
+4 -4
Ver Arquivo
@@ -45,7 +45,7 @@ class Cursor extends Model
cursor: this
@emit 'moved', movedEvent
@emitter.emit 'did-change-position'
@emitter.emit 'did-change-position', movedEvent
@editor.cursorMoved(movedEvent)
@marker.onDidDestroy =>
@destroyed = true
@@ -665,7 +665,7 @@ class Cursor extends Model
autoscroll: (options) ->
@editor.scrollToScreenRange(@getScreenRange(), options)
getBeginningOfNextParagraphBufferPosition: (editor) ->
getBeginningOfNextParagraphBufferPosition: ->
start = @getBufferPosition()
eof = @editor.getEofBufferPosition()
scanRange = [start, eof]
@@ -679,8 +679,8 @@ class Cursor extends Model
stop()
@editor.screenPositionForBufferPosition(position)
getBeginningOfPreviousParagraphBufferPosition: (editor) ->
start = @editor.getCursorBufferPosition()
getBeginningOfPreviousParagraphBufferPosition: ->
start = @getBufferPosition()
{row, column} = start
scanRange = [[row-1, column], [0,0]]
+14 -9
Ver Arquivo
@@ -883,23 +883,28 @@ class DisplayBuffer extends Model
decorationForId: (id) ->
@decorationsById[id]
getDecorations: ->
getDecorations: (propertyFilter) ->
allDecorations = []
for markerId, decorations of @decorationsByMarkerId
allDecorations = allDecorations.concat(decorations) if decorations?
if propertyFilter?
allDecorations = allDecorations.filter (decoration) ->
for key, value of propertyFilter
return false unless decoration.properties[key] is value
true
allDecorations
getLineDecorations: ->
@getDecorations().filter (decoration) -> decoration.isType('line')
getLineDecorations: (propertyFilter) ->
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('line')
getGutterDecorations: ->
@getDecorations().filter (decoration) -> decoration.isType('gutter')
getGutterDecorations: (propertyFilter) ->
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('gutter')
getHighlightDecorations: ->
@getDecorations().filter (decoration) -> decoration.isType('highlight')
getHighlightDecorations: (propertyFilter) ->
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('highlight')
getOverlayDecorations: ->
@getDecorations().filter (decoration) -> decoration.isType('overlay')
getOverlayDecorations: (propertyFilter) ->
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('overlay')
decorationsForScreenRowRange: (startScreenRow, endScreenRow) ->
decorationsByMarkerId = {}
+1 -1
Ver Arquivo
@@ -25,7 +25,7 @@ KeymapManager::loadUserKeymap = ->
KeymapManager::subscribeToFileReadFailure = ->
this.onDidFailToReadFile (error) ->
atom.notifications.addError('Failed to load keymap.cson', {detail: error.stack, closable: true})
atom.notifications.addError('Failed to load keymap.cson', {detail: error.stack, dismissable: true})
# This enables command handlers registered via jQuery to call
# `.abortKeyBinding()` on the `jQuery.Event` object passed to the handler.
+23 -15
Ver Arquivo
@@ -30,13 +30,15 @@ class LanguageMode
# Returns an {Array} of the commented {Ranges}.
toggleLineCommentsForBufferRows: (start, end) ->
scopeDescriptor = @editor.scopeDescriptorForBufferPosition([start, 0])
properties = atom.config.settingsForScopeDescriptor(scopeDescriptor, 'editor.commentStart')[0]
return unless properties
commentStartString = _.valueForKeyPath(properties, 'editor.commentStart')
commentEndString = _.valueForKeyPath(properties, 'editor.commentEnd')
commentStrings = atom.config.get(scopeDescriptor, 'editor.comment')
return unless commentStartString
return unless commentStrings?
commentStartString = commentStrings.start
commentEndString = commentStrings.end
return unless commentStartString?
buffer = @editor.buffer
commentStartRegexString = _.escapeRegExp(commentStartString).replace(/(\s+)$/, '(?:$1)?')
@@ -247,7 +249,14 @@ class LanguageMode
suggestedIndentForBufferRow: (bufferRow, options) ->
currentIndentLevel = @editor.indentationForBufferRow(bufferRow)
scopeDescriptor = @editor.scopeDescriptorForBufferPosition([bufferRow, 0])
return currentIndentLevel unless increaseIndentRegex = @increaseIndentRegexForScopeDescriptor(scopeDescriptor)
indentPatterns = atom.config.get(scopeDescriptor, 'editor.indent')
if indentPatterns?.increasePattern?
increaseIndentRegex = new OnigRegExp(indentPatterns.increasePattern)
if indentPatterns?.decreasePattern?
decreaseIndentRegex = new OnigRegExp(indentPatterns.decreasePattern)
return currentIndentLevel unless increaseIndentRegex?
currentLine = @buffer.lineForRow(bufferRow)
if options?.skipBlankLines ? true
@@ -261,7 +270,7 @@ class LanguageMode
desiredIndentLevel = @editor.indentationForBufferRow(precedingRow)
desiredIndentLevel += 1 if increaseIndentRegex.testSync(precedingLine) and not @editor.isBufferRowCommented(precedingRow)
return desiredIndentLevel unless decreaseIndentRegex = @decreaseIndentRegexForScopeDescriptor(scopeDescriptor)
return desiredIndentLevel unless decreaseIndentRegex?
desiredIndentLevel -= 1 if decreaseIndentRegex.testSync(currentLine)
Math.max(desiredIndentLevel, 0)
@@ -297,8 +306,13 @@ class LanguageMode
# bufferRow - The row {Number}
autoDecreaseIndentForBufferRow: (bufferRow) ->
scopeDescriptor = @editor.scopeDescriptorForBufferPosition([bufferRow, 0])
increaseIndentRegex = @increaseIndentRegexForScopeDescriptor(scopeDescriptor)
decreaseIndentRegex = @decreaseIndentRegexForScopeDescriptor(scopeDescriptor)
indentPatterns = atom.config.get(scopeDescriptor, 'editor.indent')
if indentPatterns?.increasePattern?
increaseIndentRegex = new OnigRegExp(indentPatterns.increasePattern)
if indentPatterns?.decreasePattern?
decreaseIndentRegex = new OnigRegExp(indentPatterns.decreasePattern)
return unless increaseIndentRegex and decreaseIndentRegex
line = @buffer.lineForRow(bufferRow)
@@ -319,11 +333,5 @@ class LanguageMode
if pattern = atom.config.get(scopeDescriptor, property)
new OnigRegExp(pattern)
increaseIndentRegexForScopeDescriptor: (scopeDescriptor) ->
@getRegexForProperty(scopeDescriptor, 'editor.increaseIndentPattern')
decreaseIndentRegexForScopeDescriptor: (scopeDescriptor) ->
@getRegexForProperty(scopeDescriptor, 'editor.decreaseIndentPattern')
foldEndRegexForScopeDescriptor: (scopeDescriptor) ->
@getRegexForProperty(scopeDescriptor, 'editor.foldEndPattern')
+6
Ver Arquivo
@@ -42,3 +42,9 @@ class NotificationManager
@notifications.push(notification)
@emitter.emit('did-add-notification', notification)
notification
###
Section: Getting Notifications
###
getNotifications: -> @notifications
+15 -2
Ver Arquivo
@@ -1,9 +1,16 @@
{Emitter} = require 'event-kit'
# Experimental: This will likely change, do not use.
module.exports =
class Notification
constructor: (@type, @message, @options={}) ->
@emitter = new Emitter
@timestamp = new Date()
@dismissed = true
@dismissed = false if @isDismissable()
onDidDismiss: (callback) ->
@emitter.on 'did-dismiss', callback
getOptions: -> @options
@@ -20,8 +27,14 @@ class Notification
and @getType() == other.getType() \
and @getDetail() == other.getDetail()
isClosable: ->
!!@options.closable
dismiss: ->
return unless @isDismissable() and not @isDismissed()
@dismissed = true
@emitter.emit 'did-dismiss'
isDismissed: -> @dismissed
isDismissable: -> !!@options.dismissable
getIcon: ->
return @options.icon if @options.icon?
+1 -1
Ver Arquivo
@@ -338,7 +338,7 @@ class Package
reloadStylesheets: ->
oldSheets = _.clone(@stylesheets)
@loadStylesheets()
@stylesheetDisposables.dispose()
@stylesheetDisposables?.dispose()
@stylesheetDisposables = new CompositeDisposable
@stylesheetsActivated = false
@activateStylesheets()
+5 -3
Ver Arquivo
@@ -1,5 +1,6 @@
{CompositeDisposable} = require 'event-kit'
{callAttachHooks} = require './space-pen-extensions'
Panel = require './panel'
class PanelElement extends HTMLElement
createdCallback: ->
@@ -13,14 +14,15 @@ class PanelElement extends HTMLElement
@subscriptions.add @model.onDidDestroy(@destroyed.bind(this))
this
getModel: -> @model
getModel: ->
@model ?= new Panel
getItemView: ->
atom.views.getView(@model.getItem())
atom.views.getView(@getModel().getItem())
attachedCallback: ->
callAttachHooks(@getItemView()) # for backward compatibility with SpacePen views
@visibleChanged(@model.isVisible())
@visibleChanged(@getModel().isVisible())
visibleChanged: (visible) ->
if visible
+2 -1
Ver Arquivo
@@ -14,13 +14,14 @@ class Panel
Section: Construction and Destruction
###
constructor: ({@item, @visible, @priority, @className}) ->
constructor: ({@item, @visible, @priority, @className}={}) ->
@emitter = new Emitter
@visible ?= true
@priority ?= 100
# Public: Destroy and remove this panel from the UI.
destroy: ->
@hide()
@emitter.emit 'did-destroy', this
@emitter.dispose()
+26
Ver Arquivo
@@ -1,3 +1,4 @@
Grim = require 'grim'
CSON = require 'season'
{CompositeDisposable} = require 'event-kit'
@@ -11,6 +12,31 @@ class ScopedProperties
callback(null, new ScopedProperties(scopedPropertiesPath, scopedProperties))
constructor: (@path, @scopedProperties) ->
for selector, properties of @scopedProperties
if properties.editor?.commentStart?
properties.editor.comment ?= {}
properties.editor.comment.start ?= properties.editor.commentStart
delete properties.editor.commentStart
Grim.deprecate("The 'editor.commentStart' setting has been moved to 'editor.comment.start'. Please update `#{@path}`.")
if properties.editor?.commentEnd?
properties.editor.comment ?= {}
properties.editor.comment.end ?= properties.editor.commentEnd
delete properties.editor.commentEnd
Grim.deprecate("The 'editor.commentEnd' setting has been moved to 'editor.comment.end'. Please update `#{@path}`.")
if properties.editor?.increaseIndentPattern?
properties.editor.indent ?= {}
properties.editor.indent.increasePattern ?= properties.editor.increaseIndentPattern
delete properties.editor.increaseIndentPattern
Grim.deprecate("The 'editor.increaseIndentPattern' setting has been moved to 'editor.indent.increasePattern'. Please update `#{@path}`.")
if properties.editor?.decreaseIndentPattern?
properties.editor.indent ?= {}
properties.editor.indent.decreasePattern ?= properties.editor.decreaseIndentPattern
delete properties.editor.decreaseIndentPattern
Grim.deprecate("The 'editor.decreaseIndentPattern' setting has been moved to 'editor.indent.decreasePattern'. Please update `#{@path}`.")
@propertyDisposable = new CompositeDisposable
activate: ->
+93
Ver Arquivo
@@ -0,0 +1,93 @@
_ServiceHub = require('service-hub')
# Experimental: This class facilitates communication between Atom packages
# through semantically-versioned services. If you want your package to provide
# an API for other packages to interact with, provide or consume a service via
# the global instance of this class available as `atom.services`.
#
# If you're providing an API for other packages, the most straightforward is to
# `provide` a module namespaced under your package's name as follows.
#
# ```coffee
# atom.services.provide "status-bar", "1.0.0",
# addRightItem: (item) -> # ...
# addLeftItem: (item) -> # ...
# ```
#
# Then other packages can interact with your package by consuming the provided
# service. Note that a service consumer can provide an npm-style version range
# string to express the required API version of the consumed service. The
# callback will be invoked with the service immediately or when the service
# becomes available. If multiple services match the provided key-path and
# version range, the callback will be invoked multiple times.
#
# ```coffee
# atom.services.consume "status-bar", "^1.0.0", (statusBar) ->
# statusBar.addLeftItem(new GrammarChanger)
# ```
#
# You can also provide multiple services end-points under the same namespace by
# passing a dot-separated key path. In this example, we also provide a global
# reference to the status bar's DOM element so other packages can modify it
# directly. Doing this via `atom.services` is superior to querying from the DOM
# manually because you can use semantic versioning to indicate when the DOM
# structure changes in a breaking way.
#
# ```coffee
# atom.services.provide "status-bar.view", "1.0.0", statusBarElement
# ```
#
# By convention, every package owns its package name in the services namespace.
# Your package can provide a service under another package's namespace, but you
# should always conform to that package's API. If you want to make additions to
# the API, add them under your own namespace.
#
# When upgrading your package's API, consider retaining previous versions with
# shims if at all possible to minimize breakage and to give the ecosystem time
# to catch up with your changes.
#
# You can also apply an inverted pattern, where your package consumes services
# under its own namespace. In this pattern, you would define a contract for
# services that other packages provide and your package consumes. For example,
# say we were adding the ability to add custom completion providers to
# autocomplete:
#
# ```coffee
# atom.services.consume "autocomplete", "1.0.0", (provider) ->
# addCompletionProvider(provider)
# ```
#
# In this use case, you would want to consume a specific version number rather
# than a range. You could consume multiple version numbers to provide backward
# compatibility.
module.exports =
class ServiceHub extends _ServiceHub
# Experimental: Provide a service by invoking the callback of all current and
# future consumers matching the given key path and version range.
#
# * `keyPath` A {String} of `.` separated keys indicating the services's
# location in the namespace of all services.
# * `version` A {String} containing a [semantic version](http://semver.org/)
# for the service's API.
# * `service` An object exposing the service API.
#
# Returns a {Disposable} on which `.dispose()` can be called to remove the
# provided service.
provide: (keyPath, version, service) ->
super
# Experimental: Consume a service by invoking the given callback for all
# current and future provided services matching the given key path and version
# range.
#
# * `keyPath` A {String} of `.` separated keys indicating the services's
# location in the namespace of all services.
# * `versionRange` A {String} containing a [semantic version range](https://www.npmjs.org/doc/misc/semver.html)
# that any provided services for the given key path must satisfy.
# * `callback` A {Function} to be called with current and future matching
# service objects.
#
# Returns a {Disposable} on which `.dispose()` can be called to remove the
# consumer.
consume: (keyPath, versionRange, callback) ->
super
+1
Ver Arquivo
@@ -92,6 +92,7 @@ class StylesElement extends HTMLElement
upgradedSelectors = []
for rule in styleElement.sheet.cssRules
continue unless rule.selectorText?
continue if /\:host/.test(rule.selectorText)
inputSelector = rule.selectorText
+7 -2
Ver Arquivo
@@ -664,8 +664,13 @@ TextEditorComponent = React.createClass
onStylesheetsChanged: (styleElement) ->
return unless @performedInitialMeasurement
return unless atom.themes.isInitialLoadComplete()
@refreshScrollbars() if not styleElement.sheet? or @containsScrollbarSelector(styleElement.sheet)
@handleStylingChange()
# This delay prevents the styling from going haywire when stylesheets are
# reloaded in dev mode. It seems like a workaround for a browser bug, but
# not totally sure.
requestAnimationFrame =>
@refreshScrollbars() if not styleElement.sheet? or @containsScrollbarSelector(styleElement.sheet)
@handleStylingChange()
onAllThemesLoaded: ->
@refreshScrollbars()
+57 -29
Ver Arquivo
@@ -1,3 +1,4 @@
{Emitter} = require 'event-kit'
{View, $, callRemoveHooks} = require 'space-pen'
React = require 'react-atom-fork'
Path = require 'path'
@@ -13,10 +14,12 @@ class TextEditorElement extends HTMLElement
model: null
componentDescriptor: null
component: null
attached: false
lineOverdrawMargin: null
focusOnAttach: false
createdCallback: ->
@emitter = new Emitter
@initializeContent()
@createSpacePenShim()
@addEventListener 'focus', @focused.bind(this)
@@ -61,6 +64,10 @@ class TextEditorElement extends HTMLElement
@mountComponent() unless @component?.isMounted()
@component.checkForVisibilityChange()
@focus() if @focusOnAttach
@emitter.emit("did-attach")
detachedCallback: ->
@emitter.emit("did-detach")
initialize: (model) ->
@setModel(model)
@@ -86,7 +93,7 @@ class TextEditorElement extends HTMLElement
buildModel: ->
@setModel(new TextEditor(
buffer: new TextBuffer
buffer: new TextBuffer(@textContent)
softWrapped: false
tabLength: 2
softTabs: true
@@ -160,6 +167,24 @@ class TextEditorElement extends HTMLElement
isUpdatedSynchronously: -> @updatedSynchronously
# Extended: get the width of a character of text displayed in this element.
#
# Returns a {Number} of pixels.
getDefaultCharacterWidth: ->
@getModel().getDefaultCharWidth()
# Extended: call the given `callback` when the editor is attached to the DOM.
#
# * `callback` {Function}
onDidAttach: (callback) ->
@emitter.on("did-attach", callback)
# Extended: call the given `callback` when the editor is detached from the DOM.
#
# * `callback` {Function}
onDidDetach: (callback) ->
@emitter.on("did-detach", callback)
stopEventPropagation = (commandListeners) ->
newCommandListeners = {}
for commandName, commandListener of commandListeners
@@ -183,28 +208,14 @@ stopEventPropagationAndGroupUndo = (commandListeners) ->
atom.commands.add 'atom-text-editor', stopEventPropagation(
'core:undo': -> @undo()
'core:redo': -> @redo()
)
atom.commands.add 'atom-text-editor', stopEventPropagationAndGroupUndo(
'core:move-left': -> @moveLeft()
'core:move-right': -> @moveRight()
'core:select-left': -> @selectLeft()
'core:select-right': -> @selectRight()
'core:select-all': -> @selectAll()
'core:backspace': -> @backspace()
'core:delete': -> @delete()
'core:cut': -> @cutSelectedText()
'core:copy': -> @copySelectedText()
'core:paste': -> @pasteText()
'editor:move-to-previous-word': -> @moveToPreviousWord()
'editor:select-word': -> @selectWordsContainingCursors()
'editor:consolidate-selections': (event) -> event.abortKeyBinding() unless @consolidateSelections()
'editor:delete-to-beginning-of-word': -> @deleteToBeginningOfWord()
'editor:delete-to-beginning-of-line': -> @deleteToBeginningOfLine()
'editor:delete-to-end-of-line': -> @deleteToEndOfLine()
'editor:delete-to-end-of-word': -> @deleteToEndOfWord()
'editor:delete-line': -> @deleteLine()
'editor:cut-to-end-of-line': -> @cutToEndOfLine()
'editor:move-to-beginning-of-next-paragraph': -> @moveToBeginningOfNextParagraph()
'editor:move-to-beginning-of-previous-paragraph': -> @moveToBeginningOfPreviousParagraph()
'editor:move-to-beginning-of-screen-line': -> @moveToBeginningOfScreenLine()
@@ -228,12 +239,26 @@ atom.commands.add 'atom-text-editor', stopEventPropagationAndGroupUndo(
'editor:select-to-previous-word-boundary': -> @selectToPreviousWordBoundary()
'editor:select-to-first-character-of-line': -> @selectToFirstCharacterOfLine()
'editor:select-line': -> @selectLinesContainingCursors()
)
atom.commands.add 'atom-text-editor', stopEventPropagationAndGroupUndo(
'core:backspace': -> @backspace()
'core:delete': -> @delete()
'core:cut': -> @cutSelectedText()
'core:copy': -> @copySelectedText()
'core:paste': -> @pasteText()
'editor:delete-to-beginning-of-word': -> @deleteToBeginningOfWord()
'editor:delete-to-beginning-of-line': -> @deleteToBeginningOfLine()
'editor:delete-to-end-of-line': -> @deleteToEndOfLine()
'editor:delete-to-end-of-word': -> @deleteToEndOfWord()
'editor:delete-line': -> @deleteLine()
'editor:cut-to-end-of-line': -> @cutToEndOfLine()
'editor:transpose': -> @transpose()
'editor:upper-case': -> @upperCase()
'editor:lower-case': -> @lowerCase()
)
atom.commands.add 'atom-text-editor:not([mini])', stopEventPropagationAndGroupUndo(
atom.commands.add 'atom-text-editor:not([mini])', stopEventPropagation(
'core:move-up': -> @moveUp()
'core:move-down': -> @moveDown()
'core:move-to-top': -> @moveToTop()
@@ -246,13 +271,6 @@ atom.commands.add 'atom-text-editor:not([mini])', stopEventPropagationAndGroupUn
'core:select-to-bottom': -> @selectToBottom()
'core:select-page-up': -> @selectPageUp()
'core:select-page-down': -> @selectPageDown()
'editor:indent': -> @indent()
'editor:auto-indent': -> @autoIndentSelectedRows()
'editor:indent-selected-rows': -> @indentSelectedRows()
'editor:outdent-selected-rows': -> @outdentSelectedRows()
'editor:newline': -> @insertNewline()
'editor:newline-below': -> @insertNewlineBelow()
'editor:newline-above': -> @insertNewlineAbove()
'editor:add-selection-below': -> @addSelectionBelow()
'editor:add-selection-above': -> @addSelectionAbove()
'editor:split-selections-into-lines': -> @splitSelectionsIntoLines()
@@ -272,17 +290,27 @@ atom.commands.add 'atom-text-editor:not([mini])', stopEventPropagationAndGroupUn
'editor:fold-at-indent-level-7': -> @foldAllAtIndentLevel(6)
'editor:fold-at-indent-level-8': -> @foldAllAtIndentLevel(7)
'editor:fold-at-indent-level-9': -> @foldAllAtIndentLevel(8)
'editor:toggle-line-comments': -> @toggleLineCommentsInSelection()
'editor:log-cursor-scope': -> @logCursorScope()
'editor:checkout-head-revision': -> atom.project.getRepositories()[0]?.checkoutHeadForEditor(this)
'editor:copy-path': -> @copyPathToClipboard()
'editor:move-line-up': -> @moveLineUp()
'editor:move-line-down': -> @moveLineDown()
'editor:duplicate-lines': -> @duplicateLines()
'editor:join-lines': -> @joinLines()
'editor:toggle-indent-guide': -> atom.config.set('editor.showIndentGuide', not atom.config.get('editor.showIndentGuide'))
'editor:toggle-line-numbers': -> atom.config.set('editor.showLineNumbers', not atom.config.get('editor.showLineNumbers'))
'editor:scroll-to-cursor': -> @scrollToCursorPosition()
)
atom.commands.add 'atom-text-editor:not([mini])', stopEventPropagationAndGroupUndo(
'editor:indent': -> @indent()
'editor:auto-indent': -> @autoIndentSelectedRows()
'editor:indent-selected-rows': -> @indentSelectedRows()
'editor:outdent-selected-rows': -> @outdentSelectedRows()
'editor:newline': -> @insertNewline()
'editor:newline-below': -> @insertNewlineBelow()
'editor:newline-above': -> @insertNewlineAbove()
'editor:toggle-line-comments': -> @toggleLineCommentsInSelection()
'editor:checkout-head-revision': -> atom.project.getRepositories()[0]?.checkoutHeadForEditor(this)
'editor:move-line-up': -> @moveLineUp()
'editor:move-line-down': -> @moveLineDown()
'editor:duplicate-lines': -> @duplicateLines()
'editor:join-lines': -> @joinLines()
)
module.exports = TextEditorElement = document.registerElement 'atom-text-editor', prototype: TextEditorElement.prototype
+25 -10
Ver Arquivo
@@ -1310,33 +1310,48 @@ class TextEditor extends Model
# Extended: Get all decorations.
#
# * `propertyFilter` (optional) An {Object} containing key value pairs that
# the returned decorations' properties must match.
#
# Returns an {Array} of {Decoration}s.
getDecorations: ->
@displayBuffer.getDecorations()
getDecorations: (propertyFilter) ->
@displayBuffer.getDecorations(propertyFilter)
# Extended: Get all decorations of type 'line'.
#
# * `propertyFilter` (optional) An {Object} containing key value pairs that
# the returned decorations' properties must match.
#
# Returns an {Array} of {Decoration}s.
getLineDecorations: ->
@displayBuffer.getLineDecorations()
getLineDecorations: (propertyFilter) ->
@displayBuffer.getLineDecorations(propertyFilter)
# Extended: Get all decorations of type 'gutter'.
#
# * `propertyFilter` (optional) An {Object} containing key value pairs that
# the returned decorations' properties must match.
#
# Returns an {Array} of {Decoration}s.
getGutterDecorations: ->
@displayBuffer.getGutterDecorations()
getGutterDecorations: (propertyFilter) ->
@displayBuffer.getGutterDecorations(propertyFilter)
# Extended: Get all decorations of type 'highlight'.
#
# * `propertyFilter` (optional) An {Object} containing key value pairs that
# the returned decorations' properties must match.
#
# Returns an {Array} of {Decoration}s.
getHighlightDecorations: ->
@displayBuffer.getHighlightDecorations()
getHighlightDecorations: (propertyFilter) ->
@displayBuffer.getHighlightDecorations(propertyFilter)
# Extended: Get all decorations of type 'overlay'.
#
# * `propertyFilter` (optional) An {Object} containing key value pairs that
# the returned decorations' properties must match.
#
# Returns an {Array} of {Decoration}s.
getOverlayDecorations: ->
@displayBuffer.getOverlayDecorations()
getOverlayDecorations: (propertyFilter) ->
@displayBuffer.getOverlayDecorations(propertyFilter)
decorationForId: (id) ->
@displayBuffer.decorationForId(id)
+1 -1
Ver Arquivo
@@ -150,7 +150,7 @@ atom.commands.add 'atom-workspace',
'window:focus-pane-on-right': -> @focusPaneViewOnRight()
'window:save-all': -> @getModel().saveAll()
'window:toggle-invisibles': -> atom.config.toggle("editor.showInvisibles")
'window:log-deprecation-warnings': -> Grim.logDeprecationWarnings()
'window:log-deprecation-warnings': -> Grim.logDeprecations()
'window:toggle-auto-indent': -> atom.config.toggle("editor.autoIndent")
'pane:reopen-closed-item': -> @getModel().reopenItem()
'core:close': -> @getModel().destroyActivePaneItemOrEmptyPane()
+7 -7
Ver Arquivo
@@ -423,14 +423,14 @@ class Workspace extends Model
uri = atom.project.resolve(uri)
item = @activePane.itemForUri(uri)
item = @getActivePane().itemForUri(uri)
if uri
item ?= opener(uri, options) for opener in @getOpeners() when !item
item ?= atom.project.openSync(uri, {initialLine, initialColumn})
@activePane.activateItem(item)
@getActivePane().activateItem(item)
@itemOpened(item)
@activePane.activate() if activatePane
@getActivePane().activate() if activatePane
item
openUriInPane: (uri, pane, options={}) ->
@@ -557,7 +557,7 @@ class Workspace extends Model
# {::saveActivePaneItemAs} # will be called instead. This method does nothing
# if the active item does not implement a `.save` method.
saveActivePaneItem: ->
@activePane?.saveActiveItem()
@getActivePane().saveActiveItem()
# Prompt the user for a path and save the active pane item to it.
#
@@ -565,14 +565,14 @@ class Workspace extends Model
# `.saveAs` on the item with the selected path. This method does nothing if
# the active item does not implement a `.saveAs` method.
saveActivePaneItemAs: ->
@activePane?.saveActiveItemAs()
@getActivePane().saveActiveItemAs()
# Destroy (close) the active pane item.
#
# Removes the active pane item and calls the `.destroy` method on it if one is
# defined.
destroyActivePaneItem: ->
@activePane?.destroyActiveItem()
@getActivePane().destroyActiveItem()
###
Section: Panes
@@ -616,7 +616,7 @@ class Workspace extends Model
# Destroy (close) the active pane.
destroyActivePane: ->
@activePane?.destroy()
@getActivePane()?.destroy()
# Destroy the active pane item or the active pane if it is empty.
destroyActivePaneItemOrEmptyPane: ->
+11
Ver Arquivo
@@ -19,6 +19,17 @@ body {
list-style: none;
}
.reload-button {
color: #333;
background-color: #fff;
border: 1px solid #ccc;
&:hover {
background-color: #ddd;
color: #222;
}
}
.symbol-header {
font-size: 18px;
font-weight: bold;