Comparar commits

...

4926 Commits

Autor SHA1 Mensagem Data
Cheng Zhao 993cc75c15 Merge pull request #1054 from atom/cz-fix-win32-scripts
Fix scripts on Windows
2013-10-30 17:28:57 -07:00
Ben Ogle 64e02d007c Upgrade to find-and-replace@0.35.0 2013-10-30 17:17:24 -07:00
Kevin Sawicki a39255fa77 Upgrade to settings-view@0.37.0 2013-10-30 16:47:40 -07:00
Kevin Sawicki ddfd1842d1 Upgrade apm for --no-color option 2013-10-30 16:47:40 -07:00
Garen Torikian c30f63fa0c Merge pull request #1052 from atom/doc-updates
Doc updates
2013-10-30 15:59:29 -07:00
Ben Ogle 5685eb9263 Upgrade to 2013-10-30 15:53:34 -07:00
Garen Torikian e3fd999964 Address a few more typos 2013-10-30 15:21:51 -07:00
Matt Colyer e8109adeee Retrieve docs/template.jst from the history 2013-10-30 15:14:02 -07:00
Kevin Sawicki b150191263 Upgrade to snippets@0.13.0 2013-10-30 15:11:59 -07:00
Matt Colyer 4dc909de03 Use a fork of grunt-coffeelint
Upgrades version of coffelint to support windows. Related to #1043.
2013-10-30 15:06:07 -07:00
Garen Torikian c029f8eb95 Remove images directory
Depend on the GitHub cloud instead
2013-10-30 15:02:23 -07:00
Garen Torikian 31e75884be Spruce up documentation around themes 2013-10-30 15:01:37 -07:00
Kevin Sawicki 82e5545f6e Stub refresh methods in replication spec 2013-10-30 14:54:48 -07:00
Matt Colyer febd845876 Escape backslashes in task bootstrap on all platforms 2013-10-30 14:48:22 -07:00
Ben Ogle 61021b6a13 Add docs about the keybindings tab 2013-10-30 14:42:53 -07:00
Kevin Sawicki b9274412c5 Refresh index and status after opening repo
Previously this relied on an initial window focus event firing
to kick off the initial load.  This focus event no longer fires
in jquery 2.0 so just explicitly refresh the index and status when
setting the project path.
2013-10-30 14:42:24 -07:00
Ben Ogle d6457152f0 typos 2013-10-30 14:37:08 -07:00
Matt Colyer 49e48a0895 Merge brantch 'win-tasks' 2013-10-30 14:35:48 -07:00
Ben Ogle eae7a7065e Link the package docs together 2013-10-30 14:34:50 -07:00
Kevin Sawicki 696355f6dd Upgrade to tree-view@0.23.0 2013-10-30 14:32:51 -07:00
Matt Colyer ab0c60bd45 Update paths in task bootstrap for windows
Fixes #1049
2013-10-30 14:30:01 -07:00
Ben Ogle 83005deae6 Small changes 2013-10-30 14:28:20 -07:00
Ben Ogle d486a55b4c Fix the panel code to use the tool-panel component 2013-10-30 14:22:12 -07:00
Kevin Sawicki e6b3f400c0 Update git status on buffer path-changed events 2013-10-30 14:15:52 -07:00
Ben Ogle 86cba12457 Remove images from repo
They are hosted on github right now
2013-10-30 14:14:35 -07:00
Ben Ogle 1d6e3c73cf Update image references 2013-10-30 14:14:16 -07:00
Garen Torikian 8fb06a5b11 Add images of sample package 2013-10-30 13:21:02 -07:00
Garen Torikian 8afb3fb6b9 Talk about using Theme Variables 2013-10-30 13:21:02 -07:00
Garen Torikian ff9356bc2c Begin talking about Theme Variables 2013-10-30 13:21:02 -07:00
Garen Torikian b523decc7e Indicating the color in the stylesheet is important 2013-10-30 13:21:02 -07:00
Garen Torikian e7a14bf17f Provide initial edits to "Your First Package" docs 2013-10-30 13:21:02 -07:00
Garen Torikian a593d3b152 Split basic package information from the tutorial 2013-10-30 13:21:02 -07:00
Ben Ogle 9781565df8 Link to the theme docs 2013-10-30 13:21:02 -07:00
Ben Ogle a595378850 Add a theme-variables.md doc 2013-10-30 13:21:01 -07:00
Ben Ogle b2e2a2cdda Upgrade scandal@0.6.1 2013-10-30 12:34:57 -07:00
Ben Ogle eb8d9214b7 Upgrade to find-and-replace@0.34.0
Project search in a tab
2013-10-30 12:23:47 -07:00
Ben Ogle 8ac8b3748f Merge pull request #1053 from atom/bo-singleton-open
openSingletonSync()
2013-10-30 12:21:19 -07:00
Ben Ogle b4a28d7418 Fix test 2013-10-30 12:13:38 -07:00
Ben Ogle c6ee5699e7 Upgrade to status-bar@0.15.1 2013-10-30 11:49:43 -07:00
Ben Ogle 19220aa9f3 Upgrade to tabs@0.7.2 2013-10-30 11:49:10 -07:00
Ben Ogle 0a10603eb3 Pass all options through 2013-10-30 11:38:32 -07:00
Ben Ogle 0700732495 Upgrade to find-and-replace@0.33.1 2013-10-30 11:36:50 -07:00
Ben Ogle c3b270dc80 Upgrade to tabs@0.7.1 2013-10-30 11:26:18 -07:00
Ben Ogle 2baa5ba678 Upgrade to fuzzy-finder@0.15.1 2013-10-30 11:26:04 -07:00
Ben Ogle 0bd701b4a6 Fix tests 2013-10-30 11:25:30 -07:00
Ben Ogle 1be8d5e618 Add openSingletonSync() to rootView 2013-10-30 11:25:30 -07:00
Ben Ogle a212a7c259 pane.split() doesn't implicitly copy the active item. 2013-10-30 11:25:30 -07:00
probablycorey 76a041cfe1 Update autosave package 2013-10-30 11:08:13 -07:00
Kevin Sawicki 46eb6df61e Prepare 34.0.0 release 2013-10-30 10:51:31 -07:00
probablycorey 93c7531cf9 Don't destroy pane items in confirmClose 2013-10-30 10:47:01 -07:00
Kevin Sawicki 8bf726d3e1 Merge pull request #1055 from atom/ks-rename-toml-gfm
Add language- prefix to gfm and toml
2013-10-30 10:43:00 -07:00
Kevin Sawicki 412cb602a4 Upgrade to whitespace@0.8.0 2013-10-30 10:35:50 -07:00
Kevin Sawicki f10abfe630 Upgrade to markdown-preview@0.13.0 2013-10-30 10:34:40 -07:00
Kevin Sawicki 14664625d5 Upgrade to language-toml@0.6.0 2013-10-30 10:29:24 -07:00
Kevin Sawicki 9e12c4610d Upgrade to language-gfm@0.8.0 2013-10-30 10:29:10 -07:00
Kevin Sawicki c1d09f5229 Add cson to valid grammar extensions 2013-10-30 10:23:25 -07:00
Kevin Sawicki d486522cde Upgrade to language-toml@0.4.0 2013-10-30 10:15:41 -07:00
Kevin Sawicki e3ff39bf4f Upgrade to language-gfm@0.6.0 2013-10-30 10:15:18 -07:00
Kevin Sawicki 74a48e58dc Upgrade to settings-view@0.36.0 2013-10-30 09:29:33 -07:00
Kevin Sawicki e63bf75f96 Update apm for native module fix 2013-10-30 09:20:21 -07:00
Kevin Sawicki 8b9595f1bd Use getter when toggling soft tabs 2013-10-30 09:06:12 -07:00
Cheng Zhao 53954c236c Use the apm in node_modules/atom-package-manager instead of vendor/apm. 2013-10-30 23:44:05 +08:00
Cheng Zhao 3de18ae9f6 Fix calling of apm and grunt in script/cibuild and script/test. 2013-10-30 18:10:03 +08:00
Cheng Zhao 9c7ce22abe Unzipping atom-shell.zip on Windows with node-unzip. 2013-10-30 18:02:43 +08:00
Cheng Zhao bfab56247f node_modules/.bin/grunt is a bash script not a js script. 2013-10-30 17:05:08 +08:00
Cheng Zhao e4400c648d Revert "Run apm from node_modules"
This reverts commit 8742f6c06c.

The `node_modules/.bin/apm` is a bash script not a js script, so on
Windows `node node_modules/.bin/apm` would fail with:

```
C:\cygwin\home\zcbenz\codes\atom\node_modules\.bin\apm:2
basedir=`dirname "$0"`
        ^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
```
2013-10-30 10:51:06 +08:00
Kevin Sawicki 271f23083e Bump packages for emissary@0.9.0 upgrade 2013-10-29 18:48:20 -07:00
Kevin Sawicki e3f4a72ab3 Add empty changelog to get this deploy out 2013-10-29 18:28:49 -07:00
Kevin Sawicki ee3b7cee76 Upgrade to emissary@0.9.0 2013-10-29 17:57:36 -07:00
Kevin Sawicki 5a357a54dc Prepare 33.0.0 release 2013-10-29 16:20:05 -07:00
probablycorey d07bf338c8 Consolidate pane item destruction 2013-10-29 15:55:07 -07:00
Kevin Sawicki 516ddec854 Upgrade to dev-live-reload@0.12.0 2013-10-29 15:45:05 -07:00
Kevin Sawicki 0ab2b89c1a Upgrade to collaboration@0.34.0 2013-10-29 15:24:16 -07:00
Kevin Sawicki 2c2c7e67d7 Upgrade to release-notes@0.11.0 2013-10-29 15:20:06 -07:00
probablycorey e1f8b042ed Update autosave 2013-10-29 15:18:07 -07:00
Kevin Sawicki f7ce6a015d Upgrade to release-notes@0.10.0 2013-10-29 15:12:58 -07:00
Kevin Sawicki 4775783ba3 Add missing path require 2013-10-29 15:02:05 -07:00
Kevin Sawicki d0bf4c1d2e Upgrade to emissary@0.8.0 2013-10-29 14:54:54 -07:00
Kevin Sawicki 4f1d862bc0 Merge pull request #1040 from atom/ks-speed-up-load
Speed up start time
2013-10-29 13:47:11 -07:00
Kevin Sawicki 059671c454 🐎 Load packages by path
Previously the package paths were converted to names and then
re-resolved to paths.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This speeds up the spec suite require time by not stat'ing the entire
node_modules directory.
2013-08-14 11:29:48 -07:00
Ted Nyman c61d45805d Formatting 2013-08-14 11:01:50 -07:00
Ted Nyman c294c94c02 Update documentation location 2013-08-14 11:01:50 -07:00
Kevin Sawicki b7a8e22d82 Set spec type after all specs in the category are required 2013-08-14 10:58:56 -07:00
Nathan Sobo bd6dda6f0f Don't load buffer contents from disk without an isModified key in state
When we deserialize a replicated buffer, we always want to honor the
current contents of state. If the state was produced by a call to
`getState` instead of `serialize`, it won't have an `isModified` key,
so we should not load from disk.
2013-08-14 11:55:37 -06:00
Nathan Sobo 468034f261 🙊 2013-08-14 11:46:10 -06:00
Nathan Sobo c6a0e385f7 Always include text in serialized buffer state; also include isModified
Previously, we were not including the text when serializing an
unmodified buffer. We would use the absence of the text field to
determine that the buffer was previously unmodified when deserializing.
The problem is that text now stores the markers associated with the
buffer, and we want to retain those across serialization regardless of
the modified status. So now I include the text always, along with an
isModified flag which if true, will tell to reload the buffer if it
has changed since we last serialized it. Reloading a buffer should
probably do a diff-and-patch in the future rather than replacing the
contents outright, so that we always preserve markers as best as we can.
2013-08-14 11:31:17 -06:00
Kevin Sawicki 4781636889 💄 Group dependencies by type 2013-08-14 10:27:12 -07:00
Nathan Sobo fa6ea01bfc Restore assignment of @project ivar in TextBuffer
Because TextBuffers need a reference to `project` during deserialization,
and because the project global deserializes text buffers while it itself
is being deserialized (which happens before the global is actually
assigned), we have to pass a project reference into TextBuffer. This is
really annoying and makes me want to store the references to open buffers 
elsewhere. But for now it's the only way to break the circularity.
2013-08-14 10:49:48 -06:00
Kevin Sawicki f021ce3657 Compile bundled package files in compile task
Any .coffee, .cson, and .less files found in bundled Atom packages
in node_modules are now compiled during the compile task
2013-08-14 09:28:17 -07:00
Kevin Sawicki 71b238fafc Upgrade to command-logger@0.2.0 2013-08-14 08:48:13 -07:00
Kevin Sawicki 63df6c8dcd Upgrade to settings-view@0.3.0 2013-08-14 08:48:13 -07:00
Kevin Sawicki 7fc8cea167 Upgrade to settings-view@0.2.0 2013-08-14 08:48:12 -07:00
Kevin Sawicki 726a60b348 Upgrade to archive-view 0.2 2013-08-14 08:48:12 -07:00
Kevin Sawicki 0429ed09ff Remove humanize-plus dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki 14df854ea8 Remove keytar dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki c8727873c7 Remove jqueryui-browser dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki 3b7e1400c0 Remove roaster dependency 2013-08-14 08:48:12 -07:00
Kevin Sawicki 2ddd77122e Remove config.bundledPackagesDirPath that was src/packages 2013-08-14 08:48:12 -07:00
Kevin Sawicki 41268c67d7 Remove internal packages section from spec reporter 2013-08-14 08:48:12 -07:00
Kevin Sawicki 4777c4c42c Remove mention of src/packages 2013-08-14 08:48:12 -07:00
Kevin Sawicki ced95e7ad9 Remove src/packages from NODE_PATH 2013-08-14 08:48:12 -07:00
Kevin Sawicki 68ddeeef01 Pull out collaboration package into a separate repo 2013-08-14 08:48:12 -07:00
Kevin Sawicki 184e6a14c7 Pull out settings-view package into a separate repo 2013-08-14 08:48:12 -07:00
Kevin Sawicki 25378e9905 Pull out command-panel package into a separate repo 2013-08-14 08:48:12 -07:00
Kevin Sawicki 80a6999af4 Pull out fuzzy-finder package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 257722f82e Pull out command-palette package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 58a938b3f1 Pull out snippets package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 875f187915 Pull out status-bar package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 229e380e28 Pull out tree-view package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 52e8e3aaf3 Pull out autocomplete package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki dc775f93ff Pull out tabs package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 63b1546212 Pull out bookmarks package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki b9585d1cf2 Pull out package-generator package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 189b9051a9 Pull out whitespace package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki f3ef0b77a8 Pull out bracket-matcher package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki bdefff6abe Pull out editor-stats package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 235078be8e Pull out github-sign-in package into a separate repo 2013-08-14 08:48:11 -07:00
Kevin Sawicki 02d7668c73 Pull out link package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 7bb41f57b0 Pull out markdown-preview package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki c1c50a0b4c Pull out symbols-view package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 7bc135d82e Pull out grammar-selector package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki a1847b5355 Pull out go-to-line package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 3686a5b0ba Pull out git-diff package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki db82f6bb8b Pull out gists package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki d5b5c76485 Pull out gfm package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 6430aefaa8 Pull out toml package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki f41ffd6cbf Pull out wrap-guide package into a separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki 8a44da49d1 Remove tilde from humanize-plus dependency 2013-08-14 08:48:10 -07:00
Kevin Sawicki 9e50c829a0 Pull out image-view package into separate repo 2013-08-14 08:48:10 -07:00
Kevin Sawicki d2cf652a0b Pull out command-logger package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki 01fee754f7 Pull out autoflow package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki 24c304481e Pull out archive-view package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki d02d42f40e Pull out spell-check package to separate repo 2013-08-14 08:48:09 -07:00
Kevin Sawicki c747e1c686 Separate npm and apm output with an empty line 2013-08-14 08:46:53 -07:00
Corey Johnson & Nathan Sobo 3c166edd26 Start switch to Telepath for undo/redo
Also, TextBuffer spec passes!
2013-08-13 17:34:31 -07:00
Corey Johnson & Nathan Sobo 2d46a98ea2 Update telepath 2013-08-13 17:14:10 -07:00
Cheng Zhao 51a847c820 Merge pull request #697 from github/buffered-node-process
Remove dependency of bundled node
2013-08-13 00:05:17 -07:00
Cheng Zhao 4f7c7568e9 Update apm: No more need of bundled node. 2013-08-13 14:48:40 +08:00
Cheng Zhao 326ee2e5fa 💄 2013-08-13 14:47:28 +08:00
Cheng Zhao 32a0faf068 Don't assume we have a bundled node process in BufferedProcess. 2013-08-13 14:47:27 +08:00
Cheng Zhao 66da13a6ff Add BufferedNodeProcess to execute apm and nak.
On Windows the shebang string is not supported, so we haveto execute apm
and nak as scripts instead of as executables.
2013-08-13 14:47:27 +08:00
Cheng Zhao ebaa6c349f Revert "Downgrade to atom-shell@v0.2.1"
This reverts commit d7cfb757d6.
2013-08-13 14:47:27 +08:00
Kevin Sawicki 063d48c4ab Use ScopeSelector class from first-mate
Begin migrating TextMate helpers out of src/ and into the first-mate
package.
2013-08-12 16:22:18 -07:00
Jessica Lord & Kevin Sawicki 0a53e2f7bb Use getText() instead of val() for username & password 2013-08-12 15:52:28 -07:00
Jessica Lord & Kevin Sawicki 12fbd89e79 Clear username and password when detached 2013-08-12 15:46:01 -07:00
Jessica Lord & Kevin Sawicki 6a16ef0cf8 Listen for buffer changed events to validate sign in view 2013-08-12 15:45:52 -07:00
Jessica Lord & Kevin Sawicki 8d180dd767 Set text security on line elements only
This ensures the disc does not appear when the field is empty
2013-08-12 15:44:57 -07:00
Jessica Lord & Kevin Sawicki 475fefa2fd turned off html clear to show duplicate password disc 2013-08-12 15:01:41 -07:00
Jessica Lord & Kevin Sawicki 86d0fca621 Switch GitHub Sign in to mini-editors
Previously bootstrap <input> fields didn't work with keybindings.
Switched to mini-editors to enable expected keybindings. Edited tabs for
focusing and password text to disc style.
2013-08-12 14:56:47 -07:00
Kevin Sawicki 3056efd351 Remove unused lines variable 2013-08-12 14:41:14 -07:00
Kevin Sawicki 7ba57df6f7 Mention new fixes and additions 2013-08-12 10:10:22 -07:00
Nathan Sobo 5c2f4d939a Move new additions to philosophy section and tone-down the rhetoric 2013-08-12 10:46:46 -06:00
probablycorey 6c9c7b6d92 Fuzzy filter scores files more than 10 directories deep
All files more than 10 directories deep were accidentally being scored as 0.
2013-08-12 09:43:43 -07:00
Nathan Sobo 210dd61d2a Start adding some serious philosophy to the contribution guidelines 2013-08-12 00:18:58 -06:00
Kevin Sawicki aa302cb935 Add -syntax suffix to converted themes 2013-08-11 13:51:07 -07:00
Kevin Sawicki 994e856ccd Tweak error message when theme file is not found 2013-08-11 13:44:33 -07:00
Kevin Sawicki 808f7e6ed3 Add grunt task to convert TextMate themes to Atom themes 2013-08-11 13:42:34 -07:00
Kevin Sawicki 22f7bc8f26 Upgrade to terminal 0.3.0 2013-08-09 17:34:31 -07:00
Kevin Sawicki ab0b2cf12e Bundle atom/terminal package by default 2013-08-09 17:24:11 -07:00
Kevin Sawicki 599a2ad021 Group specs into four sections
1. Core specs located in spec/
2. Internal package specs in src/packages
3. Bundled package specs in node_modules
4. User package specs in ~/.atom/packages
2013-08-09 17:24:07 -07:00
Kevin Sawicki db649798ef Ignore missing symlinks in fsUtils.traverseTreeSync()
These were previously throwing an error from the call to
statSync().

Now statSync() is wrapped in a try block and only performed when
lstatSync() reports a symbolic link.
2013-08-09 17:23:29 -07:00
Jessica Lord & Kevin Sawicki 4f8f8c43a4 Rename event to open-settings from open-config 2013-08-09 13:38:01 -07:00
Jessica Lord & Kevin Sawicki 4491a9302b Forward config menu click event to focused window
Previously the Atom > Preferences... menu just logged an error message.

Now it fires a window:open-config event to the focused window.
2013-08-09 13:29:12 -07:00
Jessica Lord & Kevin Sawicki ce138b56c0 add jlord to pairs file 2013-08-09 13:28:25 -07:00
Kevin Sawicki 8f8c0cbf45 Mention theme not found fix 2013-08-09 11:26:37 -07:00
Kevin Sawicki 7e04d85e1e Log a warning when a theme fails to load
Previously Atom would fail to launch if a theme referenced in
the config was not found.
2013-08-09 11:25:07 -07:00
Kevin Sawicki 2597837ba7 Use ~/.atom/storage instead of ~/.atom/.storage
The serialization format is changing for telepath and this allows a clean
upgrade and the dotted directory does not seem needed since it is already
behind one dotted directory (.atom).
2013-08-09 10:38:57 -07:00
Kevin Sawicki 136836e615 Allow non-existent files to be opened from fuzzy finder
The previous isFileSync check prevented unsaved buffers with a path to a
non-existent file from being opened from the fuzzy finder.

Now an error is only displayed if the selected path is a directory.

Closes #686
2013-08-09 10:31:40 -07:00
Matt Colyer 82882624ce Handle atom standard output from atom.sh 2013-08-09 10:23:05 -07:00
Kevin Sawicki c03e849089 Add missing dot in usage ellipsis 2013-08-09 10:10:39 -07:00
Kevin Sawicki 25f98e223f Use subscribe for syntax event callback 2013-08-09 09:37:21 -07:00
Kevin Sawicki c2290ab8b4 Show symlink directory icon in tree view 2013-08-08 21:35:43 -07:00
Kevin Sawicki 9c39587d6e Debounce grammar-added/updated render callback
This prevents rendering from occurring once per grammar loaded
when Atom is started with a markdown preview already opened.
2013-08-08 20:37:54 -07:00
Kevin Sawicki 972aa75f3e Add mixin for adding octicon font-face 2013-08-08 18:54:13 -07:00
Kevin Sawicki 1d1e4b33d4 💄 2013-08-08 18:44:08 -07:00
Kevin Sawicki 79a61d47b2 Remove unused parameter 2013-08-08 18:41:00 -07:00
Kevin Sawicki 26c9e7cfa9 Re-render markdown when a grammar is added
Previously if the markdown preview launched before grammars finished
loading the fenced code blocks would not be colorized correctly.
2013-08-08 18:28:26 -07:00
Kevin Sawicki 28f9f22614 Map coffee-script fence to coffee extension 2013-08-08 18:20:51 -07:00
Kevin Sawicki 69caf6c98f Upgrade to roaster 0.0.7 2013-08-08 18:18:16 -07:00
Kevin Sawicki 51f1bb896c Update config.cson example with accurate keys 2013-08-08 18:07:40 -07:00
Kevin Sawicki 0fd834004e Support optional dash in CoffeeScript fence name 2013-08-08 18:03:47 -07:00
Kevin Sawicki d2654cb70c 💄 2013-08-08 17:56:01 -07:00
Kevin Sawicki 268553cda9 Use css extension for css fenced blocks 2013-08-08 17:50:40 -07:00
Kevin Sawicki 64a61d86d4 Update docs for new window keybinding change 2013-08-08 17:48:28 -07:00
Kevin Sawicki 216a9e11c0 Run set-development-version task during ci task 2013-08-08 17:25:35 -07:00
probablycorey 04373d2d9d Score files with a low nesting depth higher.
Fixes #692
2013-08-08 17:06:58 -07:00
probablycorey 9a2e768882 Group mini-editor css styles 2013-08-08 17:06:58 -07:00
Kevin Sawicki d13d0543b9 Ignore display-property-grouping lint errors
These aren't always accurate since the computed value for floats
can override the specified value.
2013-08-08 16:47:00 -07:00
Kevin Sawicki 6178294537 Use octicon mixin for gutter and line fold icons
This corrects a line height mismatch issue between the editor
and the gutter for certain fonts and font sizes.

Close #689
2013-08-08 16:12:26 -07:00
Kevin Sawicki & Nathan Sobo 4871a7a06d Floor subpixel aware values when calculating position left
getClientRects() does not return subpixels so subpixels values
should be ignored if returned either from scrollView.offset() or
scrollLeft().
2013-08-08 16:11:23 -07:00
Kevin Sawicki fe23d82e23 Use octicon mixins in fuzzy finder and status bar 2013-08-08 14:17:58 -07:00
Kevin Sawicki d6e94b1105 Try chevrons instead of triangles in command panel 2013-08-08 14:12:19 -07:00
Kevin Sawicki f0a2b17914 Use octicon mixins in command-panel.less 2013-08-08 14:10:28 -07:00
Kevin Sawicki ab2252f80f Try chevrons in tree view instead of triangles 2013-08-08 14:00:18 -07:00
Matt Colyer f1cf8711a8 Explictly stop updates if the version is a SHA 2013-08-08 10:41:44 -07:00
Nathan Sobo 0f14dd9420 Disable pane-splitting spec for now
We'll get it working once this branch gets merged to master.
2013-08-08 11:01:01 -06:00
Kevin Sawicki & Nathan Sobo d7cfb757d6 Downgrade to atom-shell@v0.2.1
atom-shell@v0.3.0 removed the node binary which was needed for
scripts spawned by BufferedProcess such as nak. We can explore
other approaches to spawning node-based  subprocesses if it's
a deal-breaker to ship with a node binary.
2013-08-08 09:45:17 -07:00
Kevin Sawicki ea2113e753 Omit 'core.themes' from general-panel
This setting is handled in the theme-panel
2013-08-08 08:45:09 -07:00
Kevin Sawicki 05f4604005 Spy on shell.beep() to prevent an audible beep when specs run 2013-08-08 08:37:09 -07:00
Kevin Sawicki 71b2400dbc Upgrade to space-pen 1.2.0
This should speed up CI times that were originally slowed
down by the upgrade from 1.0.0 to 1.1.0
2013-08-07 21:28:11 -07:00
Kevin Sawicki 1de46330d7 Upgrade to coffee-script-tmbundle 4.0.0
Previous spec failures caused by earlier upgrade were fixed in prior commit.
2013-08-07 18:20:54 -07:00
Kevin Sawicki de4e24582d Comma separate left and right matcher in or matcher 2013-08-07 18:20:41 -07:00
Kevin Sawicki dffb0b35e7 Revert to coffee-script-tmbundle 2.0.0
4.0.0 caused some specs to fails regarding commenting lines
2013-08-07 18:07:06 -07:00
Kevin Sawicki d8ec4573ec Remove all references to vendor/packages
3rd party packages are stored in node_modules
2013-08-07 17:40:15 -07:00
Kevin Sawicki 09a6e9a42e Remove vendored TextMate themes 2013-08-07 17:39:18 -07:00
probablycorey 57fe9c6903 Remove left padding to gutter fold octicon (it causes spec failures) 2013-08-07 16:46:32 -07:00
probablycorey cf3e1a9b6d Remove superfluous logging 2013-08-07 15:52:49 -07:00
probablycorey 4629905b65 Remove all references to TextMate themes.
Let's not ship with TextMate theme support. Our .less theme files are
easier to read and write than TextMate themes. If we want to use
TextMate themes we should write a script that converts them to the 
Atom .less version.

Closes #629
2013-08-07 15:21:47 -07:00
Kevin Sawicki d4e8de60ce Upgrade coffee-script-tmbundle 2013-08-07 14:37:55 -07:00
Kevin Sawicki 3237636206 Use octicon variables in bookmarks.less 2013-08-07 14:06:30 -07:00
Kevin Sawicki 934fe1c6d0 Add left padding to gutter fold octicon 2013-08-07 14:01:23 -07:00
Kevin Sawicki 9aff1476d4 Use octicon variables in command-panel.less and editor.less 2013-08-07 13:57:41 -07:00
Kevin Sawicki 084d310366 Use octicon variables in fuzzy-finder.less 2013-08-07 13:50:38 -07:00
Kevin Sawicki d122d18a34 Update New Window menu keybinding to cmd-shift-n 2013-08-07 13:39:45 -07:00
Kevin Sawicki 6fb3dea9cd Use octicon variables in status-bar.less 2013-08-07 13:36:06 -07:00
Nathan Sobo ceb2a3857d Merge pull request #681 from github/scope-ranges
Add ability to query for a range covering a given scope/position
2013-08-07 12:14:00 -07:00
Nathan Sobo ab80da4363 Add EditSession.bufferRangeForScopeAtCursor 2013-08-07 12:53:09 -06:00
Nathan Sobo 19545e1113 Add setTextInBufferRange to EditSession
We should probably rename TextBuffer.change to .setTextInRange as well
2013-08-07 12:53:09 -06:00
Nathan Sobo 88603e2771 Use normalized variables instead of original parameters 2013-08-07 12:53:09 -06:00
Nathan Sobo 5f323cc67c Add TokenizedBuffer.bufferRangeForScopeAtPosition(selector, position)
You can call this method with a selector and a position and get the range
of any matching scope containing the given position, or a falsy value
if the scope does not match at that position.
2013-08-07 12:53:03 -06:00
Jason Rudolph & Nathan Sobo 39d15d6087 Add _.isSubset 2013-08-07 12:37:03 -06:00
Jason Rudolph & Nathan Sobo eaba8ef016 Add Jason Rudolph to .pairs file 2013-08-07 12:36:05 -06:00
Jason Rudolph & Nathan Sobo 6cc4cf87b9 💄 Add intention-revealing helper method 2013-08-07 12:36:05 -06:00
Kevin Sawicki c6a914a6e1 Default looking for octicons in ~/github/octicons 2013-08-07 10:59:45 -07:00
Kevin Sawicki 32af574206 Add trailing newline to octicon-utf-codes.less 2013-08-07 10:56:08 -07:00
Kevin Sawicki 552ab150cb Mention no more reload for theme changes 2013-08-07 10:52:36 -07:00
Kevin Sawicki 2698925d10 Reload stylesheets when core.themes config changes
Extracted a new ThemeManager class to encapsulate all the theme
work previously done directly in atom global.

Closes #642
2013-08-07 10:51:25 -07:00
probablycorey 13b1632dfc Update octicons 2013-08-07 10:37:12 -07:00
probablycorey de204b0321 Add script to automate octicon updates 2013-08-07 10:37:12 -07:00
Kevin Sawicki def07344e9 Visually separate core and package specs in reporter 2013-08-07 09:32:29 -07:00
Kevin Sawicki 4ef3f39a7b Rename settings.cson to settings-view.cson 2013-08-07 08:53:20 -07:00
Kevin Sawicki 2bf26e8db5 Rename theme-config-panel-spec to theme-panel-spec 2013-08-07 08:52:02 -07:00
Kevin Sawicki 24b3b664dc Rename config-view-spec.less to settings-view-spec.less 2013-08-07 08:51:23 -07:00
Kevin Sawicki 2352829b28 Rename config-view.less to settings-view.less 2013-08-07 08:50:45 -07:00
Kevin Sawicki 3ca34dad40 Tweak settings view button text 2013-08-07 08:50:31 -07:00
Kevin Sawicki 15dc6442d0 Upgrade to less 1.4.2
Prevents issues with version incompatibilities between our less fork,
grunt-contrib-less, and grunt-lesslint.

Closes #647
2013-08-06 19:40:53 -07:00
Kevin Sawicki d775038f8d Don't expand snippets when text is selected
Closes #675
2013-08-06 19:31:49 -07:00
Kevin Sawicki 3829970a09 Register edit session with project at end of ctor
Previously edit-session-created could be fired before certain properties
were set which could cause listeners to raise exceptions.
2013-08-06 19:09:14 -07:00
Kevin Sawicki 633306e6bf Fire edit-session-created event when deserializing
This event was previously not being fired when splitting panes
since the constructor pushing the edit session directly to the
project's array.

Closes #684
2013-08-06 19:07:24 -07:00
Kevin Sawicki 7d58008ed3 Show completions for current scope in autocomplete
Add the TextMate "completions" preferences available as "editor.completions"
and add all completions matching the current scope of the cursor position
when building the autocomplete word list.

Closes #676
2013-08-06 18:18:22 -07:00
Kevin Sawicki bc9e32a3cf 💄 2013-08-06 17:11:32 -07:00
Kevin Sawicki a98791ebd0 Add filter support to selector grammar
Currently these are unimplemented but they can now be parsed
successfully since they are used by certain snippets.
2013-08-06 17:06:22 -07:00
Kevin Sawicki a72e1813e9 Support stand-alone negation in selector grammar
Previously negation was only supported as the right hand side
of an composite.
2013-08-06 16:54:32 -07:00
Kevin Sawicki fe9ffbeb12 Support selectors with a trailing comma 2013-08-06 15:55:50 -07:00
Kevin Sawicki e61992c1f6 Allow _ characters in selector segments 2013-08-06 15:21:31 -07:00
Kevin Sawicki 612332cd9f Allow + characters in selector segments 2013-08-06 15:12:24 -07:00
Kevin Sawicki 40d81ca22c Upgrade to space-pen 1.1.1
Fixes regression when removing multiple views
2013-08-06 15:09:11 -07:00
Kevin Sawicki faf02460f5 Add TextMateScopeSelector.toCssSelector() 2013-08-06 15:09:10 -07:00
Kevin Sawicki f010e8a888 Add Editor.scopesForBufferPosition()
Passes through to EditSession.scopesForBufferPosition()
2013-08-06 15:09:10 -07:00
probablycorey 712e9c7203 Add spec to test cutToEndOfLine when soft wrap is enabled 2013-08-06 14:02:30 -07:00
probablycorey 128a030880 Moving to the start or end of a line treats screen lines as real lines 2013-08-06 14:02:30 -07:00
Kevin Sawicki 907c3245a9 Upgrade to space-pen 1.1.0
Uses WeakMap cache for faster element to View lookup.
2013-08-06 13:49:20 -07:00
Kevin Sawicki da7cbeddc7 Support scope selectors with dashes in segments
Previously dashes were only interpreted as negation which
wasn't correct.

Segments should be able to contain a dash as long as it isn't at
the very beginning of the segment.
2013-08-06 12:18:36 -07:00
Kevin Sawicki 8b55c4981d Add assert for multi-segment prefix 2013-08-06 11:35:37 -07:00
Kevin Sawicki b7a59748c4 Adding missing parens 2013-08-06 10:47:56 -07:00
probablycorey b49de61402 Rename getMovePreviousWordBoundaryBufferPosition
New name is getPreviousWordBoundaryBufferPosition
2013-08-06 08:53:27 -07:00
probablycorey c38edbfe0b Cursor.moveCursorToBeginningOfNextWord() behaves correctly on whitespace
Closes #669
2013-08-05 16:47:29 -07:00
Kevin Sawicki 557ada7c81 Read metadata when TextMate packages are loaded
The bundled TextMate packages contain valid package metadata
which should be available when displaying in the packages settings
view.
2013-08-05 16:09:10 -07:00
Kevin Sawicki 236ec6fc3b Ignore children with no names
This will be elements that aren't package views
2013-08-05 15:54:03 -07:00
Kevin Sawicki 35890588ca Remove separation for release that didn't happen 2013-08-05 14:10:52 -07:00
probablycorey c6c0ecbb37 Make changelog entries more readable 2013-08-05 14:09:08 -07:00
probablycorey 1fdbf4612c Update changelog 2013-08-05 13:56:22 -07:00
probablycorey 948fa3a91c Fix naming errors 2013-08-05 13:54:39 -07:00
probablycorey a624d52f42 💄 2013-08-05 13:54:39 -07:00
probablycorey 2b50f2409e Add settings view package description 2013-08-05 13:54:39 -07:00
probablycorey 0b11ce64a2 Rename config view to settings view 2013-08-05 13:54:39 -07:00
probablycorey f70c6928cd Use rootView.open to display config panel 2013-08-05 13:54:39 -07:00
probablycorey cbb6d58d1b Rename ThemeConfigPanel to ThemePanel 2013-08-05 13:54:39 -07:00
probablycorey 4dc2e48e8c Activate all packages before loading the settings config panel 2013-08-05 13:54:39 -07:00
probablycorey 7385bd97c6 💄 2013-08-05 13:54:39 -07:00
probablycorey 063078cd34 Remove Config panel class and update Settings Panel spec 2013-08-05 13:54:39 -07:00
probablycorey 789b8a2987 Rename GeneralConfigPanel to SettingsPanel 2013-08-05 13:54:38 -07:00
probablycorey 53ea135799 Add defaults for autodave and excludeVcsIgnoredPaths 2013-08-05 13:54:38 -07:00
probablycorey 32242687bd Rename @pack to @metadata 2013-08-05 13:54:38 -07:00
probablycorey 3aca556827 Simplify tab clicking 2013-08-05 13:54:38 -07:00
probablycorey 372a64bd5d Typo 2013-08-05 13:54:38 -07:00
probablycorey 3f83d42afc Fix broken specs 2013-08-05 13:54:38 -07:00
probablycorey 8bf877e400 Inline available packages 2013-08-05 13:54:38 -07:00
probablycorey 29f45b787b Add set loading text 2013-08-05 13:54:38 -07:00
probablycorey 68491a512d Fix broken specs 2013-08-05 13:54:38 -07:00
probablycorey bd72f245b1 Inline installed packages panel 2013-08-05 13:54:38 -07:00
probablycorey 4ef5082887 Add filter to packages config panel 2013-08-05 13:54:38 -07:00
probablycorey 27822fb37c Remove editor config panel 2013-08-05 13:54:38 -07:00
probablycorey be803bf122 Remove comments 2013-08-05 13:54:38 -07:00
probablycorey db29a1b6a2 Auto populate config settings 2013-08-05 13:54:38 -07:00
probablycorey 25d4bb8d6c Add _.uncamelcase 2013-08-05 13:54:37 -07:00
probablycorey 8cc47a2069 Add _.deepExtend 2013-08-05 13:54:37 -07:00
probablycorey c825e20f62 Make config view focusable 2013-08-05 13:54:37 -07:00
probablycorey 69eace6292 Remove references to windowed config panel 2013-08-05 13:54:37 -07:00
probablycorey 2284435551 Move config view to a package 2013-08-05 13:54:37 -07:00
probablycorey 1252b94fcb Warn if no deserilizer can be found for some state 2013-08-05 13:54:37 -07:00
probablycorey 8d0afc087f Don't set uri when pane item doesn't serialize itself 2013-08-05 13:54:37 -07:00
probablycorey f789c7e2df 💄 2013-08-05 12:43:56 -07:00
probablycorey 80bbd035db Do not download update if Atom is running in dev mode 2013-08-05 12:40:47 -07:00
Kevin Sawicki 0397df2f4d Rename package main to just Bookmarks
This allows the view that displays the bookmarks for browsing
to be called just BookmarksView.
2013-08-05 11:32:50 -07:00
Kevin Sawicki cd8796b561 Add select list to browse and open bookmarks from 2013-08-05 11:28:10 -07:00
Kevin Sawicki 68103601e6 Move folding changes to next release section 2013-08-01 09:13:12 -07:00
Kevin Sawicki c278ead451 Mention bookmarks view 2013-08-01 09:12:18 -07:00
Kevin Sawicki c44e9b6308 💄 2013-08-01 08:48:15 -07:00
Kevin Sawicki 1c37537d19 Show octicon in gutter for bookmarked line 2013-08-01 08:47:41 -07:00
Kevin Sawicki 684dec4b24 Always suggest non-negative indent levels
Close #668
2013-07-31 18:01:38 -07:00
Kevin Sawicki 30f72c1519 Update bootstrap URL in .gitmodules 2013-07-30 16:39:23 -07:00
Kevin Sawicki 69733a8f7a Put file name at beginning of markdown preview title
Previously the 'Markdown Preview - ' prefix dominated the tab text
making it hard to disambiguate which preview was for which editor.

Now the title leads with the file name and follows with a "Preview" suffix.
2013-07-29 14:41:23 -07:00
Kevin Sawicki c22bbf98b8 Remove unused redis dependency 2013-07-28 19:22:45 -07:00
Kevin Sawicki 555611aa1f Prepend new participant views instead of appending 2013-07-27 13:45:21 -07:00
Nathan Sobo 579cfb4a4a Disable audio for self-streams 2013-07-27 13:53:10 -06:00
Kevin Sawicki 9753a63227 Trigger connected event for local media connection to self
Also upgrade atom-collaboration-server
2013-07-27 11:56:04 -07:00
Kevin Sawicki 292815c014 Add participant view for self
This will show your own camera video and which color you appear
as to other session participants.
2013-07-27 11:38:16 -07:00
Kevin Sawicki b38a6f2235 Request avatars to be 420px 2013-07-27 11:10:58 -07:00
Kevin Sawicki 0b6f38118e Add back setting avatar background image to avatar url 2013-07-27 11:02:44 -07:00
Kevin Sawicki 50932bc9e2 Remove unused require 2013-07-27 10:42:25 -07:00
Kevin Sawicki 99ff064072 💄 remove unneeded units 2013-07-27 10:40:50 -07:00
Kevin Sawicki 51899e602c 💄 remove trailing whitespace 2013-07-27 10:40:15 -07:00
Kevin Sawicki bca15a7589 Show avatar until video becomes available 2013-07-27 10:39:24 -07:00
Kevin Sawicki c723dd5406 Exclude remote markers from TextBuffer.serialize() 2013-07-27 10:31:11 -07:00
Kevin Sawicki 891f032def Unfocus collaboration spec 2013-07-27 10:06:04 -07:00
Nathan Sobo 433435743e Log some collaboration events until we're more stable 2013-07-27 09:48:01 -06:00
Ben Ogle 2a010cb00a volume 100%; remove remove link 2013-07-26 17:41:15 -07:00
Ben Ogle d13cc7d96f Merge branch 'summit' of github.com:github/atom into summit 2013-07-26 17:32:07 -07:00
Kevin Sawicki & Matt Colyer 624ca77173 Wrap webkitGetUserMedia in nextTick for reliability 2013-07-26 17:24:37 -07:00
Ben Ogle ac8c95d9a6 Fix padding on connections count 2013-07-26 17:16:47 -07:00
Ben Ogle 492fc46fb8 Add avatar when video hidden 2013-07-26 17:08:52 -07:00
Ben Ogle 86d1990894 Add fontello icons.
Remove this when we have octicons for audio and video
2013-07-26 16:54:35 -07:00
Kevin Sawicki & Nathan Sobo 121ee10f5a Call atom.getWindowState() instead of accessing property directly 2013-07-26 16:17:32 -07:00
Kevin Sawicki & Nathan Sobo c1e6aeece8 Store live reference to root view state in window state instead of clone 2013-07-26 16:17:32 -07:00
Ben Ogle 450caa124a add another color 2013-07-26 16:12:34 -07:00
Ben Ogle 85e90f2c09 Add ParticipantViewContainer
makes the stacking of participant views waaay better
2013-07-26 16:10:04 -07:00
Ben Ogle c6293afc3b Add index to participant view to stack multiple vids 2013-07-26 15:39:03 -07:00
Ben Ogle 87183f52ad comment out the avatar thing 2013-07-26 15:39:03 -07:00
Ben Ogle c49e092082 toggle classes added to participant view 2013-07-26 15:39:03 -07:00
Ben Ogle 100110430a Add toggle states and colors to toggle vid and audio buttons 2013-07-26 15:39:03 -07:00
Kevin Sawicki & Nathan Sobo 9d2756a8ae Rename audio/video configuration keys 2013-07-26 15:28:23 -07:00
Kevin Sawicki & Nathan Sobo 163015517e Create media connection for each other participant 2013-07-26 15:06:16 -07:00
Ben Ogle 5b267f4a3f cursor has site color 2013-07-26 14:44:32 -07:00
Ben Ogle e07f92c4ee Pick colors for the cursors and volume bars 2013-07-26 14:32:36 -07:00
Ben Ogle a7b496f8c1 add site-id class to selection-view 2013-07-26 14:10:11 -07:00
Ben Ogle f562a84bb5 add TODO for the crappy siteId hash usage 2013-07-26 14:01:18 -07:00
Ben Ogle e84065fd9d Better use of participant object 2013-07-26 14:00:53 -07:00
Ben Ogle c6737caae6 add test for clientId -> siteId map 2013-07-26 13:50:02 -07:00
Ben Ogle a0b7b4dd96 use clientIdToSiteId in participant view 2013-07-26 13:50:02 -07:00
Ben Ogle 4fe90900cc add clientIdToSiteId to session's document 2013-07-26 13:48:24 -07:00
Matt Colyer e088daa15b Copy the session id when hosting via the statusbar 2013-07-26 13:43:25 -07:00
Matt Colyer cc9902958e Remove unused github avatar initialization 2013-07-26 13:30:40 -07:00
Matt Colyer b87b4c1089 Reduce size of video stream 2013-07-26 12:22:33 -07:00
Kevin Sawicki & Nathan Sobo c2ec172617 Upgrade telepath to avoid marker update corner case 2013-07-26 13:04:42 -06:00
Kevin Sawicki & Nathan Sobo a60320df3a Add Participant class 2013-07-26 12:25:20 -06:00
Kevin Sawicki & Nathan Sobo 32f75040de Spec 💄 – Move spies to beforeEach and s/host/leader/g 2013-07-26 11:48:42 -06:00
probablycorey c7321a795b Use WsChannel to handle media webrtc handshake 2013-07-26 08:54:07 -07:00
Kevin Sawicki & Nathan Sobo 8493ef092e Add Editor.getRelativePath() that delegates to EditSession 2013-07-26 08:45:41 -07:00
Kevin Sawicki & Nathan Sobo a9edaaba51 Add failing spec for splitting edit sessions 2013-07-26 08:45:13 -07:00
Kevin Sawicki 0e89db68a3 Upgrade to patrick 0.4 2013-07-26 08:40:45 -07:00
Kevin Sawicki 4f6f26735c Upgrade to git-utils 0.24 2013-07-26 08:38:40 -07:00
Cheng Zhao b9261a33be Update apm: update node to v0.10.15. 2013-07-26 20:16:56 +08:00
Kevin Sawicki & Nathan Sobo b4401cf10c Upgrade to patrick 0.3 2013-07-25 19:22:02 -07:00
Kevin Sawicki & Nathan Sobo b55d4364ff Allow audio/video to be disabled via config 2013-07-25 19:18:09 -07:00
Kevin Sawicki & Nathan Sobo 4c65332e55 Log when attempting to open non-session URL 2013-07-25 19:04:16 -07:00
Kevin Sawicki & Nathan Sobo 20f983874a Log the session being joined from the browser process 2013-07-25 19:03:30 -07:00
Kevin Sawicki & Nathan Sobo f859c1e32a Warn if we drop replication events 2013-07-25 19:00:32 -07:00
Ben Ogle eb40100b0f Add action bar to video. 2013-07-25 18:40:42 -07:00
Ben Ogle ad946ea482 Add email title to user. Could be a proper tooltip? 2013-07-25 18:40:42 -07:00
Ben Ogle f547af2896 Add small view by clicking 2013-07-25 18:40:41 -07:00
Ben Ogle 05caa45939 use getOtherParticipants in initial view creation 2013-07-25 18:40:41 -07:00
Ben Ogle b73f020555 remove listening event, add logic to started and stopped events 2013-07-25 18:40:41 -07:00
Ben Ogle b4ee425711 subscribe to participant change events in status bar view 2013-07-25 18:40:41 -07:00
Kevin Sawicki & Nathan Sobo ffb4387aab Upgrade atom-collaboration-server 2013-07-25 18:10:49 -07:00
Kevin Sawicki & Nathan Sobo ba644ea9f1 Add SSL support to session 2013-07-25 17:58:51 -07:00
Ben Ogle & Corey Johnson 602fecefa6 Handle participant exiting 2013-07-25 16:05:48 -07:00
probablycorey d49d3156eb Display audio and video on all sessions 2013-07-25 16:05:48 -07:00
probablycorey 47ee4337ce Add Ben Ogle to pairs file
For the 50th time
2013-07-25 16:05:48 -07:00
probablycorey a8cdf2036d Add isListening to session 2013-07-25 16:05:48 -07:00
probablycorey 0ee9aecbd1 Change isHost to isLeader 2013-07-25 16:05:48 -07:00
probablycorey 34b6c71e8a 💄 2013-07-25 16:05:47 -07:00
Ben Ogle ff73ffcb16 style the video 2013-07-25 16:05:47 -07:00
Ben Ogle cff8833b4c Add status bar icon for sharing.
Also adds participant views to the rootView
2013-07-25 16:05:30 -07:00
Kevin Sawicki & Nathan Sobo 9f8a6598e3 Use avatar url directly 2013-07-25 14:36:32 -07:00
Kevin Sawicki & Nathan Sobo 0771270c0d Remove user from ec2 host 2013-07-25 14:17:25 -07:00
Kevin Sawicki & Nathan Sobo 185f97e3b2 Default session host to ec2 instance 2013-07-25 13:59:23 -07:00
Kevin Sawicki & Nathan Sobo 3685cb3b52 Display participants in host and guest views
Also add back media connection starting in Session
2013-07-25 13:47:55 -07:00
Kevin Sawicki & Nathan Sobo bb3cacf2cd Unify guest and host sessions into single class 2013-07-25 12:56:38 -07:00
Kevin Sawicki & Nathan Sobo 241e787d0f Emit 'participant-exited' events 2013-07-25 12:26:41 -06:00
Kevin Sawicki & Nathan Sobo 4c49b69613 Include participant data in 'participant-entered' event 2013-07-25 12:13:08 -06:00
Kevin Sawicki & Nathan Sobo 954a130f41 Include participants data w/ GuestSession 'started' events 2013-07-25 12:08:33 -06:00
Kevin Sawicki & Nathan Sobo 721bc67389 💄 2013-07-25 11:59:17 -06:00
Kevin Sawicki & Nathan Sobo 1755702e1a Include participants data w/ HostSession 'started' event 2013-07-25 11:51:07 -06:00
Kevin Sawicki & Nathan Sobo a4e1d84ebb Assign clientId to Session from its channel 2013-07-25 11:50:29 -06:00
Kevin Sawicki & Nathan Sobo b9e23b96eb Use atom-collaboration-server directly in specs 2013-07-25 10:38:54 -06:00
Kevin Sawicki & Nathan Sobo a22587d09b Send OAuth token as web socket query param 2013-07-24 19:47:10 -07:00
Kevin Sawicki & Nathan Sobo 50c1fb2e3c Remove redis channel 2013-07-24 18:42:52 -07:00
Kevin Sawicki & Nathan Sobo 1f00254759 Handle presence on server and clean up channel/event names 2013-07-24 19:35:05 -06:00
Kevin Sawicki & Nathan Sobo de403a68c3 Remove Pusher-related code 2013-07-24 19:10:05 -06:00
Kevin Sawicki & Nathan Sobo 6b19cbad44 Replace RedisChannel with WsChannel 2013-07-24 18:59:55 -06:00
Kevin Sawicki & Nathan Sobo 1fc6509a51 Use Redis pub/sub for channels. to @mcolyer for the idea! 2013-07-24 17:20:01 -06:00
Ben Ogle e1a78d1f0f newlines follow last line's indent 2013-07-24 15:28:12 -07:00
Ben Ogle c7de0ba3bc fix #634 jump to the beginning of the fold when clicking on folded block. 2013-07-24 15:12:19 -07:00
Kevin Sawicki & Nathan Sobo 1bfb10bf2b Distribute events with pusher 2013-07-24 15:05:39 -07:00
Ben Ogle & Corey Johnson 16cce1efb1 nof 2013-07-24 14:55:43 -07:00
Ben Ogle b3025a4dfc rename rowRangeForCommentFoldAtBufferRow -> rowRangeForCommentAtBufferRow 2013-07-24 13:09:00 -07:00
Ben Ogle 11a1a27dbd Handle * prefixes properly 2013-07-24 12:18:27 -07:00
Ben Ogle e76fe439ba Fix tests. Indent oops. 2013-07-24 12:18:27 -07:00
Ben Ogle cc8513afdf remove !! hack on isComment 2013-07-24 12:18:27 -07:00
Ben Ogle c17f5bd41e Return false from isComment() for consistency 2013-07-24 12:18:27 -07:00
Ben Ogle 2d9ef9aad6 Add note for ScreenRow in tokenizedBuffers 2013-07-24 12:18:27 -07:00
Ben Ogle f7bb8aab9e Move rowRangeForParagraphAtBufferRow into LanguageMode 2013-07-24 12:18:27 -07:00
Ben Ogle c5c1980c9a remove fdescribe 2013-07-24 12:11:33 -07:00
Ben Ogle f234b8fa27 respects comment chars 2013-07-24 12:11:33 -07:00
Ben Ogle 778e3bbd67 respects indentation 2013-07-24 12:11:33 -07:00
Ben Ogle 5d8d5da602 autoflow respects current paragraphs 2013-07-24 12:11:33 -07:00
Ben Ogle fe449e31e3 Move config stuff out of the autoflow 2013-07-24 12:11:33 -07:00
Ben Ogle 617f0ae79a tests work again 2013-07-24 12:11:33 -07:00
Ben Ogle cf3de0e8dc move autoflow into lib dir 2013-07-24 12:11:32 -07:00
Ben Ogle 173c47f780 Fix issue in jumping to next bookmark 2013-07-24 12:07:56 -07:00
Ben Ogle 77e12e3658 add comment about using better invalidation strategy 2013-07-24 12:07:56 -07:00
Ben Ogle 8db9551700 Handle one bookmark 2013-07-24 12:07:56 -07:00
Ben Ogle ece0c76158 Use @editor.command to bind to commands 2013-07-24 12:07:56 -07:00
Ben Ogle 8881847c61 Handle jumping case when no bookmarks 2013-07-24 12:07:55 -07:00
Ben Ogle 4254efd49e remove fdescribe 2013-07-24 12:07:55 -07:00
Ben Ogle 6968075d38 Jumping to bookmarks works 2013-07-24 12:07:55 -07:00
Ben Ogle 3cb29e1d5c visually marks bookmarked lines 2013-07-24 12:07:55 -07:00
Ben Ogle e632b091f9 add initial bookmark plugin 2013-07-24 12:07:55 -07:00
Ben Ogle afa92e51f6 update changelog for the folding changes 2013-07-24 12:05:16 -07:00
Ben Ogle d746c7566c Fix CommandPanel spec
I added a new sample-with-comments.js file which 
has more matches for 'sort', so the test needed 
to be updated.
2013-07-24 12:05:16 -07:00
Ben Ogle 0a075c6934 remove fdescribe 2013-07-24 12:05:16 -07:00
Ben Ogle cef3b7d634 move folding tests from EditSession -> LanguageMode 2013-07-24 12:05:16 -07:00
Ben Ogle c31ba651cf Add shortcuts for folding at an indent level. 2013-07-24 12:05:16 -07:00
Ben Ogle d4d3426b4e Add foldAllAtIndentLevel() 2013-07-24 12:05:16 -07:00
Ben Ogle 89e3d2efec Rearrange folding functions
I think it is more clear to have small constituent 
functions below functions that compose them. IMO, 
this reads better.
2013-07-24 12:05:15 -07:00
Ben Ogle c2326d096b Fold comments in foldAll() 2013-07-24 12:05:15 -07:00
Ben Ogle 18146346f6 add failing comment fold tests 2013-07-24 12:05:15 -07:00
Ben Ogle 519c514092 add a new sample with some comments 2013-07-24 12:05:15 -07:00
Ben Ogle 4187615fa7 Fix test 2013-07-24 11:53:33 -07:00
Ben Ogle d98ea0180c Proper handling of cursor up and down behavior when selection range 2013-07-24 11:53:33 -07:00
Ben Ogle 226a4bf391 Add tests for moving to end of selection 2013-07-24 11:53:33 -07:00
Ben Ogle a689a5906e add moveToEndOfSelection option to moveLEft and moveRight 2013-07-24 11:53:33 -07:00
Kevin Sawicki 71cbcf9c4a Enable peer.js debug flag
This will log messages from the reliable library to try
and debug the packet loss issue.
2013-07-24 08:29:07 -07:00
Kevin Sawicki 40d76d2db9 Replace git global with project.getRepo() 2013-07-23 19:31:32 -07:00
Kevin Sawicki & Nathan Sobo 79fab6602f Don't replicate spell check markers 2013-07-23 18:31:30 -07:00
Kevin Sawicki & Nathan Sobo 672d0051cc Upgrade to peer.js 0.2.8 2013-07-23 18:04:52 -07:00
Kevin Sawicki & Nathan Sobo 865ab16fdf Uncomment essential logging lines 2013-07-23 17:52:05 -07:00
Corey Johnson & Matt Colyer ce2a613858 Remove sharing ivar from Host Session 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 087c4c60a1 Don't turn on the web cam until sharing is begun 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 77acaf0a1a Refactor Host Session 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 12ffff9dde Refactor guest session 2013-07-23 17:49:20 -07:00
Corey Johnson & Matt Colyer 81147c4bc6 Add TURN server support for all WebRTC connections 2013-07-23 17:49:19 -07:00
Matt Colyer 0e3940373d Add user to turn server configuration 2013-07-23 17:49:19 -07:00
Corey Johnson & Matt Colyer 07dea75562 Configure TURN and STUN servers 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo 1bd9a6bef3 Display cursors from all replicas 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo 1bf6307480 Display selections from all replicas 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo b8b9653fc0 💄 2013-07-23 17:49:19 -07:00
Kevin Sawicki & Nathan Sobo 636f81703c Distinguish remote and local selections in EditSession
Also: Add an Environment spec helper class that swaps out global
variables to simulate running code in different environments for the
replication specs.
2013-07-23 17:49:14 -07:00
Ben Ogle 18370bb663 Merge pull request #645 from github/bo-move-word-behavior
Add new commands for moving between words
2013-07-23 15:38:37 -07:00
Ben Ogle 1465736974 Merge branch 'master' into bo-move-word-behavior
Conflicts:
	src/app/editor.coffee
2013-07-23 15:34:20 -07:00
Ben Ogle 3907344fef Merge pull request #646 from github/bo-small-dark-theme-change
Small dark theme change
2013-07-23 15:32:51 -07:00
Ben Ogle 7c414d47cb Merge pull request #644 from github/bo-fix-scrollbar-issues
Fix scrollbar css issues
2013-07-23 15:31:38 -07:00
Kevin Sawicki 5161a71bae Remove unused telepath key from initial data hash 2013-07-23 12:02:59 -07:00
Kevin Sawicki & Nathan Sobo 9c67aa105b Replace createSite with new Site 2013-07-23 11:58:41 -07:00
Kevin Sawicki adbdb1492f DRY up repo URL to project path mapping 2013-07-23 11:56:42 -07:00
Kevin Sawicki 4fff0b9792 Remove project path from state so it doesn't replicate 2013-07-23 11:40:21 -07:00
Kevin Sawicki 4c912f4538 Pretty print window state JSON when serializing to disk 2013-07-23 11:34:03 -07:00
Kevin Sawicki a305e15746 Shrink avatar image/video to 32px 2013-07-23 08:31:32 -07:00
Kevin Sawicki 202492cc4b Trigger started/stopped events based on peer.js open/close events 2013-07-23 08:28:02 -07:00
Kevin Sawicki bc74be531d Mention keymap changes and inspect element menu 2013-07-23 08:13:32 -07:00
Kevin Sawicki & Nathan Sobo f3a932bbde Remove unused initialPath load setting
This is now handled inside Project@deserialize
2013-07-22 20:00:15 -07:00
Kevin Sawicki & Nathan Sobo 7aa2084147 💄 2013-07-22 19:59:18 -07:00
Kevin Sawicki & Nathan Sobo 019a0f2b84 Don't deserialize null pane container root 2013-07-22 19:58:59 -07:00
Kevin Sawicki & Nathan Sobo 501a6b7d11 Add site global used to create all telepath documents 2013-07-22 19:58:27 -07:00
Kevin Sawicki & Nathan Sobo 0370eb9236 Default soft wrap to millionth column
This is because peer.js cannot encode Infinity
but it should be ideally controlled via a boolean
flag instead of column number.
2013-07-22 18:40:57 -07:00
Kevin Sawicki & Nathan Sobo 4cba8ab48f Serialize project when editor window is unloaded 2013-07-22 18:39:32 -07:00
Kevin Sawicki & Nathan Sobo f4e7693e70 💩 Put apm back to version we clobbered during merge 2013-07-22 18:47:16 -06:00
Kevin Sawicki & Nathan Sobo 73adc40c4e 💄 use array-shorthand instead of new Range 2013-07-22 18:39:46 -06:00
Kevin Sawicki & Nathan Sobo 844469a9a7 Resolve filePath in Project.buildBuffer 2013-07-22 18:39:22 -06:00
Kevin Sawicki & Nathan Sobo faa8a8d9fc Use absolute path instead of uri when opening save-as dialog 2013-07-22 18:18:42 -06:00
Kevin Sawicki & Nathan Sobo fa59aafffb Relativize buffer paths for replication
TextBuffers now maintain a reference to their containing project to
make it easier to test replication of buffers between environments
without worrying about the value of the `project` global.

We're also starting the process of moving the `git` global into Project
as the `Project.repository` property.
2013-07-22 18:13:01 -06:00
Corey Johnson & Matt Colyer d051cbe0f6 Add video and audio streams to host view 2013-07-22 14:13:58 -07:00
Corey Johnson & Matt Colyer 1f18c0ba02 Stream audio and video feed of host to guest view
Conflicts:
	src/packages/collaboration/lib/session-utils.coffee
2013-07-22 13:58:55 -07:00
Corey Johnson & Matt Colyer 034aaa2927 Assume first message sent by host is a telepath document 2013-07-22 13:57:46 -07:00
probablycorey 7b57c12f59 💄 2013-07-22 13:57:36 -07:00
Ben Ogle 592b0886b2 new editor is now cmd+n, cmd+shift+n is new window fixes #652 2013-07-22 13:45:04 -07:00
Kevin Sawicki & Nathan Sobo 642df0924d Merge branch 'master' into shared-buffers
Conflicts:
	vendor/apm
2013-07-22 11:54:51 -07:00
Kevin Sawicki & Nathan Sobo 1685d62cae Don't allow caching of coffee requires to be overridden in tasks
This is a follow-on to the previous commit which handled the index.html
case.
2013-07-22 11:50:14 -07:00
Kevin Sawicki & Nathan Sobo e705e3e045 Don't allow caching of coffee requires to be overridden
Previously coffeestack was requiring a different version of coffeescript
than atom was, which had a side effect of re-registering the extension
handler for .coffee requires. This disabled coffee-cache, which made
require really slow again.
2013-07-22 11:44:39 -07:00
Kevin Sawicki 56a2c79fe1 Merge branch 'collaboration-presence' into shared-buffers
Conflicts:
	src/app/edit-session.coffee
	src/app/project.coffee
	src/app/text-buffer.coffee
	src/app/window.coffee
	src/packages/collaboration/lib/bootstrap.coffee
	src/packages/collaboration/lib/session-utils.coffee
	vendor/telepath
2013-07-22 10:12:45 -07:00
Kevin Sawicki 0bb7d3ba09 Default save as dialog to directory of active item 2013-07-22 09:11:57 -07:00
Ben Ogle 8e92499ebb Fix comments so they match up with actual behavior 2013-07-22 09:02:05 -07:00
Ben Ogle 62e0274ff6 hook selectToFirstCharacterOfLine up to a command in editor. 2013-07-22 09:02:05 -07:00
Ben Ogle fe4c4e9751 Add selectToFirstCharacterOfLine to editSession 2013-07-22 09:02:05 -07:00
Kevin Sawicki baa03f5587 Upgrade apm
Closes #638
2013-07-22 08:35:10 -07:00
Nathan Sobo d85560e886 💄 2013-07-21 18:38:51 -06:00
Nathan Sobo 25d594e717 Update spell-check package for new telepath-based marker API 2013-07-21 18:00:55 -06:00
Nathan Sobo 383ba80d1e Use EditSession.getSoftTabs instead of .softTabs attr in snippets spec 2013-07-21 17:51:42 -06:00
Nathan Sobo 561e666091 Eliminate EditSession.markersForBufferPosition
We use findMarkers for everything now
2013-07-21 17:51:02 -06:00
Nathan Sobo 071f8a6a84 Use .findMarkers instead of .markersForBufferPosition in snippets 2013-07-21 17:50:12 -06:00
Nathan Sobo da95d26c58 Upgrade telepath to fix markers at end of buffer being invalid 2013-07-21 17:49:51 -06:00
Nathan Sobo 9c4478302e Translate attribute names in DisplayBufferMarker.matchesAttributes 2013-07-21 17:49:15 -06:00
Nathan Sobo 28a0bdaf95 Add TextBuffer.destroyMarker 2013-07-21 17:14:16 -06:00
Nathan Sobo 50ade54c3c Also serialize project in pane specs that remove the pane from the DOM
The project contains the only reference to the buffer that belongs to
the edit session in the serialized pane. If we tear down the pane then
the edit session is destroyed and the buffer is removed. So we have to
serialize and restore the project to its previous state once we finish
tearing down the view.
2013-07-21 16:55:44 -06:00
Nathan Sobo d43f459ad1 Fall back to .serialize() if a pane item has no .getState() method 2013-07-21 16:46:22 -06:00
Nathan Sobo 383985d331 Ensure there is clean serialization of RootView state
Everything from RootView to Pane needs to return a serialized clone of
its state, so we don't accidentally further mutate the serialized state
in tests.
2013-07-20 22:40:40 -06:00
Nathan Sobo 5246d4cd72 Add Project.getState() and make Project.serialize clone state 2013-07-20 21:24:32 -06:00
Nathan Sobo 97c4b9a83a Don't clone state in EditSession.getState() 2013-07-20 21:21:51 -06:00
Nathan Sobo ff9acb50ff Deserialize display buffer when deserializing edit sessions
Previously, we kept display buffer attributes in the edit session's
serialized state, then recreated a fresh display buffer each time when
deserializing edit sessions. Now that DisplayBuffer and TokenizedBuffer
are serializable, we can just include them directly when serializing
the edit session.
2013-07-20 18:21:44 -06:00
Nathan Sobo ca0832e58e Include folds in DisplayBuffer deserialization 2013-07-20 16:41:46 -07:00
Nathan Sobo 503629fdcb 💄 2013-07-20 16:40:38 -07:00
Nathan Sobo eeeb453cf9 Back DisplayBuffer with a telepath document 2013-07-20 16:22:26 -07:00
Nathan Sobo e1f795a352 Back TokenizedBuffer with a telepath document 2013-07-20 15:42:13 -07:00
Nathan Sobo 2b7a294cdd Use new marker attribute API to store/replicate selection goal ranges 2013-07-20 02:24:35 -07:00
Nathan Sobo c85932d46b Preserve folds and all selection attributes when copying EditSessions 2013-07-20 02:23:12 -07:00
Nathan Sobo 75cf1acce1 Honor preserveFolds option when creating a new selection 2013-07-20 02:23:12 -07:00
Nathan Sobo 7f5d71dada 💄 2013-07-20 02:23:12 -07:00
Nathan Sobo 1f8fd3c16c Fix isReversed option name 2013-07-20 02:23:12 -07:00
Nathan Sobo 7ccfd6c94b 💄 2013-07-20 02:23:12 -07:00
Nathan Sobo 1911ef2d80 Fix 'isReversed' option name for marker creation 2013-07-20 02:23:12 -07:00
Nathan Sobo 74347ea874 Upgrade telepath to allow marker attributes to be updated 2013-07-20 02:23:06 -07:00
Ben Ogle 214d73d812 Remove line highlight in dark syntax
When moving around and selecting things, the entire line looks selected
and is super confusing. This leaves the line number highlighted, but 
not the line itself.
2013-07-19 13:57:08 -07:00
Ben Ogle 8c6fe7a540 lighten selection color so it's more clear. 2013-07-19 13:55:29 -07:00
Ben Ogle 164d5591a0 remove comment 2013-07-19 13:25:05 -07:00
Ben Ogle 85cb7c88fa plumb up the select to boundary to editor commands 2013-07-19 12:21:36 -07:00
Ben Ogle 4ccbd03daf I can't spell. Boundary. 2013-07-19 12:17:17 -07:00
Ben Ogle 3df33a7367 Add selection counterparts to move next/prev word boundary 2013-07-19 12:07:30 -07:00
Ben Ogle 13b592d1f3 Add Cursor::moveToNextWordBoundry()
Plumb up to editor as well.
2013-07-19 11:37:47 -07:00
Ben Ogle ab8df8dcde Add moveToPreviousWordBoundry to cursor.
Plumb it up to a command in the editor.
2013-07-19 11:16:14 -07:00
Ben Ogle 2b25d433c7 move editor scrollbar above the edit pane
So you can grab it with your mouse!
2013-07-18 17:45:38 -07:00
Ben Ogle 1ba8218743 Move the resize handle over between the treeview and the editor
Otherwise it covers up the scrollbar in the treeview. No bueno.
2013-07-18 17:42:36 -07:00
Nathan Sobo de1b69dbc9 Add DisplayBuffer.copy 2013-07-18 11:34:39 -07:00
Nathan Sobo 8b53b4d749 Add ability to copy display buffer markers 2013-07-18 10:25:03 -07:00
Ben Ogle 17cf2bd1c8 Merge pull request #635 from github/bo-fix-comment-indent
Add proper indents to comments on toggle-line-comments Closes #615
2013-07-18 10:13:28 -07:00
Nathan Sobo c54bb792b2 Make EditSession.copy return a copy with a unique id and markers
We want to be able to use the copy independently, which means we
should not use EditSession@deserialize to create it because that will
tie us to the same selection markers.
2013-07-18 06:23:43 -07:00
Cheng Zhao 1746bc8797 Add 'Inspect Element' context menu. Fixes #632. 2013-07-18 20:10:33 +08:00
Cheng Zhao 635f09b741 Destroy window immediately when user choose to close window.
There is no need to delay destroy now.
2013-07-18 18:57:34 +08:00
Cheng Zhao ee0443e40c Revert "Use atom-shell 23dd5b4da8"
Since the async function issue is fixed in atom-shell, we can go back to
use the latest release.
2013-07-18 18:57:13 +08:00
Ben Ogle d02e9172da 💄 2013-07-17 21:04:50 -07:00
Nathan Sobo 804df73e8d Get edit session specs passing with selection based markers 2013-07-17 19:16:42 -07:00
Ben Ogle bc55ee6bd2 Add change string to changelog.md
Added a newline; assumed I am the first on this deploy
2013-07-17 18:30:43 -07:00
Ben Ogle 76be95bd6c update comment 2013-07-17 18:25:41 -07:00
Ben Ogle e43e8d156e Combat against empty range; fixes tests 2013-07-17 18:22:41 -07:00
Ben Ogle 2aca31988f Fix tests in EditSession 2013-07-17 17:56:52 -07:00
Ben Ogle c937827582 Use editSession.lineForBufferRow()
Rather than the buffer directly.
2013-07-17 17:51:40 -07:00
Ben Ogle c52cf836cd remove the f on the describe 2013-07-17 17:42:33 -07:00
Ben Ogle 0924ad586f spaces around the + 2013-07-17 17:39:39 -07:00
Ben Ogle abdce2df04 replace new Range(...) with [[..], [..]] syntax 2013-07-17 17:38:51 -07:00
Ben Ogle 3f8c120ad0 update tests to be more clear 2013-07-17 17:37:45 -07:00
Ben Ogle 365e5e8413 calcMinIndent -> minIndentLevelForRowRange 2013-07-17 17:35:05 -07:00
Ben Ogle 90e53ad3e2 Add proper indents on auto comments 2013-07-17 16:04:53 -07:00
Nathan Sobo a724ef3b40 Tag selection markers with a disambiguating EditSession id
This prevents selection markers created by different edit sessions
from being shared. Otherwise every edit session for a buffer would be
forced to have the same selection/cursor state.
2013-07-17 15:29:21 -07:00
Nathan Sobo ab8c0bbf04 Make DisplayBuffer.getMarkers call down into TextBuffer.getMarkers 2013-07-17 15:00:15 -07:00
Ben Ogle & Nathan Sobo 96f434f276 Set languageMode and softTabs in constructor, not setBuffer
The softTabs option is only in scope in the constructor, and it can
sometimes be needed if we're unable to auto-determine the softTabs
setting from the buffer.
2013-07-17 14:59:46 -07:00
Ben Ogle & Nathan Sobo ba3fa50c6e Add DisplayBufferMarker.getAttributes 2013-07-17 14:58:21 -07:00
Ben Ogle & Nathan Sobo e8d4bbe5e7 💄 Extract setBuffer/buildDisplayBuffer methods 2013-07-17 12:05:18 -07:00
Ben Ogle & Nathan Sobo bb695ec53f Replicate the destruction of selections 2013-07-17 11:53:39 -07:00
Ben Ogle & Nathan Sobo 6079dd4ba3 💄 2013-07-17 11:33:56 -07:00
Ben Ogle & Nathan Sobo 47bfac22c2 Replicate the addition of new selections 2013-07-17 11:12:42 -07:00
Ben Ogle & Nathan Sobo 461e331f58 🙊 2013-07-17 11:12:18 -07:00
Ben Ogle & Nathan Sobo f32e1fc643 Replicate initial EditSession selection state 2013-07-17 10:25:28 -07:00
Ben Ogle & Nathan Sobo baeae2d8d5 Upgrade telepath so we can query 'invalidation' key in findMarkers 2013-07-17 10:25:02 -07:00
Corey Johnson & Matt Colyer 4a67bfcf15 Remove editor.autoIndentOnPaste config option
Normalize paste on indent covers most use cases of autoindent when pasting.

Closes #584
2013-07-16 17:08:12 -07:00
Corey Johnson & Matt Colyer 2410ea0d5b Add Matt to pairs file 2013-07-16 17:07:59 -07:00
Kevin Sawicki 6482e26526 Copy session url to clipboard instead of just id 2013-07-16 09:49:47 -07:00
Kevin Sawicki 0a4e3cec94 Add missing connection prefix to event name 2013-07-16 09:49:47 -07:00
Kevin Sawicki c8accea5dc Synchronize instead of Synchronize 2013-07-16 09:49:47 -07:00
Kevin Sawicki 438b8f6a14 Support launching the app directly with a URL
In this case there will be no paths to open and so editor windows
should be created.

This will allow sessions to be joined when Atom isn't currently running
but a session link is clicked from within another application.
2013-07-16 09:49:47 -07:00
Kevin Sawicki 522768e6c0 Handle opening session urls 2013-07-16 09:49:47 -07:00
Kevin Sawicki 5bb45d4684 Add serialization version to image and archive edit sessions 2013-07-16 09:49:46 -07:00
Kevin Sawicki 3d6fb85152 Upgrade to patrick 2.0 2013-07-16 09:49:46 -07:00
Kevin Sawicki 9ccf9365c3 Make all edit session uri's relative
This allows them to be collaborated without having absolute paths
in the shared document.
2013-07-16 09:49:46 -07:00
Kevin Sawicki a9710e7a63 Ignore session id if empty 2013-07-16 09:49:46 -07:00
Kevin Sawicki f3bb826e8d Remove unused color from dark collaboration theme 2013-07-16 09:49:46 -07:00
Kevin Sawicki 96b91ef36b Add collaboration stylesheet for light theme 2013-07-16 09:49:46 -07:00
Kevin Sawicki ae9ffbb526 Rename buddy-list.less to collaboration.less 2013-07-16 09:49:46 -07:00
Kevin Sawicki 89dba4603c Add progress bar to loading sesion view 2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 8812b6c31d Use patrick to mirror repository state 2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 33f538ebf4 Create new branch if guest has unpushed changes 2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 56b333e7fb 💄
Kevin found this offensive
2013-07-16 09:49:46 -07:00
Corey Johnson & Kevin Sawicki 72d76e511e Begin replication of host repo state 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 601efa53e6 Only create single host view instance 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki af80327995 Set guest session project path from repo name 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 3ce520d9de Store participants and repository under collaborationState doc 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 1836257f0b Show avatars in host and guest views 2013-07-16 09:49:45 -07:00
Kevin Sawicki 98765c7d5c Only display participants that aren't the host 2013-07-16 09:49:45 -07:00
Kevin Sawicki f3ca26e2c9 Trigger participants-changed in guest session 2013-07-16 09:49:45 -07:00
Kevin Sawicki b1ca43ac0f Upgrade telepath 2013-07-16 09:49:45 -07:00
Kevin Sawicki 5ce0cf65c4 Unvendor pusher.js 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 460a09f9eb Show participants in the session 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki 40d500949b Remove presence from collaboration package. 2013-07-16 09:49:45 -07:00
Corey Johnson & Kevin Sawicki be078b2b41 Add share button to buddy list 2013-07-16 09:49:45 -07:00
Kevin Sawicki 0fd44994ee Trigger status changed for self 2013-07-16 09:49:44 -07:00
Kevin Sawicki 09e73b16fe Show all open windows in buddy list 2013-07-16 09:49:44 -07:00
Kevin Sawicki b55e62f2ab Use fat arrow for callbacks 2013-07-16 09:49:44 -07:00
Kevin Sawicki aab4d7a78b Add avatar to buddy view 2013-07-16 09:49:44 -07:00
Kevin Sawicki 533f91e7ac Remove unused class 2013-07-16 09:49:44 -07:00
Kevin Sawicki aed7d3ed70 Make buddy list a permanent view on the right 2013-07-16 09:49:44 -07:00
Kevin Sawicki 0fdb15f9a6 Move peer.js to vendor directory 2013-07-16 09:49:44 -07:00
Kevin Sawicki 05748cd7dc Display repo and branch in buddy list 2013-07-16 09:49:44 -07:00
Kevin Sawicki b127492c9f Add initial buddy list 2013-07-16 09:49:44 -07:00
Kevin Sawicki 4fde8f0753 Export Pusher class 2013-07-16 09:49:44 -07:00
Kevin Sawicki e7ba9e1c9d Add Git.getConfigValue() 2013-07-16 09:49:44 -07:00
Kevin Sawicki d1812d74d6 Vendor pusher.js 2013-07-16 09:49:44 -07:00
Kevin Sawicki 17cecda23e Use atom-shell 23dd5b4da8
The release past this build is causing issues with async callbacks
not firing.
2013-07-16 09:48:15 -07:00
Kevin Sawicki & Nathan Sobo abc20b3a05 Update text buffer to use telepath markers 2013-07-15 17:07:06 -07:00
Kevin Sawicki 9d733a2da9 Don't grab native window focus
Call $(window) instead of atom.focus() so the native window
doesn't regain focus on each spec run preventing it from running
in the background.
2013-07-15 13:56:21 -07:00
Kevin Sawicki 6bbcc58542 Call atom.focus() in the root beforeEach
Async events are not currently firing in specs and this
appears to cause them fire.
2013-07-15 13:40:53 -07:00
Kevin Sawicki 1a76e3dc9d Add missing '..' to node directory path
The path has changed and one more parent directory needs to be
traversed to find the bundled path to node for spawning child
processes.
2013-07-15 12:20:09 -07:00
Kevin Sawicki ff70ae633d Correct broken link to npm 2013-07-12 17:30:05 -07:00
Kevin Sawicki d1f372e439 Rebuild native modules when atom-shell is upgraded
Spawn an apm rebuild when the atom shell version changes
after running the update-atom-shell script.

Closes #618
2013-07-12 14:48:10 -07:00
Kevin Sawicki 041f52aaaa Upgrade apm 2013-07-12 14:07:03 -07:00
Kevin Sawicki 270d17814e Move right border to tree view resizer
This allows the border to still show when the tree view
scrolls horizontally.

Closes #622
2013-07-12 13:59:52 -07:00
Kevin Sawicki 16095c8086 Add New Window to File menu
Closes #626
2013-07-11 20:22:43 -07:00
Coby Chapple 94e2dbbc2c extraneous paren in package docs 2013-07-11 10:20:29 +01:00
Kevin Sawicki 12580bce83 Guard against missing file path in getScore() 2013-07-10 08:54:15 -07:00
Cheng Zhao 753b11cf15 Register Atom to handle atom:// scheme URLs. 2013-07-10 18:57:26 +08:00
Kevin Sawicki 0fee962faa Mention j/k support 2013-07-09 09:22:35 -07:00
Kevin Sawicki ed1f51b987 Map k/j to up/down in archive-view 2013-07-08 18:57:58 -07:00
Kevin Sawicki f1bdcaedc1 Support moving up/down in tree view with k/j keys 2013-07-08 17:06:16 -07:00
Kevin Sawicki 2efbe9ce4e Run partial-clean during deploy task 2013-07-08 11:29:46 -07:00
Kevin Sawicki 3366c4d6a5 Remove node_modules before bootstrapping 2013-07-08 11:29:28 -07:00
Kevin Sawicki acb69a4221 Format stack traces in console reporter
This generates valid CoffeeScript line/column numbers and
also removes noisy lines from jasmine.js and from the grunt
stack portion for the initial test process spawn.
2013-07-06 15:39:32 -07:00
Kevin Sawicki b3b501ef07 Set stack trace overflow to auto
This keeps the stack trace text inside the spec box when the window
in narrower than the stack trace lines.
2013-07-06 14:27:23 -07:00
Kevin Sawicki e34d8e4c42 Display CoffeeScript line numbers in stack traces
Use coffeestack to convert stack traces to have CoffeeScript
line and column numbers in the output instead of JavaScript line
and column numbers.
2013-07-06 14:27:16 -07:00
Kevin Sawicki adebae6c47 Remove jasmine.js lines from displayed stack trace
This removes the noise from the setup and compare lines that occur in
jasmine.js and only displays the lines that are generated from within
the failing spec.
2013-07-06 14:03:13 -07:00
Kevin Sawicki 4ae0d8af9f Use tantamount for _.isEqual() implementation
This code was needed in telepath so it was pulled out as a
standalone module with the exact same behavior as was previously
in Atom.
2013-07-06 13:54:46 -07:00
Kevin Sawicki 010fa219aa Move Point and Range specs to telepath 2013-07-05 12:53:51 -07:00
Kevin Sawicki cdbbb114f6 Use PeerServer ☁️ instead of EC2 2013-07-05 12:53:51 -07:00
Kevin Sawicki b8bd9b6ec6 Compare site id using site from original event
Previously the site was being looked for in a copy of the event where
only the range and text keys were picked and so it was always missing.
2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo 5a26fa838f Emit markers-updated event for remote buffer changes
This is temporary until markers are a part of telepath.
2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo bffe361151 Upgrade telepath 2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo bf45beedbe Swap parameter order for Document.deserialize() 2013-07-05 12:53:51 -07:00
Kevin Sawicki & Nathan Sobo e82170efcb Serialize EditSession's buffer's id instead of its path 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 9b22ca4825 Serialize window state in telepath format 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 85cc81851f Replicate insertion and removal of project buffers
Buffers are now destroyed when removed from the project if they
haven't been destroyed already.
2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 30273c6a66 Add serialization version to TextBuffer 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo e01ac96b66 Guard against a null pending changed event
Previously TextBuffer would emit change events even when the change
was empty. SharedString does not emit empty change events and so a
pending event may no longer be present when a marker-updated event
fires.
2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 2ff282011b 💄 2013-07-05 12:53:50 -07:00
Kevin Sawicki f766bbbb38 Remove Point and Range classes now provided by telepath 2013-07-05 12:53:50 -07:00
Kevin Sawicki e5ef23dc5a Expect null instead of undefined for invalid line rows 2013-07-05 12:53:50 -07:00
Kevin Sawicki fddcbae4eb Clip range specified to change() 2013-07-05 12:53:50 -07:00
Kevin Sawicki 2d313e07ff Clip position in characterIndexForPosition() 2013-07-05 12:53:50 -07:00
Kevin Sawicki 1efa480b4e Upgrade telepath 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 05a3f35512 Normalize line endings in TextBuffer.change() 2013-07-05 12:53:50 -07:00
Kevin Sawicki & Nathan Sobo 72f9af4d00 Replicate buffer changes
Still some failures due to line endings
2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo dd0f7a032f Start basing Buffer's text on a replicable string 2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo 010c3435da Add Project serialization version 2013-07-05 12:53:49 -07:00
Kevin Sawicki & Nathan Sobo da3a89fc27 Don't show pane items that can't be deserialized 2013-07-05 12:53:49 -07:00
Nathan Sobo 30e4531a8f Store buffer paths instead of serialized buffers in EditSession state
Since there can be multiple edit sessions per buffer, it doesn't make
sense to serialize the buffer multiple times. Previously, we were
de-duplicating buffers in the deserialize method itself, but this won't
work now that we want to replicate buffers.
2013-07-05 12:53:49 -07:00
Kevin Sawicki 651bbaa3ce Create an empty ~/.atom/config.cson when missing
Closes #614
2013-07-05 09:17:44 -07:00
Kevin Sawicki & Nathan Sobo 0448ba5ceb Remove atom-shell during partial-clean task instead of clean task 2013-07-03 17:53:43 -07:00
Kevin Sawicki & Nathan Sobo 6d70bf9106 Remove node_modules during script/cibuild so they recompile during bootstrap 2013-07-03 17:53:43 -07:00
Cheng Zhao 857629e07e Revert "Revert "Upgrade apm: update node to v0.10.12.""
This reverts commit 18c5c788d7.
2013-07-04 08:52:13 +08:00
Cheng Zhao 18c5c788d7 Revert "Upgrade apm: update node to v0.10.12."
This reverts commit 433beac9aa.
2013-07-04 08:37:59 +08:00
Cheng Zhao a8e7a9a091 Should also clean atom-shell. 2013-07-04 07:22:15 +08:00
Kevin Sawicki 59097ddf96 Remove ~/.atom/.node-gyp during clean 2013-07-03 09:26:04 -07:00
Cheng Zhao 433beac9aa Upgrade apm: update node to v0.10.12. 2013-07-03 18:23:41 +08:00
Kevin Sawicki c7f6e87132 Only use event.which when key identifier is non-ASCII
Previously event.which was used when it was less than the key identifier
which broke fn-delete since that generates a valid key identifier but a
lower event.which value that does not translate to 'delete' using the char
code converter.

Close #611
2013-07-02 13:13:45 -07:00
Garen Torikian 64e2fee975 Merge pull request #610 from github/add-nooutput-to-biscotto
Bump the biscotto version
2013-07-02 11:13:20 -07:00
Garen Torikian df35cb0756 Bump the biscotto version
This prevents doc builds from occuring when you're only interested in stats/missing
2013-07-02 11:07:58 -07:00
Kevin Sawicki & Nathan Sobo 0e6a3c52ad Add comments to view cache ivars 2013-07-02 10:13:59 -07:00
Kevin Sawicki b786bcc774 Store views that don't implement setModel() by their item
Previously viewForItem() would create a new view each time it was called
with an item whose view did not implement setModel() even if a view for that
item already existed in the pane.

Now a WeakMap is used to map items to their view so they can be reused
and cleaned up even when the view does not implement setModel().
2013-07-02 09:41:46 -07:00
Kevin Sawicki 6cb13e843c Mention more fixed and added items 2013-07-02 09:08:57 -07:00
Kevin Sawicki 7e76721712 Don't call realpathSync for non-existent directory 2013-07-01 13:23:47 -07:00
Nathan Sobo 23df564189 Release any leftover buffers in Project.destroy 2013-07-01 14:21:42 -06:00
Nathan Sobo 0c17ed9c33 Return a clone of @buffers from Project.getBuffers
Previously, we traversed the EditSessions. Not necessary.
2013-07-01 14:21:42 -06:00
Kevin Sawicki cde9ae02fe Prevent clash between path require and variable name 2013-07-01 13:07:35 -07:00
Kevin Sawicki 77017c2cd3 Compare against realpath of HOME 2013-07-01 12:59:31 -07:00
Kevin Sawicki 7615d54337 Support calling fsUtils.absolute() with a '~' path 2013-07-01 12:46:50 -07:00
Kevin Sawicki 6b591b121d Interpolate pathToCreate instead of path
This regressed as part of the migration to using helpers from
path instead of fs-utils.

Close #608
2013-07-01 12:10:52 -07:00
Kevin Sawicki & Nathan Sobo 268edf16d8 Make setModel optional in pane item view classes 2013-07-01 10:53:34 -07:00
Kevin Sawicki 01f220fb1b Support non-English keyboard languages
Use event.which if it is lower than the parsed key identifier.
This is the case when a non-English keyboard language is selected and
a physical English keyboard is being used.

This allows keybindings to still work even when the physical key pressed
is different than the key it maps to for the currently selected language.

Closes #585
2013-06-28 16:36:55 -07:00
Kevin Sawicki 53a92751e6 Add missing @ before call to confirmSync 2013-06-28 10:06:41 -07:00
Nathan Sobo b66431e3a6 Delete atom.windowState in global afterEach
It seems like the windowState was getting saved to disk, causing weird
window state to be loaded on the next test run and a spec to fail.
2013-06-28 04:39:31 -06:00
Nathan Sobo 5a9e45f9d8 Upgrade telepath 2013-06-28 04:39:31 -06:00
Kevin Sawicki 8561bb34a8 Save and restore spec window dimensions
Closes #597
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo d55c09c9d3 Nuke documentation threshold specs
We're going to make it a lint task that's run via grunt.
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo f4300b8cab Fix specs due to scrollTop/Left becoming methods on EditSession 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo f3f9c2c921 Show active item from Pane constructor if state has activeItemUri 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo 33dca9315c Add PaneContainer.getState 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo c596514d11 Accept documents in EditSession and replicate scroll position 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo 390b03647e Don't clear #jasmine-content when window.debugContent is true 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo 5b00cf1701 Rename Buffer -> TextBuffer to match file and deserializer name 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo 95e69ad858 Use .getState() instead of .serialize() in replication specs 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo ef0363e8ff Use jasmine-focused npm instead of spec/jasmine-focused.coffee 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo a62cd0f16a Replicate active pane item 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo f340828506 Use .getState() instead of .serialize() when mutating panes 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo 8b0a68dd4a Return this from $.fn.attachToDom spec helper 2013-06-28 04:39:29 -06:00
Kevin Sawicki 1049a677bf Set dimension of spec window 2013-06-28 04:39:29 -06:00
Kevin Sawicki d2bc415042 Remove telepath from package.json 2013-06-28 04:39:28 -06:00
Kevin Sawicki b439e6239d Add telepath as submodule 2013-06-28 04:39:28 -06:00
Kevin Sawicki b999c71ad6 Auto-insert clipboard when it is a GUID 2013-06-28 04:39:28 -06:00
Kevin Sawicki 9f31f9a76b Add loading view when joining session 2013-06-28 04:39:28 -06:00
Kevin Sawicki & Nathan Sobo 7fe356b649 Ensure events are delivered in order 2013-06-28 04:39:28 -06:00
Kevin Sawicki & Nathan Sobo b5aa0b900c Remove output listener when connection is closed 2013-06-28 04:39:28 -06:00
Kevin Sawicki & Nathan Sobo cd4622fbeb Serialize project in window state 2013-06-28 04:39:27 -06:00
Kevin Sawicki & Nathan Sobo 89192c2ee2 Extract helpers to session-utils 2013-06-28 04:39:27 -06:00
Kevin Sawicki & Nathan Sobo b5b408d134 Open new window when joining collaboration session 2013-06-28 04:39:27 -06:00
Kevin Sawicki b08f320ed5 Remove mini class to give id enough room 2013-06-28 04:39:27 -06:00
Kevin Sawicki 4c7025ae81 Add message to join prompt 2013-06-28 04:39:27 -06:00
Kevin Sawicki 554af1becb Add initial collaboration keymap 2013-06-28 04:39:27 -06:00
Kevin Sawicki 6d49e0fd57 Pass through all window settings as load settings 2013-06-28 04:39:26 -06:00
Kevin Sawicki 31d872fbfe Add atom.openWindow() 2013-06-28 04:39:26 -06:00
Kevin Sawicki b842a727ee Support sending in windowState to AtomWindow ctor 2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 0851b4d011 Replicate pane splitting and removal
We're using Peer.js to stream changes to shared telepath documents
between participants.

We're replacing the rootView of joiners in a somewhat hacky way,
but replication of pane splits and items is fully tested.
2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 8a7c57994d Remove parens from require 2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 6480e956af Keep resident window state object 2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 9c95a4751b Return telepath documents from getWindowState() 2013-06-28 04:39:25 -06:00
Kevin Sawicki & Nathan Sobo d283834978 Add initial document sharing over peerJS connection 2013-06-28 04:38:22 -06:00
Kevin Sawicki 66b490b5da Add initial collaboration package 2013-06-28 04:38:22 -06:00
Kevin Sawicki 0d252ab9fd Use parent directory as resource path 2013-06-27 09:19:37 -07:00
Kevin Sawicki 3e8de2d22d Use config to retrieve contents directory 2013-06-27 09:18:22 -07:00
Kevin Sawicki 52aee1d050 💄 2013-06-27 09:11:15 -07:00
Kevin Sawicki ff9dc2c5af Look under atom instead of globals for buildDir 2013-06-27 09:10:18 -07:00
Kevin Sawicki 3b8cdb58e2 Rename docs to docs-task 2013-06-27 09:08:16 -07:00
Kevin Sawicki bd14aeee17 Move Grunt tasks to tasks directory 2013-06-27 09:07:33 -07:00
Cheng Zhao e434f7c0a9 💄 2013-06-27 22:39:41 +08:00
Cheng Zhao 837e3000d3 Merge pull request #605 from github/beforeunload
Use beforeunload handler to control whether window should close
2013-06-27 07:33:35 -07:00
Cheng Zhao e1c2aa0da1 Fix specs regarding beforeunload event. 2013-06-27 21:31:07 +08:00
Cheng Zhao e7aac2ef6e Show confirm close dialog as sheet. 2013-06-27 21:30:47 +08:00
Cheng Zhao f9545acde6 Show window before opening devtools.
It may happen that an exception is thrown before window is shown.
2013-06-27 19:29:35 +08:00
Cheng Zhao 45ce8e1d63 Ask for close confirmation in beforeunload handler. 2013-06-27 18:39:29 +08:00
Cheng Zhao bdbec54f24 Make PaneContainer.confirmClose() synchronous. 2013-06-27 16:21:14 +08:00
Cheng Zhao 1df48d1725 Fix spec of confirmSync in 'window:close'. 2013-06-27 15:07:38 +08:00
Cheng Zhao 6c0f4c09d9 Make Pane.promptToSaveItem synchronous. 2013-06-27 12:40:36 +08:00
Cheng Zhao f45ce3a7ee Upgrade apm: update to node v0.10.12. 2013-06-27 10:59:09 +08:00
Kevin Sawicki dc6e624eda Add grunt tasks to generate and lint docs
Closes #604
2013-06-26 19:25:50 -07:00
Kevin Sawicki e67676b01c Use deleteSelectedText() instead of delete()
Selection.delete() adds to the selection if it is empty which
we don't want to do when replacing selected text.

Closes #603
2013-06-26 19:03:45 -07:00
Kevin Sawicki f37ae7e4e7 Upgrade dev dependencies 2013-06-26 08:57:52 -07:00
Kevin Sawicki f913f6a8d5 Upgrade dependencies 2013-06-26 08:56:04 -07:00
Kevin Sawicki 20991381bd Remove unneeded stdout/stderr output forwarding 2013-06-25 17:47:21 -07:00
Kevin Sawicki 6930fe0eff Mention keymap fixes 2013-06-25 13:47:39 -07:00
Kevin Sawicki f3b50eed3b Migrate close bindings from editor namespace to pane
These were left over from the pane migration still under
the editor namespace and were previously not accessible via
a keybinding.
2013-06-25 13:15:39 -07:00
probablycorey a4217909c0 Don't check for updates in background if version is a sha
If the version is a 7 char sha, then we assume it is a local build.
2013-06-25 09:54:03 -07:00
Kevin Sawicki 5b7c4686f9 Add nof task 2013-06-24 20:55:55 -07:00
Kevin Sawicki 86c8343107 Score grammar matches using longest fileType match
Previously the score for two grammars matching on path
was equal and so the first one would be selected.

Now the longer match will have a higher score and will be selected
over other grammars with shorter fileType match lengths.

Closes #602
2013-06-24 18:23:54 -07:00
Kevin Sawicki 6b6ce03c72 Use hasParent() instead of isOnDom() 2013-06-24 18:03:35 -07:00
Kevin Sawicki a7ee5985db Separate variable from requires 2013-06-24 16:56:52 -07:00
Kevin Sawicki be354f78a6 Focus root view if previously focused element is no longer attached
This can be the case when a select list is triggered while a different
select list is already open and so the second list to open has no
element to restore focus to when it closes.
2013-06-24 16:46:36 -07:00
Kevin Sawicki ab75f6f635 Don't detach on focusout when detaching 2013-06-24 16:45:26 -07:00
Kevin Sawicki d6513e9aa9 Use BufferedProcess for apm commands
This ensures the path to node is always available in the environment.
2013-06-24 16:44:40 -07:00
Kevin Sawicki afac77ddfd Don't copy bootstrap docs to build folder 2013-06-24 16:17:07 -07:00
Kevin Sawicki fcd0b6839b Don't copy vendor/apm to build folder
This is already copied as node_modules/atom-package-manager
2013-06-24 16:13:56 -07:00
Kevin Sawicki 32c2548442 Allow spaces before fenced code block language 2013-06-24 15:13:51 -07:00
Kevin Sawicki 1cf02c22a7 Support colorizing fenced python blocks 2013-06-24 15:08:19 -07:00
Kevin Sawicki 34e5594a2d Nest all rules under a root .is-blurred class 2013-06-24 15:01:05 -07:00
Kevin Sawicki 46eac52dbf Upgrade apm 2013-06-24 14:57:32 -07:00
Kevin Sawicki 915a737797 Don't copy git-utils/oniguruma deps/ during build
These contain source files used to build the native modules
and are not needed in the binary distribution.
2013-06-24 14:56:02 -07:00
Kevin Sawicki d227d8794d Upgrade apm 2013-06-24 14:24:29 -07:00
Kevin Sawicki ad888b3250 Use walkdir for recursively copying
grunt.file.recurse only calls back for file paths so directory
symlinks are being copied instead of linked causing duplicate
files in the final build folder.
2013-06-24 14:11:18 -07:00
Kevin Sawicki 5350a67990 Correct typo in package.json key 2013-06-24 12:13:48 -07:00
Kevin Sawicki c02be2330c Only read package.json once 2013-06-24 12:05:14 -07:00
Kevin Sawicki cf936a8a02 Upgrade apm 2013-06-24 11:45:53 -07:00
Kevin Sawicki 0b07d276b9 Don't copy dev dependencies during build task
Closes #601
2013-06-24 11:14:46 -07:00
Kevin Sawicki 6879f0d0ac Update initialPath on project path changes
atom.setPathToOpen() is now longer available and instead
the load settings should be updated.
2013-06-24 10:41:44 -07:00
Kevin Sawicki d31d18360b Store untitled window state under load settings
This keeps untitled windows from contaminating each other by
storing to the same state path on disk but still stores state
across reloads of the windows.

Closes #599
2013-06-24 10:37:53 -07:00
Kevin Sawicki aeee3c9ade Remove unused methods 2013-06-24 08:53:15 -07:00
Kevin Sawicki dae28d2222 Add light syntax colors for embedded strings
Closes #598
2013-06-24 08:33:18 -07:00
Kevin Sawicki f81f95e830 💄 2013-06-24 08:32:33 -07:00
Kevin Sawicki 41611f826a Add back lint as part of CI 2013-06-21 19:59:37 -07:00
Kevin Sawicki 4eac57c31c Capture test standard out and error and log it 2013-06-21 13:35:19 -07:00
probablycorey 2a7f03761d Update documentation 2013-06-21 09:46:25 -07:00
probablycorey 264f7e1a74 Add script/test 2013-06-21 09:46:25 -07:00
probablycorey 94227889f1 script/build calls script/bootstrap 2013-06-21 09:46:25 -07:00
Kevin Sawicki 34114a9620 Add jasmine-focused as dev dependency
This has the nof command to un-focus all specs
2013-06-21 09:36:27 -07:00
Kevin Sawicki b562b3cf72 Remove script/copy-info-plist
Perform the copy in Gruntfile.coffee instead of a script
2013-06-21 09:30:53 -07:00
Kevin Sawicki 3938d143a1 Drop unneeded './' from script commands 2013-06-20 22:02:53 -07:00
Kevin Sawicki 95418566ef Correct typo in Requirements 2013-06-20 22:02:28 -07:00
Kevin Sawicki 622b877663 Remove extra newline 2013-06-20 21:59:23 -07:00
Kevin Sawicki 503ff13eb3 Sort keys in fence extension hash 2013-06-20 21:59:21 -07:00
Kevin Sawicki 2792f0d835 Map XML fence to grammar 2013-06-20 21:59:12 -07:00
probablycorey 82cb2aa124 Remove unused scripts 2013-06-20 17:15:53 -07:00
probablycorey ba08123abc Update installation instructions 2013-06-20 17:15:53 -07:00
probablycorey 93d6a80bc6 Add script/build task 2013-06-20 17:15:53 -07:00
probablycorey fd78c2a709 Don't clean node_modules when building 2013-06-20 17:15:53 -07:00
Kevin Sawicki & Nathan Sobo fb7080c39a Remove unused require 2013-06-20 17:15:53 -07:00
probablycorey cc591e18b0 Remove colored output from cibuilds 2013-06-20 17:15:53 -07:00
probablycorey 7e6979236e 🐛 2013-06-20 17:15:53 -07:00
probablycorey e72c48607b Fix doc specs 2013-06-20 17:15:52 -07:00
probablycorey 3e91334c82 Bundle themes are no longer copied 2013-06-20 17:15:52 -07:00
probablycorey 593e8c0e14 Don't bootstrap from gruntfile 2013-06-20 17:15:52 -07:00
probablycorey f8bc5ce648 cibuild runs ./script/bootstrap 2013-06-20 17:15:52 -07:00
probablycorey 29f10e71ce Mentioned grunt change 2013-06-20 17:15:52 -07:00
probablycorey 84340782ff Update readme 2013-06-20 17:15:52 -07:00
probablycorey 674946d180 Update rakefile 2013-06-20 17:15:52 -07:00
probablycorey abf4a6501a Use grunt to run ci tests 2013-06-20 17:15:52 -07:00
probablycorey ee0d073cd2 Update default grunt task 2013-06-20 17:15:52 -07:00
probablycorey 2d583d6ea0 Use local spawn method to output all errors 2013-06-20 17:15:52 -07:00
probablycorey e46af10631 Remove unused files from gitignore 2013-06-20 17:15:52 -07:00
probablycorey 0328c77be1 Don't copy themes to .atom dir 2013-06-20 17:15:51 -07:00
probablycorey 5c2aaf9849 Create deploy task 2013-06-20 17:15:51 -07:00
Kevin Sawicki & Nathan Sobo eab21e19f6 💄 2013-06-20 16:13:42 -07:00
Kevin Sawicki & Nathan Sobo 266548d75c Implement dev window opening with meta-O 2013-06-20 16:12:11 -07:00
probablycorey 4731c1f3f0 Hack to always update from the speakeasy master release
Related to https://github.com/atom/atom-shell/issues/33
2013-06-20 12:15:35 -07:00
probablycorey d6cd51399d Fix build script 2013-06-20 12:15:35 -07:00
probablycorey 7eff25e180 Install atom when default grunt task is run 2013-06-20 12:15:35 -07:00
probablycorey ab53e2ffda Rename create-atom script to constructicon/build 2013-06-20 12:15:35 -07:00
probablycorey e23357cf13 Default to version 0 2013-06-20 12:15:35 -07:00
probablycorey d5808e1164 Let constructicon set the SUFeedURL 2013-06-20 12:15:35 -07:00
probablycorey f47fa21fe9 Don't create version file in app bundle 2013-06-20 12:15:34 -07:00
probablycorey 478c617e60 Don't use polite curl in update-atom-shell 2013-06-20 12:15:34 -07:00
probablycorey 4449758135 Don't set version when building on constructicon 2013-06-20 12:15:34 -07:00
probablycorey 7163d8dc71 Make atom work with constructicon 2013-06-20 12:15:34 -07:00
probablycorey 128f7b851a Better constructicon output 2013-06-20 12:15:34 -07:00
probablycorey 90bc5f58f7 Bootstrap atom before constructicon build 2013-06-20 12:15:34 -07:00
probablycorey c89328fa14 Set permissions for prebuild script 2013-06-20 12:15:34 -07:00
probablycorey af655b3674 Make atom work with constructicon 2013-06-20 12:15:34 -07:00
probablycorey 5875c814df Don't assume we can remove the BUILD_DIR 2013-06-20 12:15:34 -07:00
probablycorey fcaa952973 Simplify gyp
Gyp is only used for construction now.
2013-06-20 12:15:34 -07:00
probablycorey 65c02328b3 Remove polite curl 2013-06-20 12:15:34 -07:00
probablycorey d629468cd1 Send error to async callback 2013-06-20 12:15:34 -07:00
probablycorey 0cdb477b3f Only copy the app file 2013-06-20 12:15:34 -07:00
probablycorey ed4f4a699b Remove typo that causes everything to fail 2013-06-20 12:15:34 -07:00
probablycorey fc7b8b4bf1 Replace local exec function calls with grunt.util.spawn 2013-06-20 12:15:33 -07:00
probablycorey 22b7ae2136 Move plist code into update-info-plist 2013-06-20 12:15:33 -07:00
probablycorey 032d865c92 Move plist code into update-info-plist 2013-06-20 12:15:33 -07:00
probablycorey c48c716eb0 Move utility functions to bottom of file 2013-06-20 12:15:33 -07:00
probablycorey e98219d2c5 Allow gruntfile to set build-dir from the command line 2013-06-20 12:15:33 -07:00
probablycorey 519e090a7a Rename app-Info.plist to atom-Info.plist 2013-06-20 12:15:33 -07:00
probablycorey 4e0f37281b Add codesign grunt task 2013-06-20 12:15:33 -07:00
probablycorey e6750de14d Remove lint from default task
It is causing an error.
2013-06-20 12:15:33 -07:00
probablycorey 5380a342d5 Rename postbuild to update-version 2013-06-20 12:15:33 -07:00
Nathan Sobo 44e73200ff Default editor.normalizeIndentOnPaste to true 2013-06-19 13:01:23 -06:00
Nathan Sobo 48b4c62696 Add editor.normalizeIndentOnPaste to the config panel 2013-06-19 13:01:01 -06:00
Corey Johnson & Nathan Sobo b9accadb70 When normalizing indent, ignore leading spaces of first line
Fixes #594
2013-06-19 12:21:05 -06:00
Kevin Sawicki e358c67da5 Listen for correct path loader progress event 2013-06-19 10:17:23 -07:00
Kevin Sawicki 1764677b7d Unsubscribe markers when destroying display buffer
Previously the display buffer markers would still fire events
even after a display buffer was destroyed since they were not
being unsubscribed from their underlying buffer marker which
could still fire events in the case of an editor split on the
same buffer.

Closes #593
2013-06-19 09:56:55 -07:00
probablycorey 264ddbe183 Use app.getVersion instead of the version file 2013-06-19 09:43:34 -07:00
probablycorey d8ba422178 Replace global.homeDir with app.getHomeDir() 2013-06-19 09:33:34 -07:00
Cheng Zhao 95f43917a4 Use @resourcePath when resource path of specs doesn't exist.
People may put atom under places other than ~/github/atom and wants to
run specs.
2013-06-19 14:01:24 +08:00
Cheng Zhao e0f806f0fb Use app.getHomeDir() API to get home dir. 2013-06-19 13:57:31 +08:00
Kevin Sawicki & Nathan Sobo 01a7b5fbc6 Throw exception when referencing a non-existent screen line 2013-06-18 14:34:23 -06:00
Kevin Sawicki c86b8198d9 Use built-in underscore from grunt.util 2013-06-18 10:21:15 -07:00
Kevin Sawicki 3771bda471 Separate resources and mac segments before joining 2013-06-18 10:09:16 -07:00
Kevin Sawicki 1178d844d0 Look before and after empty lines for max indent level
Previously the indentation guide level for empty lines was
derived by only looking after the empty line which caused gaps
in certain cases.

Now the indentation for an empty line is the higher value of the
previous non-empty line indentation and the following non-empty
line indentation.

Closes #588
2013-06-18 09:56:31 -07:00
Kevin Sawicki aa9577db67 Upgrade to lesslint 0.7 2013-06-17 20:02:35 -07:00
Kevin Sawicki 7af474cbc6 Disable outline-none rule 2013-06-17 19:58:21 -07:00
Kevin Sawicki 7f6de430c0 Remove unneeded units 2013-06-17 19:57:38 -07:00
Kevin Sawicki bc2d0ff0cc Only check ending rules when stack size increases
Previously on zero length matches the last two rules were compared
and if they had the same scope name then the last rule was popped
and the remaining line was tokenized using the current scope stack
to prevent infinite parsing loops.

This caused nested method calls in Java to not tokenize correctly
since method rules were sequential in the stack but did not constitute
an infinite loop of zero matches since the stack was currently decreasing.

Now the last two rules are only compared when the stack size is increasing
to prevent this false positive.

Closes #587
2013-06-17 13:08:10 -07:00
Kevin Sawicki 645aa65e9b Remove view when package is deactivated 2013-06-17 12:11:26 -07:00
Kevin Sawicki 2ae494999c Terminate in beforeRemove() instead of afterRemove() 2013-06-17 12:11:26 -07:00
Kevin Sawicki 2826d50cbb Remove logging of pid 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 8c4bddac9f Add spec for Task.once() 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 2a7d35cc39 Remove spec that was renamed to task-spec.coffee 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 8389698958 Drop suffix from handler path 2013-06-17 12:11:26 -07:00
Kevin Sawicki 289b270c85 Use Task.once for repository status handler 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 8661290c6a Rename LoadPathsTask to PathLoader 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 84a8f11fc9 Make fuzzy finder work with new Task system 2013-06-17 12:11:25 -07:00
Kevin Sawicki ad1b530d32 💄 2013-06-17 12:11:25 -07:00
Kevin Sawicki 65e322824b Remove task-shell 2013-06-17 12:11:25 -07:00
Kevin Sawicki 3f5bee7e4c Move task-bootstrap to src/ 2013-06-17 12:11:25 -07:00
Kevin Sawicki bff57e53f0 Throw error when starting terminated process 2013-06-17 12:11:25 -07:00
Kevin Sawicki 8280b3a3ff Update repository status to use new task style 2013-06-17 12:11:25 -07:00
Kevin Sawicki 7dd52995d0 Update tag reader view to use new task style 2013-06-17 12:11:25 -07:00
Kevin Sawicki e8bf433c68 Remove unused class 2013-06-17 12:11:25 -07:00
Kevin Sawicki 12b5c43d85 Remove unused task 2013-06-17 12:11:25 -07:00
Kevin Sawicki b42cc6f683 Update spell check view to use new task 2013-06-17 12:11:25 -07:00
Kevin Sawicki a1d6ae010e 💄 2013-06-17 12:11:25 -07:00
Kevin Sawicki cd1c88a1b5 Correct typo in git docs 2013-06-16 22:08:18 -07:00
Kevin Sawicki 5d245f403f Upgrade to grunt-cson 0.3 2013-06-16 21:37:48 -07:00
Kevin Sawicki 91f18df917 Use grunt-cson for compilation 2013-06-15 22:10:06 -07:00
Kevin Sawicki f3b3c291b9 Un-f wrap guide spec 2013-06-15 21:25:46 -07:00
Kevin Sawicki 6bcd6240ce Only override resource path if running specs from menu
Previously if the specs were being run via the --test command line
flag then the resource path specified would be overridden and
~/github/atom would be used instead which was causing CI to fail
since it specified a custom resource path at a different location.
2013-06-15 20:07:16 -07:00
Kevin Sawicki 5df5a679ac Un-f fuzzy finder spec 2013-06-14 11:48:02 -07:00
Kevin Sawicki 6dc2db25da Add Zoom to Window menu 2013-06-14 11:47:12 -07:00
Kevin Sawicki 7d33e1302a Doc what unicode characters render to 2013-06-14 11:47:12 -07:00
Corey Johnson & Kevin Sawicki 2edb5b5496 Setup node path in Atom Window.
This lets windows run code from different resource paths.
2013-06-14 10:01:23 -07:00
probablycorey 3ba7d68d4a Add global.homeDir
Ick, this should be handled by an npm or hopefully a patch to Node.
2013-06-14 09:56:01 -07:00
probablycorey da58bd5609 Always use ~/github/atom as the resource path when running specs 2013-06-14 09:27:54 -07:00
Kevin Sawicki e8c0f46afb Relativize exact path matches to the empty string 2013-06-14 09:20:28 -07:00
Kevin Sawicki 772a99012d Focus window when atom.focus() is called
Previously listeners bound to $(window).focus() would not get
events when Atom initially started or on reloads.
2013-06-14 08:39:32 -07:00
Kevin Sawicki f408406ef0 Support symlinks in .relativize() and .contains() 2013-06-14 08:29:21 -07:00
Kevin Sawicki 1fa319a8f3 Hide status and branch info for non-project files 2013-06-13 23:11:07 -07:00
Kevin Sawicki a0aefe21c8 Bind mousewheel event to list instead of parent 2013-06-13 22:11:46 -07:00
Kevin Sawicki d6be29dbdc Prevent propagation of mousewheel events from list
Without this, the autocomplete list is not scrollable using
the mouse wheel since it is consumed by the parent editor.
2013-06-13 18:50:36 -07:00
Kevin Sawicki 52ffa2d8c0 Use fat arrow for write callback 2013-06-13 18:38:23 -07:00
Kevin Sawicki 5ca4e8006e Format command and run count integers 2013-06-13 18:09:37 -07:00
Kevin Sawicki 75cfddebcd Implement getEmptyMessage() in CorrectionsView 2013-06-13 11:47:00 -07:00
Kevin Sawicki 1bc4b4ef32 Use mini-icon helper for loading-message 2013-06-13 11:40:32 -07:00
Kevin Sawicki ff7c639b64 Don't use error class in select list
Use a subtler error message that displays in the same place as the
loading message but does not change the entire background of the
view.

Also, extending classes can now customize the message displayed
when there are no items and also no filtered items to allow for
different messages for these two cases.
2013-06-13 11:31:09 -07:00
Kevin Sawicki 77172800a8 Remove link to deleted method 2013-06-13 10:10:59 -07:00
Kevin Sawicki 6615e0f2db Use triple # internal comment 2013-06-13 10:03:54 -07:00
Kevin Sawicki 0f562330cf Remove unused functions and specs 2013-06-13 10:02:13 -07:00
Kevin Sawicki 42a8a1ff61 Use skinny arrow for onPath callback 2013-06-13 08:51:13 -07:00
Kevin Sawicki 29c0f0c115 Clean up function comments 2013-06-13 08:49:48 -07:00
Kevin Sawicki dc33168ecc 💄 2013-06-13 08:44:12 -07:00
Kevin Sawicki 1e26bb533a Remove unneeded relativePath parameter 2013-06-13 08:41:04 -07:00
Kevin Sawicki 021fbc533f Specify utf8 encoding to fs.readFileSync() 2013-06-13 08:34:26 -07:00
Kevin Sawicki bc6daaeac2 Make function comment accurate 2013-06-13 08:32:58 -07:00
Kevin Sawicki d60c255703 Rename nodePath to path 2013-06-13 08:31:04 -07:00
Kevin Sawicki 2d9ba937fb Only ignore tags file at root
This allows the tags file inside spec/fixtures to be modified.
2013-06-12 20:57:38 -07:00
Kevin Sawicki 9cdc6122b3 Add mdown to readme extensions array 2013-06-12 20:56:52 -07:00
Kevin Sawicki 3374074940 Use path instead of Path 2013-06-12 20:55:27 -07:00
Kevin Sawicki 4f65cb099a Remove unused fsUtils.split() 2013-06-12 20:44:15 -07:00
Kevin Sawicki 0e52a3bcee Remove fsUtils.makeDirectory()
fsUtils.makeTree() was sufficient for all current uses.
2013-06-12 20:39:40 -07:00
Kevin Sawicki ed3a4a33e2 Rename .write() to writeSync() 2013-06-12 20:38:26 -07:00
Kevin Sawicki 3e0658fe30 Use mkdirp from fsUtils.makeTree() 2013-06-12 20:31:38 -07:00
Kevin Sawicki f35724daa9 Revert incorrect rename to isDirectorySync() 2013-06-12 20:29:14 -07:00
Kevin Sawicki 58fd786fda Rename readPlist() to readPlistSync() 2013-06-12 18:32:36 -07:00
Kevin Sawicki bf41c77d80 Use fsUtils.readObject to load snippets file 2013-06-12 18:30:43 -07:00
Kevin Sawicki d8de321074 Rename readObject() to readObjectSync() 2013-06-12 18:28:25 -07:00
Kevin Sawicki d77705a039 Rename listTree() to listTreeSync() 2013-06-12 18:26:44 -07:00
Kevin Sawicki 27d9da15dc Rename list() to listSync() 2013-06-12 18:25:42 -07:00
Kevin Sawicki a192842dc0 Rename isExecutable() to isExecutableSync() 2013-06-12 18:22:43 -07:00
Kevin Sawicki 400aa93bf3 Rename isFile() to isFileSync() 2013-06-12 18:21:57 -07:00
Kevin Sawicki 86952ff85e Rename isDirectory() to isDirectorySync() 2013-06-12 18:16:31 -07:00
Kevin Sawicki bab9bd7550 Rename path variables to prevent collisions 2013-06-12 17:59:37 -07:00
Kevin Sawicki 87e60bd0eb Update element path key to filePath instead of path 2013-06-12 17:51:07 -07:00
Kevin Sawicki 711d20ea14 Rename path variables to prevent collisions 2013-06-12 17:35:12 -07:00
Kevin Sawicki a0a0036727 Add missing path require 2013-06-12 17:35:03 -07:00
Kevin Sawicki 15f6a33c4b Rename path variables to prevent collisions 2013-06-12 17:27:23 -07:00
Kevin Sawicki 10f92836e6 Rename path variables to prevent collisions 2013-06-12 17:19:16 -07:00
Kevin Sawicki 54558c863d Remove unused path 2013-06-12 17:10:19 -07:00
Kevin Sawicki e25aece700 Use filePath instead of path as variable name 2013-06-12 17:04:37 -07:00
Kevin Sawicki bfdad19911 Use repoPath as parameter name to loadStatuses() 2013-06-12 17:02:02 -07:00
Kevin Sawicki d112089152 Use filePath variable instead of path 2013-06-12 16:57:47 -07:00
Kevin Sawicki 6c91d8bea6 Add missing require for path 2013-06-12 16:51:53 -07:00
Kevin Sawicki 7edebc6dd2 Don't clobber path module by using path as a variable name 2013-06-12 16:50:15 -07:00
Kevin Sawicki 76649ba268 Add missing require for path 2013-06-12 16:50:00 -07:00
Kevin Sawicki 2ae95bdf2b Use scopedPropertiesPath instead of propertiesPath 2013-06-12 16:44:08 -07:00
Kevin Sawicki 1548ef10b0 Don't clobber module by reassigning to path 2013-06-12 16:41:23 -07:00
Kevin Sawicki 835cd70ded Use Path.dirname() internally 2013-06-12 16:33:36 -07:00
Kevin Sawicki 5a8444579c Use more description variable names instead of path 2013-06-12 16:32:12 -07:00
Kevin Sawicki dc4012ea7c Add missing path require 2013-06-12 16:25:41 -07:00
Kevin Sawicki 17007e6154 Add missing path prefix to method invocation 2013-06-12 16:23:48 -07:00
Kevin Sawicki 82013b1970 Use path.join() instead of fsUtils.join() 2013-06-12 16:20:40 -07:00
Kevin Sawicki 7cf4063d9e Use path.dirname() instead of fsUtils.directory() 2013-06-12 15:54:34 -07:00
Kevin Sawicki d1cf839e53 Use correct less stylesheet path variable name 2013-06-12 15:53:47 -07:00
Kevin Sawicki f47164a2e6 Use more descriptive variable name instead of path 2013-06-12 15:46:15 -07:00
Kevin Sawicki bdb641ec94 Use path.extname() instead of fsUtils.extension() 2013-06-12 15:43:58 -07:00
Kevin Sawicki 341a327ea0 Rename path variable to entryPath 2013-06-12 15:36:18 -07:00
Kevin Sawicki 3d53a6ecf8 Remove internal references to .base() 2013-06-12 15:32:25 -07:00
Kevin Sawicki eede4a386f Use path.basename() instead of fsUtils.base() 2013-06-12 15:26:09 -07:00
Kevin Sawicki 437137783c Use rimraf for removing files/folders 2013-06-12 15:09:54 -07:00
Kevin Sawicki b96597b089 💄 2013-06-12 14:44:06 -07:00
Kevin Sawicki eeb2782700 Use lookbehind for whitespace before bold/italic text 2013-06-12 14:43:14 -07:00
Kevin Sawicki 0f4ad0bbf5 Guard against a null initial path
This will be the case when the .atom fold is opened from the config window.

path.join() cannot be called with null values.
2013-06-12 14:31:49 -07:00
Kevin Sawicki 750e4a1cca Rename linux.css to linux.less 2013-06-12 13:28:39 -07:00
Kevin Sawicki e5b8aa57d7 Guard against null rootView
This will be the case for the config window.
2013-06-12 13:13:24 -07:00
Kevin Sawicki 0723514fea Combine colors into single rule 2013-06-12 13:10:23 -07:00
Kevin Sawicki c298e1b3ee Remove background-color on .text .source
This was causing a different background in script tags
in HTML that looked strange.
2013-06-12 13:07:32 -07:00
Kevin Sawicki 91e5d171b7 Lint dot-atom coffee files 2013-06-12 13:04:10 -07:00
Kevin Sawicki 28f47e8248 hideGitIgnoredFiles is under core key, not editor 2013-06-12 12:48:25 -07:00
Kevin Sawicki f870dc7b72 Allow autocomplete package to be deactivated 2013-06-12 11:41:41 -07:00
Kevin Sawicki 04c5e9fa42 Return subscription from RootView.eachEditor() 2013-06-12 11:38:05 -07:00
Kevin Sawicki 65b08e2914 Upgrade to lesslint 0.4 2013-06-12 11:02:34 -07:00
Kevin Sawicki ed19b9e032 Upgrade to lesslint 0.3 2013-06-12 10:27:40 -07:00
Kevin Sawicki e72b5a55a0 Remove invalid float on inline-block element 2013-06-12 10:18:23 -07:00
Kevin Sawicki 5281507483 Remove invalid include rule 2013-06-12 10:18:23 -07:00
Kevin Sawicki abf7303d6e Disable font-sizes rule 2013-06-12 10:18:23 -07:00
Kevin Sawicki 775f29564a Use LESS style comments 2013-06-12 10:18:23 -07:00
Kevin Sawicki 7e33a3e12f Remove duplicate properties 2013-06-12 10:18:23 -07:00
Kevin Sawicki 5538b2910d 💄 2013-06-12 10:18:23 -07:00
Kevin Sawicki c7c7988ae6 Drop units when using zero 2013-06-12 10:18:23 -07:00
Kevin Sawicki 454106a22b Disable several CSS Lint rules 2013-06-12 10:18:22 -07:00
Kevin Sawicki 43c1d7f8aa Add less lint task 2013-06-12 10:18:22 -07:00
probablycorey 1156018c0d Make gutter line number's position relative
This makes it easier to decorate line numbers.
2013-06-12 09:55:31 -07:00
Kevin Sawicki e00e87a845 Lint css files in static/ 2013-06-11 16:34:48 -07:00
Kevin Sawicki 2b29212d0f Sort flags alphabetically 2013-06-11 16:30:46 -07:00
Kevin Sawicki 7390d908bd Add -v flag to print the version 2013-06-11 16:23:47 -07:00
Kevin Sawicki a98308a7a4 Add -n option to always open a new window 2013-06-11 16:15:04 -07:00
Kevin Sawicki 3b263eb961 Tweak crashed dialog messaging 2013-06-11 16:07:57 -07:00
Kevin Sawicki c6d5c143cf Mention LESS/CSS indent fix 2013-06-11 15:54:56 -07:00
Kevin Sawicki 6d0f303cd5 Set initialPath on load settings 2013-06-11 15:48:22 -07:00
Kevin Sawicki 327f16fa03 Add semicolon 2013-06-11 15:44:25 -07:00
Corey Johnson & Kevin Sawicki a4ee1eb785 Rename pathToOpen load setting to initialPath
Use the initialPath as the window state serialization key.

Also use the parent directory as the intitial path when the
path to open is a file.
2013-06-11 15:38:31 -07:00
Corey Johnson & Kevin Sawicki fc52ee518e Wait for window:loaded before emitting window:open-path 2013-06-11 14:48:51 -07:00
Corey Johnson & Kevin Sawicki b3e0ea6d33 Add AtomWindow.openPath() 2013-06-11 14:39:52 -07:00
Corey Johnson & Kevin Sawicki dc53f387a6 Remove project serialization 2013-06-11 14:39:32 -07:00
Corey Johnson & Kevin Sawicki 11dfe7b649 Tweak unresponsive dialog text 2013-06-11 14:28:27 -07:00
Corey Johnson & Kevin Sawicki 1ce861c000 Don't save pathToOpen to window state 2013-06-11 14:17:20 -07:00
Corey Johnson & Kevin Sawicki 0c8f200d45 Always load bundle preferences
Previously the scoped properties would not load if there weren't
any grammars in the bundle or if listing the grammars directory
failed.

Closes #570
2013-06-11 13:52:40 -07:00
Kevin Sawicki c63536c682 Include source TextMate bundle 2013-06-11 13:02:00 -07:00
Corey Johnson & Kevin Sawicki 7516cebb40 Comment .less code correctly 2013-06-11 12:25:57 -07:00
Corey Johnson & Kevin Sawicki e82a7f57fe Move already opened path logic to Atom Window 2013-06-11 11:28:53 -07:00
Corey Johnson & Kevin Sawicki bcc16fbefe Remove hash params from url
Load settings are now stored on the browser window.
2013-06-11 11:17:16 -07:00
Cheng Zhao a57c5c7c93 Show prompt to close or reload window when renderer is crashed. 2013-06-11 14:49:04 +08:00
Cheng Zhao f7db59ea7c Close window immediately if renderer is crashed. Fixed #580. 2013-06-11 14:49:04 +08:00
Kevin Sawicki 4f348dcd19 Watch archive file and react to events
The view now refreshes on 'contents-changed' events and
closes on 'removed' events
2013-06-10 18:32:11 -07:00
Kevin Sawicki a3d896f456 Mention archive viewer 2013-06-10 14:22:30 -07:00
Kevin Sawicki 9ad65e6e46 Add top padding to directories 2013-06-10 14:11:19 -07:00
Kevin Sawicki 790c9714c7 Forward focus to selected file on focus events 2013-06-10 14:11:19 -07:00
Kevin Sawicki 68074be9d6 Add initial archive viewer spec 2013-06-10 14:11:19 -07:00
Kevin Sawicki 4c2a40808b 💄 2013-06-10 14:11:19 -07:00
Kevin Sawicki 8dbac6a34f Add light theme support for archive viewer 2013-06-10 14:11:18 -07:00
Kevin Sawicki 6bd8213093 Remove duplicate property 2013-06-10 14:11:18 -07:00
Kevin Sawicki 0b0af2296f Add summary header with size and file/folder counts 2013-06-10 14:11:18 -07:00
Kevin Sawicki 2c7d49f7a8 Ignore callbacks if path has changed 2013-06-10 14:11:18 -07:00
Kevin Sawicki dc89b0569a Add margin to loading message 2013-06-10 14:11:18 -07:00
Kevin Sawicki ff5ea00b00 Use toggle class for removing selected class 2013-06-10 14:11:18 -07:00
Kevin Sawicki 1894901930 Add up/down/confirm event handling 2013-06-10 14:11:18 -07:00
Kevin Sawicki 135a285596 Remove unused require 2013-06-10 14:11:18 -07:00
Kevin Sawicki 32e229b162 Log error stack 2013-06-10 14:11:18 -07:00
Kevin Sawicki 3102ac403b Tweak file and folder styles 2013-06-10 14:11:18 -07:00
Kevin Sawicki 0f16b54d8e Only update view when path changes 2013-06-10 14:11:18 -07:00
Kevin Sawicki 8fc1e34a74 Remove debug logging 2013-06-10 14:11:18 -07:00
Kevin Sawicki af2b775a4a Upgrade to ls-archive 0.9 2013-06-10 14:11:18 -07:00
Kevin Sawicki e9bf2fe161 Add initial archive viewer 2013-06-10 14:11:17 -07:00
Kevin Sawicki 3709a0b7e1 Release instead of build 2013-06-10 09:01:00 -07:00
Kevin Sawicki c651cdc356 Update image to match current icon 2013-06-10 09:00:26 -07:00
Kevin Sawicki db9d92041f Add speakeasy link 2013-06-10 09:00:08 -07:00
Kevin Sawicki b474a818aa Always return false from link click callback 2013-06-10 08:56:19 -07:00
Kevin Sawicki cea521a737 Save window parameters on reload 2013-06-08 17:22:21 -07:00
Kevin Sawicki b89eb07c6e URI encode parameter values
Previously the path to open would not open properly if it contained
a '&' character since the character was not encoded and would cause
the parameter parsing to stop at the first '&'.
2013-06-07 11:11:31 -07:00
Kevin Sawicki 7f6e5e2e52 Un-f image view spec 2013-06-07 11:02:41 -07:00
Kevin Sawicki 4fdaf6dead Always open untitled editor when no path to open
Refs #577
2013-06-07 10:54:51 -07:00
Kevin Sawicki dea0e08d93 Use hash instead of query string for parameters
This allows the pathToOpen to be changed when the project
path changes.

Previously if the untitled window file was saved, the project
path would be forever associated with the undefined window.

Now when the project path changes, the pathToOpen changes so
that the state is persisted to the project area and the untitled
window never has a project.
2013-06-07 10:50:06 -07:00
Kevin Sawicki fca1c13d03 Move image-view to a package
This removes the ugliness of having project.coffee require
image-edit-session at the end since the image-edit-session can
now register itself in an @activate callback and as a deferred
deserializer in the package.cson file.
2013-06-07 10:15:32 -07:00
Kevin Sawicki 3029137cb8 Correct typo in return comment 2013-06-07 09:31:04 -07:00
Kevin Sawicki c7c9a2496a Sort autocomplete words case insensitively 2013-06-07 09:18:16 -07:00
Kevin Sawicki f40a7105bc Call .openPath() when 'new-window' is triggered
Closes #577
2013-06-07 08:51:10 -07:00
Kevin Sawicki 00313c747a Mention TODO 2013-06-07 08:29:05 -07:00
Kevin Sawicki 2ffd187094 Mention full screen persistence 2013-06-07 08:27:53 -07:00
Cheng Zhao 6f519b0456 Show unresponsive message dialog as sheet. 2013-06-07 16:26:58 +08:00
Cheng Zhao cb2bf796fa Show prompt to force closing window when window is frozen.
Fixed atom/atom-shell#17.
2013-06-07 16:26:18 +08:00
Cheng Zhao bbde993e81 Fullscreen => FullScreen. 2013-06-07 14:33:55 +08:00
Kevin Sawicki 9088ecca16 Default first argument to empty hash 2013-06-06 17:31:54 -07:00
Kevin Sawicki 9a99af2281 Store/restore full screen state on root view
Closes #245
2013-06-06 17:21:33 -07:00
Kevin Sawicki 70bb40ce2f Show all words when prefix and suffix are empty
This seems more applicable than just showing the "No matches found"
error when the current position has neither a prefix or a suffix.
2013-06-06 16:42:37 -07:00
Kevin Sawicki 9fea9ea756 Catch and log errors thrown by process.kill()
These can occur if killing the process fails because it no longer exists.
2013-06-06 16:23:53 -07:00
Kevin Sawicki dc46960e6c Update scroll position after layer dimensions
Calling updateLayerDimensions() may change the scroll position
so restore the edit session's stored scroll positions after
updateLayerDimensions() is called but store the scroll left and
scroll top positions beforehand.
2013-06-06 16:15:51 -07:00
Kevin Sawicki 7a04b22375 💄 2013-06-06 16:00:44 -07:00
Kevin Sawicki d5526515f1 Only save scroll position when attached 2013-06-06 15:58:44 -07:00
Kevin Sawicki 8aeedb8971 Upgrade apm 2013-06-06 13:23:19 -07:00
Kevin Sawicki 9fe7bfb898 Remove unneeded activatePackage calls
These are already done in the root beforeEach
2013-06-06 12:45:41 -07:00
Kevin Sawicki 7313407d04 Resolve ${group:/command} style pattern names
These are used by the todo package to include the lower cased
version of the matched capture index in the pattern scope name.
2013-06-06 12:39:51 -07:00
Kevin Sawicki 42d70f888e Bundle todo package 2013-06-06 12:37:39 -07:00
Kevin Sawicki 881efc8e8f Add mdown for GFM fileTypes 2013-06-06 12:12:26 -07:00
Kevin Sawicki 71c86381df Support includes inside of injection grammars 2013-06-06 11:30:01 -07:00
Kevin Sawicki efdb750334 Mention make package 2013-06-06 11:02:57 -07:00
Kevin Sawicki 5afd8d8bd3 Bundle make package 2013-06-06 10:40:45 -07:00
Kevin Sawicki 6f21ea930a Menion opening fuzzy finder to specific line 2013-06-06 10:23:58 -07:00
Kevin Sawicki af14f57962 Support opening fuzzy finder to a specific line
Adding a line number after a colon such as ':8' to the end of the fuzzy
filter input field will navigate to line 8 of the opened editor.
2013-06-06 10:17:15 -07:00
Kevin Sawicki e9b8f71997 Mark indentation issues as errors
All existing issues have been resolved.
2013-06-06 08:33:25 -07:00
Kevin Sawicki 2f8c45aec4 Break out wrap test to own function 2013-06-06 08:32:47 -07:00
Kevin Sawicki eaf5b8bc8e Remove duplicate getLastScreenRow() method 2013-06-06 08:21:00 -07:00
Kevin Sawicki efb2cfab9f Remove duplicate getBufferRowCount() method 2013-06-06 08:19:21 -07:00
Kevin Sawicki 320328777e Remove duplicate keys in classes 2013-06-06 08:18:08 -07:00
Kevin Sawicki 21f965f284 Mark empty param lists as errors 2013-06-06 08:16:23 -07:00
Kevin Sawicki 5c36064afc Remove empty param lists 2013-06-06 08:16:11 -07:00
Cheng Zhao 01b583957e Add back edit menu.
On OS X, applications rely on the menu to trigger native events for
various commands. Editor view doesn't need it before it listens to the
keyboard shortcuts itself. Since spec window and devtools view don't
listen to keyboard shortcuts, we should rely on the menu to make edit
commands work.

Fixed atom/atom-shell#18.
2013-06-06 10:24:30 +08:00
Kevin Sawicki 7ccf2390a7 Constantly sync scroll left/top value from editor to edit session
Previously these values were only saved on the edit session when
is became inactive causing the scroll position to not always
persist between refreshes.

Closes #474
2013-06-05 19:14:30 -07:00
Cheng Zhao feab9862ac Update apm for node v0.10.9. 2013-06-06 09:57:03 +08:00
Kevin Sawicki f85f95e792 Move universal comment toggle specs to edit-session-spec 2013-06-05 17:58:39 -07:00
Kevin Sawicki d658e7c490 Only uncomment when all lines start with a comment
Previously only the first row was checked for a comment. Now all
rows are checked and the rows are only uncommented when they all
start with a comment.

This only impacts languages that do not specify a command end pattern.

Closes #554
2013-06-05 17:38:50 -07:00
Kevin Sawicki 520e510aab Update expection extension to .less 2013-06-05 17:02:44 -07:00
Kevin Sawicki 769834e1a6 Add more common binary exetnsions 2013-06-05 17:00:30 -07:00
Kevin Sawicki 42d06d6281 Update path text when active item title changes
Closes #573
2013-06-05 16:53:52 -07:00
Kevin Sawicki 0d6028976b Convert light and dark syntaxes to less
Closes #533
2013-06-05 16:25:12 -07:00
Kevin Sawicki 69f7af7c63 Ignore errors unlinking non-existent path 2013-06-05 11:54:27 -07:00
Kevin Sawicki abbada47da Put node directory in PATH when spawning
This ensures the node used by the spawned process is the one bundled
with Atom.

This should prevent any "env: node: No such file or directory"
errors when spawning a node bin script such as nak.

Refs #514
2013-06-05 10:58:52 -07:00
Kevin Sawicki e7679d8320 Remove submoduling 3rd-party packages 2013-06-05 10:51:55 -07:00
Kevin Sawicki d3807fd908 Remove deleted folder 2013-06-05 10:51:11 -07:00
Kevin Sawicki 5adf74794b Log errors from nak to console 2013-06-04 18:47:05 -07:00
Kevin Sawicki 73c2e94a32 Pad image from container 2013-06-04 18:43:44 -07:00
Kevin Sawicki 66000a6769 Upgrade to oniguruma 0.16
This release returns objects for capture indices instead of
the index, start, and end in sequence in a single array.
2013-06-04 17:41:02 -07:00
Kevin Sawicki 09b15bab9b Mention tree view and utf8 fixes 2013-06-04 13:55:07 -07:00
Kevin Sawicki 0ed88c474a 💄 2013-06-04 13:43:19 -07:00
Kevin Sawicki c40a312e73 Add spec with surrogate pair token with trailing text 2013-06-04 13:43:19 -07:00
Kevin Sawicki 3d1ca5abb1 Add specs for partial surrogate pairs 2013-06-04 13:43:19 -07:00
Kevin Sawicki f63866b2a2 Rename hasSurrogatePairs() to hasSurrogatePair() 2013-06-04 13:43:19 -07:00
Kevin Sawicki 7dec3866cf Update spec description to be accurate 2013-06-04 13:43:19 -07:00
Kevin Sawicki 06a5234d10 Doc text-utils.coffee 2013-06-04 13:43:19 -07:00
Kevin Sawicki a109a3317e Add support for surrogate pairs
Surrogate pairs, meaning characters outside the Basic
Multilingual Plane, are now broken out as atomic tokens.

Closes #567
2013-06-04 13:43:19 -07:00
Kevin Sawicki 9f4fc49790 💄 2013-06-04 13:38:14 -07:00
Kevin Sawicki 6c8063b26a Use active pane item for path
Previously the active view was used to obtain the path.

The ImageView does not provide a path and was causing an
exception to be thrown when getPath was called on it
unguarded.

Closes #568
2013-06-04 13:36:45 -07:00
Kevin Sawicki 36ddbe99a1 Have inner image-container consume entire area 2013-06-04 13:23:26 -07:00
Cheng Zhao 47e5c0df16 Merge branch 'master' into atom-shell
Conflicts:
	.nakignore
2013-06-04 09:52:18 +08:00
Kevin Sawicki 86635c4543 Ignore docs/api when searching 2013-06-03 17:40:45 -07:00
Kevin Sawicki 855549d677 Remove unused method 2013-06-03 13:39:50 -07:00
Kevin Sawicki d58ec4d3f6 Show window from bootstrap script 2013-06-03 13:23:16 -07:00
Kevin Sawicki 879cc31261 Replace DevTools with Developer Tools in menu text 2013-06-03 13:19:05 -07:00
Kevin Sawicki 56fea45505 Replace Atom Shell with Atom in menu text 2013-06-03 13:17:40 -07:00
Kevin Sawicki 5e7656489d Add toggle full screen to View menu 2013-06-03 13:16:51 -07:00
Kevin Sawicki a816423037 Remove non-functional menus
These can be re-added as they are wired to triggering
commands into Atom.
2013-06-03 13:10:40 -07:00
Kevin Sawicki f3a500923c Catch and log errors parsing window state
Previously if a read or parse error occurred the window
would never show and the dev tools would be inaccessible.
2013-06-03 12:14:17 -07:00
Kevin Sawicki 7f0947ef9b Don't cancel on delay when no tags exist
Instead just show the error until explicitly cancelled so the behavior
when no tags is the same as the behavior when no tags match the
current filter.
2013-06-03 11:46:30 -07:00
Kevin Sawicki f90530f593 💄 2013-06-03 10:50:13 -07:00
Kevin Sawicki 3683f7e097 Move show() to atom.coffee
Co-locates it with hide() and focus() which are similar.
2013-06-03 10:43:43 -07:00
Kevin Sawicki 98310e8d7a 💄 2013-06-03 10:32:35 -07:00
Kevin Sawicki 8c9aad9e34 Merge branch 'master' into atom-shell 2013-06-03 09:38:47 -07:00
Kevin Sawicki 2b6a4365ac Upgrade apm 2013-06-03 09:34:53 -07:00
Kevin Sawicki 94c1ed4c28 Add node_modules dir to config.bundledPackageDirPaths array 2013-06-03 09:32:20 -07:00
Kevin Sawicki c1a1633593 Break on first path match 2013-06-03 09:30:33 -07:00
Cheng Zhao a6c37ff276 💄 on code style. 2013-06-03 22:56:30 +08:00
Cheng Zhao 495b218c7f Make atom.update() work. 2013-06-03 22:48:52 +08:00
Cheng Zhao d224f3c5bd Don't check for updates if it's a custom build.
Currently we check whether the version has the '.', the custom builds
would have commit hash as version, which doesn't contain '.'.
2013-06-03 22:33:04 +08:00
Cheng Zhao be309aba69 Setup crash reporter on 'will-finish-launching' event. 2013-06-03 22:26:47 +08:00
Cheng Zhao 2b3d3d9cf5 Make auto updater work. 2013-06-03 22:21:45 +08:00
Cheng Zhao 681969439d Merge branch 'master' into atom-shell 2013-06-03 19:53:10 +08:00
Cheng Zhao f9be1f3493 Convert Info.plist to XML format. 2013-06-03 18:42:23 +08:00
Cheng Zhao a2efd40798 URL => Url. 2013-06-02 15:16:21 +08:00
Cheng Zhao 94e7011413 Update node version to v0.10.9.
Should make this default settings after atom-shell branch is merged.
2013-06-02 10:25:35 +08:00
Cheng Zhao 1aca554ae3 Make atom.crashMainProcess and atom.crashRenderProcess work. 2013-06-02 00:34:12 +08:00
Cheng Zhao eefc18202f Make crash reporter work. 2013-06-01 20:15:19 +08:00
Cheng Zhao 70e414b279 Check the existence of socketPath.
See the comments for the reason.
2013-06-01 14:09:53 +08:00
Cheng Zhao e629088ec3 Make sure Atom terminates after message is sent. 2013-06-01 13:11:07 +08:00
Kevin Sawicki 9431a8c3ac Check that scope name is present before comparing
Previously if the last 2 rules in the stack had no scope
name and the position wasn't advancing then the last rule
would be popped.

This caused Java single line comments to not parse properly
since the push rules for comment blocks have no scope name.
2013-05-31 09:28:41 -07:00
Kevin Sawicki 9e7a9e6210 Remove incorrect @
anchorPosition is a parameter
2013-05-31 09:25:54 -07:00
Cheng Zhao c36fc467e6 Since files passed in command line won't trigger 'open-file' any more, there is no need to clean duplicate paths.
It also seems that there is a typo...
2013-05-31 10:30:37 +08:00
Kevin Sawicki 0c7701dc57 Copy files consistently with perms 2013-05-30 18:00:14 -07:00
Kevin Sawicki 2dbbce31d6 Set resource path as single argument 2013-05-30 16:45:40 -07:00
Kevin Sawicki d18ccc168f Guard against null options 2013-05-30 16:45:40 -07:00
Kevin Sawicki cc5ae002a2 Ignore pkill failures 2013-05-30 16:45:40 -07:00
Kevin Sawicki 06886f98d4 Log failure code 2013-05-30 16:45:40 -07:00
Kevin Sawicki 5e072e94e8 Add ci task 2013-05-30 16:45:39 -07:00
Kevin Sawicki 9e4ef708e4 Add test task 2013-05-30 16:45:15 -07:00
Kevin Sawicki da0af11bbb Only delete file if it exists 2013-05-30 16:45:15 -07:00
Kevin Sawicki 04b8ab1b87 Add bootstrap task 2013-05-30 16:45:15 -07:00
Kevin Sawicki 7988e3ead9 Run postbuild scripts after compile 2013-05-30 16:45:15 -07:00
Kevin Sawicki b51aea98b4 Copy symlinks properly 2013-05-30 16:45:15 -07:00
Kevin Sawicki 91cb03a43c Filter paths while recursing 2013-05-30 16:45:14 -07:00
Kevin Sawicki 9977f4efab Use grunt API for is directory 2013-05-30 16:45:14 -07:00
Kevin Sawicki 7928f075b5 Use grunt API for mkdir and rm 2013-05-30 16:45:14 -07:00
Kevin Sawicki 79bc23f83a Copy source mode to destination 2013-05-30 16:45:14 -07:00
Kevin Sawicki b201dbb698 Use grunt API for copying folders 2013-05-30 16:45:14 -07:00
Kevin Sawicki 11004c20e6 Use grunt API for copying files 2013-05-30 16:45:14 -07:00
Kevin Sawicki 3a54d0b8a9 💄 2013-05-30 16:45:14 -07:00
Kevin Sawicki 24d5fdd6eb Create path to install directory 2013-05-30 16:45:14 -07:00
Kevin Sawicki 75eb321272 Support copying files and folder from cp function 2013-05-30 16:45:14 -07:00
Kevin Sawicki ef8f630ad5 Copy non-compiled files to build directory 2013-05-30 16:45:14 -07:00
Kevin Sawicki 5c51060dca Add atom-shell segment to BUILD_DIR 2013-05-30 16:45:14 -07:00
Kevin Sawicki ec13dea5e6 Add missing atom-shell segment to APP_DIR 2013-05-30 16:45:14 -07:00
Kevin Sawicki affd4a481f Add install task 2013-05-30 16:45:13 -07:00
Kevin Sawicki eafad9a5c4 Show skull menu when in dev mode 2013-05-30 16:31:54 -07:00
Corey Johnson & Kevin Sawicki 454656a91c Use open-file event for paths to open 2013-05-30 15:15:08 -07:00
Corey Johnson & Kevin Sawicki a5c3ca9e8e Add open menu under File 2013-05-30 14:04:15 -07:00
Corey Johnson & Kevin Sawicki 4db152b2d7 Killing comment that made kevin angry 2013-05-30 12:07:48 -07:00
Corey Johnson & Kevin Sawicki 43a2096852 Don't reuse windows when --wait flag is set 2013-05-30 12:02:56 -07:00
Corey Johnson & Kevin Sawicki f76ab1ebe6 Add open class method to AtomApplication 2013-05-30 11:57:49 -07:00
Corey Johnson & Kevin Sawicki 04392c562e Create AtomApplication after app is finished launching 2013-05-30 11:38:08 -07:00
Corey Johnson & Kevin Sawicki a4470f9b6d Ignore windows without paths 2013-05-30 11:05:16 -07:00
Cheng Zhao db85792c59 Center the window by default, instead of position of (0, 0). 2013-05-30 22:16:15 +08:00
Cheng Zhao 92f071de93 Add script to clean up "open with" menu.
By compiling and running Atom again and again, the "open with" menu
would be polluted with various Atoms... This script cleans them.
2013-05-30 22:11:24 +08:00
Cheng Zhao ee046f1c25 Check whether the socket file exists before connecting.
By removing the socket file when the browser process of Atom quits and
checking it's existence before trying to connect it, we can greatly
reduce the startup time of the first instance of Atom.
2013-05-30 22:02:35 +08:00
Cheng Zhao 2135de059f Also listen to 'open-file' event in constructor.
The 'open-file' may happen before application is launched.
2013-05-30 21:37:14 +08:00
Cheng Zhao 3cad4ae118 Adopt to filename changes of atom-shell. 2013-05-30 21:36:49 +08:00
Cheng Zhao 69b8b7989a Listen to 'finish-launching' event in constructor.
Otherwise @handleEvents would never be called...
2013-05-30 21:30:46 +08:00
Cheng Zhao 3c02b28c11 Don't open any file until the application has finished launching.
When user double clicks a file in Finder, the Atom would start with no
pathToOpen, and then the 'open-file' event would be emitted for the
opened file. After 'open-file' event has been emitted for all files, the
'finish-launching' event would be finally emitted.

If no file has been opened and current process is the first instance of
Atom, Atom would open the empty editor.
2013-05-30 19:55:10 +08:00
Cheng Zhao 9e7510deea atomWindow.pathToOpen could be null. 2013-05-30 18:21:58 +08:00
Cheng Zhao e259df1d0a Add various file types in Info.plist. 2013-05-30 17:04:32 +08:00
Cheng Zhao 941a3d8bf8 Open file when received 'open-file' event.
This event is emitted when the OS X opens files with Atom.
2013-05-30 16:13:25 +08:00
Kevin Sawicki 970227e082 Add initial build task 2013-05-29 17:35:00 -07:00
Kevin Sawicki c42b018915 Simplify lint task 2013-05-29 16:45:12 -07:00
Kevin Sawicki c7553e032e Correct indentation 2013-05-29 16:45:00 -07:00
Kevin Sawicki 3e10fac5d0 Add clean task 2013-05-29 16:39:37 -07:00
Corey Johnson & Kevin Sawicki b15f0b0805 Guard against null pathsToOpen 2013-05-29 15:49:50 -07:00
Corey Johnson & Kevin Sawicki fa3c636494 Doc test flag 2013-05-29 14:57:33 -07:00
Corey Johnson & Kevin Sawicki b91487c60f Pass pid to kill to AtomApplication ctor 2013-05-29 14:52:45 -07:00
Corey Johnson & Kevin Sawicki 8ad695e89f Make atomApplication a global 2013-05-29 14:49:43 -07:00
Corey Johnson & Kevin Sawicki 0f5c68971c 💄 2013-05-29 14:43:57 -07:00
Corey Johnson & Kevin Sawicki 3373549e56 Resolve paths to open in main.coffee 2013-05-29 14:39:20 -07:00
Corey Johnson & Kevin Sawicki 608fcbd0a1 Use relative requires 2013-05-29 14:38:48 -07:00
Corey Johnson & Kevin Sawicki 1470ae73e7 Make --wait flag work again 2013-05-29 14:09:44 -07:00
Corey Johnson & Kevin Sawicki b0f51eaca6 Stringify Browser logging 2013-05-29 14:05:58 -07:00
Corey Johnson & Kevin Sawicki 715210944e Forward console.log to NSLog in browser process 2013-05-29 14:05:58 -07:00
Kevin Sawicki a4f35a8452 Remove OnigRegExp spec now included in package 2013-05-29 13:46:00 -07:00
Kevin Sawicki 5a691a1b1e Merge branch 'master' into atom-shell 2013-05-29 13:23:23 -07:00
Kevin Sawicki 73a755f29b Move grunt packages to dev dependencies 2013-05-29 13:16:52 -07:00
Kevin Sawicki fe7f36ad7f Add initial csslint task 2013-05-29 12:13:47 -07:00
Kevin Sawicki 36e41ecae6 Remove invalid class name 2013-05-29 12:10:56 -07:00
Kevin Sawicki 367e532578 Remove empty rule 2013-05-29 12:04:16 -07:00
Kevin Sawicki ce71cf7703 Use correct indentation 2013-05-29 11:55:06 -07:00
Kevin Sawicki e19c0e4f87 Remove semicolons 2013-05-29 11:52:14 -07:00
Kevin Sawicki 60881e2ecd Don't lint fixtures 2013-05-29 11:50:53 -07:00
Kevin Sawicki f8fb803e52 Update snippet for newly upgraded javascript bundle 2013-05-29 11:46:05 -07:00
Kevin Sawicki 19411d3d3d Update package id for fixture with broken snippets 2013-05-29 11:45:35 -07:00
Corey Johnson & Kevin Sawicki c1ebf8ae1a Allow Syntaxes and Preferences directories to be lowercase 2013-05-29 11:02:57 -07:00
Corey Johnson & Kevin Sawicki f8f059d3fe Use correct textmate package names 2013-05-29 11:01:59 -07:00
Corey Johnson & Kevin Sawicki 17a83933d4 Use two -f flags to clean all git dirs 2013-05-29 10:01:33 -07:00
Cheng Zhao 326c1332bf shell.moveToTrash => shell.moveItemToTrash 2013-05-29 20:04:00 +08:00
Cheng Zhao c6d4942295 Generate Info.plist for App and Helper. 2013-05-29 19:33:48 +08:00
Cheng Zhao 9a08ea10cc Copy icon files and speakeasy.pem to bundle. 2013-05-29 18:57:02 +08:00
Cheng Zhao aace41032e Rake clean should also clean unused files of master branch.
So when people switch from master branch to atom-shell, they wouldn't
have to clean those files themselves.
2013-05-29 12:21:26 +08:00
Cheng Zhao b1e8a45fbe Remove some dead code. 2013-05-29 12:20:56 +08:00
Cheng Zhao 0cc86b024d Unspy atom.setWindowState after each spec.
Spec window needs to call it to save window dimenses.
2013-05-29 12:20:55 +08:00
Cheng Zhao d4142db847 Restart renderer process instead of reloading.
Chromium has the bug that reloading would cause memory leaks, and V8's
GC would slow down everything, so restarting the renderer process when
the Atom is reloaded would make things much cleaner.
2013-05-29 12:20:55 +08:00
Kevin Sawicki 30b67af51a doc dev flag 2013-05-28 18:15:25 -07:00
Kevin Sawicki be595a62b7 Add version to usage message 2013-05-28 17:56:07 -07:00
Kevin Sawicki f64724eda0 doc wait flag 2013-05-28 17:54:54 -07:00
Kevin Sawicki fe532b9dd5 Add initial help message 2013-05-28 17:52:19 -07:00
Kevin Sawicki 40dd8275d2 Add initial Gruntfile 2013-05-28 17:30:09 -07:00
Corey Johnson & Kevin Sawicki 40b654048b Recompile atom-application and atom-window 2013-05-28 17:29:00 -07:00
Corey Johnson & Kevin Sawicki 53f98951ea Parse out wait and pid arguments 2013-05-28 16:31:23 -07:00
Corey Johnson & Kevin Sawicki 88a3a82a21 Resolve paths to open in constructor 2013-05-28 15:10:26 -07:00
Corey Johnson & Kevin Sawicki bb5e18d981 Exit with 0 when process exists 2013-05-28 14:53:17 -07:00
Corey Johnson & Kevin Sawicki 7bc905d352 Reuse existing windows when opening paths from command line 2013-05-28 14:45:54 -07:00
Kevin Sawicki ba60324426 Correct indentation 2013-05-28 13:29:45 -07:00
Kevin Sawicki a731e4a9b5 Remove semicolons 2013-05-28 13:26:34 -07:00
Kevin Sawicki ed4d12bfcb Remove non-existent directory 2013-05-28 13:07:29 -07:00
Kevin Sawicki 0c44769740 Use relative main path 2013-05-28 13:05:15 -07:00
Kevin Sawicki 8c774a204d Remove submodules task
This is handled in script/bootstrap
2013-05-28 12:57:46 -07:00
Kevin Sawicki 9919387904 Use shorter symlink paths 2013-05-28 12:54:08 -07:00
Kevin Sawicki 13d57f56f6 Focus existing window for path 2013-05-28 12:26:54 -07:00
Kevin Sawicki 56731927ee 💄 2013-05-28 12:03:47 -07:00
Kevin Sawicki b21db90456 💄 2013-05-28 12:02:11 -07:00
Kevin Sawicki 55e0f91bcc Resolve paths before writing to socket 2013-05-28 11:59:26 -07:00
probablycorey 0eaec66ba6 Remove all native code 2013-05-28 11:46:19 -07:00
Kevin Sawicki 7c4f373d2a Add back coffee-script require but don't assign it 2013-05-28 11:28:03 -07:00
Kevin Sawicki 60e08de077 Remove unused require 2013-05-28 11:17:25 -07:00
Kevin Sawicki a081c47efa Join github and atom dirs 2013-05-28 11:05:46 -07:00
Kevin Sawicki b015b8bd2b 💄 2013-05-28 11:00:13 -07:00
Kevin Sawicki 2bd95a2b57 Merge branch 'master' into atom-shell
Conflicts:
	.gitmodules
2013-05-28 10:47:46 -07:00
Kevin Sawicki ea7ff135ee 💄 2013-05-28 09:42:20 -07:00
Kevin Sawicki e84e13fe37 Load internal modules with an atom engines field as packages 2013-05-28 09:25:28 -07:00
Kevin Sawicki 617af68aeb Upgrade apm 2013-05-28 09:25:28 -07:00
Kevin Sawicki 6690598024 Use TextMate packages instead of vendoring bundles 2013-05-28 09:25:22 -07:00
Cheng Zhao 54de539b8b 'pathsToOpen' passed in 'open' message is an array. 2013-05-27 21:38:46 +08:00
Cheng Zhao 684778b666 Map 'meta-r' to 'window:reload' in renderer. 2013-05-25 15:37:22 +08:00
Cheng Zhao e89ee8ff3c 💄 2013-05-25 15:36:47 +08:00
Cheng Zhao 50ba01e22d If no 'executed-from' and 'pathsToOpen' is provided, open empty editor. 2013-05-25 14:56:17 +08:00
Cheng Zhao 462bd77ad5 Make atom.open work with parameters. 2013-05-25 14:38:04 +08:00
Cheng Zhao 0cdbfed7ab Push new window to atomApplication.windows in AtomWindow. 2013-05-25 12:04:53 +08:00
Cheng Zhao ddfae74ba4 Only allow one config window. 2013-05-25 11:58:18 +08:00
Cheng Zhao 45f96ab67f Fix atom.getVersion. 2013-05-25 11:50:23 +08:00
probablycorey 5170478f19 Rely on the atom cli created inside Atom 2013-05-24 14:54:32 -07:00
probablycorey 6b08d18f4b Move AtomWindow to it's own file 2013-05-24 14:46:25 -07:00
probablycorey 7aa6c1c08e Change how pathsToOpen gets passed around 2013-05-24 14:45:48 -07:00
probablycorey 623a58fb47 Use the local pathsToOpen 2013-05-24 14:43:58 -07:00
probablycorey b6c543734a Moved AtomApplication out of main.coffee 2013-05-24 11:53:49 -07:00
probablycorey 6ae858d35c 🙈 2013-05-24 11:53:49 -07:00
Cheng Zhao 47410c54e5 Remove 'modal dialogs' spec.
The main purpose of this spec is to test whether the simulation of modal
dialogs works, since the dialogs of atom-shell are real blocking modal
dialogs, there is no need to check whether the dialogs are presented as
modal dialogs correctly any more.
2013-05-25 00:20:54 +08:00
Cheng Zhao e430002951 atom.getVersion returns plain string, not string object. 2013-05-25 00:19:50 +08:00
Cheng Zhao 0fa5ca3782 Generate version after all files are copied.
And also note that <(PRODUCT_DIR) cannot work in postbuilds.
2013-05-24 23:58:01 +08:00
Cheng Zhao 6bbea1bbf2 Clean atom-shell caches in 'rake clean'. 2013-05-24 23:35:31 +08:00
Cheng Zhao a00fe91fca Show Atom's version. 2013-05-24 23:24:46 +08:00
Cheng Zhao 22d77af409 Also restore dimensions for spec window. 2013-05-24 22:09:44 +08:00
Cheng Zhao e2a18e3487 Hide window when window is going to close, not when unloading.
Otherwise reloading window would also hide and then show window, which
makes things weird.
2013-05-24 21:58:14 +08:00
Cheng Zhao 7bb6a7c1e8 Restore window dimensions after atom.windowMode is set.
It's required to set atom.windowMode before getting window state.
2013-05-24 21:52:03 +08:00
Cheng Zhao 2937404227 Make cibuild work. 2013-05-24 21:29:35 +08:00
Cheng Zhao a3b7df7b25 Fix window spec.
The windowStatePath now requires atom.windowMode, without setting it the
deserializeEditorWindow would create the wrong window.project.
2013-05-24 21:10:40 +08:00
Cheng Zhao 6edcb553e8 If no pathsToOpen is specified and executedFrom is provided, then open executedFrom.
This is the expected behavior of 'atom' cli command.
2013-05-24 20:41:52 +08:00
Cheng Zhao ce1c1e1f88 Hide window before doing unload work.
In this way we can give user the feeling of quick close even though the
unloading could take some time.
2013-05-24 20:12:42 +08:00
Cheng Zhao fa0a35741a Make configuration window work. 2013-05-24 19:45:20 +08:00
Cheng Zhao cf4c2b5768 Return separate windowStatePath for config window. 2013-05-24 19:33:25 +08:00
Cheng Zhao 0dd823aa38 Merge branch 'master' into atom-shell 2013-05-24 19:12:47 +08:00
Cheng Zhao b9b8101676 Window without pathToOpen should also has meaningful windowStatePath. 2013-05-24 19:02:53 +08:00
Cheng Zhao d1917fb986 Calling AtomApplication.open() without parameters should work. 2013-05-24 18:40:33 +08:00
Cheng Zhao e1442efef3 Make sure web view in spec window never loses focus. 2013-05-24 18:21:48 +08:00
Cheng Zhao 20b53313af dimensions could be undefined. 2013-05-24 16:34:26 +08:00
probablycorey 15baa08ca2 Only allow one atom process to run at a time
If another atom process is opened, it will send its pathsToOpen to the
existing atom process via a socket
2013-05-23 16:34:49 -07:00
Kevin Sawicki 7daeb6c633 Allow json grammars in TextMate bundles 2013-05-23 12:11:17 -07:00
Kevin Sawicki a267b67337 Remove unused require 2013-05-23 11:58:34 -07:00
probablycorey 70ac47b8a8 🙈 2013-05-23 11:18:31 -07:00
probablycorey 61d9f957ea Change indexOf string matching calls to use regex 2013-05-23 10:31:07 -07:00
probablycorey c0149100bb 💄 2013-05-23 10:26:31 -07:00
Cheng Zhao 1b896d8b30 Fix link package spec. 2013-05-23 15:04:47 +08:00
Cheng Zhao 20c0b76329 Add prefix for loading packages in spec/fixtures. 2013-05-23 14:50:56 +08:00
Cheng Zhao f715a6fca2 Fix opening links in external browsers. 2013-05-23 14:50:21 +08:00
Cheng Zhao 8849eb1186 Remove a few abandonded atom.* functions relying on sendMessageToBrowserProcess. 2013-05-23 14:13:39 +08:00
Cheng Zhao 95d5bff6ba Make atom work when there is no enough command line parameters. 2013-05-23 10:53:35 +08:00
Cheng Zhao 1d9449838f Make detect order of resourcePath more robust.
1. Use the resource-path of process.argv if specified;
2. Otherwise if --dev is specified then use ~/github/atom;
3. If no valid resourcePath is provide use the ones in bundle.
2013-05-23 10:36:27 +08:00
probablycorey b5bd7160d2 Update window spec 2013-05-22 16:44:09 -07:00
probablycorey ce4cb0db80 Test window.closeWithoutConfirm instead of window.close 2013-05-22 16:28:13 -07:00
Kevin Sawicki 603868a8c9 Mention installing packages 2013-05-22 16:02:48 -07:00
probablycorey 7716441bbd Update clipboard calls in edit session spec 2013-05-22 16:01:57 -07:00
Kevin Sawicki b5c805f0e9 Listen for package events and update view on state changes 2013-05-22 15:44:44 -07:00
Kevin Sawicki 6f54250ee5 Include error in trigger arguments 2013-05-22 15:41:03 -07:00
probablycorey 2746d72731 Ignoring 'modal native dialogs' spec
/cc @zcbenz since we don't use sendMessageToBrowserProcess anymore
these specs aren't mocked correctly. Is there a method that we can
mock when calling remote objects?
2013-05-22 15:34:48 -07:00
probablycorey 7f083acdc4 Update atom specs 2013-05-22 15:31:59 -07:00
Kevin Sawicki 681bc18248 Add spec for installing a package 2013-05-22 15:29:38 -07:00
Kevin Sawicki 23ce97a358 Add spec for uninstalling a package 2013-05-22 15:29:38 -07:00
Kevin Sawicki 26bfd95289 Expect relative main path 2013-05-22 15:29:38 -07:00
Kevin Sawicki 51cd8cc977 Add string case to unsubscribeFromActivationEvents() 2013-05-22 15:29:38 -07:00
Kevin Sawicki 571c953e51 Mark emitter class as internal 2013-05-22 15:29:38 -07:00
Kevin Sawicki d65b3608ba Add keybinding to description 2013-05-22 15:29:38 -07:00
Kevin Sawicki 14db63df3c Support single string activationEvents 2013-05-22 15:29:38 -07:00
Kevin Sawicki ed95c0d555 Add a description for each package 2013-05-22 15:29:38 -07:00
Kevin Sawicki 8deaeed6b7 Use a relative require path 2013-05-22 15:29:38 -07:00
Kevin Sawicki 05df25b8f4 Update spec for new DOM layout 2013-05-22 15:29:38 -07:00
Kevin Sawicki 9a5fc6ebe8 Add retry button for when fetching fails 2013-05-22 15:29:38 -07:00
Kevin Sawicki d671345ab3 Update views when packages are installed/uninstalled 2013-05-22 15:29:37 -07:00
Kevin Sawicki 9ecfe91729 💄 2013-05-22 15:29:37 -07:00
Kevin Sawicki fa571717d4 Only unload package if it is loaded 2013-05-22 15:29:37 -07:00
Kevin Sawicki 262a7d549e Add asserts for version text 2013-05-22 15:29:37 -07:00
Kevin Sawicki 860dd76d0d Wait for packages loaded event before starting specs 2013-05-22 15:29:37 -07:00
Kevin Sawicki 484c16da42 Always trigger loaded event 2013-05-22 15:29:37 -07:00
Kevin Sawicki 9552ebf4c2 Add warning label instead of warning panel when disabled 2013-05-22 15:29:37 -07:00
Kevin Sawicki 732c846cfc Show label when update is available 2013-05-22 15:29:37 -07:00
Kevin Sawicki a518af71ea Unload package before upgrade 2013-05-22 15:29:37 -07:00
Kevin Sawicki ca8a99bcfb Support a string repository field 2013-05-22 15:29:37 -07:00
Kevin Sawicki d1a5add3ea Remove unused requires 2013-05-22 15:29:37 -07:00
Kevin Sawicki 055e4d96e8 Render markdown in installed package views 2013-05-22 15:29:37 -07:00
Kevin Sawicki ce20bba792 Show loading message in available tab 2013-05-22 15:29:37 -07:00
Kevin Sawicki 80a55bb69a Use correct path variable name 2013-05-22 15:29:37 -07:00
Kevin Sawicki 32bdffa7eb Add description 2013-05-22 15:29:36 -07:00
Kevin Sawicki 07e8ee35d9 Add Atom.getAvailablePackageMetadata()
This includes the metadata for all available packages
whether or not they are currently loaded.
2013-05-22 15:29:36 -07:00
Kevin Sawicki 25b8da0a76 Don't show uninstall action for bundled packages 2013-05-22 15:29:36 -07:00
Kevin Sawicki 63bfca3d09 Allow metadata to be loaded independently 2013-05-22 15:29:36 -07:00
Kevin Sawicki 37b1d4e77d Force metadata name to be package name 2013-05-22 15:29:36 -07:00
Kevin Sawicki d4e5050fc2 Load packages by name instead of path 2013-05-22 15:29:36 -07:00
Kevin Sawicki 0cd27eac50 Use CSON.resolve() to find metadata path 2013-05-22 15:29:36 -07:00
Kevin Sawicki 7fa67d4a21 Sort installed packages by name 2013-05-22 15:29:36 -07:00
Kevin Sawicki 493f02951f Always include a name value in the metadata 2013-05-22 15:29:36 -07:00
Kevin Sawicki 82597aa636 Use same view for installed and available packages 2013-05-22 15:29:36 -07:00
Kevin Sawicki 76384747a1 Add isActive() helper to Package 2013-05-22 15:29:36 -07:00
Kevin Sawicki e85e30c1f7 Simplify version label 2013-05-22 15:29:36 -07:00
Kevin Sawicki 25eb893837 💄 2013-05-22 15:29:36 -07:00
Kevin Sawicki b6b48513de Remove logging of selector length 2013-05-22 15:29:36 -07:00
Kevin Sawicki e9a22192f7 Only show installed version when different 2013-05-22 15:29:35 -07:00
Kevin Sawicki 1fe576752b Unload package when uninstalled 2013-05-22 15:29:35 -07:00
Kevin Sawicki 4277271992 Don't hide dropdown when clicked 2013-05-22 15:29:35 -07:00
Kevin Sawicki 6622e7369d Decrease coverage to 75% 2013-05-22 15:29:35 -07:00
Kevin Sawicki d2bd937f36 Store packages in hash instead of array
This allows quick lookup by name without having to
memoize the resolved path.
2013-05-22 15:29:35 -07:00
Kevin Sawicki ff1f9b98d2 Use path.basename() instead of fsUtils.base() 2013-05-22 15:29:35 -07:00
Kevin Sawicki 0c85b40789 Add initial support for installing and uninstalling 2013-05-22 15:29:35 -07:00
Kevin Sawicki b4104c0136 Use third package view instead of first 2013-05-22 15:29:35 -07:00
Kevin Sawicki fb712cf9c1 Add asserts for homepage and issue links 2013-05-22 15:29:35 -07:00
Kevin Sawicki 061b285aeb Use simpler internal tag 2013-05-22 15:29:35 -07:00
Kevin Sawicki 9841df732f Remove unused method 2013-05-22 15:29:35 -07:00
Kevin Sawicki 9f94d1b6b4 Add initial spec for available packages 2013-05-22 15:29:35 -07:00
Kevin Sawicki 5b2b699618 💄 2013-05-22 15:29:35 -07:00
Kevin Sawicki 7c04662d7d Remove logging statement 2013-05-22 15:29:34 -07:00
Kevin Sawicki 4746ac82c3 Show counts in nav area badge 2013-05-22 15:29:34 -07:00
Kevin Sawicki a223439eb8 Combine package configs into single panel 2013-05-22 15:29:34 -07:00
Kevin Sawicki 6e50b5c005 Mark class as internal 2013-05-22 15:29:34 -07:00
Kevin Sawicki 213524e893 Show upgrade as default action when newer version exists 2013-05-22 15:29:34 -07:00
Kevin Sawicki be020fad39 💄 2013-05-22 15:29:34 -07:00
Kevin Sawicki 2308533235 Add issue link to dropdown 2013-05-22 15:29:34 -07:00
Kevin Sawicki 009b50557c Add homepage link to dropdown 2013-05-22 15:29:34 -07:00
Kevin Sawicki 8668dd67ac Add README to package section 2013-05-22 15:29:34 -07:00
Kevin Sawicki e7df1f1f3d Use a dropdown button for package actions 2013-05-22 15:29:34 -07:00
Kevin Sawicki 6b81eebb02 Add initial available packages view 2013-05-22 15:29:34 -07:00
Kevin Sawicki c4cfc0cff6 Move btn override to command panel stylesheet 2013-05-22 15:29:34 -07:00
Kevin Sawicki d3cbd937fb Clip buffer position in screenPositionForBufferPosition()
Closes #562
2013-05-22 15:25:27 -07:00
probablycorey 102068f9e5 Remove calls to $native
And now some specs pass!
2013-05-22 11:57:31 -07:00
probablycorey 0901e1a34c Allow spec window to store window state
It just stores window dimensions for now.
2013-05-22 11:56:33 -07:00
probablycorey 6abe6e7539 💄 2013-05-22 11:39:16 -07:00
probablycorey f6cb33b2ea Replace resource-path flag with dev flag (assume atom is located at
~/github/atom)
2013-05-22 11:06:50 -07:00
Garen Torikian 1dc49cfc70 Merge pull request #561 from github/update-nak
Bump nak, for better gitignoring
2013-05-22 10:11:22 -07:00
Garen Torikian f49ec5fac8 Explicitly require nak's bin executable 2013-05-22 10:05:50 -07:00
Garen Torikian ab466b60c8 command in project.scan needs to resolve to the bin, not the lib file
This is because nak was changed to also be run as a regular Node script, not just an executable
2013-05-22 09:29:37 -07:00
Garen Torikian d2e5c55bbf Bump nak, for better gitignoring 2013-05-22 09:29:34 -07:00
Cheng Zhao 127e38a0b5 Don't send commands to renderer for reload and toggleDevTools menu item.
The specs window doesn't respond to window commands, so it would make
the menu items do not work.
2013-05-22 22:35:19 +08:00
Cheng Zhao b68978ecb3 💄 2013-05-22 22:30:04 +08:00
Cheng Zhao a381e36779 The resourcePath should also be added to 'NODE_PATH'.
The core specs rely on this to find and run specs.
2013-05-22 22:27:18 +08:00
Cheng Zhao a5a6af7ef6 Don't prevent close for specs window. 2013-05-22 21:39:31 +08:00
Cheng Zhao 31ffe5e060 💄 2013-05-22 20:57:23 +08:00
Cheng Zhao 61f8878e05 Merge branch 'master' into atom-shell
Conflicts:
	package.json
	script/bootstrap
	spec/app/window-spec.coffee
	src/app/window.coffee
2013-05-22 20:52:42 +08:00
Cheng Zhao 9b44b15f3b Use Command+Ctrl+Alt+S for running specs. 2013-05-22 20:01:25 +08:00
Kevin Sawicki 530965ac7e Mention .git in search results 2013-05-21 21:20:39 -07:00
Kevin Sawicki 42e1595bd7 💄 2013-05-21 18:49:27 -07:00
Kevin Sawicki e7c08d1202 Exclude core.ignoredNames when scanning project 2013-05-21 18:46:03 -07:00
Kevin Sawicki 61b5160d81 Move apm to github org. 2013-05-21 18:24:55 -07:00
probablycorey b58fcc5395 Specs run (but fail hardcore) 2013-05-21 17:04:00 -07:00
probablycorey d4b146d080 Serialize window dimensions 2013-05-21 14:33:45 -07:00
probablycorey f65fbdf7ae Don't show window until it is finished loading 2013-05-21 14:32:12 -07:00
probablycorey 8008985120 🙊 2013-05-21 14:27:58 -07:00
probablycorey f23cb1aa79 Window state works now
The state is now stored in ~/.atom/.storage/SHA-OF-PATH. It is written
to every time it is set.
2013-05-21 14:12:15 -07:00
Garen Torikian 0caf6b5a2e Merge pull request #559 from github/remove-blank-options
Remove blank options in renderMarkdown
2013-05-21 11:36:19 -07:00
Garen Torikian d401f7cd19 Bump roaster 2013-05-21 11:30:24 -07:00
Garen Torikian 21bf03320e Remove blank options argument from renderMarkdown 2013-05-21 10:52:50 -07:00
Garen Torikian ecc65ff233 Bump roaster 2013-05-21 10:52:36 -07:00
probablycorey 26094a5405 Use executedFrom command line option to resolve paths 2013-05-20 16:02:06 -07:00
probablycorey 40d49373d3 Rename createAtomWindow to open 2013-05-20 14:47:36 -07:00
probablycorey 501acbc9c8 Files and folders can be opened from the command line 2013-05-20 14:46:57 -07:00
probablycorey cf6b2f8efd Slice application name off the argument list 2013-05-20 14:46:57 -07:00
Cheng Zhao 4faf48233b 💄 2013-05-20 22:36:49 +08:00
Cheng Zhao bf6e0752f8 Remove atom.presentModal and its helper methods.
Since all the dialogs are modal and blocking now, there is no need to
keep the atom.presentModal which is used to emulate the blocking
behavior.
2013-05-20 22:25:57 +08:00
Cheng Zhao 6e012ed24f Adopt to new open/save dialog API. 2013-05-20 22:23:27 +08:00
Cheng Zhao 1254561724 There is no need to call node-gyp externally any more.
From npm v1.2.19, the npm_config_disturl is supported to set dist-url
for node-gyp, so we don't need to interactive with node-gyp ourselves
any more.
2013-05-20 15:27:12 +08:00
Cheng Zhao 60fcb97a3e Send window commands instead of invoking window APIs directly.
For some events generated on the browser side, like reloading, closing
window, we should not handle those events directly, instead we should
send the corresponding commands to the renderer and let the renderer
deal with it.

The window.reload() is also moved to atom.reload(), because I saw things
like toggleFullScreen(), focus(), toggleDevTools() are also there.
2013-05-20 14:19:12 +08:00
Cheng Zhao 5459f1e9db Store AtomWindow instead of BrowserWindow in atomApplication.windows. 2013-05-20 12:07:04 +08:00
Cheng Zhao 0ad96ca7da Make a few window related atom.* functions work. 2013-05-20 11:55:27 +08:00
Cheng Zhao 8be54136ed Use "shell.openExternal(url)" to open links in external browsers. 2013-05-20 10:12:40 +08:00
Cheng Zhao 7cb6801ce8 Use atom-shell's "shell.moveToTrash()" to replace "$native.moveToTrash()" 2013-05-20 09:57:29 +08:00
Cheng Zhao 177ac5687f Use atom-shell's "shell.beep()" to replace "$native.beep()" 2013-05-20 09:49:34 +08:00
Cheng Zhao 1301eb0fa4 Use atom-shell's API for pasteboard operations. 2013-05-20 09:43:19 +08:00
Cheng Zhao 62caaf01d7 💄 2013-05-18 15:06:35 +08:00
Cheng Zhao 160c9b9d8e Add Edit menu. 2013-05-18 12:28:17 +08:00
Cheng Zhao c8891c1008 Adopt to API change of dialog.showMessageBox. 2013-05-18 12:21:25 +08:00
probablycorey 153668db56 Opening a folder works! 2013-05-17 15:51:11 -07:00
Kevin Sawicki 276c6c1725 Add --silent flag to apm/npm commands 2013-05-17 15:37:26 -07:00
Kevin Sawicki 5859ae6ba7 Upgrade apm 2013-05-17 15:37:21 -07:00
probablycorey 1594231b4f Refactor AtomWindow code 2013-05-17 14:21:43 -07:00
probablycorey f9acde8c55 AtomApplication takes resourcePath as a parameter 2013-05-17 14:14:27 -07:00
probablycorey 6bdfe65bf2 💄 2013-05-17 14:10:03 -07:00
probablycorey 5fd6c1c5ab Move windows var to AtomApplication 2013-05-17 14:09:54 -07:00
probablycorey bab80e0089 AtomApplication creates the initial AtomWindow 2013-05-17 13:59:03 -07:00
probablycorey be2cfb3252 Rename BrowserMain to AtomApplication 2013-05-17 13:54:08 -07:00
probablycorey 49bc53c6d2 Moving bootstrap methods out of BrowserWindow
The file is going pretty hairy, so I'm going to split the classes
into new files
2013-05-17 11:47:58 -07:00
probablycorey 067bbb966d 💄
This is a totally subjective style change. I just prefer keeping code
that is rarely changed tight and dense. Another option would be to 
move the menu templates into a separate file.
2013-05-17 10:51:12 -07:00
Kevin Sawicki 75508fe9e8 Allow more than 3 back ticks for fenced code blocks 2013-05-17 10:00:14 -07:00
Kevin Sawicki 49afce5f68 Register javascript fence names 2013-05-17 08:51:25 -07:00
Cheng Zhao 6260d350ac Should always show devtools instead of toggling when getting error. 2013-05-17 23:07:34 +08:00
Cheng Zhao 26c89f71b2 Use BrowserWindow's 'close' event instead of 'beforeunload' to control closing.
Ideally both window closing and reloading should use 'beforeunload' to
control whether the unloading should continue, however since the save as
dialog is asynchronous, we have to prevent unloading first and then
continue after user's confirmation. And since we can not distinguish
whether the window is reloading or closing in the 'beforeunload'
handler, we do not know what to continue after user's confirmation. So I
have to rely on BrowserWindow's 'close' event to let user decide whether
window should be closed.
2013-05-17 22:30:14 +08:00
Cheng Zhao 2d14f6e768 Replace default menu with custom built menu. 2013-05-17 22:14:09 +08:00
Cheng Zhao b27cd33116 Implement atom.confirm with atom-shell's dialog API.
Note that the dialog.showMessageBox is blocking, so we don't need to use
the '@presentModal'.
2013-05-17 20:39:37 +08:00
Cheng Zhao f0448ba231 Trigger 'window:close' command in the 'beforeunload' event handler.
When user wants to close the window, the 'beforeunload' event would be
called, then the closing would be cancelled and the 'window:close'
command would be triggered. In the 'window:close' handler, a confirm
dialog could be showed if there are unsaved contents, and if the window
is really meant to be closed, the window would be tried to be closed
again and this time 'beforeunload' handler wont't prevent it.
2013-05-17 20:17:06 +08:00
Cheng Zhao acf5e21f50 Do unload work in 'unload' event handler instead of 'beforeunload'.
In Atom, the 'beforeunload' event never prevents window from closing so
it in fact has the same effect with 'unload' event, I guess using
'beforeunload' instead of 'unload' is because the 'beforeunload' is
guarrenteed to happen when window is closing or application is quiting.
However in Atom Shell the 'unload' event is guarrenteed to happen on
both conditions, just like the 'beforeunload' in Atom, so it's safe to
replace the 'beforeunload' with 'unload' here.

And in Atom Shell, the 'beforeunload' event is mainly used for
preventing window from closing, just like the 'window:close' command in
Atom.
2013-05-17 20:17:03 +08:00
Cheng Zhao d1ca0a8f8f Use toggleDevTools instead of showDevTools. Fixes atom/atom-shell#8.
Currently the toggleDevTools of atom-shell is simulated by keeping state
of devtools, because there is no way to know the state of devtools in
brightray, so it could not behave correctly sometimes.

This problem will be solved when brightray is patched and atom-shel gets
updated.
2013-05-17 19:02:03 +08:00
Cheng Zhao e7b35d27e7 Revert ae7dce4575.
Now require('package') won't wrong resolve to the package.json, so
reverting previous workaround.
2013-05-17 18:48:02 +08:00
Cheng Zhao 02e3f4cd9c Enable harmony collections, also revert previous WeakMap hack.
Fixed atom/atom-shell#7.
2013-05-17 16:21:01 +08:00
probablycorey 8487536280 Store parsed command line args in BrowserMain 2013-05-16 17:33:12 -07:00
Kevin Sawicki 84753e55a7 Add enable/disable helpers to jquery extensions 2013-05-16 17:29:48 -07:00
probablycorey 0c96b30053 Move setupNodePaths method to BrowserMain 2013-05-16 17:28:54 -07:00
probablycorey 27bd476b12 Moving logic into BrowserMain class 2013-05-16 17:25:39 -07:00
Kevin Sawicki ed69dc12ab Serialize logged in username with view 2013-05-16 17:16:44 -07:00
Kevin Sawicki e05b443a69 Tweak service name and warning text 2013-05-16 16:46:25 -07:00
Kevin Sawicki a4455d2c5f Use released version of space-pen 2013-05-16 16:42:12 -07:00
probablycorey 8f17889f7f Open dialog creates new atom window 2013-05-16 16:38:47 -07:00
Kevin Sawicki a965cb684c Add some commas to the paths loaded badge 2013-05-16 16:22:53 -07:00
probablycorey f713429674 Remove unused params 2013-05-16 16:21:29 -07:00
Kevin Sawicki 392ffce8c7 Remove unused requires 2013-05-16 15:54:10 -07:00
Kevin Sawicki d7a238b5ec Guard against possibly null event handler 2013-05-16 15:49:53 -07:00
probablycorey 92ec78cd8a Show dev tools when toggleDevTools is triggered
Eventually want make toggle work as expected. Related to https://github.com/atom/atom-shell/issues/8
2013-05-16 15:14:50 -07:00
probablycorey 889ccdb58d Throw error when sendMessageToBrowserProcess is called 2013-05-16 15:13:31 -07:00
Kevin Sawicki & Nathan Sobo a29015551c Extract link click callback to method 2013-05-16 15:04:30 -07:00
Kevin Sawicki & Nathan Sobo 83e6a4a57e Rely on core:focus-next/previous in sign in view 2013-05-16 15:01:23 -07:00
Kevin Sawicki & Nathan Sobo 001183245e Add core:focus-next/focus-previous
Focus now cycles between elements with a positive tabindex on
tab and shift-tab.
2013-05-16 15:00:55 -07:00
probablycorey 09ab319328 Atom.show no longer used
The window is shown automatically when it is created.
2013-05-16 14:19:53 -07:00
Kevin Sawicki & Nathan Sobo 76e7161608 Extract window event handling into separate class 2013-05-16 14:18:57 -07:00
probablycorey bc854afead Make messageIdCounter an instance var of window.atom 2013-05-16 13:48:16 -07:00
probablycorey 1e0b734734 Add hacked interface for WeakMap
We need to add the `--harmony_collections` flag to atom-shell.
Related to issue https://github.com/atom/atom-shell/issues/7
2013-05-16 13:46:17 -07:00
Kevin Sawicki & Nathan Sobo 848ce7936f DRY up subscribe and subscribeToCommand
subscribeToCommand now supports unsubscribing by object.
2013-05-16 13:43:18 -07:00
Kevin Sawicki & Nathan Sobo d76d0a030f Forward all subscribe arguments from Subscriber to EventEmitter 2013-05-16 13:36:51 -07:00
Kevin Sawicki e2af4c964d Bind multiple events to single callback 2013-05-16 12:17:41 -07:00
Kevin Sawicki 4527d8bd51 Remove unneeded catch and default response to empty hash 2013-05-16 12:17:41 -07:00
Kevin Sawicki a17a282b03 Warn instead of log 2013-05-16 12:17:41 -07:00
Kevin Sawicki 2c050522cd Enable fields when attaching 2013-05-16 12:17:41 -07:00
Kevin Sawicki c98e7cab4b Upgrade to keytar 0.4 2013-05-16 12:17:41 -07:00
Kevin Sawicki 4b49562949 Add token to request when available 2013-05-16 12:17:40 -07:00
Kevin Sawicki efb388ded4 Add initial sign in screen
Signing in generates an OAuth2 token and saves
it to the keychain.
2013-05-16 12:17:40 -07:00
Kevin Sawicki 08e9f19644 Add repository field 2013-05-16 12:16:48 -07:00
Kevin Sawicki 3b35a4b63b Link atom.sh instead of copying 2013-05-16 12:16:33 -07:00
Garen Torikian b3b7f1ea97 Change to an H2
Otherwise the TOC renders wrong
2013-05-16 12:48:20 -06:00
Kevin Sawicki 075018d03d Mention disabled packages fix 2013-05-16 11:45:38 -07:00
probablycorey ae7dce4575 Rename package.coffee to base-package.coffee
Related to https://github.com/atom/atom-shell/issues/6
2013-05-16 10:57:41 -07:00
Kevin Sawicki & Nathan Sobo 3b0748fe44 Add config.pushAtKeyPath/removeAtKeyPath 2013-05-16 10:51:23 -07:00
Kevin Sawicki & Nathan Sobo 2b49a04227 Return a cloned object from config.get()
This prevents mutations to the values of the default settings.
2013-05-16 10:29:08 -07:00
Kevin Sawicki & Nathan Sobo 097ee9f2a9 Remove unneeeded calls to config.update() 2013-05-16 10:14:21 -07:00
probablycorey ee12977a9f Use ipc to store and retrieve windowState
I'll want to change the interface in the future. For now I am trying
to keep the code as simple and small as possible.
2013-05-16 09:57:07 -07:00
Kevin Sawicki e2821cbea8 Use map instead of iterating 2013-05-16 09:42:09 -07:00
Kevin Sawicki e9f9c6e777 Mention fuzzy finder 2013-05-16 08:51:04 -07:00
Kevin Sawicki 95d4391680 Run fuzzy filter on project relative paths
This prevents the score being influenced by the
segments contained in the project path.

Closes #553
2013-05-16 08:49:43 -07:00
probablycorey f65a2826f2 Make atom a global object 2013-05-15 15:32:51 -07:00
probablycorey 94a8c44d39 Remove AtomWindow params that are not in use yet
I pulled these out to keep the code simpler until we something running
2013-05-15 15:18:43 -07:00
probablycorey 16f8402d36 The resource path can be set with a command arg 2013-05-15 15:03:59 -07:00
Garen Torikian 04d4085759 Update manifest to include new "Your First Package!" information 2013-05-15 14:41:13 -06:00
Garen Torikian a75896c85b Merge pull request #544 from github/api/extension-docs
Level up the "creating packages" documentation
2013-05-15 13:37:36 -07:00
probablycorey d397bd5c4f Add optimist npm (an option parser) 2013-05-15 11:22:40 -07:00
Kevin Sawicki 61675c2e77 Install apm command when Atom starts
This changes the command installation to use symlinks instead
of copying over the contents of the file.
2013-05-15 10:29:27 -07:00
Kevin Sawicki 718175eb34 Make atom.sh executable 2013-05-15 10:29:27 -07:00
Cheng Zhao 8a3ee0515c 'window' module is renamed to 'browser_window'. 2013-05-15 22:27:28 +08:00
Nathan Sobo aefb84cdeb Don't modify uri's with a scheme prefix in Project.resolve 2013-05-14 20:55:14 -06:00
Nathan Sobo 5aac826ec1 Register a custom opener for ImageEditSessions on the Project class 2013-05-14 20:32:16 -06:00
Nathan Sobo aa86362a0a Add Project@registerOpener(fn) to register custom openers on project
Now packages can register custom handlers for different kinds of file
paths. If the function you register returns a resource for the given
path, it will be returned from Project.open instead of an EditSession.
2013-05-14 20:23:25 -06:00
Nathan Sobo 6104927cb6 Rename Project.buildEditSession -> Project.open 2013-05-14 20:03:53 -06:00
Kevin Sawicki 74c889062b Upgrade apm 2013-05-14 13:14:55 -07:00
Kevin Sawicki 7b2539c4f4 Correct typo in console warning message 2013-05-14 12:30:48 -07:00
Kevin Sawicki 851febd495 Use apm to install modules 2013-05-14 12:30:35 -07:00
Kevin Sawicki a12abd7377 💄 2013-05-14 12:01:21 -07:00
Kevin Sawicki 2f54cb4c22 Use season module internally 2013-05-14 11:58:34 -07:00
Kevin Sawicki 81f7354fb5 Use season for compiling cson to json 2013-05-14 11:08:32 -07:00
Kevin Sawicki f8c20e1659 Use correct dev mode check when opening config window
Closes #545
2013-05-14 10:12:25 -07:00
Kevin Sawicki 56394f6d8d Don't wrap the path text in the status bar
Also set a min width so the branch icon doesn't overlap
the path text when the window isn't wide enough to display
both.
2013-05-14 09:59:16 -07:00
Nathan Sobo e0e6d96c84 Fix #550. Use min-width: 0 after flexbox orientation switch.
By default, flexbox items have a min size of -webkit-min-content in the
the flex axis. I previously switched the pane item-views to flex
horizontally for performance reasons (preventing over-aggressive
repaints), but forgot to change min-height to min-width.
2013-05-14 10:10:25 -06:00
Kevin Sawicki f41b558fe5 Exclude symlinked folders from fuzzy finder
This can put the fuzzy finder in an infinite loop if a cycle
occurs.
2013-05-13 17:35:51 -07:00
Kevin Sawicki 5507febe09 Upgrade to git-utils 0.17
This release handles relativizing paths to a symlinked repository.

Close #549
2013-05-13 17:35:51 -07:00
Kevin Sawicki b8ee3187ec doc: task instead of web worker 2013-05-13 17:35:51 -07:00
probablycorey f74842cd4c Use new ruby scopes in TextMateGrammar spec 2013-05-13 16:51:30 -07:00
probablycorey 2e61201f86 Update ruby TextMate bundle
Closes #541
2013-05-13 16:51:30 -07:00
Kevin Sawicki 4108d572b8 Use real path to determine if repository root 2013-05-13 15:52:49 -07:00
probablycorey 423b133e75 Comments can't increase the indent level of the next line 2013-05-13 14:28:16 -07:00
probablycorey eb25d2e6a8 TokenizedBuffer.tokenForPosition(position) now works correctly
It was previously returning the wrong token at token boundaries.
2013-05-13 14:28:16 -07:00
probablycorey eae06b62bc Spec 💄 2013-05-13 14:28:16 -07:00
probablycorey 49aeef99b6 Add config option editor.normalizeIndentOnPaste 2013-05-13 14:28:16 -07:00
probablycorey 8e37d2ada6 Turn auto-indent on for all 'newline' specs 2013-05-13 14:28:16 -07:00
probablycorey 7513fe9c69 Set editor.autoIndent to true in specs 2013-05-13 14:28:16 -07:00
probablycorey 34d3091fc9 Remove console.log 2013-05-13 14:28:16 -07:00
probablycorey 992f520698 Normalize pasted text when there is an indent basis 2013-05-13 14:28:16 -07:00
probablycorey b23e1d3d52 In specs, use local copyText function to put text on the pasteboard 2013-05-13 14:28:16 -07:00
probablycorey dd53539799 Moving auto-indent specs to appropriate places 2013-05-13 14:28:15 -07:00
probablycorey 93b1ce53c0 Rename autoDecreaseIndentForRow to autoDecreaseIndentForBufferRow 2013-05-13 14:28:15 -07:00
probablycorey e70d6d1f8f Remove unused method autoIncreaseIndentForBufferRow 2013-05-13 14:28:15 -07:00
probablycorey c34db290e4 Only indent the line following a '\n' not the line preceding it 2013-05-13 14:28:15 -07:00
probablycorey 9d2b7875b9 💄 2013-05-13 14:28:15 -07:00
probablycorey 1f025817f1 Rename autoIndentNewlines to autoIndentNewline 2013-05-13 14:28:15 -07:00
probablycorey 38d4e3a097 Move all auto-indent specs to the auto-indent describe block 2013-05-13 14:28:15 -07:00
probablycorey c03d44da00 Add autoIndentNewline and autoDecreaseIndent options to insertText
insertText now takes these options:
* autoIndent will auto indent all inserted text based
* autoIndentNewline will indent a line when a '\n' is inserted
* autoDecreaseIndent will decrease the indent if the line matches a 
decreaseIndent pattern (such as a `}` in javavascript)
2013-05-13 14:28:15 -07:00
probablycorey 537c507efe Use suggested indent when auto indenting a buffer row 2013-05-13 14:28:15 -07:00
probablycorey 0fbd08f1ab Allow suggested indent level to be less than the current indent level 2013-05-13 14:28:15 -07:00
probablycorey 0f469a3269 Add Range.getRows 2013-05-13 14:28:15 -07:00
probablycorey 9713bc8c02 💄 2013-05-13 14:28:15 -07:00
probablycorey 7f0b2c54f3 editor.autoIndentOnPaste will auto indent every pasted line
I've removed normalizeLines and its tests. They will be added back in
a later commit.
2013-05-13 14:28:14 -07:00
probablycorey e9fd61a1ea Remove unused indent methods from Selection 2013-05-13 14:28:14 -07:00
probablycorey 33c95d1a58 Rename insideExistingLine to isCursorInsideExistingLine 2013-05-13 14:28:14 -07:00
probablycorey c5aa670569 Document methods as internal 2013-05-13 14:28:14 -07:00
probablycorey 533b11f991 💄 2013-05-13 14:28:14 -07:00
Kevin Sawicki ebb68c3386 Mention new icon 2013-05-13 09:33:17 -07:00
Cheng Zhao e9a4d9cafe 💄 2013-05-13 20:08:43 +08:00
Cheng Zhao bb114932ea Correctly set NODE_PATH before opening window. 2013-05-13 19:57:07 +08:00
Cheng Zhao 3b87c5d84b Set bootstrapScript and resourcePath params in URL. 2013-05-13 18:32:15 +08:00
Cheng Zhao 30b635527c Show the static/index.html on startup. 2013-05-13 16:47:16 +08:00
Cheng Zhao 77963aaf88 Keep symbol links when copying atom-shell bundle. 2013-05-13 16:46:48 +08:00
Cheng Zhao 02d5ca78d5 Clean unused native build scripts. 2013-05-13 15:16:42 +08:00
Cheng Zhao e99fe93029 Don't build native code and use atom-shell's binary instead. 2013-05-13 13:49:31 +08:00
Cheng Zhao 548021dd40 Download atom-shell and remove cefode. 2013-05-12 19:51:31 +08:00
Cheng Zhao 0f528c4811 Remove prebuilt-cef submodule. 2013-05-12 19:18:06 +08:00
Nathan Sobo c876876d5e Upgrade the icon 2013-05-11 10:35:45 -06:00
Nathan Sobo 7dde2fec55 Fix wrap guide spec again. Previously it only passed w/ a wide window. 2013-05-11 09:08:10 -06:00
Nathan Sobo 49cf92c2a2 Fix perf regression: Don't update line numbers for single line changes 2013-05-10 19:39:33 -06:00
Nathan Sobo 60319c30ac Fix wrap guide specs after panes css change 2013-05-10 18:30:01 -06:00
Nathan Sobo 191e8ab240 Fix perf regression caused by flex-flow: column on pane item views
For some reason, having flex-flow column on the pane item views
container was forcing the entire view to be repainted on cursor
movement and line edits. Allowing the container to flow row-wise and
setting the min-height to 0 instead of min-content-height achieves
the same layout effect without the huge repaint cost. Flexbox is a
fragile bitch.
2013-05-10 18:19:41 -06:00
Nathan Sobo b4dec8ccbb In Editor.updateRenderedLines, cap renderFrom to the last screen row
If we remove a large number of screen lines when we are scrolled down,
the current @firstRenderedScreenRow may end up being larger than the
number of screen rows we now have. Setting renderFrom to the
@firstRenderedScreenRow in this case was causing the renderFrom to be
larger than the renderTo, which was causing problems downstream with
the new mapping code.
2013-05-10 13:20:43 -06:00
Nathan Sobo 7d28edc116 Rename ScreenLine -> TokenizedLine
Now that ScreenLines don't contain the bufferRows property, which was
essential to the functioning of the LineMap, they're just containers
for tokens. Since they're stored in the TokenizedBuffer in a form that
doesn't necessarily match what ends up on screen, it makes more sense
to call them tokenized lines. A tokenized line is a screen line if it's
in the `.screenLines` array of the DisplayBuffer, but "screenness" is
not an inherent property, so it shouldn't be in the name of the class.
2013-05-10 13:20:43 -06:00
Nathan Sobo 4d314f99ac Eliminate ScreenLine.bufferRows property
Previously, we used bufferRows to determine how many buffer rows were
spanned by the screen line in the event it was folded. Now that we have
RowMap, screen lines don't need to serve this purpose. We still need
to know if a screen line is wrapped, which we solve via setting the
lineEnd property to null for a soft-wrapped screen line.
2013-05-10 13:20:43 -06:00
Nathan Sobo 1d146640e5 Break some methods out of DisplayBuffer.updateScreenLines 2013-05-10 13:20:43 -06:00
Nathan Sobo b4c95d4fc9 Merge adjacent isomorphic regions after adding new regions 2013-05-10 13:20:42 -06:00
Nathan Sobo d9c258f27e Handle new regions overlapping screen wise but not buffer wise 2013-05-10 13:20:42 -06:00
Nathan Sobo 4a56cc3693 Kick docs threshold down again because I removed public methods 2013-05-10 13:20:42 -06:00
Nathan Sobo 8b149ff827 Delete LineMap 2013-05-10 13:20:42 -06:00
Nathan Sobo f3145e671a Declare screenLines ivar in DisplayBuffer 2013-05-10 13:20:42 -06:00
Nathan Sobo d3cb001d65 Use RowMap instead of LineMap in DisplayBuffer 2013-05-10 13:20:42 -06:00
Nathan Sobo 16da9b0506 Document RowMap 2013-05-10 13:20:42 -06:00
Nathan Sobo d7914d2c54 Ensure row map applies negative deltas only after the given start row 2013-05-10 13:20:42 -06:00
Nathan Sobo 9849c62d80 Properly handle regions that straddle existing regions
When we're creating folds that contain other folds, we'll need the
region based on the new fold's row mapping to overwrite the regions
from the old folds. This commit ensures that the new region cleanly
slots in, replacing any regions it completely contains and splitting
regions that it only partially overlaps.
2013-05-10 13:20:42 -06:00
Nathan Sobo 3c630fb7f4 Rename mapping -> region within RowMap 2013-05-10 13:20:42 -06:00
Nathan Sobo 55f0b6a1f8 Replace existing regions when inserting a mapping that surrounds them 2013-05-10 13:20:42 -06:00
Nathan Sobo 1b21fdda3b Don't throw errors when applying screen deltas after the last mapping 2013-05-10 13:20:41 -06:00
Nathan Sobo c17d6ba487 Adjust multiple mappings if needed when applying screen deltas
If there are multiple mappings following the start row of the delta
that span fewer screen rows than the delta, we collapse mappings to 0
screen rows until we have removed the number of rows specified by the
delta.

Expanding positive deltas expands the first mapping following the
start row as it did previously.
2013-05-10 13:20:41 -06:00
Nathan Sobo c6ff7e8934 Inserting a mapping within an existing mapping preserves its shape
Inserting a mapping should never change the position of any existing
mappings on screen or in the buffer. It's simply a statement about a
range of rows in the buffer mapping to a range of existing rows on
screen, but shouldn't add or remove any rows. Adding and removing rows
on screen or in the buffer is the job of the applyBufferDelta and
applyScreenDelta methods.
2013-05-10 13:20:41 -06:00
Nathan Sobo 1895e8143d Allow the screen row count of N-screen:1-buffer mappings to be updated 2013-05-10 13:20:41 -06:00
Nathan Sobo 5c74a02688 Add row map specs for mappings of N screen rows to 1 buffer row 2013-05-10 13:20:41 -06:00
Nathan Sobo 2f900e11ed Add RowMap.bufferRowRangeForScreenRow 2013-05-10 13:20:41 -06:00
Nathan Sobo 1123ca4bc1 Helpful comments 2013-05-10 13:20:41 -06:00
Nathan Sobo 4973c2afc6 Don't return a mapping from traverseToBufferRow if we fall off the end 2013-05-10 13:20:41 -06:00
Nathan Sobo 502e3ceb3b Factor mapping traversal its own traverseToBufferRow method 2013-05-10 13:20:41 -06:00
Nathan Sobo 32b40fe1ad Eliminate dummy implementation of bufferRowRangeForScreenRow 2013-05-10 13:20:41 -06:00
Nathan Sobo 9a12b170f6 Allow insertion of multiple buffer row range mappings 2013-05-10 13:20:41 -06:00
Nathan Sobo 9f4b594bd0 Start on RowMap 2013-05-10 13:20:41 -06:00
Kevin Sawicki ea7a8c9670 Render markdown when buffer is reloaded
This will keep the preview in sync with the editor.
2013-05-10 12:16:45 -07:00
Kevin Sawicki 113dac6e2b Add more entries to fence name hash 2013-05-10 12:13:37 -07:00
Kevin Sawicki 642427d015 Remove unneeded guards
Syntax will always return a grammar and tokenizing
with the null grammar is acceptable.
2013-05-10 12:12:25 -07:00
Kevin Sawicki 26dad65c8d Only set code color outside of editor-colors parent 2013-05-10 12:12:03 -07:00
Kevin Sawicki 827bab90bf Add tokenizeLines to null grammar 2013-05-10 12:09:58 -07:00
Kevin Sawicki 1a90f1c017 Include source.shell inside of sh/bash code blocks 2013-05-10 11:50:21 -07:00
Kevin Sawicki 8172618bec Remove unused libgit2 script 2013-05-10 11:19:40 -07:00
Garen Torikian & Nathan Sobo e12d779f00 Add listing of package.json keys 2013-05-08 15:07:55 -07:00
Garen Torikian & Nathan Sobo 1300955c13 Explicitly mention node.js core modules 2013-05-08 15:07:38 -07:00
Garen Torikian & Nathan Sobo 7714c35829 Finish package sample 2013-05-08 15:07:25 -07:00
Kevin Sawicki 3de070708f Mention class layout 2013-05-08 11:30:34 -07:00
Kevin Sawicki 7aba7b0854 Use consistent rm flag order 2013-05-08 11:17:55 -07:00
Kevin Sawicki f16c7247a9 Clean cefode cache during prebuild 2013-05-08 11:17:30 -07:00
Kevin Sawicki ef2ece3600 Treat .tgz extension as compressed 2013-05-08 10:27:26 -07:00
Kevin Sawicki 962b559638 Mention fuzy finder fix 2013-05-08 10:25:54 -07:00
Garen Torikian & Nathan Sobo 9ab4707d43 More words on creating a pane 2013-05-07 12:53:09 -07:00
Kevin Sawicki c3759feaa0 Show number of paths loaded after indexing message 2013-05-07 08:56:06 -07:00
Kevin Sawicki 96418f3640 Respect core.excludeVcsIgnoredPaths in fuzzy finder 2013-05-06 18:06:10 -07:00
Kevin Sawicki a96c354f4f Fork with harmony collections enabled 2013-05-06 18:04:01 -07:00
Kevin Sawicki 81462d9050 Hide/show entire loading area instead of only message 2013-05-06 16:53:34 -07:00
Kevin Sawicki 919bdca8f4 Style select list loading area similar to command panel 2013-05-06 16:34:39 -07:00
Kevin Sawicki 130e5cd3ec Use task handler to load fuzzy finder paths
This use completely async calls from a process task and
also respects the repository-defined ignore rules.

Closes #509 and #514
2013-05-06 16:34:39 -07:00
Kevin Sawicki 42301210c4 Log uncaught exceptions to parent process 2013-05-06 16:34:39 -07:00
probablycorey 43a3c93d9b Substitution commands can replace text with empty string
Closes #488
2013-05-06 12:11:48 -07:00
Kevin Sawicki cc98b88e28 Expect Error instead of JSON string in markdown preview view 2013-05-06 09:42:45 -07:00
Kevin Sawicki 212a192abf 💄 2013-05-06 09:38:10 -07:00
Kevin Sawicki ebc75b1ba8 Use site color for code elements 2013-05-06 08:34:05 -07:00
Kevin Sawicki 7be6421989 Remove incorrect error message
The markdown API is no longer used.
2013-05-06 08:26:02 -07:00
Nathan Sobo b4206d3202 Merge branch 'master' into know-when-to-foldem
Conflicts:
	src/app/edit-session.coffee
2013-05-06 08:35:13 -06:00
Nathan Sobo e8e0d5dd02 Fix regression: folds can be destroyed by clicking them 2013-05-06 08:27:43 -06:00
Garen Torikian be229d374e Finish the working with styles section 2013-05-04 11:49:22 -07:00
Garen Torikian 14b28a8a89 Update package creation docs 2013-05-04 11:49:22 -07:00
Garen Torikian c71bccd72c Add new Included Libs doc 2013-05-04 11:49:22 -07:00
Garen Torikian cee9605fc5 Updates to first package information 2013-05-04 11:49:22 -07:00
Garen Torikian 7b5b942c47 Start the Creating a Package doc 2013-05-04 11:49:22 -07:00
Garen Torikian d5e0af2646 Move themes file 2013-05-04 11:49:22 -07:00
Garen Torikian a12e1d8b0e Update note on activationEvents 2013-05-04 11:49:22 -07:00
Garen Torikian d9d9b6800b Finish authoring packages section 2013-05-04 11:49:21 -07:00
Garen Torikian 8d7fd982e1 Start leveling up extension docs 2013-05-04 11:49:21 -07:00
Nathan Sobo 3e937e9811 Merge remote-tracking branch 'origin/master' into know-when-to-foldem
Conflicts:
	src/app/buffer-marker.coffee
	src/app/cursor.coffee
	src/app/display-buffer-marker.coffee
	src/app/display-buffer.coffee
	src/app/edit-session.coffee
	src/app/fold.coffee
	src/app/line-map.coffee
	src/app/range.coffee
	src/app/selection.coffee
	src/app/text-buffer.coffee
2013-05-03 18:29:52 -06:00
Garen Torikian 4b993b99cd Merge pull request #507 from github/markdown-and-out
Swap out Markdown render logic with module
2013-05-03 16:59:00 -07:00
Garen Torikian & Nathan Sobo 839f0b642c Merge Kevin's fix for empty line invisibles with the reshuffling of buildLineHtml methods to be on the class level 2013-05-03 16:57:42 -07:00
Garen Torikian & Nathan Sobo f4d7586034 Refactor syntax highlighting of Markdown pre blocks
Extract out editor-colors class to apply background and default text color
Remove pre background coloring from Markdown preview stylesheet
2013-05-03 16:57:42 -07:00
Garen Torikian & Nathan Sobo ab23f624af Add pairs file for gjt 2013-05-03 16:57:42 -07:00
Garen Torikian 86484e7426 💄 for renamed method call 2013-05-03 16:57:42 -07:00
Garen Torikian 734b6778b1 Add more langauges to mapping 2013-05-03 16:57:42 -07:00
Garen Torikian 252682dd99 Syntax highlight based entirely on editor colors 2013-05-03 16:57:42 -07:00
Garen Torikian 95e14486af Fix specs for testing highlighted lines 2013-05-03 16:57:42 -07:00
Garen Torikian cf239ccac0 Implement highlighting of Markdown pre blocks 2013-05-03 16:57:41 -07:00
Garen Torikian dd041945d2 Transform specs to something useful 2013-05-03 16:57:41 -07:00
Garen Torikian 1cc4c52c7a Style emoji 2013-05-03 16:57:41 -07:00
Nathan Sobo a2c894bcc9 Fix some docs issues 2013-05-03 17:35:01 -06:00
Nathan Sobo ebfd8ca4c3 Give docs errors a better failure message 2013-05-03 17:34:48 -06:00
Corey Johnson & Nathan Sobo da938d8212 Fix edit session specs concerning delete/backspace + folds 2013-05-03 17:24:08 -06:00
Corey Johnson & Nathan Sobo 855f955dec Make BufferMarker return copies of its points so they can't be mutated 2013-05-03 17:23:24 -06:00
Corey Johnson & Nathan Sobo 1b8a8cf939 Make UndoManager.clear not cancel the transaction
If an exception is thrown while running an operation, we clear the
undo manager and re-throw it. But if we were in a transaction, we will
commit it in a `finally` block. If the transaction is set to null,
committing the transaction will then throw an exception which hides
the original exception… we don't want that. Now clear just empties the
current transaction out.
2013-05-03 17:21:50 -06:00
Nathan Sobo 9147e86d96 Delete unused param 2013-05-03 17:19:11 -06:00
Garen Torikian 6c748c2f87 Fix tests 2013-05-02 18:33:28 -07:00
Garen Torikian 4b6e0916c9 Swap out Markdown render logic 2013-05-02 18:33:20 -07:00
Kevin Sawicki fa5861a626 Include $self inside heading rule
This allows emoji, links, etc. to be parsed
and highlighted in headings
2013-05-02 16:21:22 -07:00
Kevin Sawicki f556890873 Mention icon 2013-05-02 14:21:22 -07:00
Kevin Sawicki 55f185f980 Tweak select list colors 2013-05-02 14:08:51 -07:00
Garen Torikian d4474e1d4d Merge pull request #512 from github/change-status-block-tag
Change status block tag
2013-05-02 13:50:06 -07:00
Kevin Sawicki b64f6c5c27 Upgrade icon to orange cube circles 2013-05-02 13:46:42 -07:00
probablycorey 616bb487f4 Correct config.observe documentation 2013-05-02 13:24:08 -07:00
probablycorey 9f4fb29b58 💄 2013-05-02 13:22:08 -07:00
Garen Torikian 1262d3fce9 💄 2013-05-02 12:22:37 -07:00
probablycorey f4f74e1171 💄 2013-05-02 12:05:56 -07:00
probablycorey f0c8c044c9 No longer need extra event handler
Since config doesn't store default values anymore, this line isn't
needed.
2013-05-02 12:05:56 -07:00
probablycorey c13b291c64 Update config panel spec 2013-05-02 12:05:56 -07:00
probablycorey 70191ea368 Don't store config values that equal their default config value
If 'foo' has not been set and has a default value of 1, 
config.set('foo', 1) will not store the 1.

If 'foo' has been set to X and has a default value of 1, 
config.set('foo', 1) will remove 'foo' from config
2013-05-02 12:05:56 -07:00
probablycorey d294bf4d05 💄
Keep the bind commands close together
2013-05-02 12:05:56 -07:00
Kevin Sawicki 10ca03f238 Don't show indent guide in truly trailing whitespace
Lines that are all whitespace are considered trailing
whitespace and should display the indent guide.

But lines with leading and trailing whitespace should never
have the indent guide rendered in the trailing area.
2013-05-02 11:44:49 -07:00
probablycorey 67f96e0fdd Remove shift from all non-alphanumeric key bindings
There is no guarantee that the shift values for
non-alphanumeric keys will be the same across keyboards.
2013-05-02 10:29:10 -07:00
Cameron McEfee 879ce3b30d ctrl-| to ctrl-shift-| 2013-05-02 10:01:32 -07:00
probablycorey 3de96f1e7a Only cancel termination if there are AtomWindowControllers open.
Sometimes an application has other windows open, like the open
panel. Even when these are closed they seem to live on in the
application's window array. We now ignore those windows when trying
to terminate the app.

Closes #534
2013-05-02 09:38:51 -07:00
Kevin Sawicki ee621bcace Bind link click handler in window.handleEvents() 2013-05-01 22:18:39 -07:00
Kevin Sawicki c2118a8cb9 Remove unneeded trailing if 2013-05-01 21:55:37 -07:00
Kevin Sawicki 21f1579f73 Return early when href is a hash 2013-05-01 21:48:43 -07:00
Kevin Sawicki 4dce9d659f Open http/https links in an external browser
Listen for all links being clicked and open any http/https
hrefs by spawning a call to the 'open' command.

Closes #531
2013-05-01 21:36:36 -07:00
Kevin Sawicki ca4cfe358f Mention update and indent guide fixes 2013-05-01 21:26:15 -07:00
Kevin Sawicki 7c8c4bd233 Remove unused requires 2013-05-01 20:57:16 -07:00
Kevin Sawicki 35cf96e15f Render empty line invisibles at correct position
End of line invisibles are not rendered at the correct
position for empty lines instead of always after the
last indent guide span.

Closes #456
2013-05-01 20:54:09 -07:00
Corey Johnson & Nathan Sobo 7a9d408425 Add rootView to tab spec 2013-05-01 17:41:25 -07:00
Nathan Sobo 69300e0766 Make Buffer.transact restore marker ranges on undo/redo of transaction
We no longer need to restore selection ranges before and after
transactions now because selections are based on markers so they go
along for the ride for free. This allows us to delegate directly to
Buffer.transact from EditSession.
2013-05-01 18:38:40 -06:00
Corey Johnson & Nathan Sobo 559f76e887 Dragging a tab from one pane to another clears all placement markers
Closes #528
2013-05-01 17:36:54 -07:00
Kevin Sawicki 6eb88278ae Only return false if focused
Previously the editor would not gain focus if the underlayer was clicked.
2013-05-01 17:27:33 -07:00
Garen Torikian 662ddf9fd6 Update documentation to push threshold back past 80% 2013-05-01 17:21:05 -07:00
Kevin Sawicki 698f670350 Remove mini class from grammar selector
Grammars were wrapping when miniaturized even though
there was plenty of room.
2013-05-01 17:13:46 -07:00
Kevin Sawicki aebaf688a9 Add secondar-line class to light theme 2013-05-01 17:13:17 -07:00
Kevin Sawicki 7e15a343f3 Add primary/secondary line classes to select list
This will be a style that can be used by extending
classes to provide two lines that don't wrap with
color and padding.

This is initially used by symbols view and fuzzy finder.
2013-05-01 17:09:37 -07:00
Garen Torikian f47eea1e6c 💄 2013-05-01 17:03:12 -07:00
Garen Torikian 5a944514f3 Rewrite all hash key options 2013-05-01 17:01:55 -07:00
Garen Torikian fb955667f5 Resolve references to Internal 2013-05-01 17:01:55 -07:00
Garen Torikian 31aaa23b20 Update tokenizedbuffers 2013-05-01 17:01:55 -07:00
Garen Torikian 4d239b46e2 Update textmatescopeselector 2013-05-01 17:01:55 -07:00
Garen Torikian 856b07197a Update textbuffer 2013-05-01 17:01:55 -07:00
Garen Torikian d07751605a Update textbuffer 2013-05-01 17:01:55 -07:00
Garen Torikian ddb09e98e8 Update selection 2013-05-01 17:01:55 -07:00
Garen Torikian 75b40f603a Update screen-line 2013-05-01 17:01:55 -07:00
Garen Torikian 5c21d71461 Update root-view 2013-05-01 17:01:54 -07:00
Garen Torikian 6c5f310cba Update range 2013-05-01 17:01:54 -07:00
Garen Torikian 909a951ff0 Update project 2013-05-01 17:01:54 -07:00
Garen Torikian 51a07bdb31 Update point 2013-05-01 17:01:54 -07:00
Garen Torikian 3dcdf0863e Update line-map 2013-05-01 17:01:54 -07:00
Garen Torikian 46b5731ac4 Update line-map 2013-05-01 17:01:54 -07:00
Garen Torikian 9be438d2f7 Update language-mode 2013-05-01 17:01:54 -07:00
Garen Torikian bb8f4fb092 Update image-view 2013-05-01 17:01:54 -07:00
Garen Torikian 7b65a68450 Update image-edit-session 2013-05-01 17:01:54 -07:00
Garen Torikian 7e6eecc6cf Update gutter 2013-05-01 17:01:54 -07:00
Garen Torikian 9d709ea152 Update git 2013-05-01 17:01:54 -07:00
Garen Torikian eadb3cf98c Update fold 2013-05-01 17:01:54 -07:00
Garen Torikian 09e9c2f224 Update file 2013-05-01 17:01:53 -07:00
Garen Torikian dbae05605b Update eventemitter 2013-05-01 17:01:53 -07:00
Garen Torikian 3c5b721177 Update Editor 2013-05-01 17:01:53 -07:00
Garen Torikian b0e4ce7bb8 Update EditSession 2013-05-01 17:01:53 -07:00
Garen Torikian 2bf7adef5c A slight modification to EditSession 2013-05-01 17:01:53 -07:00
Garen Torikian 34fb03fbd3 Update DisplayBuffer 2013-05-01 17:01:53 -07:00
Garen Torikian a8a28fea18 Update DisplayBufferMarker 2013-05-01 17:01:53 -07:00
Garen Torikian 16cef29925 Update directory 2013-05-01 17:01:53 -07:00
Garen Torikian 26564ee020 Update cursor 2013-05-01 17:01:53 -07:00
Garen Torikian 66a80ade30 Update config 2013-05-01 17:01:53 -07:00
Garen Torikian 685ec5d8d7 Update buffer-marker docs 2013-05-01 16:58:43 -07:00
Garen Torikian 52139dc24e Bump biscotto 2013-05-01 16:58:43 -07:00
Garen Torikian 2357f46761 Fix block comments in src 2013-05-01 16:58:43 -07:00
Garen Torikian 64fea21a38 Bump biscotto 2013-05-01 16:58:05 -07:00
Kevin Sawicki 71e73750e2 Kill negative top margin on path 2013-05-01 16:52:13 -07:00
Kevin Sawicki 37b298fcba Lessify the base fuzzy finder stylehsheet 2013-05-01 16:51:39 -07:00
Kevin Sawicki 01ad97e7b0 Show ellipsis for long paths in fuzzy finder
Previously the directory was shown after the file name
and it would wrap if too long causing inconsistent row
heights.

Now the full path is shown below the name in a smaller font
and both the path and file are set to overflow with an ellipsis.
2013-05-01 16:46:22 -07:00
Nathan Sobo 988f4da6e1 Always restore marker ranges on undo/redo, even for valid markers 2013-05-01 17:32:39 -06:00
Nathan Sobo f48ee846e9 💄 2013-05-01 17:23:21 -06:00
Nathan Sobo a9c599abeb Isolate folds on a per-display-buffer basis
Creating a fold in one pane now has no effect on an edit session
for the same buffer in another pane. Before they were polluting each
other by sharing the same fold markers.
2013-05-01 16:24:32 -06:00
Nathan Sobo c717d23901 🔫 dead code 2013-05-01 16:15:28 -06:00
Nathan Sobo 6153375c76 Base folds on buffer markers, since they don't rely on screen coords
When creating a display buffer for buffers that already have fold
markers, which we'll eventually do on refresh, basing folds on
full-blown display buffer markers is a problem because we end up
creating display buffer markers during construction of the line map.
When we create a display buffer marker it memoizes its screen positions,
but since the line map isn't built yet we have nothing to translate
against. Basically, since the line map depends on folds, folds can't
depend on the line map. Luckily, they don't need to. Buffer markers
work just fine.
2013-05-01 16:14:25 -06:00
probablycorey 850ecb23df Atom will auto-update on close if a newer version is on Speakeasy
The first call to terminate is canceled so that every window can be 
closed. On AtomCefClient the OnBeforeClose method is called when a
browser is finished closing. Once all windows have finished closing, AtomCefClient calls terminate again, which will terminate the 
application.

Closes #527
2013-05-01 13:54:38 -07:00
probablycorey 8f03ff2952 💄 2013-05-01 13:54:38 -07:00
probablycorey 0be166bb59 Remove the bottomPaddingInLines from editor 2013-05-01 13:54:37 -07:00
probablycorey cb2d24baca Listen for clicks outside of the render lines on the underlayer 2013-05-01 13:54:37 -07:00
probablycorey 7609b08e86 💄 2013-05-01 13:54:37 -07:00
Kevin Sawicki aeffa0e150 Remove duplicate property 2013-05-01 13:10:14 -07:00
Kevin Sawicki 932d552ae7 Only show scrolls when needed in tree view 2013-05-01 08:22:03 -07:00
Kevin Sawicki 78d8485243 Allow config window to be closed with meta-W
window.confirmClose() should close the window immediately when
there is no rootView which is the case in the config window.
2013-05-01 08:02:17 -07:00
Kevin Sawicki c3232a463c Use ems instead of pixels for config editor widths
This allows the editor to be big enough to still show
multiple characters in large font sizes.
2013-05-01 07:58:12 -07:00
Kevin Sawicki 536beb0d40 Support setting number fields to 0
Previously entering 0 would end up as '0' in the config
value instead of as a numeric value.
2013-04-30 23:10:22 -07:00
Kevin Sawicki 1afe4f0cd9 Mention missing wrap guide fix 2013-04-30 23:02:48 -07:00
Kevin Sawicki 334c4095bb Write empty object values on same line as keys 2013-04-30 22:43:51 -07:00
Kevin Sawicki 986e5f9c7a Default to 80 when editor.preferredLineLength <= 0
Previously any non-null value would be used as the target
column in the wrap guide and autoflow packages when really
80 should have been used if the value was non-postive.

Now config.getPositiveInt() is called with a default value
of 80 if the current value isn't already positive.
2013-04-30 22:37:02 -07:00
Kevin Sawicki 6077cf2389 Mention save error with markdow preview 2013-04-30 22:06:05 -07:00
Kevin Sawicki f417e898f6 Only call save on active item when it exists
Closes #529
2013-04-30 22:02:46 -07:00
Kevin Sawicki 047d9525e7 Ignore first modified event in config editor
This event comes from initially setting the text for the current
config value on the editor and was causing the config to be
immediately saved multiple times when opened.
2013-04-30 21:55:43 -07:00
Kevin Sawicki ca7da8a0da Don't set un-parseable numbers to 0 in the config
Previously if an integer or float field was empty it would
default to zero instead of undefined which made it inconsistent
with string value fields.

Now the config value is only set as a Number when it can be
parsed as one.
2013-04-30 21:36:27 -07:00
Nathan Sobo 49b17023a5 Fix method missing exception in LineMap.logLines 2013-04-30 18:40:14 -06:00
Nathan Sobo 693c4f8270 Preserve folds when restoring selections on undo/redo 2013-04-30 18:39:54 -06:00
Nathan Sobo df08c14aef Restore markers before triggering buffer events
This allows folds to be restored on undo/redo
2013-04-30 18:21:37 -06:00
Nathan Sobo af903f6690 Don't trigger marker-added/removed events anymore
I missed this previously
2013-04-30 18:20:15 -06:00
Nathan Sobo cef25898bb Properly unsubscribe DisplayBuffer from Buffer on destruction 2013-04-30 18:14:53 -06:00
Nathan Sobo 0dea901368 Use instance method 2013-04-30 18:14:31 -06:00
Nathan Sobo 9086171f45 💄 2013-04-30 18:14:13 -06:00
Nathan Sobo 9aec992693 Hold marker [in]validation events until after buffer change events
For a while, the goal has been to prevent marker update events from
firing until after the buffer change event. But at the same time, we
want all the markers to be updated when the buffer change fires. This
commit irons out some issues for markers that are invalidated or
revalidated by the change, making their behavior consistent with the
rest of marker updates.
2013-04-30 17:37:28 -06:00
Kevin Sawicki a788006d7c Default editor.preferredLineLength config to 80 2013-04-30 15:03:46 -07:00
Nathan Sobo 40512a4823 Don't update the DisplayBuffer when a fold's marker changes
Because we don't currently allow for direct manipulation of fold
marker ranges, if a fold's marker changes it will be because of a
buffer change. This buffer change will bubble to the display buffer
anyway, where the screen line update will account for the change to
the fold's marker range.
2013-04-30 15:07:37 -06:00
Nathan Sobo 2e77f0ed7d Eliminate special behavior for changes straddling start / end of folds
Previously, we were attempting to preserve the fold and adjust in an
intuitive way in the face of changes that straddled the beginning or
the end of the fold. That added complexity… we would have to add a new
marker invalidation strategy to support it and I'm not convinced it's
actually a big deal to destroy folds in the face of straddling changes.
So that's what we do now.
2013-04-30 14:28:42 -06:00
probablycorey af5392b8ac Add extra padding to the bottom of an editor's vertical scrollbar
This gives us some space when we scroll to the bottom of a file.
Similar to how MacVim works when using the mouse.

Closes #464
2013-04-30 11:52:28 -07:00
probablycorey 471ac4976f Test correct editor in font size spec 2013-04-30 11:52:28 -07:00
probablycorey 16c892caa6 Update click and drag spec
Stop relying on setInterval to trigger the scroll events in the spec. Instead simulate the mouse moving at the top of the screen. I found 
testing the setInterval approach required so much mocking that it 
wasn't worth it.
2013-04-30 11:52:28 -07:00
Corey Johnson 35b0e06260 💄 2013-04-30 11:52:28 -07:00
Corey Johnson bbb7dfdd07 Only the underlayer needs height: 100% 2013-04-30 11:52:28 -07:00
Nathan Sobo 56a9316a28 Fix docs references 2013-04-30 11:37:31 -06:00
Nathan Sobo 7d676f51bd Document TextBuffer.getMarker[s] 2013-04-30 05:12:43 -06:00
Nathan Sobo 7ca8e31087 Document Fold methods 2013-04-30 05:12:13 -06:00
Nathan Sobo 029d8b58db Remove outdated method 2013-04-30 04:58:02 -06:00
Nathan Sobo 160a336b48 Fix command interpreter spec 2013-04-30 04:57:08 -06:00
Nathan Sobo 1ecd195e6e 💄 2013-04-30 04:53:26 -06:00
Nathan Sobo 9f8a07fc27 Fix some edit session specs. The remaining failures are less trivial. 2013-04-30 04:43:28 -06:00
Nathan Sobo 1f3e3c698f Add DisplayBuffer.foldsStartingAtBufferRow 2013-04-30 04:37:11 -06:00
Nathan Sobo 1f9e33d995 WIP: Base folds on markers.
Still a couple of specs failing on this for changes that straddle the
start / end of a fold. We need a new marker invalidation strategy for
these cases.
2013-04-30 04:30:08 -06:00
Nathan Sobo 32178541fe Emit 'destroyed' events from display buffer markers 2013-04-29 21:01:48 -06:00
Nathan Sobo 51e915c423 Replace marker 'observe' methods w/ ordinary 'changed' event 2013-04-29 21:01:48 -06:00
Nathan Sobo 4ca00f7347 Simplify marker events
Instead of marker-added and marker-removed events which are emitted
when markers are created/invalidated/revalidated/destroyed, we now
just have marker-created events that are triggered *only* when markers
are created for the first time. The marker itself emits a 'destroyed'
event when it is destroyed. The marker already notifies observers when
its validation status changes, so that's covered.
2013-04-29 21:01:48 -06:00
Nathan Sobo b2d34d93ab Emit 'marker-added/removed' events on DisplayBuffer 2013-04-29 21:01:48 -06:00
Nathan Sobo 78bb074c0d Add DisplayBufferMarker.inspect 2013-04-29 21:01:48 -06:00
Nathan Sobo 3a39c92ae4 Emit 'marker-added/removed' events when buffer marker validity changes 2013-04-29 21:01:48 -06:00
Nathan Sobo 883127f0d6 Emit 'marker-added/removed' when buffer markers are created/destroyed 2013-04-29 21:01:48 -06:00
Nathan Sobo 3b52cd018b Reduce documentation threshold
I deleted a bunch of documented methods. I haven't added any new
undocumented methods, but now there are fewer overall documented
methods, which is breaking the docs threshold spec. I don't think it
makes sense to start documenting non-related methods in this branch
right now.
2013-04-29 21:01:48 -06:00
Nathan Sobo 6f34d0b346 Document new methods 2013-04-29 21:01:48 -06:00
Nathan Sobo b35bd36ec7 Get spell check specs passing with new marker api 2013-04-29 21:01:48 -06:00
Nathan Sobo 8c037bf425 Destroy markers properly in command panel operations 2013-04-29 21:01:48 -06:00
Nathan Sobo ae5e07ddd6 Make bracket matcher work with new marker API 2013-04-29 21:01:48 -06:00
Nathan Sobo b16529bf9f Use new marker API to get marker ranges in command panel operations 2013-04-29 21:01:47 -06:00
Nathan Sobo db0676cc51 Use new API to destroy markers in snippets package 2013-04-29 21:01:47 -06:00
Nathan Sobo 2d1cb8b519 Fix selection spec to to check marker destruction properly 2013-04-29 21:01:47 -06:00
Nathan Sobo 3a11c56438 Add .isDestroyed method to markers 2013-04-29 21:01:47 -06:00
Nathan Sobo caf34d6a3a EditSession.selectMarker checks if the marker is valid
Also, it returns the selected range if it's valid, and otherwise
returns a falsy value. This has more utility than just true/false.
2013-04-29 21:01:47 -06:00
Nathan Sobo a028dff6e9 Add DisplayBufferMarker.isValid 2013-04-29 21:01:47 -06:00
Nathan Sobo 0563ee4a97 Make DisplayBuffer.findMarkers return DisplayBufferMarkers 2013-04-29 21:01:47 -06:00
Nathan Sobo d466abdc64 Fix DisplayBuffer spec 2013-04-29 21:01:47 -06:00
Nathan Sobo f4be899ae9 Switch EditSession over to object-oriented markers API 2013-04-29 21:01:47 -06:00
Nathan Sobo 5403bc647a Convert display buffer markers to object-oriented API 2013-04-29 21:01:47 -06:00
Nathan Sobo 482eb6c0de Give TextBuffer an object-oriented marker interface
The previous API revolved around methods on TextBuffer for querying
and manipulating markers based on their id. Now marker creation
methods return marker objects. These are still retrievable by id so
they can be dealt with across serialization boundaries in the future,
but you deal with them directly as objects.
2013-04-29 21:01:47 -06:00
Nathan Sobo e02e4cd975 Add DisplayBuffer.findMarker[s] 2013-04-29 21:01:47 -06:00
Nathan Sobo ac90b13032 Add missing Buffer.findMarker implementation 2013-04-29 21:01:46 -06:00
Nathan Sobo 64aaf670ed Add startRow and endRow special attributes to TextBuffer.findMarker[s] 2013-04-29 21:01:46 -06:00
Nathan Sobo 4a764c2d9d 💄 2013-04-29 21:01:46 -06:00
Nathan Sobo 0f0480b79f Add Buffer.findMarker[s], which returns marker[s] matching attributes 2013-04-29 21:01:46 -06:00
Nathan Sobo df6feab346 Add Range.compare 2013-04-29 21:01:46 -06:00
Nathan Sobo aef34c11b7 Use new DisplayBuffer.updateScreenLines method for .destroyFold 2013-04-29 21:01:46 -06:00
Nathan Sobo 0292ba959f Use the same code path for fold creation and tokenized buffer changes 2013-04-29 21:01:46 -06:00
Kevin Sawicki 58275a2f0a Use ems instead of pixels for loading octicon size 2013-04-29 18:23:10 -07:00
Kevin Sawicki f0d3a06655 Mention dev mode fixes 2013-04-29 18:02:40 -07:00
Kevin Sawicki 0ce67b307c Remove unneeded resource path assignment
There is a fall back case after this that sets the resource
path to the bundle path if not already set.
2013-04-29 17:58:41 -07:00
Kevin Sawicki 598cdea22a Don't crash when running dev with no resource path
Previously if the --dev flag was used and no resource was
specified or found in ~/github/atom then the app would
crash trying to add a null resource path to the node paths
list.

Now the bundle resource path is the fallback whenever the
dev resource path cannot be found or does not exist.
2013-04-29 17:54:31 -07:00
Kevin Sawicki 32d23d6303 Allow Atom to be run in stable mode
Previously isDevMode was returning true when it was called
before the resource path was initially set forcing Atom to
always run in dev mode.

Now we just use the new isDevFlagSpecified() method to check
where the bundle resource path should be used.
2013-04-29 17:51:13 -07:00
Kevin Sawicki 3279a575f6 Reuse search when re-toggling find in project
Previously the prior find in file search was thrown
away when toggling find-in-project subsequent times.

Now the previous search text is retained and selected when toggled.
2013-04-29 15:25:07 -07:00
Kevin Sawicki 16ffbd1920 Reuse search when re-toggling find in file
Previously the prior find in file search was thrown
away when toggling find-in-file subsequent times.

Now the previous search text is retained and selected when toggled.
2013-04-29 15:24:44 -07:00
Corey Johnson 9180060920 Revert "Listen for mouse events on scrollView instead of renderedLines"
You can't listen on scroll view because that makes
it impossible to scroll using the scrollbar

Opens #464

This reverts commit fdae5fd89c.
2013-04-29 15:07:38 -07:00
Corey Johnson fdae5fd89c Listen for mouse events on scrollView instead of renderedLines
It was not possible to click on the lower part of the last line
when the editor was scrollable and listening for mousedown events on renderedLines.

Closes #464
2013-04-29 14:59:23 -07:00
Corey Johnson 8e218de3e7 💄 2013-04-29 14:59:23 -07:00
Kevin Sawicki a6c89b75fc Retain command panel text between toggles
Previously the mini editor was cleared on toggle but now
the existing text retained and selected when toggled.
2013-04-29 14:48:06 -07:00
Kevin Sawicki 15cf475d04 Use loading octicon in command panel
This removes the SVG spinner which had been incorrectly
rendering since the bootstrap upgrade due to box sizing
issues.
2013-04-29 14:13:21 -07:00
Corey Johnson & Kevin Sawicki b56f4a129f Mention fixed freeze 2013-04-29 12:15:10 -07:00
Corey Johnson & Kevin Sawicki 0d8a6782b3 Stop tokenizing line when the same rule is pushed more than once
Previously Rails classes would infinitly loop if the Ruby on Rails
grammar was loaded but the Ruby grammar had not been. This occurred
because a rule was continually pushing itself on the stack but never
advancing.

Now if the position does not advance and the last two rules in the
stack have the same scope the last rule is popped and the entire line
is tokenized with the current scopes.

Closes #524 #486
2013-04-29 12:10:40 -07:00
Corey Johnson fe219ed159 💄 2013-04-29 12:10:40 -07:00
probablycorey 6ee24cc50e 💄 2013-04-29 12:10:40 -07:00
Kevin Sawicki 5a84814e27 Undasherize the namespace when no event exists
This would present the new-window event as "New Window"
instead of "New-window".
2013-04-29 10:49:31 -07:00
Kevin Sawicki 994138c7a6 Mention meta-N command 2013-04-29 10:29:46 -07:00
Kevin Sawicki df6809e705 Bind meta-N to open a new untitled editor 2013-04-29 10:27:39 -07:00
Kevin Sawicki 71aa9802d5 Move default keys from keymap.coffee to atom.cson 2013-04-29 10:11:21 -07:00
Kevin Sawicki 8b98a7793d Include Java grammar in fenced code blocks 2013-04-28 06:50:03 -07:00
Kevin Sawicki b4cbffd978 Wait for execute promise to prevent leaking subscriptions 2013-04-27 07:58:56 -07:00
Kevin Sawicki 53dde09523 Mark config panels as internal
The doc spec was failing since these classes were added with
no docs and weren't marked as internal so the coverage dropped
below 80%.
2013-04-27 07:40:06 -07:00
Kevin Sawicki 8af73449fe Set no max width on img elements in image view 2013-04-27 07:21:23 -07:00
Kevin Sawicki d2b513bd5e Bind meta-_ to zoom out in image view 2013-04-27 07:19:34 -07:00
Kevin Sawicki c54766a08a Don't show indent guide in mini editor 2013-04-26 17:31:54 -07:00
probablycorey 8a7aa8083c Add show inded guide 2013-04-26 15:36:58 -07:00
probablycorey d1a26b9f81 Style editors like input fields 2013-04-26 15:36:58 -07:00
probablycorey 655fec2f18 Redraw editors when panel appears
If not done, the editors have zero height.
2013-04-26 15:36:58 -07:00
probablycorey 2d5bb8bd8b Move open .atom button to config menu 2013-04-26 15:36:58 -07:00
probablycorey bd7542cb0a Use mini-editors instead of inputs 2013-04-26 15:36:58 -07:00
probablycorey f06c9a5bc8 Don't respond to observe events when the editor value doesn't change 2013-04-26 15:36:58 -07:00
probablycorey 9f85ba4f7d Empty editors trigger config to delete the associated config key 2013-04-26 15:36:58 -07:00
Corey Johnson & Nathan Sobo b878be27a0 Revert to default font when setFontFamily is set to null/undefined 2013-04-26 15:36:58 -07:00
Corey Johnson & Nathan Sobo 1b98bf706e Setting value to null/undefined removes key from config 2013-04-26 15:36:58 -07:00
Corey Johnson & Nathan Sobo c923b561e2 💄 2013-04-26 15:36:57 -07:00
probablycorey e72e1c9c56 Remove log 2013-04-26 15:36:57 -07:00
probablycorey ecad6bc2a8 Don't allow float or int Editor's to have NaN as a value 2013-04-26 15:36:57 -07:00
probablycorey cedea831f7 Config panel handles binding for Editors 2013-04-26 15:36:57 -07:00
probablycorey 1b4fbdb065 Allow html attributes to be applied to Editors 2013-04-26 15:36:57 -07:00
Corey Johnson & Nathan Sobo c5cd39308d Add "open .atom" button to general config view 2013-04-26 15:36:57 -07:00
Nathan Sobo 083e6f26bd Style the general config panel w/ bootstrap 2013-04-26 15:36:57 -07:00
Nathan Sobo 15f95cb2a3 Add some explanatory text about cascading themes 2013-04-26 15:36:57 -07:00
Nathan Sobo b6d1f37249 Make theme name text non-selectable 2013-04-26 15:36:14 -07:00
Nathan Sobo 232978ea9d Themes can be disabled by clicking their 'x' icon in the enabled list 2013-04-26 15:36:14 -07:00
Nathan Sobo 5afe0a758c Allow stylesheets with ' characters in their filename 2013-04-26 15:36:14 -07:00
Nathan Sobo d3fa5b0f85 🙊 2013-04-26 15:36:13 -07:00
Nathan Sobo ad0bcc3851 Update enabled themes list when config key is updated 2013-04-26 15:36:13 -07:00
Nathan Sobo b110f430ee Update 'config.themes' config key when enabled themes list is sorted 2013-04-26 15:36:13 -07:00
Nathan Sobo 7993e3ab39 WIP: don't allow duplicates to be dragged 2013-04-26 15:36:13 -07:00
Nathan Sobo 540c543984 Add a styled but non-functional themes config panel 2013-04-26 15:36:13 -07:00
Nathan Sobo af02d9f0fd Use config defaults to default themes to atom-dark-* 2013-04-26 15:36:13 -07:00
Nathan Sobo 36d0b2c735 No need for jQuery UI in package config panel 2013-04-26 15:36:13 -07:00
Nathan Sobo 7518864938 Set initial size of config window to 800x600 2013-04-26 15:36:13 -07:00
Nathan Sobo 2d00d3e07e Import variables.less into config.less so it can be compiled alone
We try to compile all stylesheets across the board, but now many of
our stylesheets are imported into a master `atom.less` stylesheet. The
config stylesheet would compile fine when included from `atom.less`,
but alone it fails because it doesn't have the variables. We should
probably only try to pre-compile stylesheets we intend to require
directly… using a manifest maybe?
2013-04-26 15:36:13 -07:00
Nathan Sobo 0d520e9930 Add a package config panel with the list of enabled packages 2013-04-26 15:36:13 -07:00
Nathan Sobo b70ff1b164 Don't assign window.jQuery in jasmine-jquery.js helper
I wrap it in a function wrapper to ensure that the assignment
`var jQuery` doesn't end up assigning a window global.
2013-04-26 15:36:13 -07:00
Nathan Sobo ba6d3a1124 Use bootstrap to style editor config panel 2013-04-26 15:36:13 -07:00
Nathan Sobo ac65e288df Pull config stylesheet into atom.less 2013-04-26 15:36:12 -07:00
Nathan Sobo c5e34c60f8 Don't explode if 'core.themes' config key is undefined 2013-04-26 15:36:12 -07:00
Nathan Sobo 5a291e8188 Use bootstrap stacked nav-pills for panels menu in config window 2013-04-26 15:36:12 -07:00
Nathan Sobo ab5156c5e3 Clear out some styling cruft that will be replaced by bootstrap stuff 2013-04-26 15:36:12 -07:00
Nathan Sobo 360a3076a8 Fix jqueryui-browser npm version 2013-04-26 15:36:12 -07:00
Nathan Sobo 0af9564d1a Styling 💄 2013-04-26 15:36:12 -07:00
Nathan Sobo 21f83ea938 Add 'x' icon to enabled themes list 2013-04-26 15:36:12 -07:00
Nathan Sobo 81c1769770 Allow available themes to be dragged to sortable 'enabled themes' list
Still not doing anything with the sort update events.
2013-04-26 15:36:12 -07:00
Nathan Sobo 0620d19f26 Require jquery-ui-sortable and -draggable in the general config panel.
This commit has a hack to make window.jQuery available during the
duration of the requiring of jquery-ui. Once we're done requiring
jQuery, the global is removed from window once again.

Issue #494 has an alternative idea of enhancing require to allow the
requiring script to specify the value of global variables in the script
being required.
2013-04-26 15:36:12 -07:00
Nathan Sobo 46acb6da2c Style themes and packages lists 2013-04-26 15:36:12 -07:00
Nathan Sobo e8a66ded01 🙊 2013-04-26 15:36:12 -07:00
Nathan Sobo c90579956f Un-f 2013-04-26 15:36:11 -07:00
Nathan Sobo d857cc7d77 List available themes in general config panel 2013-04-26 15:36:11 -07:00
Nathan Sobo 495230435f Allow packages to be enabled / disabled from general config panel 2013-04-26 15:36:11 -07:00
Nathan Sobo 707ed3c51a Make config panels to scroll vertically if needed 2013-04-26 15:36:11 -07:00
Nathan Sobo 027bada7d5 Add editor.nonWordCharacters to editor config panel 2013-04-26 15:36:11 -07:00
Nathan Sobo 58add85f09 Add editor.showLineNumbers option 2013-04-26 15:36:11 -07:00
Nathan Sobo 7359101bac Add core.hideGitIgnoredFiles option 2013-04-26 15:36:11 -07:00
Nathan Sobo 4e787ceb43 Fix typo 2013-04-26 15:36:11 -07:00
Nathan Sobo ff76911e4c Move autosave to general config panel 2013-04-26 15:36:11 -07:00
Nathan Sobo f0cddf9f32 Serialize the state of the config window on refresh 2013-04-26 15:36:11 -07:00
Nathan Sobo c32c894d23 Add more editor config properties 2013-04-26 15:34:48 -07:00
Nathan Sobo 422d89a7ed Handle checkbox fields in config panel 2013-04-26 15:34:48 -07:00
Nathan Sobo 5e0dd80366 Remove overkill assertions 2013-04-26 15:34:48 -07:00
Nathan Sobo bfbdfb46a8 Use id instead of name for config key path 2013-04-26 15:32:48 -07:00
Nathan Sobo 91e3fbd2d8 Allow native event handling for non-editor input elements
This allows arrow keys, tab, etc. to work properly inside input
elements.
2013-04-26 15:32:48 -07:00
Nathan Sobo 6c640133f1 Add 'native!' keymap override to let the browser handle the keystroke
This allows us to selectively opt out of handling key events with the
keymap for certain elements. In particular, it will be useful for
allowing the standard native behavior in input elements by overriding
global bindings for arrow keys, backspace, etc.
2013-04-26 15:32:47 -07:00
Nathan Sobo bb287cb465 Add ConfigPanel superclass that can bind fields to config values
When you give a config field a `name` attribute based on a config key
path, such as 'editor.fontSize', it is automatically kept in sync with
the config value. You can also specify a `type` attribute of 'int' or
'float' to automatically convert the field value to a numeric type.
Specifying a type of 'string' is optional to signal no conversion.
2013-04-26 15:32:47 -07:00
Nathan Sobo 252159afcf Add super basic styling to config view and 2 non-functional panels 2013-04-26 15:32:47 -07:00
Nathan Sobo 6c43fd5c9d Set up dev tools event handler when binding default keys 2013-04-26 15:32:47 -07:00
Nathan Sobo 2f60ffcfce Add ability to add panels to the config view 2013-04-26 15:32:47 -07:00
Nathan Sobo 8980a97895 Add atom.activatePackageConfig, which is called in config windows
This calls an optional `activateConfig` method on the package's main
module, which allows it to add a configuration interface to the
`configView`.
2013-04-26 15:32:47 -07:00
Nathan Sobo 160b80b47f Open a custom config window on 'open-user-configuration' event 2013-04-26 15:32:47 -07:00
Nathan Sobo df064ddd21 Use isDevMode method to determine whether to use bundle resource path 2013-04-26 15:32:46 -07:00
Nathan Sobo 9d2d3d5c00 Rename window methods to distinguish editor window from config window 2013-04-26 15:32:46 -07:00
Nathan Sobo f62e81bca8 Add config.observeUserConfig 2013-04-26 15:32:46 -07:00
Nathan Sobo ab1b90804e Add specs for successful calls to .loadUserConfig 2013-04-26 15:31:18 -07:00
Nathan Sobo 9fe264ded4 💄 2013-04-26 15:31:18 -07:00
Corey Johnson & Kevin Sawicki 0e3f9297fb Only pass instances of EditSession to CommandInterpreter 2013-04-26 14:54:15 -07:00
Garen Torikian 7fdfd71382 💄 2013-04-26 14:45:18 -07:00
Garen Torikian bb40ad6177 💄 all the things 2013-04-26 13:49:12 -07:00
Kevin Sawicki e3295059a0 Mention bug fixes and new features 2013-04-26 09:53:17 -07:00
Kevin Sawicki 4940439f4b Include ruby grammar for fenced ruby blocks 2013-04-26 08:58:43 -07:00
Kevin Sawicki dccd5ec8ba Include XML grammar for fenced XML blocks 2013-04-26 08:56:13 -07:00
Kevin Sawicki 0ca1204b89 Use standard headings in command logger
Now that we have bootstrap we no longer need these
tweaks to headings.
2013-04-25 18:44:25 -07:00
Kevin Sawicki c8d76edea1 Always return created view 2013-04-25 18:44:25 -07:00
Kevin Sawicki 1d9aa7c5e1 Use relative require path 2013-04-25 18:44:25 -07:00
Nathan Sobo 3a05731f2d Eliminate EditSession references from tokenized-buffer-spec 2013-04-25 17:16:51 -06:00
Nathan Sobo 9c7ff78fc8 Move language-specific integration tests to text-mate-grammar-spec 2013-04-25 17:15:27 -06:00
Nathan Sobo 89fe8e1628 Add TextMateGrammar.tokenizeLines convenience method
It can be used in specs to test parsing. It takes a block of text,
splits it into lines, and then tokenizes them, returning an array
of token arrays, one for each line.
2013-04-25 17:15:27 -06:00
Nathan Sobo 7e0ac1db9c Default TokenizedBuffer options hash to {} 2013-04-25 17:15:27 -06:00
Kevin Sawicki 20073c9d34 Upgrade to git-utils 0.15 2013-04-25 15:39:22 -07:00
Nathan Sobo 4fdc9fba63 Eliminate EditSession dependencies in DisplayBuffer spec 2013-04-25 16:18:39 -06:00
Nathan Sobo 0d78098dbf Make TokenizedBuffer select its own grammar, not LanguageMode
This is part of an effort to disentangle LanguageMode, DisplayBuffer,
and TokenizedBuffer. It should be easy to create a DisplayBuffer
without creating an EditSession… let's get the dependencies flowing
in a single direction.
2013-04-25 15:13:00 -06:00
Nathan Sobo ee31114b32 💄 whitespace 2013-04-25 14:06:53 -06:00
Nathan Sobo 0f623b3d08 Move structural folding logic to LanguageMode
DisplayBuffer should just focus on providing basic support for folding.
Scanning the structure of the code, looking at scopes, etc is more the
domain of the LanguageMode object.
2013-04-25 14:06:53 -06:00
Nathan Sobo 1ac55413d9 Define class properties with :, not = 2013-04-25 14:06:53 -06:00
Nathan Sobo 60f945aafd Move structural folding specs to edit-session-spec
Structural folding should really be handled at the edit session level
so that the DisplayBuffer doesn't need access to the LanguageMode. It
should only be concerned with the raw ability to create folds.
2013-04-25 14:06:53 -06:00
Nathan Sobo ca3b0c97da 💄 getter renames 2013-04-25 14:06:52 -06:00
Kevin Sawicki c50b7fd99e 💄 2013-04-25 11:27:59 -07:00
Kevin Sawicki d69a32d551 Mention invisibles bug 2013-04-25 10:10:00 -07:00
Kevin Sawicki 875555d933 Rename invisible class to invisible-character
Bootstrap defines this class with visibility: hidden
which we don't want since invisible characters should
be visible.
2013-04-25 10:02:33 -07:00
Kevin Sawicki faaaa538a9 Enable git-diffs by default 2013-04-25 09:36:26 -07:00
Kevin Sawicki 00cb0bb8d9 Don't require SpellChecker module until correction command is triggered 2013-04-25 09:33:11 -07:00
Kevin Sawicki 59c02c90da Include comma as a word boundary 2013-04-25 09:18:43 -07:00
Kevin Sawicki 2302baa4f3 Include colon as a word boundary 2013-04-25 09:17:40 -07:00
Kevin Sawicki 443056ef5c Mention faster startup time 2013-04-24 22:10:57 -07:00
Kevin Sawicki 6b0a466596 Mention newly included bundles 2013-04-24 22:00:01 -07:00
Kevin Sawicki d6eb1aba75 Mention hyperlink opening 2013-04-24 21:51:20 -07:00
Kevin Sawicki c1769c3de1 Get this changelog started 2013-04-24 21:48:59 -07:00
Kevin Sawicki d37605766d Remove testing block 2013-04-24 18:08:27 -07:00
Kevin Sawicki 763c59764f Include css grammar in fenced block 2013-04-24 18:06:27 -07:00
Kevin Sawicki ec54330096 Add language name to fenced scopes 2013-04-24 18:03:35 -07:00
Kevin Sawicki ac225731d5 Remove testing block 2013-04-24 18:01:04 -07:00
Kevin Sawicki 2803da2f8b Replace offsUtilscreen with offscreen 2013-04-24 17:59:50 -07:00
Kevin Sawicki 0640631d07 Include JS/CoffeeScript grammars in markdown code blocks 2013-04-24 17:57:59 -07:00
Kevin Sawicki 4e8c6e29ad Use @ instead of this. 2013-04-24 17:57:59 -07:00
probablycorey 915d2e42b7 Store cefode versions in /tmp/atom-cached-cefodes
This will make rake cleaning go faster
2013-04-24 15:19:11 -07:00
Corey Johnson & Nathan Sobo cd7162b3bc Fix event emitter error
Introduced in 9cc4c2e5de because
of botched merge conflict resolution
2013-04-24 14:17:47 -07:00
Corey Johnson & Nathan Sobo 96e91f5fa1 Use correct case when requiring subscriber 2013-04-24 14:15:09 -07:00
Corey Johnson & Nathan Sobo 24ce415283 Move event listener calls from resetDisplay to edit
Fixes #140
2013-04-24 11:41:56 -07:00
probablycorey 2a6c4b04b1 Lower case custom attribute linenumber.
All attribute names on HTML elements in HTML documents get ASCII-lowercased
automatically, so the restriction on ASCII uppercase letters doesn't affect such
documents. Via http://www.w3.org/html/wg/drafts/html/master/single-page.html
2013-04-24 11:41:56 -07:00
probablycorey 9cc4c2e5de Allow off to be called before on without error
Previously calling `something.off 'event-name', handler` would throw
an error unless `on` was called first.
2013-04-24 11:41:56 -07:00
Kevin Sawicki 7e9c39fd55 Remove less hack
less is no longer vendored and so the previous
window hack is no longer needed.
2013-04-24 11:36:18 -07:00
Kevin Sawicki 09967db742 Don't count DOM elements for operations count
The number of DOM elements rendered is fluid and using this
number displays inaccurate results as new operations are rendered.

Instead just set the operation count when creating the PathView
based on considering all the operations available.

Closes #502
2013-04-24 10:32:55 -07:00
Kevin Sawicki 946f908ab7 Use relative require paths 2013-04-24 10:12:30 -07:00
Kevin Sawicki 8fb61168b0 doc: mention cson and less files 2013-04-24 10:12:30 -07:00
Kevin Sawicki b65e1485a7 Copy folders to ~/.atom directory asynchronously 2013-04-24 10:12:30 -07:00
Kevin Sawicki 1c8509b873 Look for .json extension first 2013-04-24 10:12:30 -07:00
Kevin Sawicki 044396d41a Remove unneeded empty array fallback 2013-04-24 10:12:30 -07:00
Kevin Sawicki 41229f50f7 Look for .json extension first 2013-04-24 10:12:29 -07:00
Kevin Sawicki 1368026db2 Remove measure calls 2013-04-24 10:12:29 -07:00
Kevin Sawicki 36e725d5d5 Precompile theme metadata to JSON 2013-04-24 10:12:29 -07:00
Kevin Sawicki fc00688454 Use fsUtils.readObject() to read theme metadata 2013-04-24 10:12:29 -07:00
Kevin Sawicki df9c30d174 Precompile .less theme files 2013-04-24 10:12:29 -07:00
Kevin Sawicki 1b6bd1f32f Only add view to attached editors 2013-04-24 10:12:29 -07:00
Kevin Sawicki 2f5a99fac2 Install atom command asynchronously 2013-04-24 10:12:29 -07:00
Kevin Sawicki b27b0c7d4f Defer require and only add view to pane-based editors 2013-04-24 10:12:29 -07:00
Kevin Sawicki d92db4a7a8 💄 2013-04-24 10:12:29 -07:00
Kevin Sawicki 7ef87cb6c4 Load scoped properties asynchronously 2013-04-24 10:12:29 -07:00
Kevin Sawicki 001fef384c Remove extra initialization of scoped properties 2013-04-24 10:12:29 -07:00
Kevin Sawicki ab2a298994 💄 2013-04-24 10:12:28 -07:00
Kevin Sawicki bef3c50fe5 Load scoped properties after grammars load 2013-04-24 10:12:28 -07:00
Nathan Sobo 4a5a155511 Log non-zero exits and stderr output from LoadPathsTask subprocess
This will help us investigate issue #514
2013-04-24 10:26:15 -06:00
Garen Torikian 3087fabc21 Merge pull request #511 from github/no-trim-whitespace
Leave Markdown files alone when trimming whitespace
2013-04-23 17:22:37 -07:00
Garen Torikian 41c79789e3 Make words more consistent 2013-04-23 17:15:20 -07:00
Garen Torikian 0ae599ad6f double space outta my face 2013-04-23 17:15:20 -07:00
Garen Torikian 1b2b8861ee fix specs 2013-04-23 17:15:20 -07:00
Garen Torikian f85e1ccf9a modify whitespace replace fn directly 2013-04-23 17:15:19 -07:00
Garen Torikian 4ed36ec095 Fix dem specs 2013-04-23 17:15:19 -07:00
Garen Torikian 4fc7e1a9d5 Leave Markdown files alone 2013-04-23 17:15:19 -07:00
Garen Torikian 7940820877 Update display-buffer.coffee 2013-04-23 15:41:02 -07:00
Garen Torikian e4eea237b5 Update display-buffer.coffee 2013-04-23 15:37:14 -07:00
Nathan Sobo 1d6c2cdf27 In documentation strings ,s/Integer/Number/g 2013-04-23 16:30:23 -06:00
Nathan Sobo c51db80d6e Some more docs fixes
/cc @gjtorikian
2013-04-23 16:17:36 -06:00
Nathan Sobo 38c2509927 Fix some documentation 2013-04-23 16:11:15 -06:00
Corey Johnson & Nathan Sobo caed3d39de Revert "Don't tokenize files that have more than 10000 lines"
This was a premature optimization. The real problem is
with the spell-check package.

This reverts commit 987d1da233.
2013-04-23 13:50:02 -07:00
Corey Johnson & Nathan Sobo 693a495618 Use _.spliceWithArray in tokenized buffer 2013-04-23 12:01:16 -07:00
Corey Johnson & Nathan Sobo 987d1da233 Don't tokenize files that have more than 10000 lines 2013-04-23 12:00:57 -07:00
Corey Johnson & Nathan Sobo 840efa3d82 Use _.spliceWithArray when splicing in new lines 2013-04-23 11:19:54 -07:00
Corey Johnson & Nathan Sobo 9f235103f8 Add _.spliceWithArray to avoid stack overflows when splicing huge arrays 2013-04-23 11:16:55 -07:00
Kevin Sawicki 1ccf026a83 Set/get text using edit session instead of buffer 2013-04-23 08:54:43 -07:00
Kevin Sawicki 2d897ba415 Remove trailing whitespace 2013-04-23 08:54:18 -07:00
Kevin Sawicki c3045dd230 doc: tweak eventNames param description 2013-04-23 08:42:33 -07:00
Kevin Sawicki & Nathan Sobo e50aa56d02 Space separate event names 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo 228fa1abe5 Store injections grammars on Syntax global 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo 125c41a2e2 Support space-separated event names in EventEmitter.on()/off() 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo b9ad462c69 Retokenize when grammar with matching injection selector is updated 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo 0d35943386 Retokenize when grammar with matching injection selector is loaded 2013-04-23 08:39:26 -07:00
Kevin Sawicki & Nathan Sobo b1527a7982 Add getter and setter for buffer text 2013-04-23 08:39:26 -07:00
Kevin Sawicki eec6518278 Add package to open links on ctrl-O 2013-04-23 08:39:26 -07:00
Kevin Sawicki a447ab4edc Add link segment to GFM underline scope 2013-04-23 08:39:26 -07:00
Kevin Sawicki f0cf337857 Support grammars with an injectionSelector
These grammars can now contribute rules to other grammars when
their selector matches the current scope stack.
2013-04-23 08:39:26 -07:00
Kevin Sawicki 927e9c3de8 Upgrade to oniguruma 0.11 2013-04-23 08:39:25 -07:00
Kevin Sawicki 4acb3acebc Use substring instead of substr 2013-04-23 08:39:25 -07:00
Kevin Sawicki 63d665e2cb Replace capture groups in pattern names with match 2013-04-23 08:39:25 -07:00
Kevin Sawicki a720919dd8 Add hyperlink helper TextMate bundle 2013-04-23 08:39:25 -07:00
Kevin Sawicki 220b9dadbb Don't show null grammar in grammar selector 2013-04-22 22:13:21 -07:00
Nathan Sobo 608ffd27ad Slightly more correct 2013-04-22 11:34:03 -06:00
Nathan Sobo 35f0b7b49e Fix #505. Update grammars if any included grammars are updated. 2013-04-22 11:34:03 -06:00
Nathan Sobo b856ab16cf Add SQL textmate bundle 2013-04-22 11:34:03 -06:00
Nathan Sobo 9866e84c9f In LanguageMode, unsubscribe from old grammar when switching grammars 2013-04-22 11:34:03 -06:00
Nathan Sobo 444325893b Allow subscribers to unsubscribe on a per-object basis
This makes use of the new ES6 WeakMap feature, which allows for a hash
map that's keyed by object.
2013-04-22 11:34:03 -06:00
Nathan Sobo 93910201b0 Re-tokenize buffer when its grammar is updated
This can happen if a grammar that the grammar includes is added or
removed from the syntax global.
2013-04-22 11:34:03 -06:00
Nathan Sobo 9204836d70 Update grammars when grammars they include are added/removed
If the Ruby on Rails grammar depends on HTML, but it isn't loaded, its
syntax highlighting won't include HTMl tokens. If we later load HTML,
we should update any buffer with the Rails grammar to reflect the
change. This commit changes grammars to memoize their initial rule and
repository. If an included grammar is added or removed, we clear the
memoized rules and emit a 'grammar-updated' event. Any tokenized
buffer that points to this grammar can then retokenize to reflect the
newly available/unavailable included grammar.
2013-04-22 11:33:59 -06:00
Kevin Sawicki e6274b2f45 Update expected require path for changes in 8e2938ea 2013-04-20 09:57:34 -07:00
Kevin Sawicki 8cd7adceb5 Remove ignore of doc/assets
Biscotto upgrade removes the need to ignore this
folder which was previously when generating the
doc stats.
2013-04-20 09:53:50 -07:00
Garen Torikian d52631bab5 Update package.json
Bump for excessive dir creation
2013-04-19 18:28:42 -07:00
Corey Johnson 8e2938ea82 Updae package generator require paths 2013-04-19 14:59:54 -07:00
Kevin Sawicki f8011d9cc9 doc: capitalize number and wrap in {} 2013-04-19 11:05:54 -07:00
Kevin Sawicki 8bf9598f7b doc: pluralize event 2013-04-19 11:03:38 -07:00
Kevin Sawicki 74d6bf776d Alphabetize class exports 2013-04-19 10:58:36 -07:00
Kevin Sawicki 4fa4bc5c17 Remove extra newline 2013-04-19 10:58:36 -07:00
Kevin Sawicki abc025326f 💄 2013-04-19 10:58:36 -07:00
Kevin Sawicki 2d054e715e Mark matchers as internal 2013-04-19 10:58:36 -07:00
Kevin Sawicki 9b621f330b Doc TextMateScopeSelector 2013-04-19 10:58:36 -07:00
Kevin Sawicki f84402c4cf Rename selector ivar to source 2013-04-19 10:58:36 -07:00
Kevin Sawicki 62c94959e1 Move injections spec to TextMateGrammar spec
This spec was previously in the TokenizeBuffer spec which
required having a PHP fixture and setting up an edit session
to verify a line could be tokenized which was unnecessary.
2013-04-19 10:58:35 -07:00
Kevin Sawicki 23fc73733f Rename AsteriskMatcher to TrueMatcher 2013-04-19 10:58:35 -07:00
Kevin Sawicki 6bda6e7644 Update remaining Asterix to Asterisk 2013-04-19 10:58:35 -07:00
Kevin Sawicki & Nathan Sobo faac67c88e Rename asterix to asterisk 2013-04-19 10:58:35 -07:00
Kevin Sawicki & Nathan Sobo 1f4febcfaf Ignore child captures of captures with patterns 2013-04-19 10:58:35 -07:00
Kevin Sawicki & Nathan Sobo b37468871c Use TextMateGrammar.tokenizeLine() to create capture rule tokens 2013-04-19 10:58:35 -07:00
Kevin Sawicki c63834924a Support patterns included in captures
Previously only the capture's name was considered when processing
tokens for capture indices.

Now the capture's patterns are matched against the captured region
if they exist.
2013-04-19 10:58:35 -07:00
Kevin Sawicki 1091875ca1 Index into array instead of removing matchers 2013-04-19 10:58:35 -07:00
Kevin Sawicki 66b80d9682 💄 2013-04-19 10:58:35 -07:00
Kevin Sawicki faca7f091a Include PEG js bundle 2013-04-19 10:58:35 -07:00
Kevin Sawicki 9489ec6787 Add specs for & selectors 2013-04-19 10:58:35 -07:00
Kevin Sawicki d5723aa18d Port scope selector matchers to CoffeeScript 2013-04-19 10:58:35 -07:00
Kevin Sawicki & Nathan Sobo 1dffb9237a Use the earliest result when both injection and non-injection patterns match 2013-04-19 10:58:34 -07:00
Kevin Sawicki & Nathan Sobo 0a92f68aac Remove unused variable 2013-04-19 10:58:34 -07:00
Kevin Sawicki 40939ab984 Remove unused injected variable 2013-04-19 10:58:34 -07:00
Kevin Sawicki da898a5344 Cache scanners used in injections 2013-04-19 10:58:34 -07:00
Kevin Sawicki 88ebad2b7a Add Injections helper class 2013-04-19 10:58:34 -07:00
Kevin Sawicki c9edc3b2d6 Add createScanner() helper to Rule 2013-04-19 10:58:34 -07:00
Kevin Sawicki 1407f6c1f0 Add getRegex() helper to Pattern 2013-04-19 10:58:34 -07:00
Kevin Sawicki 3542e879bc Set injected to false by default 2013-04-19 10:58:34 -07:00
Kevin Sawicki c2eca1ff99 Add initial support for injection grammars
Build scope selectors and patterns when setting up the grammar
for all entries under the grammar's injection object.

Include the injection patterns in the scanner when the injection's
scope selector matches the current rule stack.
2013-04-19 10:58:34 -07:00
Kevin Sawicki 2568aa086e 💄 2013-04-19 10:58:34 -07:00
Kevin Sawicki 7cb8850ed2 Expect single scope as parameter to scope matcher 2013-04-19 10:58:34 -07:00
Kevin Sawicki beeaa01d22 Support space-separated scopes in selector parser 2013-04-19 10:58:33 -07:00
Kevin Sawicki 3e5448b698 Add initial TextMate scope selector parser 2013-04-19 10:58:33 -07:00
Kevin Sawicki ed9f46b39f Upgrade TextMate PHP bundle to current master 2013-04-19 10:58:33 -07:00
Kevin Sawicki 76484acb21 Call atom.show() from a setTimeout()
The window was previously flashing white if atom.show() was called
directly after window.startup()

Wrapping the call in a setTimeout with a zero delay seems to prevent
the white flash and the perceived amount of time to display the contents
appears to be the same.
2013-04-19 10:15:50 -07:00
Kevin Sawicki 36768251f8 Default ranges to empty array when no edit session
Previously an exception would be thrown if a '/' pattern was evaluated
when there was no active edit session.
2013-04-19 10:05:48 -07:00
Kevin Sawicki b4ab10403d Use lower case submodule paths
Lowercase the Go and Mustache bundle paths to be
consistent with all others.
2013-04-18 21:34:31 -07:00
Kevin Sawicki 086c7f7133 Run biscotto directly through coffee
CI had issues finding coffee when exec'ing directly.
2013-04-18 21:08:33 -07:00
Kevin Sawicki 4b48e07f83 Specify cwd instead of cd'ing 2013-04-18 20:41:17 -07:00
Kevin Sawicki ca1177efea Ignore doc/assets 2013-04-18 20:40:48 -07:00
Kevin Sawicki a149357bd5 💄 2013-04-18 20:21:34 -07:00
Kevin Sawicki b5474790cb Remove unused imports 2013-04-18 20:18:37 -07:00
Kevin Sawicki 848761710e 💄 2013-04-18 20:16:49 -07:00
Garen Torikian 53f03d1b30 Missed a spot 2013-04-18 20:10:30 -07:00
Garen Torikian dcbd6f07e5 Merge pull request #498 from github/api/docs
Add API documentation for src/app
2013-04-18 18:58:41 -07:00
Garen Torikian 42290e87f8 80 is good. 2013-04-18 18:51:46 -07:00
Garen Torikian df528f954b Bump biscotto one last time 2013-04-18 18:51:23 -07:00
Garen Torikian 5ee388cede Get it to a proper 80% 2013-04-18 18:50:22 -07:00
Garen Torikian 5d7b4ec04b Bump biscotto again 2013-04-18 15:24:19 -07:00
Garen Torikian cabee75f8a 💄 2013-04-18 15:02:22 -07:00
Garen Torikian 87f991a35d Remove package doc for now 2013-04-18 15:01:52 -07:00
Garen Torikian 14a0010517 Keep updating Internal hiding 2013-04-18 14:58:19 -07:00
Garen Torikian e478d9b7a0 Add more corrections off of the #Internal syntax 2013-04-18 13:38:26 -07:00
Garen Torikian 0acccc383e Remove test for folder not documented 2013-04-18 13:24:55 -07:00
Garen Torikian 3303f5a741 Bump biscotto 2013-04-18 13:05:46 -07:00
Garen Torikian a50cfa26cc Updates for new biscotto 2013-04-18 13:05:40 -07:00
Garen Torikian 4d2b78b1f8 Bump biscotto version 2013-04-18 11:22:39 -07:00
Garen Torikian 9f6ef4beec Merge branch 'master' into api/docs 2013-04-18 11:20:23 -07:00
Kevin Sawicki f93b09fc9e Don't try to active windows without a path
Previously Atom would crash if a path was opened when there
was already a window open that did not have a path, such as
the specs window.

Now window controllers without a path are skipped during the
checks to activate an existing window for an opened path.
2013-04-17 18:45:24 -07:00
probablycorey 599328cb9c Better error message when Atom.app is not found 2013-04-17 16:26:13 -07:00
probablycorey 9b8abe3552 If Atom.app doesn't exist, wait 5 seconds and try again.
Closes #351

When Sparkle updates Atom, it deletes the app and replaces it. This
causes the `atom` cli to fail when called within this brief time
period. This gives `atom` a five second grace period if it is not
found.
2013-04-17 16:25:42 -07:00
Garen Torikian 130baf2235 Merge branch 'master' into api/docs 2013-04-17 16:08:18 -07:00
probablycorey 5d84c8117e Explain the meta key in the getting started docs
Closes #328
2013-04-17 14:30:24 -07:00
Kevin Sawicki 379bf54c40 Don't set widthChanged handler on gutter
The gutter now uses flex box so the width is no longer explicitly
set based on the number of lines.
2013-04-17 09:01:27 -07:00
Kevin Sawicki 88ae70eb19 Remove duplicate property 2013-04-16 17:56:06 -07:00
Kevin Sawicki 1aa0e52cea 💄 2013-04-16 17:52:00 -07:00
Kevin Sawicki 8c138ebd04 Remove unused ivar 2013-04-16 17:47:30 -07:00
Nathan Sobo cada940345 Load full bootstrap 2013-04-16 17:24:21 -06:00
Nathan Sobo bbbdacab74 Avoid the .label class because it conflicts with bootstrap 2013-04-16 17:24:21 -06:00
Kevin Sawicki aa27b3d464 Set min-height on tree to 100% 2013-04-16 15:30:33 -07:00
Kevin Sawicki & Nathan Sobo 807c6878c1 Set width of hidden input to 1 pixel
Previously the width was set to the width of a single character which
caused issues if the char width was currently zero and since the hidden
input no longer has padding or border the width of the input would end
up being zero which would prevent it from gaining focus.
2013-04-16 15:20:16 -07:00
Nathan Sobo 45ede6bc79 💄 rename treeViewList outlet to list 2013-04-16 15:26:31 -06:00
Corey Johnson 3c95fbd72c Remove redundant conditional 2013-04-16 14:23:42 -07:00
Corey Johnson & Nathan Sobo ca49d0714c Restore previous selections after tailing newlines are added
Closes #496
2013-04-16 14:23:42 -07:00
Corey Johnson & Nathan Sobo f21571eab1 Rename isFirstPoint to isHead in marker.updatePosition 2013-04-16 14:23:42 -07:00
Kevin Sawicki bc99e72b3d Verify the buttons individually in the spec
The outer expand-collapse element is no longer in the view.
2013-04-16 13:56:27 -07:00
Kevin Sawicki & Nathan Sobo fe5d73c02a Use bootstrap buttons in command panel
Thanks @mdo!
2013-04-16 12:28:35 -07:00
Kevin Sawicki & Nathan Sobo a1cab1a692 Log instead of re-throwing less parser errors 2013-04-16 12:10:07 -07:00
Nathan Sobo afa58160b3 Oops. Fix tree-view auto-scrolling and specs after breaking them. 2013-04-16 11:59:25 -06:00
Nathan Sobo 84bc5d1e56 Fix syntax error in select-list.less of atom-dark-ui theme 2013-04-16 11:53:48 -06:00
Nathan Sobo 917ab3fe7b Ensure tree view highlights extend full-width, even when scrolled
The .tree-view-wrapper element is renamed to `.tree-view-resizer` to
clarify its purpose, and the actual draggable div is renamed to
`.tree-view-resize-handle`. Then a new div is introduced beneath the
resized wrapper called `tree-view-scroller`. This element has 100%
width/height and overflow scroll, allowing the actual tree view list
to *not* scroll. It uses the cutting edge `min-content` property as
its min width, which ensures it's always wide enough to contain its 
content even when the scroller wrapper is narrower. This allows the
absolutely-positioned highlights to always extend *at least* across
the full width of the list elements.
2013-04-16 11:20:56 -06:00
probablycorey a8f27a7848 Convert select list to Less style markup 2013-04-16 10:20:00 -07:00
Kevin Sawicki 58bf33fc6f Remove margins on nested matches list 2013-04-16 10:08:15 -07:00
Nathan Sobo 6107734460 Fix command panel preview list header styling 2013-04-16 10:57:50 -06:00
Nathan Sobo 4c037d53e2 Eliminate :focus outline 2013-04-16 10:57:50 -06:00
Kevin Sawicki 44871c84cf Ignore .git folder 2013-04-16 09:46:49 -07:00
Nathan Sobo 5071f083a1 Revert "Load all of bootstrap"
This reverts commit e59ab14ad3.
2013-04-16 10:38:35 -06:00
Kevin Sawicki a2035bc305 Move error-messages class under command-panel class 2013-04-16 09:33:45 -07:00
Kevin Sawicki 27252961cf Remove list style type on matches class 2013-04-16 09:29:31 -07:00
Kevin Sawicki 0102c0fd8d Bind click events using new button outlets 2013-04-16 09:26:24 -07:00
Kevin Sawicki f190dab5e6 Remove classes from buttons
The collapse class was causing the button to be very small since it
is defined in bootstrap with height 0.
2013-04-16 09:22:18 -07:00
Kevin Sawicki e037bf1db9 Remove list type and margin from error messages 2013-04-16 09:18:43 -07:00
Kevin Sawicki 865b70e16d Don't exclude node_modules/less
Less is no longer vendored and so it should now be
copied over.
2013-04-16 08:46:13 -07:00
Nathan Sobo e59ab14ad3 Load all of bootstrap 2013-04-15 20:45:56 -06:00
Nathan Sobo 1ce9cdff0c Make precompilation of less stylesheets work with @import directives 2013-04-15 20:45:56 -06:00
Nathan Sobo 140d5d5a85 💄 Use outlet 2013-04-15 20:45:56 -06:00
Nathan Sobo 8c648e9226 Fix tree-view specs 2013-04-15 20:45:56 -06:00
Nathan Sobo cd9f6d4c62 Remove tree-view margin bottom 2013-04-15 20:45:56 -06:00
Nathan Sobo 305a1b91b8 Set box-sizing to content-box for autocomplete 2013-04-15 20:45:56 -06:00
Nathan Sobo fff4531663 Fix select-list auto-scrolling specs 2013-04-15 20:45:55 -06:00
Nathan Sobo 9d987ac911 Set box-sizing: content-box on image-view img tags
Bootstrap sets box-sizing: border-box everywhere. It's often a good
idea, but in this case it screws up the specs for the image view.
2013-04-15 20:45:55 -06:00
Nathan Sobo bc03810589 Set height on image view, not parent
Setting the height of the parent caused #jasmine-content to be tall
for the remainder of the specs
2013-04-15 20:45:55 -06:00
Corey Johnson & Nathan Sobo d95016307a Fix mini-editor appearance by clearing styles on hidden input. 2013-04-15 20:45:55 -06:00
Corey Johnson & Nathan Sobo 8f0bffc589 Don't set height on mini editor explicitly. Let 'height: auto' do it.
We're not sure why this is here, and can't see a problem when we remove
it.
2013-04-15 20:45:55 -06:00
Nathan Sobo d82daeccee Fix jasmine styling 2013-04-15 20:45:55 -06:00
Nathan Sobo 23f66c12a4 Make modified tab's close icon remain blue on hover 2013-04-15 20:45:55 -06:00
Nathan Sobo 39f920165d Report errors with no stack when loading packages 2013-04-15 20:45:55 -06:00
Nathan Sobo e0c8c5ccb7 Clean up tabs styling using LESS features 2013-04-15 20:45:55 -06:00
Nathan Sobo c1e4d2f1f1 Make tree-view CSS bootstrap-compatible. Use less and octicon-mixins. 2013-04-15 20:45:55 -06:00
Nathan Sobo 312f04f44d Add octicon-mixins.less
This file contains mixins that make it easy to turn any selector into
an icon. You use them in the following way:

```less
@import "octicon-mixins.less";

.entry .disclosure-arrow {
  .mini-icon(arr-collapsed);
}

.entry.expanded .disclosure-arrow {
  .mini-icon(arr-expanded);
}
```

There is also the `.mega-icon` mixin, and you are free to pass a size
as a second parameter, like this: `.mega-icon(octocat, 64px)`
2013-04-15 20:45:55 -06:00
Nathan Sobo e871929aae Load a subset of bootstrap from atom.less and nuke reset.less 2013-04-15 20:45:55 -06:00
Nathan Sobo 91cbcf0073 Update editor lines & cursors to not use bootstrap-styled pre element 2013-04-15 20:45:55 -06:00
Nathan Sobo 738fc31f56 Add twitter bootstrap submodule and put it on less search path 2013-04-15 20:45:54 -06:00
Nathan Sobo bbf7c6ca1b Replace requireStylesheet calls w/ @import directives in atom.less 2013-04-15 20:45:54 -06:00
Nathan Sobo 2f008aa886 Use less NPM module instead of vendored less
We're currently using nathansobo's fork, which doesn't depend on
`window` being undefined to operate in Node mode.
2013-04-15 20:45:54 -06:00
Garen Torikian 4c56e8bb57 Merge branch 'master' into api/docs 2013-04-14 09:43:06 -07:00
Garen Torikian c4e713f121 Update biscotto 2013-04-14 01:44:59 -07:00
Garen Torikian 99333d4444 Don't commit output 2013-04-12 22:37:07 -05:00
Garen Torikian 8bd02358d2 Should I regret a lack of better commit messages? 2013-04-12 22:35:54 -05:00
Cheng Zhao 558e41f740 Make main window restart renderer process when reloaded for 4 times.
Fix #495.
2013-04-13 10:24:58 +08:00
Garen Torikian 37b3784129 Finish Selections, add Fold 2013-04-12 21:10:57 -05:00
Garen Torikian f3b7874007 Get a good chunk of Selection} 2013-04-12 15:54:56 -05:00
Garen Torikian 286e70cc57 Hella Editor updates 2013-04-12 15:17:11 -05:00
Garen Torikian b2637aae57 Don't add stats 2013-04-12 14:38:59 -05:00
Garen Torikian 0c5e38680d Internalize a bunch of methods 2013-04-12 14:37:21 -05:00
Garen Torikian e412eb16af Add a proper output dir 2013-04-12 14:36:59 -05:00
Garen Torikian 6963503d6f Finish config 2013-04-12 14:23:43 -05:00
Kevin Sawicki 7b42e975fb Include hidden files when running nak 2013-04-12 11:48:44 -07:00
Kevin Sawicki 26638980bf Upgrade to git-utils 0.14 2013-04-12 11:09:58 -07:00
Kevin Sawicki 9a3821b97e Quit message loop when last browser is closed
Previously CefShutdown() was called after closing the windows
which would prevent them from running their beforeunload callbacks
and saving state properly when cmd-Q the application.

Now the number of open browsers is tracked and the message loop
is quit and the windows are autoreleased only after the browser
is ready to be closed.

Closes #493
2013-04-12 10:22:18 -07:00
Garen Torikian 7e5b6bf5c4 Massive updates 2013-04-11 21:11:12 -05:00
Kevin Sawicki 235cd1fbff Add initial .nakignore file 2013-04-11 15:32:45 -07:00
Kevin Sawicki 224e01102c Use path.join() of fsUtils.join() 2013-04-11 14:37:25 -07:00
Kevin Sawicki 75da75158a Default width to min-width property 2013-04-11 14:26:29 -07:00
Kevin Sawicki ee7a90184b Make autocomplete wide enough to not scroll 2013-04-11 14:18:22 -07:00
Kevin Sawicki 78dc676f0f Exclude .less/.cson/.coffee files at root of src
Previously the rsync exclude rules required files to be two-levels
deep to be excluded which would keep the window-bootstrap.coffee in
the bundle since it was at the root of the src folder.

Now if cson, less, or coffee files end up in src/ they will be
correctly excluded from the bundle when synced.
2013-04-11 12:36:40 -07:00
Nathan Sobo 7967dada4b Make script/bootstrap exit on subprocess errors 2013-04-11 13:07:16 -06:00
Nathan Sobo b1e79b4634 Run rake clean on prebuild to clear out node_modules 2013-04-11 12:53:32 -06:00
Kevin Sawicki 4e59605728 Don't bubble move-to-top/bottom events
This will cause the editor to scroll as well when a select
list is a child of an editor such as in the autocomplete view.
2013-04-11 10:39:19 -07:00
Kevin Sawicki 461aaa83b0 Unsubscribe correctly from buffers in packages
Previously namespaces were used to off() when a buffer was
unsubscribed from which affected other views in the same
package also listening to the current buffer.

Now event namespaces are no longer used and instead off() is
called with the callbacks originally registered for the given
event name.
2013-04-11 08:53:01 -07:00
Garen Torikian bb8f5bb40c Fix errors 2013-04-11 02:29:48 -05:00
Garen Torikian e0e4936756 Update spec 2013-04-11 02:14:24 -05:00
Kevin Sawicki 2e6735ecd0 Extend Subscriber from GitDiffView 2013-04-10 22:23:29 -07:00
Kevin Sawicki 26a4ff9121 DRY up how diffs are generated and rendered 2013-04-10 22:20:21 -07:00
Kevin Sawicki 89b0d7efdb 💄 2013-04-10 22:17:14 -07:00
Kevin Sawicki 99e573006e Upgrade to pathwatcher 0.3 2013-04-10 21:54:54 -07:00
Kevin Sawicki 1ae878c000 Fire will-be-removed event from beforeRemove() 2013-04-10 17:43:26 -07:00
Chris Wanstrath 6c4294dda9 fix typo 2013-04-10 16:59:12 -07:00
Garen Torikian 8bcb01383c Add Project 2013-04-10 18:16:54 -05:00
Garen Torikian bd00c5d53d stash 2013-04-10 18:04:14 -05:00
Garen Torikian 1142ae89aa Update spec 2013-04-10 18:02:13 -05:00
Garen Torikian c5557500a9 Add more to specs 2013-04-10 18:01:54 -05:00
Garen Torikian 1963cb66fd Merge branch 'master' into api/docs 2013-04-10 17:23:05 -05:00
Kevin Sawicki 9597d4ea52 Upgrade to pathwatcher 0.1.5
This version is the last known good one pre-0.2
2013-04-10 15:17:12 -07:00
Kevin Sawicki 57d9a7b22e Downgrade to pathwatcher 0.1
Closes #491
2013-04-10 15:11:06 -07:00
Nathan Sobo 93cddcf8dc Make CODE_SIGN gyp var lowercase and 💄 it in Rakefile 2013-04-10 15:57:17 -06:00
Nathan Sobo 2cb18f5855 Allow gyp version var to be set from CLI, but default it to git HEAD. 2013-04-10 15:57:17 -06:00
Nathan Sobo d56946fa6e Export VERSION to rake task in prebuild script 2013-04-10 15:57:17 -06:00
Garen Torikian 9432f9703e Merge master 2013-04-10 15:05:21 -05:00
Kevin Sawicki 8182bd59f9 Upgrade to pathwatcher 0.2
This appears to work now after doing a clean and reinstall
of all modules.
2013-04-10 12:56:12 -07:00
Kevin Sawicki a64b81090d Only remove styles if line diffs exist 2013-04-10 12:41:35 -07:00
Kevin Sawicki 5bbc70e6de Back out pathwatcher upgrade
The v0.2.0 version does not appear to load within atom.
2013-04-10 12:40:36 -07:00
Kevin Sawicki f868c0cd4f Add line diff decorations to editor gutter
Added, modified, and deleted lines will now highlighted
in the gutter for files already checked in to the repository.
2013-04-10 12:17:01 -07:00
Kevin Sawicki b74f2a3e9e Upgrade to git-utils 0.13 2013-04-10 12:17:01 -07:00
Garen Torikian ec3a137a1a Doc events 2013-04-10 02:27:42 -05:00
Garen Torikian 742a28ca9c Define file stuff 2013-04-10 02:20:55 -05:00
Garen Torikian f677e6633c Fix doc tasks 2013-04-10 02:20:45 -05:00
Garen Torikian 79562f51fd Some more low hanging fruit 2013-04-10 01:28:50 -05:00
Cheng Zhao badcc6c2bf Update node-pathwatcher to 0.2.0, node-spellchecker to 0.3.0. 2013-04-10 13:22:06 +08:00
Garen Torikian fad987c0f3 More updates--25% 2013-04-09 18:03:39 -05:00
Garen Torikian 756bb5604f Add API doc spec 2013-04-09 18:03:29 -05:00
Garen Torikian abbda0643a Specify more namespaces 2013-04-09 18:02:24 -05:00
Kevin Sawicki 53c3fa8ac8 Bind meta-< to scroll to cursor location 2013-04-09 14:33:36 -07:00
Garen Torikian cf9185b512 Merge branch 'master' into api/docs 2013-04-09 16:21:14 -05:00
Garen Torikian dbd924cfb0 Stash 2013-04-09 16:20:49 -05:00
Kevin Sawicki 8bfc3e473e 💄 2013-04-09 13:56:53 -07:00
Kevin Sawicki 27c5506d83 Set a -1 tabindex on on the tab bar
This prevents it from gaining focus when a close icon is clicked.
2013-04-09 13:56:28 -07:00
Kevin Sawicki efb4bdd028 Remove duplicate RootView.eachPane(callback) 2013-04-09 13:36:52 -07:00
Garen Torikian bf76083939 Merge master 2013-04-09 14:54:17 -05:00
Garen Torikian 49e42c0510 Updates 2013-04-09 14:49:58 -05:00
Garen Torikian 5dc1ddd5b5 Remove invalid biscotto for now 2013-04-09 14:49:51 -05:00
Garen Torikian 19c347903a Add stats tasks 2013-04-09 14:49:41 -05:00
Kevin Sawicki c9e1f89b60 Upgrade to git-utils 0.12 2013-04-09 12:04:31 -07:00
Kevin Sawicki fe1b4c71a3 Use ? instead of or 2013-04-09 10:47:19 -07:00
Kevin Sawicki cc3558067d Merge pull request #480 from github/vim-core-changes
Vim core changes
2013-04-09 10:43:01 -07:00
Mutwin Kraus cfe03c108a Revert changes in src/app/text-buffer.coffee and src/app/pane.coffee 2013-04-09 18:53:56 +02:00
Mutwin Kraus c91de1e515 Merge remote-tracking branch 'origin/master' into vim-core-changes
Conflicts:
	src/app/pane.coffee
2013-04-09 18:52:36 +02:00
Kevin Sawicki b2cb527f03 Look in all panes for existing preview to show
Previously only the next pane was checked for an existing
preview which would fail to locate any existing previews
that were moved to different panes or were no longer in the
next pane for the edit session.
2013-04-09 08:47:38 -07:00
Cheng Zhao f1c9d09fd9 Merge pull request #484 from github/external-drag
Drag-drop with external applications
2013-04-09 00:45:09 -07:00
Cheng Zhao a5b8478060 Allow dragging of tab when there is only one tab.
The tabs should be able to be draggale out of the application at any
time, and if there is only one tab it should not be able to be dropped
in the same window.
2013-04-09 15:37:30 +08:00
Cheng Zhao 3c4966f6a3 Open the file dragged to window. 2013-04-09 15:37:30 +08:00
Cheng Zhao fdcbf611aa The drop marker should disappear when drag is done.
Previously we make drop marker disappear when drop is done, it would
case the marker to live forever if the drop is not done in Atom.
2013-04-09 15:37:30 +08:00
Cheng Zhao a630f05ae4 The dragged tab should carry information of file. 2013-04-09 15:37:30 +08:00
Garen Torikian a16428c5b6 Merge master 2013-04-09 01:37:46 -05:00
Garen Torikian d042fadab1 More updates 2013-04-09 01:18:12 -05:00
Kevin Sawicki 9173711b58 Look for markdown preview in all panes to update
Previously only the next pane was checked to see if a preview
exists to update.  This would fail to update the preview if
it was moved moved from its original pane to a different pane.

Now the view tracks the buffer and updates on 'saved' events and
shows the preview if it is not in the active pane.
2013-04-08 18:26:55 -07:00
Kevin Sawicki 09b7fe72eb Detach instead of remove when moved item is the view
Moving an item that extended the jQuery object between panes
was previously wiping out all jQuery data since remove() was being
called on the view item instead of detach().
2013-04-08 18:22:58 -07:00
Kevin Sawicki 758ff58d2d 💄 2013-04-08 17:04:53 -07:00
Kevin Sawicki d1c9d0ea68 Focus pane after reopening it
Previously the reopened item would not have focus if it was
reopened into a newly appended pane.
2013-04-08 16:54:05 -07:00
Nathan Sobo ae77011385 Unsubscribe correctly in subscribeToCommand 2013-04-08 17:46:29 -06:00
Kevin Sawicki 2f67312a80 Don't prompt to save if buffer is opened elsewhere
This corrects a regression where closing an edit session that
is opened somewhere else should not prompt to save since it
won't be lost if closed immediately since it is still open in
another pane.
2013-04-08 16:30:35 -07:00
Nathan Sobo 78cb747a39 No need to .off events explicitly now 2013-04-08 17:25:13 -06:00
Nathan Sobo 2601f266fa Add subscribeToCommand to track command subscriptions on other views 2013-04-08 17:09:12 -06:00
Kevin Sawicki 7c9119c793 Add ImageEditSession.canOpen(path)
This returns whether the path specified is an image that can
be loaded internally by the image view.
2013-04-08 15:46:24 -07:00
Kevin Sawicki 9949f044cc Call super from ImageView.initialize()
This allows the ScrollView superclass to set up bindings
for scrolling events.
2013-04-08 15:36:43 -07:00
Kevin Sawicki d42db869cd Keep image centered after window resizes 2013-04-08 15:36:43 -07:00
Kevin Sawicki 7a709b05f3 Support zooming images in/out and resetting 2013-04-08 15:36:43 -07:00
Kevin Sawicki 6ce3f87448 Add initial image viewer
An image session will be opened by project.buildEditSession()
for known image extensions.

Closes #203
2013-04-08 15:36:35 -07:00
Kevin Sawicki cd7a906b9a Use Pane.activeView instead of Pane.viewForActiveItem()
viewForActiveItem() can create a view which we don't want to do
when responding to events in the status bar. Instead we just want
to access the already existing view for the active item.
2013-04-08 13:58:22 -07:00
Kevin Sawicki 5e504d6c08 Support more than just editors in the status bar
The status bar view now tracks the active pane item
and hides and shows elements that apply for the active
item such as path, cursor position, grammar, etc.
2013-04-08 13:26:57 -07:00
Kevin Sawicki e3b381f638 Add RootView.eachPane(callback) 2013-04-08 13:04:50 -07:00
Kevin Sawicki c7175c7e5f Return top and left values of 0 when not visible 2013-04-08 13:03:19 -07:00
Kevin Sawicki 8993258e74 Update display when cancelled
This will force the rendered line to be cleared
so it doesn't flicker the next time the list is opened.
2013-04-08 12:54:56 -07:00
Kevin Sawicki b7b4dcda24 Schedule redraw when updating an invisible editor
The redrawOnReattach flag will now be set when update
display is called on an invisible editor so that if the
editor is detached or hidden before the next update was
processed it will be performed when reattached.
2013-04-08 12:50:05 -07:00
Kevin Sawicki 63017b7800 Attach editor and update display in spec
This is required now that the editor checks visibility
before updating the display.
2013-04-08 12:10:57 -07:00
Kevin Sawicki 503b1231db Redraw editor when it becomes the active view
Start watching for when the editor becomes the active view
once it is attached and redraw it when it does.
2013-04-08 12:00:25 -07:00
Mutwin Kraus 9041c56ef3 Spec for selectToBeginningOfNextWord 2013-04-08 14:19:28 +02:00
Mutwin Kraus 2445829f83 Specs for moveCursorToBeginningOfNextWord 2013-04-08 14:15:25 +02:00
Mutwin Kraus a12c78100e Merge remote-tracking branch 'origin/master' into vim-core-changes
Conflicts:
	src/app/editor.coffee
2013-04-08 12:54:43 +02:00
Garen Torikian f2698bc6a9 More updates 2013-04-08 02:14:45 -05:00
Cheng Zhao 314324562e Update node-pathwatcher to v0.1.5. 2013-04-08 12:00:52 +08:00
Cheng Zhao f4161a1889 Restart interval of main window should be longer than specs window. 2013-04-08 12:00:52 +08:00
Cheng Zhao 17e9c6ea3b Restart renderer process when reloaded for 4 times.
Fix #481.
2013-04-08 12:00:52 +08:00
Kevin Sawicki dc94855e1a Parse emoji start, word, and end into different scopes 2013-04-07 15:07:57 -07:00
Kevin Sawicki 4636e9ca40 Unsubscribe if editor has no session 2013-04-07 14:52:20 -07:00
Cheng Zhao 049a2b3884 Merge pull request #485 from github/node-pathwatcher
Use node-pathwatcher to replace $native.watchPath.
2013-04-07 05:50:43 -07:00
Cheng Zhao 7c8e1634b8 Remove native path watcher code. 2013-04-07 19:33:27 +08:00
Cheng Zhao e0865e8c38 Use node-pathwatcher. 2013-04-07 16:35:35 +08:00
Cheng Zhao 20580a5da8 Merge pull request #478 from github/no-drag-drop
Don't respond to drag-drop of external files
2013-04-05 23:39:42 -07:00
Kevin Sawicki fcb90abfda Don't show status colors on selected arrow 2013-04-05 15:05:43 -07:00
Kevin Sawicki b9fcfda904 Only match brackets if underlayer is visible 2013-04-05 15:05:43 -07:00
Garen Torikian fe0dc8181a More doc updates--now at 15% 2013-04-05 14:33:58 -07:00
Garen Torikian 003813f39d Add statsOnly task 2013-04-05 13:54:56 -07:00
Nathan Sobo 763729d08d 🏇 Use buffer ranges to see if selections intersect 2013-04-05 14:52:36 -06:00
Nathan Sobo 6042439598 Add emacs bindings for add selection commands: alt-ctrl-n/p 2013-04-05 14:52:36 -06:00
Nathan Sobo 987f80aeb3 Bind add selection commands to alt-shift-up/down 2013-04-05 14:52:35 -06:00
Nathan Sobo abc5ed5190 Add editor:add-selection-above command 2013-04-05 14:52:35 -06:00
Nathan Sobo 3e07351552 Also bind escape to consolidate selections in mini editors 2013-04-05 14:52:35 -06:00
Nathan Sobo a7091c8d94 Remove *all* !important expressions once specificity is calculated 2013-04-05 14:52:35 -06:00
Nathan Sobo 37e16bb163 Clear multiple selections on escape
The binding uses the `!important` selector to ensure that the editor
always gets a chance to clear multiple selections before other bindings
for escape are processed.
2013-04-05 14:52:35 -06:00
Nathan Sobo 7018f33ad7 Allow !important flag in keymap selectors 2013-04-05 14:52:35 -06:00
Nathan Sobo 2efed9f42c Add EditSession.consolidateSelections() 2013-04-05 14:52:30 -06:00
Nathan Sobo bd58834e7d Merge goal ranges when merging selections 2013-04-05 14:17:21 -06:00
Nathan Sobo be009e87c2 Skip empty lines when adding selections below empty selections
Unless the selection's column is 0
2013-04-05 14:17:21 -06:00
Nathan Sobo 393cba4d42 Don't skip shorter lines when the adding empty selection below 2013-04-05 14:17:21 -06:00
Nathan Sobo 131df22c11 Skip lines that are too-short when adding non-empty selection below 2013-04-05 14:17:21 -06:00
Nathan Sobo 40d7fcf32c 🙊 2013-04-05 14:17:21 -06:00
Nathan Sobo ff8491f8d3 Base cursor visibility on marker emptiness instead of tail status 2013-04-05 14:17:20 -06:00
Nathan Sobo f22461e5e8 Clear goal range when selection is modified
Just like the cursor clears its goal column when it is moved in any
way other than vertically, the selection clears its goal range (the
range it will attempt to use when adding a selection below) when it
is changed in any way.
2013-04-05 14:17:20 -06:00
Nathan Sobo 7b7c77645c Rename SelectionView.destroyed to .needsRemoval to match CursorView 2013-04-05 14:17:20 -06:00
Nathan Sobo f6bfab5dd7 Don't freak when selections are added & removed before display update
Previously, if a selection was added and removed before the editor got
a chance to update its display, it would try to add a selection view
for the destroyed selection. Now we check the new selections and
cursors to make sure they aren't destroyed before we add views for
them.
2013-04-05 14:17:20 -06:00
Nathan Sobo 31579703f0 Ensure new non-empty selections have an invisible cursor. 2013-04-05 14:17:20 -06:00
Nathan Sobo 34019951d3 💄 2013-04-05 14:17:20 -06:00
Nathan Sobo af923cca9b Preserve original selection's range when adding selection's below
Just like the cursor tries to stay in its "goal column" when moving
vertically, here we try to keep the same selection even when adding
across shorter lines.
2013-04-05 14:17:20 -06:00
Nathan Sobo 26e53584c1 Add 'editor:add-selection-below' command
It still needs work, but the basic idea is for every selection to
add another another selection over the same column range of the line
below.
2013-04-05 14:17:20 -06:00
Kevin Sawicki 9633677bcc Only check for updates on code signed builds 2013-04-05 10:16:56 -07:00
Kevin Sawicki f8fbfc8624 Don't show status color on arrow when selected 2013-04-05 09:34:25 -07:00
Kevin Sawicki c8dd9f8d82 Use indexOf instead of substring to check path 2013-04-05 09:07:31 -07:00
Kevin Sawicki 1e3d157f49 💄 2013-04-05 09:01:02 -07:00
Kevin Sawicki 9843147c3d Ignore tag files in any directory 2013-04-05 08:52:17 -07:00
Kevin Sawicki 30fb637f86 Add spec for excluding ignored files from Project.scan() 2013-04-05 08:45:00 -07:00
Kevin Sawicki 6e4d9508aa Close browser instead of sending shutdown message
CEF now supports calling the beforeunload handler when closed
so we no longer need to send a shutdown message on the native
side.
2013-04-05 08:34:04 -07:00
Cheng Zhao 1fcc0adf6c Update cefode2 to cefode3. 2013-04-05 23:00:58 +08:00
Cheng Zhao 33de90a0b6 dataTransfer.setData only accepts string. 2013-04-05 10:30:18 +08:00
Garen Torikian 9e38537239 Hella docs, we're up to 10% coverage 2013-04-04 18:54:36 -07:00
Kevin Sawicki 84107317bb Support opening non-existent files from the CLI
This required changing text-buffer to support having a
path but not underlying file that exists yet.

Now calling RootView.open() with a non-existed path will
open a dirty empty editor to the path and the file will be
created on first save.
2013-04-04 17:08:05 -07:00
Kevin Sawicki 931ae677c1 💄 2013-04-04 16:37:52 -07:00
Kevin Sawicki 8745ef8723 💄 2013-04-04 16:29:15 -07:00
Kevin Sawicki 062d07ada0 💄 2013-04-04 15:52:53 -07:00
Kevin Sawicki 6166f8e681 Remove unused require 2013-04-04 13:40:48 -07:00
Kevin Sawicki bb2ab15753 Open files specified via CLI in existing window
Activate the window and open an editor when a path is specified
that is already present in an existing window's project.

Closes #357
2013-04-04 13:40:48 -07:00
probablycorey a048d2994e Use [ -t 1 ] to check if we should output progress bar. 2013-04-04 12:22:37 -07:00
Mutwin Kraus 3a3336aaaa Merge remote-tracking branch 'origin/master' into vim-core-changes 2013-04-04 20:19:00 +02:00
Kevin Sawicki e442dfff11 Support joining editor lines with ctrl-J
This can be used with or without a selection to join one
or more lines with the line below it separated by a space.

Refs #134
2013-04-04 11:07:59 -07:00
probablycorey 44d78ed30d move files int tools/mac to scripts dir 2013-04-04 10:04:45 -07:00
probablycorey 725e0d778a Remove notes directory 2013-04-04 10:04:44 -07:00
Kevin Sawicki bd40133277 Remove note that is now issue #479 2013-04-04 09:57:27 -07:00
Kevin Sawicki 9773751e79 Delete left when meta-backspacing at start of line
Previously EditSession.backspaceToBeginningOfLine() would do nothing
if at the beginning of the line.

Now it selects left and does a delete so it can be used to delete
multiple lines continuously without having to move the cursor.

Refs #134
2013-04-04 09:25:35 -07:00
Kevin Sawicki 4683285e0d Move opacity to line numbers instead of gutter
Having the opacity previously on the .gutter class was making
the gutter background color for the current line be different
than the editor background color.
2013-04-04 08:57:47 -07:00
Kevin Sawicki 1730444db8 Use released version of nak 2013-04-04 08:39:09 -07:00
Cheng Zhao 20083b97c6 Update node to v0.10.3 2013-04-04 21:18:21 +08:00
Mutwin Kraus 26bcf7718b Revert "Selection support for bracket matcher"
This reverts commit 460c4a0b09.
2013-04-04 15:03:35 +02:00
Mutwin Kraus 42119ecb29 Merge remote-tracking branch 'origin/master' into vim-core-changes
Conflicts:
	src/app/text-buffer.coffee
2013-04-04 14:23:58 +02:00
Cheng Zhao f37265978e Only respond to drag-drop of tabs in tab bar. 2013-04-04 16:23:46 +08:00
Cheng Zhao f455379a17 No drag-drop by default. 2013-04-04 15:31:06 +08:00
Kevin Sawicki bac2209449 Remove unneeded syntax.off() call
syntax.on() is no longer called anywhere in the package.
2013-04-03 17:51:24 -07:00
Corey Johnson & Nathan Sobo 2f4bbd90a6 Don't emit grammars-loaded event 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo 5c9dd50e39 Start spell-checking immediately
When the grammar changes, spell check will detect this and toggle
itself accordingly. Before a grammar matches a buffer, it has the
NullGrammar, which won't be spell-checked.
2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo 2973a81293 Don't assign text grammar by default. Just use the null grammar. 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo 144984c726 Make LanguageMode unsubscribe from syntax global when destroyed 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo 1b56cfb270 LanguageMode switches to a better-matching grammar when it is added 2013-04-03 18:34:54 -06:00
Corey Johnson & Nathan Sobo 16b53d3183 Eliminate syntax.grammarsByFileType hash 2013-04-03 18:34:53 -06:00
Corey Johnson & Nathan Sobo 05d6adc6c7 Change syntax.selectGrammar to choose the highest-scoring grammar
This sets us up to switch to a grammar when it is loaded if it is a
better match for the current file.
2013-04-03 18:34:53 -06:00
Nathan Sobo ed1c5d3417 Localize grammar reloading / setting to LanguageMode
Previously, logic associated with swapping grammars was a bit
scattered. Now grammar reloading / assignment methods delegate to
LanguageMode directly, and it emits a 'grammar-changed' event when
the grammar changes. Now EditSession and TokenizedBuffer listen for
this event and perform necessary actions for grammar change.
2013-04-03 18:34:53 -06:00
Kevin Sawicki cf357376b3 Only add wrap guide to pane-based editors 2013-04-03 17:30:24 -07:00
Kevin Sawicki b4eb7d072e Only expand folder when needed for file asserts
Closes #470
2013-04-03 17:07:23 -07:00
Kevin Sawicki 4f8d51450a Add missing space in expected string 2013-04-03 16:01:17 -07:00
Kevin Sawicki b50b2231d6 Render all operations when moving to bottom 2013-04-03 15:55:07 -07:00
Kevin Sawicki a762291de9 Render more operations when path is collapsed
Previously the command panel would shrink when a path was
collapsed since operations that hadn't been rendered yet weren't
properly added to the DOM.

This removes the collapse/expand animation since it becomes jittery
when combined with rendering new path and operation views.
2013-04-03 15:53:07 -07:00
Kevin Sawicki ec2b116674 💄 2013-04-03 15:53:07 -07:00
Kevin Sawicki 0b9f6b14ba Put 'atom' in window title when no panes are open
Previously the title would revert to 'index.html' when
focus was gained and no panes were open.
2013-04-03 15:53:07 -07:00
Corey Johnson & Nathan Sobo d136837c79 Fix version spec 2013-04-03 15:28:43 -07:00
Corey Johnson & Nathan Sobo 081967dc95 Change development version number to the sha 2013-04-03 15:24:17 -07:00
Corey Johnson & Nathan Sobo 101605e50f Add atom.crashMainProcess and atom.crashRenderProcess 2013-04-03 15:08:16 -07:00
Corey Johnson & Nathan Sobo 262e2fe1ec Add Quincy crash reporter framework 2013-04-03 15:08:16 -07:00
Kevin Sawicki 5d2a0a0223 Use fs.chmod() to make atom.sh executable 2013-04-03 15:01:23 -07:00
Kevin Sawicki 8447a22419 Support reloading the window from the event palette 2013-04-03 14:48:11 -07:00
Kevin Sawicki b6eed51eed Merge pull request #460 from github/nak-powered-search
Nak powered search
2013-04-03 14:21:07 -07:00
Kevin Sawicki d1fd3c8d7c Invoke callback with empty array on non-zero exit code 2013-04-03 13:54:52 -07:00
Kevin Sawicki a3ef9c204b Use repository URL for nak dependency
This is temporary until https://github.com/gjtorikian/nak/pull/17/files
is merged and released.
2013-04-03 13:47:03 -07:00
Kevin Sawicki 52d47f555f Don't run clean before test
Clean should be optional
2013-04-03 12:11:45 -07:00
Kevin Sawicki a5870cedd2 Use more generic core.excludeVcsIgnoredPaths config key 2013-04-03 11:45:55 -07:00
Kevin Sawicki ede5e88a19 Merge origin/master into nak-powered-search
Conflicts:
	src/packages/command-panel/lib/preview-list.coffee
	src/packages/fuzzy-finder/lib/load-paths-task.coffee
2013-04-03 11:43:35 -07:00
Kevin Sawicki 0b3a91b5fe Rename VCS ignore config setting to fuzzyFinder.hideVcsIgnoredPaths 2013-04-03 11:39:16 -07:00
Nathan Sobo 40aa81e9c1 Add required activate method to avoid logging during specs 2013-04-03 12:34:56 -06:00
Kevin Sawicki ace71acb3c Invoke callback even when command fails 2013-04-03 11:34:27 -07:00
Nathan Sobo 5d22cff6ad 🙊 2013-04-03 12:33:40 -06:00
Kevin Sawicki 19cf333e52 Use long opts for readability 2013-04-03 11:32:42 -07:00
Kevin Sawicki e176141846 Follow symlinks loading paths 2013-04-03 11:22:20 -07:00
Garen Torikian 3347aba5ff Merge branch 'nak-powered-search' of github.com:github/atom into nak-powered-search 2013-04-03 11:04:37 -07:00
Garen Torikian ee15855383 Bump nak 2013-04-03 11:04:15 -07:00
Nathan Sobo 930cd9551b 💄 add eof newlines 2013-04-03 12:01:37 -06:00
Nathan Sobo f03b6207de Make all requires of 'fs-utils' assign to fsUtils var instead of fs 2013-04-03 12:01:37 -06:00
Mutwin Kraus 08783f19e4 Skip save confirmation for pane 2013-04-03 19:48:29 +02:00
Jeremy McAnally a99e4ef5a9 Making an edit to .github
To make the docs build...
2013-04-03 14:44:30 -03:00
Nathan Sobo 5df78812ef Rename EditSession.scanInRange to scanInBufferRange
This is more consistent with other range-oriented methods on
EditSession. At this layer, we need to be explicit about what kind
of range we are talking about.
2013-04-03 11:28:55 -06:00
Nathan Sobo 59a5a5bc8f Always pass a hash to TextBuffer.scanInRange iterators
This makes it easy to only assign variables for the information you
need in the iterator. Before, we always forced you to take a match and
a range as the first two arguments even if you weren't using them.
2013-04-03 11:16:49 -06:00
Nathan Sobo 68a02fe009 Use backwardsScanInRange instead of passing true 2013-04-03 11:03:45 -06:00
Mutwin Kraus 460c4a0b09 Selection support for bracket matcher 2013-04-03 19:03:33 +02:00
Mutwin Kraus abce3d7f9b Add autocomplete:next/previous events 2013-04-03 18:57:01 +02:00
Nathan Sobo 11f140ac5a Don't save/load window state to/from disk when pathToOpen is undefined
This fixes a bug where `meta-n` was not opening a new buffer in the
opened window if window state was previously saved for an `undefined`
path.
2013-04-03 10:27:57 -06:00
Nathan Sobo ec93dc38b7 Version serialized state of EditSession
Since buffers are now serialized directly, previous versions of the
EditSession state which used the buffer's path as the `buffer` key
are no longer valid.
2013-04-03 10:21:56 -06:00
Kevin Sawicki aa8fb3eb4b Add failing symlink spec 2013-04-03 08:33:16 -07:00
Kevin Sawicki 917fbaadad Use splat instead of apply 2013-04-03 08:27:36 -07:00
Kevin Sawicki 2dc1817807 Push new paths onto existing array 2013-04-03 08:24:31 -07:00
Kevin Sawicki 320d177038 Use consistent quotes 2013-04-03 08:19:04 -07:00
Kevin Sawicki acf538cf4b Remove unused aborted ivar 2013-04-03 08:18:00 -07:00
Mutwin Kraus 2cda2b9fe2 Move cursor to beginning of next word 2013-04-03 16:32:30 +02:00
Garen Torikian 3d076daf54 More updates 2013-04-02 17:54:34 -07:00
Kevin Sawicki ba028f6358 Support ~/.atom/user.less 2013-04-02 17:37:21 -07:00
Garen Torikian da59785c76 Dummy package placeholder 2013-04-02 17:30:25 -07:00
Garen Torikian bd1b407a4b Add that rake task 2013-04-02 17:30:11 -07:00
Kevin Sawicki 326910eeed Don't output curl progress bar during ci build 2013-04-02 17:28:26 -07:00
probablycorey f4264f00f8 Modernize markdown preview spec 2013-04-02 17:09:08 -07:00
Corey Johnson 606f446c27 Log warning when trying to render non-markdown file 2013-04-02 17:00:42 -07:00
Corey Johnson 2944b64795 Show GitHub API error message when markdown preview fails 2013-04-02 17:00:41 -07:00
Corey Johnson 55d4625091 Only display markdown preview on save if preview already exists 2013-04-02 17:00:41 -07:00
Corey Johnson 5f2c4dad95 Only show markdown preview if the edit session's grammar is GFM 2013-04-02 16:59:44 -07:00
Corey Johnson e03f2fd738 Markdown preview listens to core:save on activate 2013-04-02 16:59:44 -07:00
Mutwin Kraus 5c93fd4574 Update markdown preview when markdown buffer is saved 2013-04-02 16:59:44 -07:00
Kevin Sawicki 22af597c42 💄 2013-04-02 16:50:53 -07:00
Kevin Sawicki 34ca5ce949 nak no longer includes a space after the colon 2013-04-02 16:49:33 -07:00
Garen Torikian 83c6975d34 Add a rake task, of course 2013-04-02 16:47:30 -07:00
Garen Torikian 955e1571a2 Bump nak version to add @kevinsawicki changes 2013-04-02 16:40:32 -07:00
Garen Torikian 79ac5d606d Bump nak again 2013-04-02 15:39:40 -07:00
Mutwin Kraus 9a6b5986fe Add editor.selectLine 2013-04-02 15:24:12 -07:00
Mutwin Kraus a9c74762cc Add focusPreviousPane to pane container 2013-04-02 15:24:12 -07:00
Garen Torikian 936d4f6d53 Merge branch 'nak-powered-search' of github.com:github/atom into nak-powered-search 2013-04-02 14:57:40 -07:00
Garen Torikian f33a8538e3 Bump nak version to allow for multiple matches 2013-04-02 14:57:20 -07:00
Nathan Sobo 1bbc9f61e9 Remove unsaved buffer prompt on reload now that we handle it correctly 2013-04-02 15:45:17 -06:00
Nathan Sobo dab8c5b53b Assign cachedDiskContents when unsaved buffer is deserialized
This allows the buffer to return to an "unmodified" state if the
unsaved changes are reversed.
2013-04-02 15:45:16 -06:00
Nathan Sobo 3150785db2 Ensure we never deserialize two instances of the same buffer
We might have two edit sessions pointing to the same buffer, for
example if we have a split pane… So when we deserialize a buffer, we
always need to check that we don't already have an instance of that
buffer on the project. If we do, then we've already deserialized it
once so we don't need to worry about the saved text.

We still have a problem when deserializing previously unsaved buffers,
because we can't use the path to identify them.
2013-04-02 15:45:16 -06:00
Nathan Sobo f531d36060 Condense / cleanup TextBuffer serialization specs
Typically it's fine to test serialization behaviorally. If we can
deserialize the serialized state correctly, then we're generally
happy. We don't need explicit tests on the serialized state… but I
added a couple assertions to ensure we don't write text when we don't
need to. It would have been more correct to just modify the saved
file and verify we load the new state, but it's not worth the hassle.
2013-04-02 15:45:16 -06:00
Nathan Sobo 9efc326ff3 Remove spec that can be covered in text-buffer specs 2013-04-02 15:45:16 -06:00
Nathan Sobo e8216a8313 Don't store @project reference inside TextBuffer. Use the global. 2013-04-02 15:45:16 -06:00
Nathan Sobo 78211acafd Use project.bufferForPath to build buffers in specs
This reflects the way buffers should always be created in practice. It
registers buffers on project, which will be important when testing
that we always get the same buffer when deserializing a buffer for a
path we've already opened.
2013-04-02 15:45:16 -06:00
Nathan Sobo 40975f15d3 💄 Follow whitespace conventions for specs 2013-04-02 15:45:16 -06:00
Mutwin Kraus cc87595e4e Serialize TextBuffer inside EditSession serialize 2013-04-02 15:45:16 -06:00
Mutwin Kraus 693d8258ad Preserve buffer contents for unsaved files when reloading 2013-04-02 15:45:16 -06:00
Kevin Sawicki 9a8fd062c4 Throw error instead of string 2013-04-02 14:40:55 -07:00
Kevin Sawicki 07b40265fb Log error when no stack exists 2013-04-02 14:40:30 -07:00
Kevin Sawicki 699212a13e Always pull line text from buffer
This accounts for positional changes that may occur if the marker
the operation is tracking moves.
2013-04-02 14:24:36 -07:00
Garen Torikian 7b0ce258d1 Merge branch 'nak-powered-search' of github.com:github/atom into nak-powered-search 2013-04-02 14:12:47 -07:00
Garen Torikian 7ab79d05f0 Merge master 2013-04-02 14:12:20 -07:00
Kevin Sawicki 1ee5eb32b4 Restore scan spec asserts now that leading space is gone 2013-04-02 14:10:30 -07:00
Garen Torikian 206b58a86c Merge branch 'nak-powered-search' of github.com:github/atom into nak-powered-search 2013-04-02 14:05:00 -07:00
Garen Torikian 7caddc6c10 Put the Expand/Collapse buttons back 2013-04-02 14:04:38 -07:00
Garen Torikian 0b6c817f0a First drop of comments 2013-04-02 14:00:56 -07:00
Kevin Sawicki 9b19b4512f Use getBufferRange() when previewing
This is for the case where the marker may move between
construction and previewing.
2013-04-02 13:53:49 -07:00
Kevin Sawicki d2f2011ea3 Skip leading space after colon in nak output
This was causing a spec to fail since the line text now had a leading
space for all results since the separator before the line text is now
': ' instead of just ':'.
2013-04-02 13:50:48 -07:00
Kevin Sawicki d64c3e773d 💄 2013-04-02 13:30:39 -07:00
Kevin Sawicki 2ae5cacc6f Un-f project spec 2013-04-02 13:25:21 -07:00
Kevin Sawicki 3cfbbc5d94 Attach to DOM in specs that alter the mini editor
This is now required since populateList() is only
calls when the timeout is fired and the select list
is still on the DOM.
2013-04-02 13:22:46 -07:00
Kevin Sawicki f3e1a72882 Only populate list from timeout when still on DOM 2013-04-02 13:14:56 -07:00
Kevin Sawicki 0e1adddd2f Remove double de-duplication of paths 2013-04-02 09:32:08 -07:00
Kevin Sawicki 995ae4c9e2 Merge branch 'absolute-paths-in-fuzzy-finder' 2013-04-02 09:28:53 -07:00
Kevin Sawicki 4ce4529022 Use absolute paths in specs 2013-04-02 09:17:53 -07:00
Kevin Sawicki cb1d9af06e Only add folder span if project-relative path isn't empty 2013-04-02 09:12:39 -07:00
Kevin Sawicki 2e0a6af8ca Add back serializiation of last opened time 2013-04-02 09:04:42 -07:00
Kevin Sawicki e3236675c9 Upgrade to coffee 1.6.2 2013-04-02 08:28:30 -07:00
Kevin Sawicki 4971a73c01 Merge branch 'master' into tweak-coffee 2013-04-02 08:27:35 -07:00
probablycorey bd3eb02b1b Remove sortable list class
Because sortable list was only being used by tab bar view, I got rid
of the class hierarchy.
2013-04-01 17:10:48 -07:00
probablycorey 7e2ea8aff1 Allow tabs to be moved to the beginning and end of the tab bar
Closes #409 (409, puts grease on the run! http://www.dailymotion.com/video/xxsbbb_formula-409-1990-puts-grease-on-the-run-commercial-2_tv#.UVocOZbF30Y)
2013-04-01 16:46:57 -07:00
probablycorey ecb159738f Rename singleTrailingNewline to ensureSingleTrailingNewline 2013-04-01 10:44:34 -07:00
probablycorey 66044175cc Add spec for when singleTrailingNewline is false 2013-04-01 10:44:34 -07:00
probablycorey 326bfe1188 default singleTrailingNewline to true 2013-04-01 10:44:34 -07:00
probablycorey 875474d496 💄 2013-04-01 10:44:34 -07:00
probablycorey 32c950dee8 Rename strip-trailing-whitespace package to whitespace
Because it does more than strip trailing whitespace
2013-04-01 10:44:34 -07:00
probablycorey 6052a90ce9 Remove auto-indent gfm spec 2013-04-01 09:58:31 -07:00
Garen Torikian 6066030059 Test it out 2013-04-01 09:49:53 -07:00
probablycorey aea27ff779 Remove auto-indentation for markdown files
Closes #395

@kevinsawicki I couldn't figure out a reason for this
indent pattern? I looked in the TextMate package and I
didn't see it there either.
2013-04-01 09:14:58 -07:00
Garen Torikian a4d8ed6ce6 Bump nak 2013-03-31 17:07:30 -07:00
Garen Torikian ae544e0c7e Bump nak 2013-03-31 01:20:56 -07:00
Garen Torikian da2cea4a24 Hide header on subsequent search 2013-03-31 01:20:50 -07:00
Garen Torikian 6f982c7c4c Fix spec 2013-03-31 01:11:19 -07:00
Garen Torikian 4cd181022d Restore old UI 2013-03-31 01:02:53 -07:00
Garen Torikian f48355ce10 Merge branch 'nak-nostream' into nak-powered-search 2013-03-31 00:45:14 -07:00
Garen Torikian 5e5437502f reset 2013-03-31 00:45:05 -07:00
Garen Torikian ea65421120 Remove streaming changes 2013-03-31 00:30:39 -07:00
Garen Torikian 7f8e2aba1b Stash changes 2013-03-31 00:22:27 -07:00
Garen Torikian 209eceee6a stash 2013-03-30 18:36:50 -07:00
Garen Torikian b8d0544517 Improve UX
Properly compress all results to one heading
Merge Expand/Collapse Button into one
2013-03-30 11:20:27 -07:00
Kevin Sawicki 19162db3ce Clip TextBuffer.characterIndexForPosition() position 2013-03-30 00:47:19 -04:00
Kevin Sawicki da090b57d4 Use line ending length for mapping positions/characters
Previously the line ending length was hard-coded to one which
would cause TextBuffer.scanInRange() to return incorrect results
since one character per line wasn't being accounted for.

Closes #428
2013-03-30 00:30:54 -04:00
Kevin Sawicki dc3b26c934 Add missing 't' in spec file name 2013-03-29 23:55:31 -04:00
Kevin Sawicki 9708f436c5 Remove unneeded empty string span values 2013-03-29 22:21:50 -04:00
Kevin Sawicki 2a2a391d13 Extend highlight span to be entire width of tree
Closes #219
2013-03-29 22:20:26 -04:00
probablycorey d3920cdc05 Click and drag on the gutter selects lines correctly
Closes #352
2013-03-29 17:58:27 -07:00
probablycorey 05336dc38c Fix atom.version spec 2013-03-29 15:24:27 -07:00
probablycorey cf07eef3ae Only change text color when select list item matches :hover
Closes #303
2013-03-29 15:09:53 -07:00
probablycorey 00c1fdce38 Change theme extension to .less 2013-03-29 15:02:45 -07:00
probablycorey 4b146f3459 Remove css extensions from themes package.cson stylesheet list 2013-03-29 15:02:44 -07:00
probablycorey a1e1bee334 Allow theme's package.cson to leave off stylesheet extension 2013-03-29 15:02:44 -07:00
probablycorey 142d18bb7c Add current commit sha to the version 2013-03-29 14:13:46 -07:00
probablycorey 1c5b72e04d Add version to the Atom Helper plist
Closes #368
2013-03-29 14:13:33 -07:00
Corey Johnson & Nathan Sobo 7d9e64a52d Mock getMaxTokensPerLine instead of overwriting member var 2013-03-29 11:22:01 -07:00
Corey Johnson & Nathan Sobo a9175665fa 💄 2013-03-29 11:22:01 -07:00
Kevin Sawicki 3773061cb5 Remove unneeded empty array fallback 2013-03-29 14:15:20 -04:00
Kevin Sawicki 8e9a7355bc Return an empty array when the fs-utils.list() path isn't a directory
This makes the common case of iterating over an array of paths and
listing them cleaner since the return value doesn't need to be checked
before it is iterated over.
2013-03-29 13:44:03 -04:00
Garen Torikian 0a6963a965 Bump node-git to 0.11.0 2013-03-29 09:36:51 -07:00
Garen Torikian 082acf4386 Stash filestream work 2013-03-29 09:35:40 -07:00
Kevin Sawicki 327b49797b Relativize paths to project for folder label 2013-03-28 23:18:34 -04:00
Kevin Sawicki 1ccfbe22dc Remove unneeded unspy calls for setTimeout 2013-03-28 23:12:53 -04:00
Kevin Sawicki 5f9c643ae9 Kill process when task is aborted 2013-03-28 22:52:01 -04:00
Kevin Sawicki 95218ca9f5 Remove commented out logging 2013-03-28 22:29:05 -04:00
Kevin Sawicki 44cd588bf9 Drop unneeded quotes 2013-03-28 22:16:48 -04:00
Kevin Sawicki e5b89e559e 💄 2013-03-28 22:15:12 -04:00
Kevin Sawicki 346a3c94aa Bring back a newline 2013-03-28 22:12:16 -04:00
Kevin Sawicki daf5b9cb14 Un-f fuzzy finder spec 2013-03-28 22:12:03 -04:00
Kevin Sawicki ff471ebf5b 💄 2013-03-28 22:08:53 -04:00
Kevin Sawicki bd48cfced0 Don't track ctrl-click as the start of a selection
Closes #396
2013-03-28 22:06:56 -04:00
probablycorey aab50d3c2c Only parse the first 100 tokens of a line
This fixes the UI thread lockup when there is a gigantic line in a
file (like minified js). I took a stab at making line tokeninization
async on the atom/async-single-line-tokenization branch, but it was
still too slow.

Closes #150
2013-03-28 17:14:45 -07:00
Garen Torikian 226611d2ec Fix fuzzy specs 2013-03-28 13:04:25 -07:00
Garen Torikian 9e3935f349 Fix scan specs 2013-03-28 12:09:14 -07:00
Kevin Sawicki f51102a230 Don't force clean installs
Making clean a pre-req install forces a reinstall and
rebuild of all npm modules and reinstall of cef which
drastically increases the install time even for small
local changes.
2013-03-28 10:09:29 -04:00
Kevin Sawicki b0706ee9fb Update coffee cache path used in clean task 2013-03-28 10:07:17 -04:00
Garen Torikian b298f63e4c Merge master 2013-03-27 19:47:14 -07:00
Garen Torikian af78a6b50f Remove unneeded quotes 2013-03-27 19:40:20 -07:00
Chris Wanstrath 7f8978f07a absolute paths 2013-03-27 19:11:27 -07:00
Chris Wanstrath 764a7bf257 Merge branch 'master' into absolute-paths-in-fuzzy-finder
Conflicts:
	src/packages/fuzzy-finder/lib/load-paths-handler.coffee
2013-03-27 19:10:50 -07:00
Kevin Sawicki d54f2e6eab Only track selections that start with a left-click
Closes #396
2013-03-27 21:06:56 -04:00
Kevin Sawicki a3483d0ffe Remove native injection from web worker contexts
Tasks are now processed based and so web workers no
longer need access to the native extension.
2013-03-27 20:51:01 -04:00
probablycorey 0fe93bef91 StatusBar now triggers grammar-selector:show 2013-03-27 17:34:14 -07:00
probablycorey 72f57ad993 Remove old grammar view files 2013-03-27 17:34:14 -07:00
Kevin Sawicki 70010bad56 Un-f grammar-selector specs 2013-03-27 20:30:22 -04:00
probablycorey 5308e03096 Move GrammarView into GrammarSelector package 2013-03-27 17:02:13 -07:00
Garen Torikian 12bc89ca50 Add newline 2013-03-27 16:48:22 -07:00
Garen Torikian a585df6d2c Use nak for fuzzyfinder, too 2013-03-27 16:45:11 -07:00
probablycorey 8323b0defd 💄 2013-03-27 16:30:33 -07:00
Garen Torikian 6a08827830 Properly append and count matches 2013-03-27 16:18:25 -07:00
Garen Torikian 416f654d2c Restore operations pushing 2013-03-27 15:19:35 -07:00
probablycorey fd7772a653 Reset scrollLeft when setSoftWrapColumn is called
When the scroll view is scrolled and overflow-x is set to 
'hidden' the scroll view renders wrong. Setting scrollLeft to 0 fixes
this problem. I'm unhappy with this solution, but it was a
simple way to get the scroll view to update its layout.

Closes #137
2013-03-27 15:13:55 -07:00
probablycorey a48a52922b Indent soft-wrap spec correctly 2013-03-27 15:13:55 -07:00
Kevin Sawicki 1d84274973 Return existing selections from addSelection()
Previously if a selection was added and then merged
away the selection-added event would still fire even
though the selection was already destroyed.

Now the existing selection that intersects with the
range is returned when the merge destroys the new selection.

Closes #374
2013-03-27 17:59:55 -04:00
Kevin Sawicki b6334483c9 Hide the loading message when eval throws an error 2013-03-27 15:43:09 -04:00
Kevin Sawicki 7f8adf247e Show root view events when no element has focus
Closes #327
2013-03-27 14:28:18 -04:00
Kevin Sawicki 4c9ebc940c Remove unneeded initialization of variable from superclass 2013-03-27 14:28:17 -04:00
Kevin Sawicki d14ddf6f38 Remove unused require 2013-03-27 14:28:17 -04:00
probablycorey a1b82e9dad Allow mini-editors to explicitly set their grammars 2013-03-27 11:00:53 -07:00
Kevin Sawicki 5a7f2a9ef4 Don't show duplicates in open buffer list
Closes #378
2013-03-27 11:56:32 -04:00
Kevin Sawicki 8d22b6d1b3 💄 2013-03-27 11:56:32 -04:00
Cheng Zhao bc211a2231 Should erase cef in rake clean. 2013-03-27 23:09:01 +08:00
Nathan Sobo 38924f5bb8 Upgrade to latest space pen, as an NPM 2013-03-27 11:06:49 -04:00
Garen Torikian 7233d9d64b Start figuring out where the pieces go 2013-03-27 01:06:34 -07:00
Cheng Zhao ac30781db8 Merge pull request #444 from github/process-task
Add ProcessTask
2013-03-26 23:00:03 -07:00
Cheng Zhao 4768ae9008 Rename node-nsspellchecker to node-spellchecker. 2013-03-27 12:25:55 +08:00
Cheng Zhao 7effc4c456 💄 2013-03-27 12:25:55 +08:00
Cheng Zhao 6ce25d4c71 Fix the usage of spawn. 2013-03-27 12:25:54 +08:00
Cheng Zhao 371fdde4f9 Use atom/cefode. 2013-03-27 12:25:54 +08:00
Cheng Zhao b5be1c378a Replace Task's implementation with ProcessTask. 2013-03-27 12:25:54 +08:00
Cheng Zhao 3c5a79710a Use _.isArray to determine whether a value is Array.
When passing arrays between child processes with node's IPC machanism,
`instance of Array` will return false for the deserialized array, we
should use the reiable way of detecting Array provided by underscore.

Read this for more:
http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/

This bug was found when moving spell-check to use ProcessTask, and the
wrong Range object was returned for the passed misspelling value.
2013-03-27 12:25:54 +08:00
Cheng Zhao 3ed35574d4 Use node-nsspellchecker to replace $native's spell checker. 2013-03-27 12:25:54 +08:00
Cheng Zhao 142824ec01 Add test for ProcessTask. 2013-03-27 12:25:54 +08:00
Cheng Zhao 0d7f642675 Add ProcessTask. 2013-03-27 12:25:54 +08:00
Cheng Zhao 67c2a1473c Cefode is using node v0.8.22. 2013-03-27 12:25:54 +08:00
Cheng Zhao 215cd64c9a Use the node binary compiled with V8 used by Chromium.
The official node is using a different V8 version with the one used by
cefode, which causes incompatibility with cefode on native modules, this
special node binary fixes it.

The source code of this node binary can be found at:
https://github.com/atom/cefode-node/tree/chromium-v8
2013-03-27 12:25:54 +08:00
Kevin Sawicki a772a9aa75 Remove unneeded std:: prefix 2013-03-26 23:32:05 -04:00
probablycorey 7e405138fc Beep when only one matches is found by repeatRelativeAddress
Closes #45
2013-03-26 16:45:21 -07:00
probablycorey f817e37a01 Refactor repeatRelativeAddress/repeatRelativeAddressInReverse 2013-03-26 16:45:21 -07:00
probablycorey 2ffb88e936 💄 2013-03-26 16:45:21 -07:00
probablycorey 34f3176259 Add $native.beep
I could have created an npm for this. I also could wash my hands every 10 seconds, but I'm not crazy, so I did neither.
2013-03-26 16:45:21 -07:00
Nathan Sobo d3fa24be57 Remove scoped-properties when deactivating a TextMate package 2013-03-26 17:35:45 -06:00
Nathan Sobo 6a5ca3805e Spec loading of scoped properties when activating TextMate packages 2013-03-26 17:35:44 -06:00
Nathan Sobo eef13e7db8 Test that deferred packages don't require their main module
As opposed to asserting that the main module isn't present, which
might not be true if a previous spec required it.
2013-03-26 17:35:44 -06:00
Nathan Sobo e32d7b1ff1 Remove unused test.tmbundle 2013-03-26 17:35:44 -06:00
Nathan Sobo d8b4beb8bd Now that we remove binding sets, track binding set indices explicitly
Previously we relied on the length of the binding sets, but now that
we remove them the length is not a strictly increasing number. This
could cause problem when using the index to break specificity ties.
2013-03-26 17:35:44 -06:00
Nathan Sobo 1f74b5ccb4 Rename textmate package w/ invalid snippets 2013-03-26 17:35:44 -06:00
Nathan Sobo a07cd87c2c Move testing of deferred deserializers to atom-spec 2013-03-26 17:35:44 -06:00
Nathan Sobo 2fe057bd9b Move deferred activation specs to atom-spec 2013-03-26 17:35:44 -06:00
Nathan Sobo 2ac3af193b Clean up deferred package activation
- Eliminate @deferActivation ivar
- Remove activation event listeners when deactivating unactivated packages
2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo 81d4b764b8 Remove a package's scoped-properties when it is deactivated
Also: don't add the properties until `activate` is called. Previously
we were still adding the properties in the `load` method, which was
wrong.
2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo c8ec73d2f0 Allow scoped-properties to be added/removed by name
Also:
  - remove "global" properties
  - clear scoped properties between specs
2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo 368e10a9f5 Move spec for scoped property loading to atom-spec 2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo 3c561ef208 💄 2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo c8b9622bf4 Move specs for loading config defaults to atom-spec 2013-03-26 17:35:44 -06:00
Corey Johnson & Nathan Sobo 5d822b7305 Remove a package's stylesheets when it is deactivated 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo 1e51750b6c Remove a package's keymaps when it is deactivated 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo 5410e9368f Add ability to add/remove keymaps by name 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo 772787121c Remove atom package grammars on deactivate 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo c1954d869a Add tests for TextMateGrammar@loadSync 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo d37fbd43f1 Test that atom packages load their grammars 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo de7d9bfcb1 Get deactivatePackage specs passing w/ new fixture data 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo 8c1f5658be Allow packages to have stylesheet manifests 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo c8804359c9 Rename fs -> fsUtils in atom-package 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo b846a4db98 wip: cleanup package lifecycle specs 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo 643a5c6d0e 💄 2013-03-26 17:35:43 -06:00
Corey Johnson da016114b6 Add specs for activating and deactivating TextMate packages 2013-03-26 17:35:43 -06:00
Corey Johnson & Nathan Sobo 8437f3ff7f Only load TextMate packages as needed in specs
Also: when a TextMate package is deactivated, remove its grammars
2013-03-26 17:35:42 -06:00
Corey Johnson & Nathan Sobo 8340a084d3 Kill vestiges of CSON from TextMatePackage 2013-03-26 17:35:42 -06:00
Nathan Sobo a41e3c1ebb Don't clear loaded packages between specs 2013-03-26 17:35:42 -06:00
Nathan Sobo bb8b3782b9 Serialize package states independently of RootView
Previously, package specs needed to deactivate the root view to test
their package serialization. Now, specs can just deactivate and then
reactivate the package, relying on serialization infrastructure that's
independent of the lifecycle of the RootView.
2013-03-26 17:35:42 -06:00
Nathan Sobo f5774972e9 Add atom.deactivatePackage(id)
It serializes the package state to the atom.packageStates hash when
the package is deactivated, which means we will be able to test 
package serialization independent of the overall window lifecycle by
just deactivating and re-activating the package.
2013-03-26 17:35:42 -06:00
Nathan Sobo e3ddc3f29b Kill window.loadPackage spec helper. We use built-in methods now. 2013-03-26 17:35:42 -06:00
Nathan Sobo 4510d31301 Pass options through when loading packages 2013-03-26 17:35:42 -06:00
Nathan Sobo 58ef6c6582 Use atom.activatePackage directly in specs 2013-03-26 17:35:42 -06:00
Nathan Sobo 054626a9a2 Add 'immediate' option to atom.activatePackage to suppress deferral 2013-03-26 17:35:42 -06:00
Nathan Sobo 6e238967a4 💄 Rearrange methods 2013-03-26 17:35:42 -06:00
Nathan Sobo ae444d1ea3 Add atom.activatePackage(id) method
It will load the specified package if it hasn't already been loaded.
2013-03-26 17:35:42 -06:00
Nathan Sobo b64f5b2a85 Add atom.loadPackage(id). Rewrite loadPackages in terms of it. 2013-03-26 17:35:42 -06:00
Nathan Sobo c51f1d2c52 💄 2013-03-26 17:35:41 -06:00
Nathan Sobo d3099cb682 Don't add grammars for atom packages until activate is called 2013-03-26 17:35:41 -06:00
Nathan Sobo bf7e586e6a Don't apply stylesheets until active is called for atom packages 2013-03-26 17:35:41 -06:00
Nathan Sobo af06575aad Don't add AtomPackage keymaps until activate is called 2013-03-26 17:35:41 -06:00
Nathan Sobo 7a4f5ad9d1 Wait until TextMate packages are activated to add grammars/properties
My plan is to cache the loading of packages so we don't have to load
them from the disk repeatedly in specs. The first step of this is
ensuring that load has no side-effects.
2013-03-26 17:35:41 -06:00
Garen Torikian 280e527f5a Remove unneeded vendor binarys 2013-03-26 15:03:10 -07:00
Garen Torikian 02873f5116 drop in nak for search 2013-03-26 15:02:48 -07:00
probablycorey 187263173b Only exit specs on exceptions when exitWhenDone is true 2013-03-26 14:57:03 -07:00
probablycorey 75fbab94b1 Make npm install quieter 2013-03-26 14:32:40 -07:00
Kevin Sawicki 4fddae68a9 Set the min-width on the gutter to 1em
This ensures the text will have padding on the left side even
when line numbers are disabled.
2013-03-26 17:30:49 -04:00
probablycorey 60189c0135 exit(1) when spec-bootstrap throws an error 2013-03-26 14:20:03 -07:00
Kevin Sawicki 00fd7fc00f Add Go Textmate bundle as submodule 2013-03-26 17:11:26 -04:00
Kevin Sawicki 8cbccafe08 Upgrade to git-utils 0.8.0 2013-03-26 17:08:00 -04:00
Kevin Sawicki 9e674d52ac Upgrade to oniguruma 0.8.0 2013-03-26 17:05:30 -04:00
Kevin Sawicki 4e9b33075f Upgrade to ctags 0.3.0 2013-03-26 17:03:33 -04:00
Kevin Sawicki d58b1d5b72 Hide the 💀 dev button in full screen mode
Closes #417
2013-03-26 16:33:04 -04:00
Kevin Sawicki 858f58da97 Precompile less files to css during build
This mirrors the CSON to JSONS compilation step.

Closes #440
2013-03-26 12:05:12 -04:00
Kevin Sawicki 43dc7fcf9e Correct typo in error message 2013-03-26 11:45:47 -04:00
Cheng Zhao c9cb5016b7 Script to translate addresses in crash log into function lines. 2013-03-26 15:47:30 +08:00
Kevin Sawicki 6d2805d782 Drop extension from requireStylesheet() 2013-03-26 00:15:32 -04:00
Kevin Sawicki fab5842651 Support requiring stylesheets without an extension
Stylesheets will attempt to be resolved with both css
and less extensions if no extension is included in the
path specified to requireStylesheet().
2013-03-26 00:11:11 -04:00
Kevin Sawicki 844f5343c2 Remove executable bit from reset stylesheet 2013-03-25 22:59:17 -04:00
Kevin Sawicki 0887ec2e55 Move fuzzy finder stylesheet into package directory 2013-03-25 22:58:40 -04:00
Kevin Sawicki 68dc76def3 Move command panel stylesheet into package directory 2013-03-25 22:56:51 -04:00
Kevin Sawicki 5a4108f3c8 Consolidate tree-view stylesheets 2013-03-25 22:56:00 -04:00
Kevin Sawicki a83cb88630 Move tabs stylesheet into package directory 2013-03-25 22:54:45 -04:00
Kevin Sawicki a52c516c88 Move status bar stylesheet into package directory 2013-03-25 22:53:42 -04:00
Kevin Sawicki 3514ee5659 Remove unused event.coffee 2013-03-25 18:06:54 -04:00
Kevin Sawicki 6f8c07e917 Enforce stricter requirements for Editor.getPane()
Previously it would return the closest '.pane' element
which would cause an editor inside of another editor
to report having a pane such as in the autocomplete view.
2013-03-25 17:10:33 -04:00
Kevin Sawicki 67adce6a99 Perform directory check with single stat call 2013-03-25 16:54:39 -04:00
Kevin Sawicki 513ed3b4b1 Show symlink file icon in tree view 2013-03-25 16:51:39 -04:00
Corey Johnson 502d3c2957 Move gutter padding out of .line-number to .gutter
This makes viewing an editor without line numbers prettier.
2013-03-25 10:40:02 -07:00
Corey Johnson ec4bb162c3 Add editor.showLineNumbers config option
Also adds toggle-line-numbers command. Closes #377
2013-03-25 10:38:06 -07:00
Kevin Sawicki 7756f8e86d Show ignored icon in status bar 2013-03-25 12:00:11 -04:00
Kevin Sawicki 9604d81ec8 Update titles after adding/removing tabs
The duplicate title detection requires the tab be on the DOM
so update the title after it is inserted and also update titles
of remaining tabs after one is removed so long titles being used
can go back to short titles if no other tab title duplicates exist.

Closes #446
2013-03-25 11:32:37 -04:00
Kevin Sawicki 0080e09065 Only check for back references in end patterns
Back references can occur in match values but should not
be treated differently when present there since they refer
to groups inside the match.

Close #370
2013-03-24 23:25:00 -04:00
Cheng Zhao 5015ca94bc Ignore vim swap file. 2013-03-24 19:54:14 +08:00
Cheng Zhao f969927c69 💄 2013-03-24 19:53:51 +08:00
Cheng Zhao e4995091d3 Always check and download newest cefode. 2013-03-24 13:43:19 +08:00
Kevin Sawicki 74e7fbc76d Remove logging of index URL 2013-03-23 20:29:53 -07:00
Kevin Sawicki 36e7351ba3 💄 2013-03-23 09:01:02 -07:00
Kevin Sawicki 7a56d4080c Hide the grammar name when it is the null grammar 2013-03-23 09:00:54 -07:00
Kevin Sawicki e0a93ed1c2 Emit a grammar-changed event from edit session
This event is now listened for from the editor and
re-emitted under the editor namespace.  This removes
the need to monitor the syntax's grammars-loaded event
from both places and also mirrors the behavior of the
path-changed event.
2013-03-23 09:00:44 -07:00
Nathan Sobo adcfcb7897 Trigger 'grammars-loaded' when TextMate packages finish loading
This is a temporary solution so we can merge async textmate package
loading. I'd like to dispense with this event and consider each
grammar individually as they are loaded. But this makes the behavior
compatible with the old background-task-based behavior.
2013-03-22 17:35:35 -06:00
Nathan Sobo a05405370c Serialize the syntax object's grammar overrides with window state 2013-03-22 17:35:35 -06:00
Corey Johnson & Nathan Sobo db4420e068 Move grammar overrides to syntax (no serialization yet) 2013-03-22 17:35:35 -06:00
Corey Johnson & Nathan Sobo dacb00ed67 Simplify grammar selection and its specs 2013-03-22 17:35:34 -06:00
Corey Johnson & Nathan Sobo bfd2667c51 Don't throw exceptions from Directory.getEntries for non-files
Just don't create entry objects for them.
2013-03-22 17:35:34 -06:00
Nathan Sobo 2416ff19a4 Add NullGrammar to obviate synchronous load of text grammar on start
It's also an extremely simple grammar, so we'll do less work to
initially tokenize open buffers before loading their real grammars.
2013-03-22 17:35:34 -06:00
Nathan Sobo a2f72882d7 Rename grammarForFilePath to selectGrammar
The old name was misleading because it the decision is based on the
file contents in some circumstances.
2013-03-22 17:35:27 -06:00
Nathan Sobo ab934cfbfb Replace LoadTextMatePackagesTask with async grammar loading 2013-03-22 15:29:07 -06:00
Nathan Sobo 8e57ee2776 Import Node's fs in text-mate-package; rename existing fs to fsUtils 2013-03-22 15:29:07 -06:00
Nathan Sobo d3ead2a0d1 Update fs.list to use readdirSync and filterExtensions helper 2013-03-22 15:29:07 -06:00
Nathan Sobo a5dcd71548 Add fs.listAsync 2013-03-22 15:29:07 -06:00
Corey Johnson 93bef861df Remove unused stdlib files 2013-03-22 13:51:09 -07:00
John Barnette 7e6dc68bca We have node now, so kill our path module 2013-03-22 13:51:09 -07:00
Kevin Sawicki & Nathan Sobo e23edd02fd Use flexbox to position editor's gutter and scroll view
This removes the need to compute the width of the gutter based
on the line count in the editor and also removes the need to
set the scroll view's left position manually.
2013-03-22 12:47:56 -07:00
Corey Johnson & Nathan Sobo 84fe0a384d Pop grammar rules that result in infinite loops 2013-03-22 11:42:47 -07:00
Kevin Sawicki 266c305ebb Implement getPath() in markdown preview view
This allows it to be shown in the tree view when the
reveal command is triggered.
2013-03-22 09:55:21 -07:00
Kevin Sawicki 3d6dbf6d59 Include path instead of file in thrown error 2013-03-22 09:50:11 -07:00
Kevin Sawicki 49d1801742 Remove dead code 2013-03-22 09:33:18 -07:00
Cheng Zhao 955fa78d51 Update cefode: fix #434 and fix #404. 2013-03-22 10:52:22 +08:00
Kevin Sawicki 712ba2c3fa Clear all syntax subscriptions after spec runs
The global syntax object is reused between specs so
each spec should start off with a clean listener list.
2013-03-21 18:46:08 -07:00
Corey Johnson & Nathan Sobo 1ad5327c99 Ensure we never load saved window in specs 2013-03-21 18:51:32 -06:00
Corey Johnson & Nathan Sobo f4d339ccac Unify root view state with window state 2013-03-21 18:24:21 -06:00
Corey Johnson & Nathan Sobo 84244a4c22 🙊 2013-03-21 18:24:21 -06:00
Kevin Sawicki a362a14f75 Only add view when grammars-loaded event fires
Previously the views would be added immediately
if more than one grammar was already registered.

This was unneeded since the event will always fire
after the package is activated.
2013-03-21 17:22:39 -07:00
Kevin Sawicki f8ffe1c408 Only delete to end row when greater than start row
Closes #442
2013-03-21 17:07:36 -07:00
Kevin Sawicki be9ffc499f Upgrade to oniguruma 0.7
Includes support for matches in strings with multi-byte
characters.

Closes #430
2013-03-21 16:56:23 -07:00
Corey Johnson & Nathan Sobo ef595c74ef Update GFM snippets to atom syntax instead of textmate 2013-03-21 16:17:50 -06:00
Corey Johnson & Nathan Sobo b169759f98 Flip version to 2.0 so we don't auto-upgrade after rake install 2013-03-21 16:01:52 -06:00
Corey Johnson & Nathan Sobo 2f3b4b9e5f Move scoped properties out of the grammar file and into a directory
Closes #435
2013-03-21 14:07:32 -07:00
Corey Johnson & Nathan Sobo 0b719bfecf Atom packages can load cson grammars and TextMate packages can't 2013-03-21 13:26:56 -07:00
Kevin Sawicki 1929899365 Remove z-index on editor stats
Wasn't needed now that it just sits below the status bar.

Closes #389
2013-03-21 11:28:16 -07:00
Kevin Sawicki 6e472064dd Add Mustache bundle as a submodule
Closes #398
2013-03-21 11:13:07 -07:00
Kevin Sawicki b006841fa7 Install npm locally and use during bootstrap
This ensures the expected version is used regardless
of the global version already installed.

Closes #439
2013-03-21 10:56:43 -07:00
Kevin Sawicki 4b5d375638 Merge pull request #431 from github/cefode
Support node API
2013-03-21 10:17:31 -07:00
Kevin Sawicki 39ee6f66ba Remove unused import 2013-03-21 10:02:14 -07:00
Cheng Zhao 95090d735e Update cefode: Fix crash when throwing exception from window context. 2013-03-21 21:56:45 +08:00
Kevin Sawicki 71f28ad9e5 💄 2013-03-20 18:50:20 -07:00
Kevin Sawicki 77b7e71920 Move jasmine-helper from vendor/ to spec/ 2013-03-20 18:38:19 -07:00
Kevin Sawicki 8668998b1a Move jasmine-focused to spec folder
This JS file was previously loaded in the vendor folder
even though it was internally written.

It has also been converted to CoffeeScript.
2013-03-20 18:36:55 -07:00
Kevin Sawicki 661ef175d5 Remove $native.getPlatform()
process.platform should now be used instead.
2013-03-20 17:51:51 -07:00
Kevin Sawicki efe44fd78c Upgrade to git-utils 0.7.0 2013-03-20 16:52:17 -07:00
Kevin Sawicki 912b9292c4 Upgrade to ctags 0.2.0 2013-03-20 16:12:09 -07:00
Kevin Sawicki 1051ad83c8 Use async queue in fs-utils traverseTree()
This removes the need for tracking when the traversal is done.
2013-03-20 15:54:23 -07:00
Kevin Sawicki 61cc592605 Use absolute paths in Editor.reloadGrammar() specs 2013-03-20 15:04:20 -07:00
Kevin Sawicki 529b3ac583 💄 2013-03-20 14:56:27 -07:00
Kevin Sawicki a55fdc7551 Return absolute paths from resolve methods
This mirrors the behavior of require.resolve for
all the resolve methods provided by fs-utils.
2013-03-20 14:52:48 -07:00
probablycorey d2b2c6fc8d Remove unused code 2013-03-20 14:33:52 -07:00
Kevin Sawicki 5f771978ac Update path when move events occur 2013-03-20 14:18:40 -07:00
Corey Johnson & Kevin Sawicki 6c357aaca7 Make paths absolute before calling $native.watchPath
Also return a subscription that can be unwatched instead
of returning an id that is later passed to $native.unwatchPath
along with the watched path.

This allows specs to pass when run from a symlink'ed folder.
2013-03-20 13:27:49 -07:00
Kevin Sawicki ae96a48572 Call populateProjectPaths when callback completes
This removes duplicate code for the cases when a callback
is used and when the view already has populated paths.
2013-03-20 11:59:38 -07:00
Kevin Sawicki & Nathan Sobo 2f190025a9 Use new parseFileSync method of plist npm 2013-03-20 10:59:54 -06:00
Kevin Sawicki & Nathan Sobo 46f0bfb991 Kill dead code 2013-03-20 10:55:00 -06:00
Kevin Sawicki & Nathan Sobo 38e8f0494d Merge branch 'cefode' of https://github.com/github/atom into cefode 2013-03-20 10:50:37 -06:00
Kevin Sawicki & Nathan Sobo 501dc9b76c Merge remote-tracking branch 'origin/master' into cefode
Conflicts:
	native/v8_extensions/native.mm
	spec/app/config-spec.coffee
	spec/app/window-spec.coffee
	spec/spec-helper.coffee
	spec/stdlib/fs-utils-spec.coffee
	src/app/atom-package.coffee
	src/app/config.coffee
	src/app/window.coffee
	src/packages/fuzzy-finder/lib/load-paths-handler.coffee
	src/packages/markdown-preview/lib/markdown-preview-view.coffee
	src/packages/tree-view/spec/tree-view-spec.coffee
	src/stdlib/require.coffee
2013-03-20 10:46:50 -06:00
Cheng Zhao 977941655f Updae cefode: make sure exceptions thrown in node context can show in devtools. 2013-03-21 00:37:25 +08:00
probablycorey 9c6978e913 Operation creates a marker immediately when given a buffer 2013-03-19 14:32:25 -07:00
Corey Johnson & Nathan Sobo aae705e82c Run rake clean before running tests 2013-03-19 12:33:16 -07:00
Corey Johnson & Nathan Sobo dfa91f0f3c Use explicit path for node-gyp 2013-03-19 12:32:50 -07:00
probablycorey 35ab49eff0 SelectAllMatchesInProject Operations create buffers on demand 2013-03-19 11:30:49 -07:00
Corey 1f23fa8cfc 💄 2013-03-19 11:30:49 -07:00
Corey Johnson 4702f3775d Calling collapseAllPaths creates elements for every Dom node 2013-03-19 11:30:48 -07:00
Corey Johnson & Nathan Sobo 10f405f61f Create preview list Dom elements only when needed 2013-03-19 11:30:48 -07:00
Corey Johnson 6b3d527dda Add one operations at a time to PathViews 2013-03-19 11:30:48 -07:00
Corey Johnson 014d5e7bb3 Remove setLineNumberWidth 2013-03-19 11:30:48 -07:00
Corey Johnson 7798f04cc4 Index variable from operations is not longer used 2013-03-19 11:30:48 -07:00
Corey Johnson 919cee3e4a Allow operations to be added to a PathView 2013-03-19 11:30:48 -07:00
Nathan Sobo e7f371ac62 Nuke node_modules before 'rake test' 2013-03-19 12:17:29 -06:00
Nathan Sobo 4a203a9eb6 Use plist NPM instead of vendor/plist.js. Use new synch parsing api.
This also adds a `readObject` method to `fs-utils`, which loads the
file as cson if it ends with json/cson, and otherwise tries to load
it as a plist.

For now, we're using my fork which is tolerant to a node environment
with a `window` global and suppresses some logging of non-fatal
errors. If the upstream author accepts my pull requests we can switch
back.
2013-03-19 11:32:23 -06:00
Nathan Sobo 5270a99f7b Use eachSeries to load snippets so we don't exhaust file descriptors 2013-03-19 11:32:23 -06:00
Nathan Sobo 91587cbb99 Guard loadAtomSnippets against non-existent snippet directories 2013-03-19 11:32:23 -06:00
Corey Johnson & Nathan Sobo dfecef24e9 Only load necessary packages in snippets spec 2013-03-19 11:32:15 -06:00
Nathan Sobo e5436974eb Replace snippet loader task w/ async loading 2013-03-18 14:57:09 -07:00
Kevin Sawicki b01a3ff9cc Release repo when destroy is called 2013-03-17 21:46:26 -05:00
Kevin Sawicki cdb7f14c03 Release repository when worker is done
Closes #414
2013-03-17 17:22:34 -05:00
John Barnette c720274221 Alphabetize flags 2013-03-15 19:49:19 -07:00
John Barnette e5f6133e40 Bump vendored CS to 1.6.1 2013-03-15 19:47:12 -07:00
John Barnette 8a1c16c35e Enable source maps
We'll figure out how to use them later.
2013-03-15 13:32:57 -07:00
John Barnette c1b22cfa90 Bump coffee-script to 1.6 2013-03-15 13:26:29 -07:00
Cheng Zhao a9b9e5651f Update cefode: speed up node's requrie by removing exceptions. 2013-03-16 00:43:43 +08:00
Nathan Sobo 875fbba024 Measure spec suite require time 2013-03-15 09:09:56 -06:00
Nathan Sobo 44f53e5ed0 Merge remote-tracking branch 'origin/dev' 2013-03-14 19:08:06 -06:00
John Barnette 09259a579d Let's not accidentally publish this ❤️ 2013-03-14 18:06:55 -07:00
Chris Wanstrath 74c1e64bdb use full paths in meta-t 2013-03-14 17:41:17 -07:00
John Barnette d120804520 Merge remote-tracking branch 'origin/master' into absolute-paths-in-fuzzy-finder 2013-03-14 16:57:19 -07:00
John Barnette 694b499b21 Only relativize stuff under the project root 2013-03-14 16:53:33 -07:00
Nathan Sobo fc7eaf57fc Add window.profile, which is like measure but also records a profile 2013-03-14 17:47:07 -06:00
Nathan Sobo 836ff53ef3 Load index.html based on the resource path
Node uses the location of index as a starting point when looking for
node_modules. Previously, we always loaded index.html out of the app
bundle, which caused us to always load node_modules from the app
bundle as well, which is not what we want in dev mode. Since we no
longer depend on a compiled require.js, it's just as easy to load
index.html from the repository path when in dev mode.
2013-03-14 17:46:25 -06:00
Nathan Sobo a1882ffd1f Move "GitHub" special-case to _.capitalize. Add specs. 2013-03-14 11:35:06 -06:00
Nathan Sobo 634117ed66 Make $.fn.document always take event name / doc string args
It's simpler and we don't use the other syntax right now.
2013-03-14 11:34:28 -06:00
Nathan Sobo 25839c5cf5 Add spec coverage for $.fn.command 2013-03-14 11:25:33 -06:00
Cheng Zhao 12d3686cb6 Update cefode: fix crash when throw error from node module's callback. 2013-03-14 19:24:30 +08:00
John Barnette eb5d0fe3f5 Actually make doc: work 2013-03-13 21:30:00 -07:00
John Barnette 460577d9ae Spike optional doc: key for command
This isn't working yet.
2013-03-13 19:40:35 -07:00
Nathan Sobo aba0f8e362 Change condition for installing a local node-gyp 2013-03-13 18:58:33 -06:00
Kevin Sawicki 8dbcb44d06 Rename traverseTree to traverseTreeSync
Also rename traverseTreeAsync to traverseTree
2013-03-13 14:40:31 -07:00
Kevin Sawicki 8fe9e31c08 Don't use a web worker for loading all paths
Instead use  fs.realpath() and fs.stat() to walk the project
tree asynchronously.
2013-03-13 11:29:40 -07:00
Cheng Zhao 20e2f2bb7c Update cefode.
This fixed two crashes:
1. (message loop) Crash occurred from micro webkit supression.
2. (cef) Random startup crash caused by proxy service initialization.
2013-03-14 01:15:18 +08:00
Kevin Sawicki 0df07a8c29 Upgrade to git-utils 0.5 2013-03-13 09:07:22 -07:00
Kevin Sawicki 2b35eaa414 Update python bundle to 70dd4be
Adds .gypi to file types
2013-03-13 08:42:23 -07:00
Cheng Zhao c393a0677e Update cefode for child_process.fork. 2013-03-13 21:57:12 +08:00
Cheng Zhao 347ba6c7ee Bundle offical node binary with Atom.
This is required for using child_process.fork.
2013-03-13 20:15:41 +08:00
Kevin Sawicki 65d5e631f8 Remove $native.absolute()
fs-utils.absolute() now recreates the same behavior
but instead using fs.readpathSync().

This brings over the same behavior for special handling
the /private directory for now.
2013-03-12 19:41:42 -07:00
John Barnette b27a465e2f Use absolute paths inside fuzzy-finder
This allows paths from outside the current project root to sanely
coexist in the buffer list.
2013-03-12 18:37:02 -07:00
Kevin Sawicki 426fc7ffc8 Remove themes from node search path 2013-03-12 18:03:47 -07:00
Kevin Sawicki 990f5a92ce Remove vendor/packages from search paths
This folder only contains text mate bundles which
can't be directly required.
2013-03-12 17:58:32 -07:00
Kevin Sawicki c64d07d506 Return false if stat exception is thrown
Calling exists() and then statSync() ends up stat'ing
the file twice so removing the exists() check saves a stat
call.
2013-03-12 17:49:11 -07:00
Kevin Sawicki 8f177c3835 Remove unused $native.md5ForPath() 2013-03-12 17:43:33 -07:00
Kevin Sawicki 3a3f4e2ce6 Use pegjs node module 2013-03-12 17:41:18 -07:00
Kevin Sawicki e091f48b81 Only search in benchmark and spec when running specs 2013-03-12 17:33:21 -07:00
Corey Johnson 3ec74f3211 Move toExistOnDisk matcher to spec helper 2013-03-12 16:55:28 -07:00
Corey Johnson c236325c1a Log errors (instead of crashing) when the config file cannot be parsed
Also, config won't overwrite changes to config.cson when the file can not be parsed. Closes #401
2013-03-12 16:47:26 -07:00
Corey Johnson f7f034ad2a Remove core:close event from window 2013-03-12 15:55:30 -07:00
Corey Johnson 4755233f92 💄 2013-03-12 15:55:30 -07:00
Corey Johnson d916962a80 Defer window close events until all modified pane items are handled
If the user presses cancel, the close event is canceled
2013-03-12 15:55:30 -07:00
Corey Johnson 44d4dc7e60 Use URI in prompt message if pane item doesn't have a title 2013-03-12 15:55:30 -07:00
Corey Johnson 9860f32d4c Add cancel callback to promptToSaveItem 2013-03-12 15:55:30 -07:00
Kevin Sawicki & Nathan Sobo 879f4e92a6 Remove require.coffee 2013-03-12 14:59:42 -07:00
Kevin Sawicki & Nathan Sobo aaf0d48edf Use coffee-cache module 2013-03-12 14:59:21 -07:00
Kevin Sawicki & Nathan Sobo 051decc08c Use fs.resolveOnLoadPath() instead of require.resolve() 2013-03-12 14:42:24 -07:00
Kevin Sawicki & Nathan Sobo d8a3848c1a Round top position before comparing to height 2013-03-12 14:40:39 -07:00
Kevin Sawicki e461c4d94a 💄 2013-03-12 13:49:28 -07:00
Kevin Sawicki 4939b636da Add missing spec segment to fixture packages path 2013-03-12 13:48:43 -07:00
Kevin Sawicki c61bf804a4 Add root resource path as last searched path 2013-03-12 13:41:27 -07:00
Kevin Sawicki e601c6e256 Use fs.resolveOnLoadPath() to find ctags executable 2013-03-12 13:37:12 -07:00
Kevin Sawicki 96a949983c Use fs.resolveOnLoadPath() instead of require.resolve() 2013-03-12 13:33:25 -07:00
Kevin Sawicki 8b82c06c6f Include fixtures/packages in resource paths when running specs 2013-03-12 13:32:21 -07:00
Kevin Sawicki eea02cb807 Remove unneeded coffee-script require
This is handled by the wrapper around task-shell
to ensure coffee-script is required before the shell
is.
2013-03-12 13:06:23 -07:00
Kevin Sawicki 6699941da0 Remove unneeded resolved task shell path 2013-03-12 13:05:51 -07:00
Kevin Sawicki & Nathan Sobo 82bfd83da1 Require task shell path in blob snippet 2013-03-12 13:05:22 -07:00
Kevin Sawicki & Nathan Sobo 5399fdb939 Don't reassign to parameter 2013-03-12 12:17:12 -07:00
Kevin Sawicki & Nathan Sobo 1d1ba5f6d1 Use node's require instead of internal require 2013-03-12 10:38:05 -07:00
Kevin R. Barnes 21cdde1188 Update relative link for key bindings 2013-03-12 09:40:05 -07:00
Kevin Sawicki & Nathan Sobo cec037333f Add all resource paths to NODE_PATH env var 2013-03-12 08:50:09 -07:00
Kevin Sawicki 6f5138a56e Revert "Remove $native.md5ForPath()"
This reverts commit 832df7149e.
2013-03-12 08:23:54 -07:00
Cheng Zhao a5a41cf292 Update cefode to branch 1432 revision 1135. 2013-03-12 20:55:32 +08:00
Kevin Sawicki 115b960ce7 Handle reading and writing in cson.coffee
Moves helpers from fs.coffee to cson.coffee
2013-03-11 22:40:00 -07:00
Kevin Sawicki 832df7149e Remove $native.md5ForPath() 2013-03-11 20:58:57 -07:00
Kevin Sawicki 9330276ae9 Abort task when view is created 2013-03-11 20:57:10 -07:00
Kevin Sawicki 7c04aaf536 Only set project paths if non-empty 2013-03-11 20:57:10 -07:00
Kevin Sawicki ec8a5b368b Use node's crypto from fs.md5ForPath() 2013-03-11 19:20:36 -07:00
Nathan Sobo 66467b3571 Fix markdown preview height. Some styles crept back in during merge. 2013-03-11 20:17:24 -06:00
Kevin Sawicki cc7ddc59ff Set input encoding to utf8 2013-03-11 19:15:49 -07:00
Kevin Sawicki 2a78183a15 Use node's crypto API for pasteboard md5s 2013-03-11 19:07:08 -07:00
Nathan Sobo 35419e8d80 💄 2013-03-11 19:59:18 -06:00
Kevin Sawicki 9139df5779 Remove unused vendor assert.js 2013-03-11 17:36:48 -07:00
Nathan Sobo 214209d2da Add docs about serialization 2013-03-11 18:35:24 -06:00
Corey Johnson 84420553d3 Merge branch 'md-preview-redux' into dev 2013-03-11 17:04:43 -07:00
Corey Johnson 06b63c24dc Merge remote-tracking branch 'origin/dev' into md-preview-redux
Conflicts:
	src/packages/markdown-preview/stylesheets/markdown-preview.css
	static/atom.css
	static/command-panel.css
2013-03-11 17:02:36 -07:00
Corey Johnson & Nathan Sobo b01a4aa041 Allow markdown preview view to be scrolled with core:move-up/move-down 2013-03-11 17:34:59 -06:00
Corey Johnson & Nathan Sobo 7e03880bd0 Add $.fn.scrollUp and .scrollDown
These scroll the element by a small amount up or down.
2013-03-11 17:32:11 -06:00
Kevin Sawicki 10fe754dfd Only install headers if directory does not exist 2013-03-11 15:59:34 -07:00
Corey Johnson & Nathan Sobo 140b22737e Refetch rendered markdown when triggering preview a subsequent time 2013-03-11 16:56:44 -06:00
Corey Johnson & Nathan Sobo 2aefd8ca46 Set overflow hidden on status bar
The octicon was causing overflow, which was making the entire view
scroll because the status bar was bigger than the height used by
flexbox.
2013-03-11 16:52:15 -06:00
Kevin Sawicki 5d8a40d240 Use d3 npm 2013-03-11 15:48:29 -07:00
Kevin Sawicki f3990722e3 Install node-gyp with custom node distribution
This should be done before the rest of the dependencies
are installed to that the correct headers are used for
compiling native modules.
2013-03-11 15:38:15 -07:00
Nathan Sobo 194ac13f43 💄 2013-03-11 16:05:20 -06:00
Nathan Sobo bf7fc39434 Rename AtomPackage.packageMain to .mainModule 2013-03-11 16:04:38 -06:00
Nathan Sobo 50b61f3a00 Test requiring of package main module via deferred deserializer 2013-03-11 15:20:51 -06:00
Nathan Sobo 10d0fdf2d7 Require a deferred package early if needed when deserializing panes
The requiring of a package's main module is now decoupled from package
activation. Non-deferred packages will always be required before the
panes are deserialized. This allows the package to register any
deserializers for objects displayed in the panes.

Deferred packages can contain a 'deferredDeserializers' array in their
package.cson. If we attempt to deserialize an object with a deserializer
in the list, the package's main module will be required first so it has
a chance to register the deserializer. But the package still won't be
activated until an activation event occurs.

We may want to add an additional optional hook called 'load' which is
called at require time. We would not guarantee that the rootView
global would exist, but we could give the package a chance to register
deserializers etc. For now, registering deserializers is a side-effect
of requiring the package.
2013-03-11 15:08:19 -06:00
Nathan Sobo a392174164 Un-f 2013-03-11 14:57:03 -06:00
Kevin Sawicki 2ecb2d9ba1 Remove unneeded _.clone call
This is no longer needed after upgrading underscore which
fixed a bug with object equality across objects created in
different contexts.
2013-03-11 13:39:54 -07:00
Kevin Sawicki 03b32ec29c Use coffee-script node module
This required upgrading underscore which to fix issues
with _.isEqual working across objects created from different
documents.

The upgrade required adding a custom _.isEqual extension that
added back support for object's having an isEqual method that
was removed in underscore 1.4.0.
2013-03-11 13:39:17 -07:00
Kevin Sawicki 2212222c47 Use underscore node module 2013-03-11 11:22:36 -07:00
Corey Johnson 8247e56bef Fix objective-c compiler warning 2013-03-11 10:49:01 -07:00
Corey Johnson 8fec1e82ee Use instantiateWithOwner:topLevelObjects
Removes deprecation warnings
2013-03-11 10:26:46 -07:00
Corey Johnson 634702005d 💄 2013-03-11 10:24:00 -07:00
Corey Johnson 7c47b7f8d4 Pane styling isn't a child of the .root-view class
Panes aren't attached to a root view in spes.
2013-03-11 10:02:19 -07:00
Corey Johnson & Nathan Sobo 478a376c97 Less files work in atom themes 2013-03-11 10:02:19 -07:00
probablycorey 9acd401b9e Use fixture files to requireStylesheet 2013-03-11 10:02:19 -07:00
Justin Palmer 050c376e87 remove old less require spec 2013-03-11 10:02:19 -07:00
Justin Palmer 0624ba6d3f rename remaining static css files to less 2013-03-11 10:02:19 -07:00
Justin Palmer 392b9cfeab command-panel.css -> command-panel.less 2013-03-11 10:02:19 -07:00
Justin Palmer a448a79ae6 atom.css -> atom.less 2013-03-11 10:02:19 -07:00
Justin Palmer 2b66b033e0 add less parsing helper to spec helper 2013-03-11 10:02:19 -07:00
Justin Palmer b9604d1baa reset.css -> reset.less 2013-03-11 10:02:18 -07:00
Justin Palmer e1a9362448 wrap-guide.css -> wrap-guide.less 2013-03-11 10:02:18 -07:00
Justin Palmer 6fd0118d2c tree-view.css -> tree-view.less 2013-03-11 10:02:18 -07:00
Justin Palmer 7ad67e50a6 spell-check.css -> spell-check.less 2013-03-11 10:02:18 -07:00
Justin Palmer 758c9f116f package-generator.css -> package-generator.less 2013-03-11 10:02:18 -07:00
Justin Palmer dcfee2d9d9 markdown preview to less. also seperate out pygments colors 2013-03-11 10:02:18 -07:00
Justin Palmer 03642a2923 editor-stats.css -> editor-stats.less 2013-03-11 10:02:18 -07:00
Justin Palmer 3821a492fc command-logger.css -> command-logger.less 2013-03-11 10:02:18 -07:00
Justin Palmer bd0751e17e braket-matcher.css -> bracket-matcher.less 2013-03-11 10:02:18 -07:00
Justin Palmer 3d3947722f autocomplete.css -> autocomplete.less 2013-03-11 10:02:18 -07:00
Justin Palmer b33494eada -console.log 2013-03-11 10:02:18 -07:00
Justin Palmer 0e2ada4a91 markdown.css -> markdown.less 2013-03-11 10:02:18 -07:00
Justin Palmer b502c811cb move less parsing to requireStylesheet 2013-03-11 10:02:18 -07:00
probablycorey 0b674978db Require will parse .less files into css 2013-03-11 10:02:18 -07:00
Nathan Sobo bf7e2d38f7 Merge pull request #393 from github/fix-cson-dependencies
The CSON library requires the underscore-extensions library
2013-03-11 08:34:28 -07:00
Ben Burkert 6dd9d011aa The CSON library requires the underscore-extensions library. 2013-03-11 10:58:52 -03:00
Kevin Sawicki 9bf7c9459d Upgrade to oniguruma 0.5 2013-03-09 21:28:13 -08:00
Kevin Sawicki e6ec46d7f0 Upgrade to git-utils 0.3 2013-03-09 21:26:18 -08:00
Kevin Sawicki 7c41907a7d Check if path exists before moving
fs.move() no longer throws an exception if the target exists
so check for it explicitly when the dialog is confirmed.
2013-03-09 14:55:17 -08:00
Kevin Sawicki 28f89672d0 Use status helpers from git-utils module 2013-03-09 14:38:04 -08:00
Kevin Sawicki f3049681bd Use git-utils module
Removes the need to include libgit2 as this is now handled by the
git-utils module which provides functions that were previously in
git.mm and git.coffee
2013-03-09 14:34:06 -08:00
Kevin Sawicki 7bee41f1e2 Use git-utils from status handler 2013-03-09 13:59:22 -08:00
Kevin Sawicki 9d706d6d5c Add git-utils dependency 2013-03-09 12:45:42 -08:00
Kevin Sawicki 8cf32149b7 Return absolute paths from $native.traverseTree()
Previously relative paths were generated even though
things like fs.list() and fs.listTree() would just
recombine them with the root path.

Closes #391
2013-03-08 13:44:28 -08:00
Kevin Sawicki 110d3719bb Use actual root path length
Previously a one was added just to use for the
length with the null byte when creating the root
path passed to fts_open.

Closes #391
2013-03-08 13:17:36 -08:00
Corey Johnson & Nathan Sobo f3910ba34e WIP: make markdown preview view serializable 2013-03-08 11:59:49 -08:00
Corey Johnson & Nathan Sobo 06c9a3ac86 Remove empty panes when PaneContainer deserializes 2013-03-08 11:45:20 -08:00
Corey Johnson & Nathan Sobo 8ca8841f9e Make command-panel's editor have -webkit-flex: 1
We moved the setting of flex on editors to the panes stylesheet
previously, but here is another context where we need flex to be
set.
2013-03-08 11:14:44 -08:00
Corey Johnson & Nathan Sobo cf6c46ba3a Tree view deselects entry when active item has no path 2013-03-08 11:10:13 -08:00
Nathan Sobo 22d1336aa0 Apply correct flexbox styling to .pane > .item-views > *
Markdown preview was overflowing because the min-height of flexbox
items is automatically set to min-content. Setting it to 0 ensures that
the item doesn't expand beyond its flex size. Moving this styling to
atom.css ensures that people don't have to work too hard to fit
their views into panes.
2013-03-08 10:56:23 -08:00
Corey Johnson & Nathan Sobo 1561f22853 Clean project before tests are run 2013-03-08 10:26:44 -08:00
Corey Johnson 5cd3dfce8e Add .template extension to package-generator template files
Acutally Closes #359
2013-03-08 09:30:20 -08:00
Corey Johnson 709d9738ef Revert "Exclude package-generator templates from coffee compilation"
This reverts commit f432ad350f.
2013-03-08 09:27:44 -08:00
Corey Johnson f432ad350f Exclude package-generator templates from coffee compilation
Closes #359
2013-03-08 09:16:19 -08:00
Kevin Sawicki 52f7e52255 💄 2013-03-07 19:01:36 -08:00
Kevin Sawicki 99dc796f42 Remove $native calls from require.coffee 2013-03-07 19:00:02 -08:00
Kevin Sawicki 6ba9f24381 Remove unused include 2013-03-07 18:37:33 -08:00
Kevin Sawicki 2f8b1d5e3e Remove $native.remove() 2013-03-07 18:36:20 -08:00
Kevin Sawicki d91c540d47 Remove $native.move() 2013-03-07 18:25:25 -08:00
Kevin Sawicki d55e1bfb67 Remove unused $native.read() 2013-03-07 18:21:36 -08:00
Kevin Sawicki 5202e846de Remove $native.write() 2013-03-07 18:20:29 -08:00
Kevin Sawicki 6abf1ff1aa Remove $native.makeDirectory() 2013-03-07 18:02:55 -08:00
Kevin Sawicki e7050b2083 Remove unused $native.lastModified() 2013-03-07 18:00:35 -08:00
Kevin Sawicki fedf43ca0a Remove $native.exists() 2013-03-07 17:57:28 -08:00
Kevin Sawicki 4bc513a8e3 Remove $native.isFile() and $native.isDirectory 2013-03-07 17:55:13 -08:00
Kevin Sawicki fe172985bb Remove unused $native.traverseTree() 2013-03-07 17:50:12 -08:00
Kevin Sawicki acf5f4ce5e Remove fs/$native.getAllFilePathsAsync()
This was previously only used by project.getFilePath()
which should have been using fs.traverseTree() instead.
2013-03-07 17:48:36 -08:00
Kevin Sawicki 53b3fbfed6 Remove $native.exec 2013-03-07 17:40:47 -08:00
Kevin Sawicki ce8867fac9 Remove unused ChildProcess class 2013-03-07 17:40:24 -08:00
Kevin Sawicki c22d14c5b0 Use child_process.spawn from Project.scan 2013-03-07 17:36:21 -08:00
Kevin Sawicki eddfb8a1bb Remove unused import 2013-03-07 17:08:26 -08:00
Kevin Sawicki 7cfdf0ad9c 💄 2013-03-07 17:07:05 -08:00
Kevin Sawicki 689088c1a8 Report exit status to callback 2013-03-07 17:01:21 -08:00
Kevin Sawicki 01faf6ea1e Create helper to buffer process lines 2013-03-07 16:58:09 -08:00
Kevin Sawicki f3c2b41f4f 💄 2013-03-07 16:11:00 -08:00
Kevin Sawicki beb0754faa Use child_process.exec to chmod atom cli 2013-03-07 16:06:37 -08:00
Kevin Sawicki e36e3c0a78 Merge remote-tracking branch 'origin/dev' into cefode 2013-03-07 16:01:09 -08:00
Kevin Sawicki 0b33c6473e Use child_process.spawn for ctags command 2013-03-07 15:58:30 -08:00
Corey Johnson & Nathan Sobo 7e33bd17e0 Make markdown preview views fit into panes and work w/ a single buffer 2013-03-07 15:49:33 -08:00
Corey Johnson & Nathan Sobo 0f1ffdaee8 Set the window title to 'untitled' when the active item has no title 2013-03-07 15:34:28 -08:00
Kevin Sawicki d59ae44914 Upgrade oniguruma dependency 2013-03-07 15:07:29 -08:00
Corey Johnson & Nathan Sobo e26d2e5637 WIP: Preview markdown in next pane, splitting current pane if needed 2013-03-07 14:53:42 -08:00
Corey Johnson & Nathan Sobo d84614866a Add Pane.getNextPane 2013-03-07 14:32:10 -08:00
Corey Johnson & Nathan Sobo ff50bc2e6f Add toBeInstanceOf and toHaveLength jasmine matchers 2013-03-07 14:32:10 -08:00
Corey Johnson & Nathan Sobo 98c9012bdb 💩 2013-03-07 14:31:04 -08:00
Corey Johnson & Nathan Sobo 0375d7f45a 💄 2013-03-07 14:25:34 -08:00
Corey Johnson & Nathan Sobo 17f4d6f064 EditSession reloads its grammar on the 'grammars-loaded' event 2013-03-07 14:25:14 -08:00
Kevin Sawicki b0ec0cda7f Merge remote-tracking branch 'origin/dev' into cefode 2013-03-07 11:44:46 -08:00
Corey Johnson & Nathan Sobo 39fabaa344 Update RootView.deserialize specs so they break on a version mismatch 2013-03-07 11:09:39 -08:00
Corey Johnson & Nathan Sobo 91b5c3e9c7 Make refresh work again by fixing version in RootView.serialize 2013-03-07 11:07:03 -08:00
Kevin Sawicki d34796a78b Use oniguruma node module
This removes all internal native oniguruma
sources and starts using the node module
directly to create onig scanners and regexes.
2013-03-07 10:45:22 -08:00
Corey Johnson & Nathan Sobo cac6c854d2 💄 2013-03-07 10:25:51 -08:00
Kevin Sawicki ea8068652b Add oniguruma to package.json 2013-03-07 10:18:08 -08:00
Kevin Sawicki ce2d0389e1 Use ctags node module
Remove internal ctags code and defer to
new node module for finding tags and listing
tags.
2013-03-07 09:41:04 -08:00
Corey Johnson & Nathan Sobo dba7c08f59 Add serialization version to root view 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo c3456dd5ac Remove serialization methods from editor 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo 6257bcf0f5 Rename root view serialization keys 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo 8333f14ef8 Throw away serialized state if its version doesn't match deserializer 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo 4f0bf9020b Fix pane focus and active item serialization
Also: Un-x root view serialization specs
2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo d4fc718e8e Update window title when a pane item's title changes 2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo c1d19c4c5c Rename restoreItem to reopenItem on pane container 2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo ffb8bcd71d Add pane:reopen-closed-item command 2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo 5ad53bb32c Add restoreItem to Pane container 2013-03-07 09:30:29 -08:00
Nathan Sobo 96fefe94f0 Fix broken specs after rebase 2013-03-07 09:30:29 -08:00
Nathan Sobo f2e5fcc902 Move autosave from editor into panes 2013-03-07 09:30:29 -08:00
Nathan Sobo d97e91bdcb Make meta-# bindings work with new panes 2013-03-07 09:30:29 -08:00
Nathan Sobo f23d9091f2 Add pane:close-other-items 2013-03-07 09:30:29 -08:00
Nathan Sobo 4b8d786d2a 💄 2013-03-07 09:30:29 -08:00
Nathan Sobo 7ebce683c6 Move saveAll and specs to PaneContainer
And simplify the specs… we don't *really* need to save. We can just
ensure that save is called on everything.
2013-03-07 09:30:29 -08:00
Nathan Sobo e4bf73b41c Give the view a chance to update before presenting next dialog 2013-03-07 09:30:28 -08:00
Nathan Sobo f0398f2331 Ensure modal dialogs are presented in a coherent order
Modal dialogs can be presented while other modal dialogs are already
being displayed. Previously, dialogs were always displayed in the order
they were requested. But say you have two untitled buffers in a
pane and you close all items… You'll display prompt dialogs for both
buffers asking the user if they want to save. If the user answers yes
to the first dialog, they should see the path selection dialog before
they see the save prompt for the second buffer.

This commit uses a stack of queues to store deferred dialogs and allow
dialogs presented by the dismissal of another dialog to take precedence
over other pending dialogs.
2013-03-07 09:30:28 -08:00
Nathan Sobo 48c693d756 Add 'pane:close' event, which destroys all pane items.
Still have some issues with the presentation order of dialogs with
multiple unsaved buffers and no paths. But for the 99% case this works
as is.
2013-03-07 09:30:28 -08:00
Nathan Sobo da986b6a6c Fix RootView.saveAll() 2013-03-07 09:30:28 -08:00
Nathan Sobo fff5d5158f Pass items through in editor's pane-splitting convenience methods 2013-03-07 09:30:28 -08:00
Nathan Sobo bb15389b66 Add 'Pane.saveItems' and corresponding event 2013-03-07 09:30:28 -08:00
Nathan Sobo 685df18a3a Fix breakages due to save method moving to Pane (except saveAll specs) 2013-03-07 09:30:28 -08:00
Nathan Sobo 3f9ee08e76 Handle save-as on pane. Replace 'editor:save-as' w/ 'core:save-as'
Pane will only show the saveAs dialog if the item has a `saveAs` method.
2013-03-07 09:30:28 -08:00
Nathan Sobo 59a06acc0b Fire 'modified-status-changed' events on changes after save/reload
Buffer keeps state about the value with which it fired the last
modified-status-changed event so that it doesn't fire it twice with the
same boolean value. Every piece of code that triggers the event also
needs to set this state, so now everything goes through the
`triggerModifiedStatusChanged` method.
2013-03-07 09:30:28 -08:00
Nathan Sobo 699e780e99 Handle save in panes with new 'core:save' event 2013-03-07 09:30:28 -08:00
Nathan Sobo 6ae684d609 Kill commented specs that were used as a reminder 2013-03-07 09:30:28 -08:00
Nathan Sobo 54fc9efdcb Eliminate fixturesProject global. Use project global instead. 2013-03-07 09:30:27 -08:00
Nathan Sobo 9f7b804a6c Panes prompt to save modified items before destroying them 2013-03-07 09:30:27 -08:00
Nathan Sobo d5654cf0df 💄 2013-03-07 09:30:27 -08:00
Nathan Sobo 43b41e9ed9 Fix spell check spec 2013-03-07 09:30:27 -08:00
Nathan Sobo 298a963148 Rework Buffer's 'contents-modified' event
This event now fires whenever the content of the buffer changes (after 
a rate-limiting delay) with a single boolean indicating the modified
status of the buffer. There's now a separate event called
'modified-status-changed' to indicate events that change the boolean
value of the isModified method, so we don't need to fire
'contents-modified' when the underlying file is deleted for instance.
2013-03-07 09:30:27 -08:00
Nathan Sobo a1dc2cfc2d Tabs indicate when their items are modified 2013-03-07 09:30:27 -08:00
Nathan Sobo 24c9f11cc9 Trigger modified-status-changed on buffers/edit sessions 2013-03-07 09:30:27 -08:00
Nathan Sobo 29566d55c6 Scope split-view bindings on body so fuzzy-finder can open in splits
Previously, they were scoped on .pane, but fuzzy-finder isn't inside
a pane and still needs to be able to respond to split events.
2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo 5bba4cd9f7 Kill dead tab view code 2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo 5d9e20afa4 Make Editor.getPath return null if edit session is null 2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo 15144514bb Don't update editor's display if its edit session is null or destroyed 2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo c1e226d6a3 Kill unused event 2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo 3bf31e440d Remove code for setting the active editor from root view
Supplanted by "active pane"
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo ae95c04bbc Focus next pane when removing the last pane item of a focused pane
Previously, removing the last pane item also ruined our ability to 
determine if the pane had focus. Now, if we're removing the last item,
we instead just go ahead and remove the entire pane. Remove contains
logic to switch focus to the next pane if its active view is focused,
which works as intended if we leave the active view in place.
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo 52b649dca5 Preserve focus when switching between pane items
If the pane is currently focused, when showing a view associated with
a new item, focus that view.
2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo 80859b0a9f Fix CSS for .file-name -> .title class rename 2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo 3c9793d803 Fix TreeView specs 2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo 6157a75868 Spec changeFocus option of RootView.open and default it to true 2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo 5291924bcc Set the project path when its first edit session is saved 2013-03-07 09:30:26 -08:00
Corey Johnson & Nathan Sobo 9a93694a4c 💄 2013-03-07 09:30:26 -08:00
Nathan Sobo 31f7d6669f Use project global in project spec 2013-03-07 09:30:26 -08:00
Nathan Sobo 7145136cd9 Fix symbols view
Makes a lot of assumptions about getActiveView being an editor. We'll
need to revisit this.
2013-03-07 09:30:26 -08:00
Nathan Sobo 2b53655934 Fix status bar spec 2013-03-07 09:30:26 -08:00
Nathan Sobo 8dc3afbcce Fix snippets spec 2013-03-07 09:30:26 -08:00
Nathan Sobo 2790e5d12b Fix package generator spec 2013-03-07 09:30:25 -08:00
Nathan Sobo 5b0f5727dc Fix GFM grammar spec 2013-03-07 09:30:25 -08:00
Nathan Sobo a2ddd10d31 Get fuzzy-finder specs passing w/ new panes
Could still probably use some cleanup and I'm not sure everything is
working correctly with regards to focus.
2013-03-07 09:30:25 -08:00
Nathan Sobo 279ebc0958 Make RootView.getModifiedBuffers work w/ new system
Eventually, this should probably become getModifiedPaneItems so that
all kinds of items are given an opportunity to participate in the
saving system.
2013-03-07 09:30:25 -08:00
Nathan Sobo 2bfc73afaa These should have been renamed w/ currentView/Item -> activeView/Item 2013-03-07 09:30:25 -08:00
Nathan Sobo fab3b4564e Add Pane.moveItemToPane specs. Fix bug moving the last edit session. 2013-03-07 09:30:25 -08:00
Nathan Sobo fe0d3cad36 Remove multiple edit session handling from Editor 2013-03-07 09:30:25 -08:00
Nathan Sobo d69335f08d Kill dead code 2013-03-07 09:30:25 -08:00
Nathan Sobo 0238061fa2 Make tab drag & drop work with new panes system 2013-03-07 09:30:25 -08:00
Nathan Sobo 9655fa8898 Implement shouldAllowDrag in positive logic for tabs 2013-03-07 09:30:25 -08:00
Nathan Sobo 916c5caa3a 💄 2013-03-07 09:30:25 -08:00
Nathan Sobo 28141e315e Make shouldAllowDrag method work properly 2013-03-07 09:30:24 -08:00
Nathan Sobo 47621bd3b2 Call Pane.destroyItem when close icon is clicked on a tab 2013-03-07 09:30:24 -08:00
Nathan Sobo 7aba839dac Fix exception when pane items with no view are removed from the pane 2013-03-07 09:30:24 -08:00
Nathan Sobo 2e2ff3a1d0 Add Pane.destroyItem and rename removeActiveItem -> destroyActiveItem
Pane.removeItem removes an item, but no longer tries to call destroy
on it. This will facilitate moving items between panes.
2013-03-07 09:30:24 -08:00
Nathan Sobo 61fa393e03 Add indexOfPane and paneAtIndex to PaneContainer 2013-03-07 09:30:24 -08:00
Nathan Sobo 4a7e5b74c6 Make sure a pane view is showing before assigning its model object 2013-03-07 09:30:24 -08:00
Nathan Sobo 1d0cd16cd1 💄 2013-03-07 09:30:24 -08:00
Nathan Sobo 465bb14659 Reflect pane item order in tab bar 2013-03-07 09:30:24 -08:00
Nathan Sobo 887b5ea007 Add Pane.moveItem(item, index)
This is the precursor to supporting drag/drop of tabs within and
between panes.
2013-03-07 09:30:24 -08:00
Nathan Sobo 21990cf986 Add EditSession.getLongTitle 2013-03-07 09:30:24 -08:00
Nathan Sobo 3456b2db3c Tabs try to use an item's longTitle if two tab titles are the same
This will replace edit-session-specific functionality that displayed
the file's parent directory when two files with the same name were
open.
2013-03-07 09:30:24 -08:00
Nathan Sobo 8898f81fc3 Add $.fn.views method to space pane, which returns an array of views 2013-03-07 09:30:24 -08:00
Nathan Sobo de8198084c EditSession emits 'title-changed' events when its buffer path changes 2013-03-07 09:30:24 -08:00
Nathan Sobo 0c24843e52 Start converting tabs package to work with new panes / pane-items 2013-03-07 09:30:23 -08:00
Nathan Sobo 5240d9989f Pane emits 'pane:item-removed' events 2013-03-07 09:30:23 -08:00
Nathan Sobo dd120663b7 Pane emits 'pane:item-added' events 2013-03-07 09:30:23 -08:00
Nathan Sobo a40d05f6ee Rename Pane.currentItem/View to activeItem/View 2013-03-07 09:30:23 -08:00
Nathan Sobo 15d8a6cada Simplify pane:active-item-changed events
Panes now trigger an event every time their active item changes,
regardless of whether the pane itself is active. Panes also trigger
events when the become active and when they are removed. The rootView
now scopes its active-item-changed event listener only to active panes,
and also listens to listens to pane activation and removal events to
update the title when switching active panes and removing the last
pane.
2013-03-07 09:30:23 -08:00
Nathan Sobo 892ff0c51f Add PaneContainer.eachPane
It calls the given callback with all current and future panes
2013-03-07 09:30:23 -08:00
Nathan Sobo 3382a542b3 Get CommandPalette specs to pass without getActiveEditor 2013-03-07 09:30:23 -08:00
Nathan Sobo 1902a0c553 Get CommandPanel specs passing without getActiveEditor/EditSession 2013-03-07 09:30:23 -08:00
Nathan Sobo 20590f590e Make window specs pass without getActiveEditor/getEditors 2013-03-07 09:30:23 -08:00
Kevin Sawicki a6bf7f876d Replace RootView.getActiveEditor() with getActiveView() 2013-03-07 09:30:23 -08:00
Kevin Sawicki 8660670ae3 Replace RootView.getActiveEditor() with getActiveView() 2013-03-07 09:30:23 -08:00
Kevin Sawicki ff899e9c1b Replace RootView.getActiveEditor() with getActiveView() 2013-03-07 09:30:23 -08:00
Kevin Sawicki & Nathan Sobo 062adae714 Return the new pane's currentView when splitting the editor 2013-03-07 09:30:23 -08:00
Kevin Sawicki & Nathan Sobo 106c6c3958 Return 'untitled' from EditSession.getPath if its path is null 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 6304bac233 Remove RootView.getActiveEditor / getActiveEditSession
There's a bunch broken because of this… to be continued.
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 2bf5163798 Kill pane specs on root view 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 26c63edf33 Assert against config for font-size changing events instead of editor 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo d6b85cf7e8 Base title updates on pane:active-item-changed events 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 3ae9c10ff5 Trigger 'pane:active-item-changed' w/ null when last pane is removed 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 161ed69ef0 When a pane is removed, focus/activate the next pane 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 75229808de Add Editor.getModel 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 517c5022d3 Provide a default param for RootView@content when not deserializing 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 80e736d4ee Add RootView.getActiveView and .getActivePaneItem
They will replace getActiveEditor/getActiveEditSession
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 58228f7ff7 Remove RootView.activeKeybindings method. It was dead code. 2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo 4a6f05ae4e Trigger 'pane:active-item-changed' on Pane
This event is triggered when the item changes on the active pane, or
when a different pane becomes active.

Also: Pane now sets itself as the active pane, rather than letting
PaneContainer handle the focusin event.
2013-03-07 09:30:22 -08:00
Kevin Sawicki & Nathan Sobo ad62f896bc Make Pane maintain a currentView pointer based on its current item 2013-03-07 09:30:21 -08:00
Kevin Sawicki & Nathan Sobo d310fb366f Remove references to RootView from editor spec 2013-03-07 09:30:21 -08:00
Nathan Sobo 4e12882478 Delegate getActivePane to the PaneContainer in RootView 2013-03-07 09:28:52 -08:00
Nathan Sobo 486baa393b PaneContainer.getActivePane returns the most recently focused pane 2013-03-07 09:28:52 -08:00
Nathan Sobo 2ba63e608f Don't allow core:close event to bubble out of Pane 2013-03-07 09:28:52 -08:00
Nathan Sobo 8f980a0f20 Replace Editor's next/previous edit session bindings w/ pane bindings 2013-03-07 09:28:52 -08:00
Nathan Sobo bd8ec81b1e Make Pane close the current item when handling 'core:close' event 2013-03-07 09:28:52 -08:00
Nathan Sobo 11a702a2a6 Remove pane when its last item is removed 2013-03-07 09:28:52 -08:00
Nathan Sobo 7d147dd2ce Make Pane handle split commands instead of Editor 2013-03-07 09:28:52 -08:00
Nathan Sobo fee835f899 Add a PaneContainer subview for RootView
PaneContainer is responsible for all pane-related logic. Laying them
out, switching focus between them, etc. This should help make RootView
simpler and keep pane-layout related tests in their own focused area.
2013-03-07 09:28:52 -08:00
Nathan Sobo 9ecb03e470 Rename PaneGrid to PaneAxis
PaneGrid is a superclass of PaneRow and PaneColumn. These are both
a type of axis for the pane layout system.
2013-03-07 09:28:52 -08:00
Nathan Sobo 19e2cab920 💄 2013-03-07 09:28:52 -08:00
Nathan Sobo 0c2a5f273c Enhance pane split methods. Spec them in pane-spec.
When a pane is split, it attempts to make a copy of its current item
if no items are passed to the split method. When splitting, multiple
items can also be passed to the constructor of the new pane.
2013-03-07 09:28:52 -08:00
Nathan Sobo 45eec6a8ff Get more specs passing. Failing specs due to missing features. 2013-03-07 09:28:52 -08:00
Nathan Sobo 281a28bb0e Add spec for pane focusing the its current item view when it's focused 2013-03-07 09:28:52 -08:00
Nathan Sobo 568fcf441e Pane serializes its serializable items 2013-03-07 09:28:52 -08:00
Nathan Sobo bee1efed5c Make RootView.open work with new Pane behavior
Still a bit of a WIP. Panes don't yet take the "active" class
correctly when focused.
2013-03-07 09:28:51 -08:00
Nathan Sobo 829bfa0a10 Add Pane.itemForPath 2013-03-07 09:28:51 -08:00
Nathan Sobo c6729e9df1 Ignore redundant destructions of EditSessions 2013-03-07 09:28:51 -08:00
Nathan Sobo 62729c42ee Panes destroy their items when they are removed
As a consequence of these changes, editors will no longer need to
listen for destruction of their edit sessions. An editor will
eventually only ever be displaying a single edit session, and the
editor will destroy that edit session when it is removed. Panes
will be responsible for supporting multiple edit sessions, and
they will automatically remove the editor when they have no more
edit session items.
2013-03-07 09:28:51 -08:00
Nathan Sobo 77bf3e4d74 Get root view pane specs passing 2013-03-07 09:28:51 -08:00
Nathan Sobo d89a7eb522 When showing an item on a pane, add it to the items list if needed 2013-03-07 09:28:51 -08:00
Nathan Sobo 41f18ee6a2 Add Pane.removeItem 2013-03-07 09:28:51 -08:00
Nathan Sobo ef0c62f532 Add show next / previous item. 2013-03-07 09:28:51 -08:00
Nathan Sobo 372393d9ca Allow panes to have model objects as items in addition to views
The problem I've been struggling with is that we need to potentially 
assign tabs both to EditSessions and also to other views added by
extensions, like a markdown preview view. EditSessions are however not
actually views… instead they plug into editors. The solution is to
have the pane ask a model object what view should be used to render
it. When asked to show a non-view item, the pane constructs and
appends a view for that item or recycles an appropriate view that it
has already appended.
2013-03-07 09:28:51 -08:00
Nathan Sobo 2bdc077d2a Construct Pane w/ multiple items. Show first item on construction. 2013-03-07 09:28:51 -08:00
Nathan Sobo 68b05a5d8d Allow for panes to exist without a rootView (for testing purposes) 2013-03-07 09:28:51 -08:00
Nathan Sobo 5b58751a14 💄 2013-03-07 09:28:51 -08:00
Nathan Sobo beaeac4425 Rename buildEditSessionForPath to buildEditSession
Since this is the more external method, having a shorter name
is more convenient. The former `buildEditSession` method took a
Buffer, and is now called `buildEditSessionForBuffer`.
2013-03-07 09:28:51 -08:00
Kevin Sawicki 9fe1be7fe0 Add parens around string length 2013-03-07 08:54:29 -08:00
Kevin Sawicki d509195aab Free keys when config open fails 2013-03-07 08:34:05 -08:00
Kevin Sawicki 8af55a04d8 Use a single worker for status refreshes
There still appear to be crashes occurring when
using libgit2 from multiple workers at the same time.

So only start a new status worker once the current one
completes if a refresh was requested while a worker was
running.

Closes #367
2013-03-06 14:59:12 -08:00
Adam Roben b76ab87a96 Use HTTPS for prebuilt-cef
Fixes #361.
2013-03-06 08:30:50 -05:00
probablycorey 57b0151cd2 Remove the dev-mode css style, for now 🔜 2013-03-05 16:10:03 -08:00
probablycorey 1b403d2920 Fix logic mistake 2013-03-05 16:10:03 -08:00
probablycorey 9331b3beed Add .dev-mode class to root view 2013-03-05 16:10:02 -08:00
probablycorey d6ae5a1778 Set atom.devMode 2013-03-05 16:10:02 -08:00
probablycorey 0dfd3597fb add visual indicator for dev mode 2013-03-05 16:10:02 -08:00
Corey Johnson, Kevin Sawicki & Nathan Sobo 8e11ca58e5 Add isDevMode method 2013-03-05 16:10:02 -08:00
Corey Johnson, Kevin Sawicki & Nathan Sobo ad3782753b Display 💀 in window bar when Atom is in dev mode
Closes #350
2013-03-05 16:10:02 -08:00
Corey Johnson & Kevin Sawicki 0a21ef4a18 Remove unused code 2013-03-05 16:10:02 -08:00
probablycorey 081e3a459f Replace Consolas with PCMyungjo in spec 2013-03-05 15:55:38 -08:00
Kevin Sawicki & Nathan Sobo 280a73e7fd Merge remote-tracking branch 'origin/dev' into cefode 2013-03-05 14:54:07 -08:00
Kevin Sawicki & Nathan Sobo fbd6364f78 Redirect worker console to window console
Use __defineGetter__ instead of setting a
console property on self because cefode
already defines a console via __defineGetter__
and we need to override it.
2013-03-05 14:52:39 -08:00
Kevin Sawicki 07a8a35e48 Migrate fs.traverseTree to use Node's fs 2013-03-05 14:51:28 -08:00
probablycorey 0c067b55ba Make rake install build with default configuration 2013-03-05 14:32:51 -08:00
probablycorey 716a78a774 Default all targets to Release 2013-03-05 14:32:51 -08:00
Adam Roben ae1757aa4a Add an empty changelog for Constructicon 2013-03-05 14:32:51 -08:00
Adam Roben 192f8841bb Let Rakefile take care of running npm 2013-03-05 14:32:51 -08:00
Adam Roben 8394852f07 Remove the :package rake task
We don't need this anymore since Constructicon takes care of packaging
the app.
2013-03-05 14:32:51 -08:00
Adam Roben cea04758a5 Print the environment for Constructicon 2013-03-05 14:32:51 -08:00
Adam Roben 9b2468a484 Update prebuilt-cef
* prebuilt-cef c24e35c...3ced0be (1):
  > Use [[:space:]] instead of \s
2013-03-05 14:32:51 -08:00
Adam Roben 5421dddec6 info.plist -> Atom-Info.plist for Constructicon 2013-03-05 14:32:51 -08:00
Adam Roben 9e1b975773 Try finding node where it's installed on Constructicon 2013-03-05 14:32:51 -08:00
Adam Roben 7b32560ce2 Fix syntax errors 2013-03-05 14:32:50 -08:00
Adam Roben 28d4ea0456 Don't source env.sh unless it exists 2013-03-05 14:32:50 -08:00
Adam Roben 01e0e886e6 Turn on code signing in Constructicon 2013-03-05 14:32:50 -08:00
Adam Roben aae5ebc810 Ensure gyp is in Constructicon's PATH 2013-03-05 14:32:50 -08:00
Adam Roben ebaa344164 Put Constructicon's node in PATH 2013-03-05 14:32:50 -08:00
Adam Roben caf0dec598 Make the prebuild script noisy while we debug 2013-03-05 14:32:50 -08:00
Adam Roben 5f2bd9edd7 Add a prebuild script for Constructicon
Constructicon will run this just before building the project, so this is
our chance to install the node modules we need and create the
.xcodeproj.
2013-03-05 14:32:50 -08:00
Kevin Sawicki 91347f14f2 Build libgit2 with thread safe option enabled 2013-03-05 14:27:19 -08:00
Corey Johnson & Kevin Sawicki 7eee81cd6a Return early when clipping tokenless screenline
Closes #337
2013-03-05 10:44:15 -08:00
Corey Johnson & Kevin Sawicki 94099358f3 Inserting whitespace never auto-outdents
Closes #340

Shout out to @nathansobo
2013-03-05 10:19:24 -08:00
probablycorey 37e4091723 💩 2013-03-05 10:13:18 -08:00
probablycorey 17fc679b25 Trigger resize event on editor before wrap guide specs 2013-03-05 09:43:38 -08:00
Corey Johnson & Kevin Sawicki 8c1ec19797 Always destroy misspelling markers 2013-03-05 09:24:41 -08:00
Kevin Sawicki 1c09a1352b Return {} when object is empty 2013-03-05 08:46:17 -08:00
Kevin Sawicki 5ddea28d80 Wrap objects inside arrays in {} 2013-03-05 08:42:24 -08:00
Cheng Zhao fe7f43155a Use the dowload script of prebuilt-cef. 2013-03-05 15:04:17 +01:00
Cheng Zhao 091851ee3d First taste of node. 2013-03-05 09:10:04 +01:00
Cheng Zhao cc4fea5e67 Adopt to CEF's API change. 2013-03-05 09:10:04 +01:00
Cheng Zhao f170d37479 Use cefode's CEF binary. 2013-03-05 09:10:04 +01:00
Kevin Sawicki 887e285cce 💄 2013-03-04 22:07:22 -08:00
Kevin Sawicki 464aed92cb Don't return before freeing references 2013-03-04 22:04:13 -08:00
Kevin Sawicki eb00623807 Return null when no merge base is found 2013-03-04 21:56:14 -08:00
Kevin Sawicki 60c2829af4 Move ahead/behind defaults to Git class 2013-03-04 21:47:21 -08:00
Kevin Sawicki a389d57219 Remove unneeded null terminators
These are already added by sprintf
2013-03-04 21:43:35 -08:00
Kevin Sawicki 11b5fc14dc Check that remote length is non-zero 2013-03-04 21:43:35 -08:00
Kevin Sawicki 5005aa0c7c Add null terminator to upstream branch string 2013-03-04 21:43:35 -08:00
Kevin Sawicki 673e8c948f Prevent repository config from leaking 2013-03-04 21:43:35 -08:00
Kevin Sawicki 8b7e3c1092 Remove unused imports 2013-03-04 21:43:35 -08:00
Kevin Sawicki a1570a77e0 Add back saved event handler 2013-03-04 21:43:35 -08:00
Kevin Sawicki 165dffc15d Always return array from Git.getLineDiffs() 2013-03-04 21:43:34 -08:00
Kevin Sawicki 060ed27a2f Set context lines to 1 for line diffs 2013-03-04 21:43:34 -08:00
Kevin Sawicki 885da83df2 💄 2013-03-04 21:43:34 -08:00
Kevin Sawicki c9ef846727 Only replace .git segment if trailing 2013-03-04 21:43:34 -08:00
Kevin Sawicki c14aa3b86f Default status to 0 if undefined
This keeps the status-changed event from triggering
the first time the status is requested as it goes
from undefined to 0 which should be treated as no
change.
2013-03-04 21:43:34 -08:00
Kevin Sawicki 1be0b817de Specify text as second parameter 2013-03-04 21:43:34 -08:00
Kevin Sawicki 14a73337ce Remove unused diff options 2013-03-04 21:43:34 -08:00
Kevin Sawicki 72851486d8 💄 2013-03-04 21:43:34 -08:00
Kevin Sawicki ab5043f890 Add method to get line diffs for path and text 2013-03-04 21:43:34 -08:00
Kevin Sawicki e3ebda7d30 Show commits ahead/behind upstream in status bar 2013-03-04 21:43:34 -08:00
Kevin Sawicki fd82f3f8a4 Add method to get ahead/behind commit counts 2013-03-04 21:43:34 -08:00
Kevin Sawicki 3703877ae8 Default status flags to 0 2013-03-04 21:43:34 -08:00
Kevin Sawicki 4384c69dcf Delete cached statuses unless non-zero 2013-03-04 21:43:34 -08:00
Kevin Sawicki 7838f3741f Update status finder keybinding to meta-B 2013-03-04 21:43:33 -08:00
Kevin Sawicki 4c773439d2 Bind meta-T to display modified/untracked files 2013-03-04 21:43:33 -08:00
Kevin Sawicki 77bc42bd45 Put status indicator on right side of fuzzy finder
Closes #313
2013-03-04 21:43:33 -08:00
Kevin Sawicki 3852b7212b Remove git-status-changed event from Buffer
This is now fired as a status-changed event from
the Git class when the checkout completes normally
and the status of the path changes.
2013-03-04 21:43:33 -08:00
Kevin Sawicki 31690d16ec Remove unused import 2013-03-04 21:43:33 -08:00
Kevin Sawicki 77a5f4775a Show Git status indicators on directories
Closes #301
2013-03-04 21:43:33 -08:00
Kevin Sawicki 587a6552ea Use subscribe instead of on 2013-03-04 21:43:33 -08:00
Kevin Sawicki 2e7e4b3ee4 💄 2013-03-04 21:43:33 -08:00
Kevin Sawicki 4fe6db240b Consolidate Git status checking
Now the status bar and tree view both listen for
status change events and use the cached information
available from the git object to update their views.
2013-03-04 21:43:33 -08:00
Kevin Sawicki 2ec4d558ba Make project's Git repository a window global
This allows it to operate independently of the
project and mirror the availability of the root view
and project.
2013-03-04 21:43:33 -08:00
Kevin Sawicki 219a8581fd 💄 2013-03-04 21:43:33 -08:00
Kevin Sawicki 94449f772c Initialize statuses and task variables correctly 2013-03-04 21:43:33 -08:00
Kevin Sawicki 910be149ab Show status icons in fuzzy finder 2013-03-04 21:43:33 -08:00
Kevin Sawicki 68b61d71c6 Trigger event when path status changes 2013-03-04 21:43:32 -08:00
Kevin Sawicki 083562e1aa Abort status task when destroyed 2013-03-04 21:43:32 -08:00
Kevin Sawicki c6e89d33f8 Git.refreshStatuses() -> Git.refreshStatus() 2013-03-04 21:43:32 -08:00
Kevin Sawicki 50bc1aac74 Add task to refresh status of repository
By default this will occur when the window gains
focus and the Git class can now be subscribed to
so listeners can become notified when the status
of a repository changes.
2013-03-04 21:43:32 -08:00
Kevin Sawicki 4add7b6213 Support getting status of entire repository
New Git.getAllStatuses() method returns all non-ignored
status entries in the repository.
2013-03-04 21:43:32 -08:00
Kevin Sawicki 69f79b940b Update nof task for new package generator naming scheme 2013-03-04 20:05:42 -08:00
Kevin Sawicki & Nathan Sobo 41e1ce4a09 Remove cson2json dependency
The latest release does not work because of CoffeeScript
changes so use a simple compile script to convert CSON
files to JSON files when buildilng.

Closes #348
2013-03-04 18:27:51 -08:00
probablycorey 30d4cb81b8 Use Courier as the default font for specs
Fixes #323
2013-03-04 16:40:02 -08:00
probablycorey 0fe570fc47 Log warning instead of throwing error when installing atom binary 2013-03-04 15:44:49 -08:00
Joshua Peek 04ec1b01be Fallback to /usr/local/bin/atom 2013-03-04 14:45:24 -06:00
probablycorey fd2d1f2dfc Peg CoffeeScript to 1.5.x 2013-03-04 09:42:54 -08:00
Adam Roben 73e0b72479 Only source /opt/github/env.sh if needed
If node is already in PATH and functional, we don't need to spend a
bunch of time running all of Boxen's setup scripts.

This reduces clean build time on my MacBook Pro from 46 seconds to 31
seconds.
2013-03-04 11:52:51 -05:00
Adam Roben 83ee2d23b3 Use gyp's rules functionality to compile .coffee/.cson files
Instead of finding and compiling all .coffee/.cson files in
script/copy-files-to-bundle, we now tell gyp how to do this for us. It
works like this:

1. Rakefile invokes the new script/generate-sources-gypi script to
   generate sources.gypi. This file lists all the .coffee/.cson files in
   the src, static, and vendor directories, as well as a new
   compiled_sources_dir variable that specifies where the compiled
   versions of the files should be placed.
2. atom.gyp includes sources.gypi.
3. atom.gyp has a new target, generated_sources, which contains all the
   .coffee/.cson files, and uses two rules to tell gyp how to compile
   them. The rules invoke the new script/compile-coffee and
   script/compile-cson files once for each file.
4. gyp generates one Makefile for each rule to actually perform the
   compilation.
5. script/copy-files-to-bundle now takes the compiled_sources_dir
   variable as an argument, and copies files both from there and from
   the repository into the Resources directory.

By putting the compilation into a different target, we can do it in
parallel with compiling/linking our binaries. And gyp automatically runs
make using -j$(sysctl -n hw.ncpu), so compilation of .coffee/.cson files
happens in parallel, too.

These changes reduce clean build time on my MacBook Pro from 55 seconds
to 46 seconds.
2013-03-04 11:32:06 -05:00
Adam Roben 6511d0e111 Replace ## in package-generator templates with __
This is a workaround for
<http://code.google.com/p/gyp/issues/detail?id=323>.

A future change will cause gyp to generate Makefiles to compile
.coffee/.cson files to .js/.json. Makefiles use # as the comment
character, and gyp isn't smart enough to escape the #. So now we don't
use # in filenames to work around this bug.
2013-03-04 11:21:29 -05:00
Adam Roben c96e9acb64 Merge pull request #326 from github/framework
Move all code and resources into Atom.framework
2013-03-04 06:10:27 -08:00
Kevin Sawicki b0e7abac60 Update image in README 2013-03-03 11:54:07 -08:00
Kevin Sawicki 7952dfc196 Add command after first argument
This forces the object to be interpreted as the
second argument to the callWorkerMethod function
instead of as the first argument to function returned
from callWorkerMethod.

Closes #338
2013-03-03 11:07:52 -08:00
probablycorey 32d57892a2 Use correct resource path in dev mode 2013-03-01 16:58:31 -08:00
probablycorey d6309ec31c Add autorelease pool wrappers around CefV8Handler::Execute methods
This removes all BlahBlahBlah was not autoreleased console warnings.
2013-03-01 15:01:14 -08:00
probablycorey 5e25d3634c Set CFBundleTypeRole to Editor
This gets ride of an annoying console warning.
2013-03-01 14:56:42 -08:00
probablycorey 467e30aeb1 Remove worker log message 2013-03-01 14:55:44 -08:00
probablycorey 591aba3faf Revert "wip"
This reverts commit 2966cdb033.
2013-03-01 14:09:43 -08:00
probablycorey 4e971b085e Now that specs can handle symlinks, put atom-build in /tmp 2013-03-01 13:54:19 -08:00
probablycorey b7976cac68 Use the /Applications directory to test cwd on Child Processes 2013-03-01 13:54:19 -08:00
Corey Johnson 2966cdb033 wip 2013-03-01 13:54:19 -08:00
Corey Johnson 595cf71d93 Return absolute path for Git repo 2013-03-01 13:54:19 -08:00
Corey Johnson 5e1701f8db Call stringByStandardizingPath on moved paths 2013-03-01 13:54:19 -08:00
Corey Johnson 82bce082ef Always call stringByStandardizingPath on the resource path
stringByStandardizingPath has an interesting quirk that causes it to
remove `/private` from the path if the result still indicates an 
existing file or directory
2013-03-01 13:54:19 -08:00
Adam Roben 8a3b395613 Use gyp's copies facility instead of cp -r
This is more portable, and ensures that we won't screw up symlinks like
cp -r would.
2013-03-01 16:35:48 -05:00
Adam Roben 225aca016b Preserve symlinks during rake install
This prevents resources within Atom.framework from getting duplicated
within the bundle.

This shrinks a `rake install`-ed Atom.app from 124MB to 82MB.
2013-03-01 16:35:47 -05:00
Adam Roben a3c48df25b Move all code and resources into Atom.framework
All our native code now gets built into Atom.framework. Atom.app and
Atom Helper.app both link against this framework. All resources other
than a couple of main-bundle-only ones (e.g., atom.icns) go into
Atom.framework.

Note that this means that there's no compile- or link-time separation
between main process code and helper process code. We could introduce a
compile-time separation by building main process and helper process code
into separate static libraries with mutually exclusive include paths, if
we want.

Atom.framework exports a single symbol: AtomMain(). Atom.app and Atom
Helper.app contain a single source file: main.cpp. main() just calls
AtomMain().

All frameworks are placed in Atom.app/Contents/Frameworks. We now link
against all frameworks using @rpath-based install names, which allows
Atom.app and Atom Helper.app to find them automatically based on their
own LD_RUNPATH_SEARCH_PATH settings. We use install_name_tool at build
time on each of our three binaries (Atom.app, Atom Helper.app,
Atom.framework) to set the install names.

By reducing duplication of code and resources between Atom.app and Atom
Helper.app (and the EH/NP copies of Atom Helper.app), this reduces the
size of the total installed Atom.app bundle from 145MB to 82MB. By
compiling .coffee and .cson files only once, clean build time drops from
114 seconds to 79 seconds on my MacBook Pro.
2013-03-01 16:35:42 -05:00
Kevin Sawicki 0c5b50decf Merge branch 'dev' 2013-03-01 11:08:42 -08:00
Kevin Sawicki 31c1a202fd Bump version to 0.3 2013-03-01 11:08:21 -08:00
Kevin Sawicki 58bd83a225 Always unsubscribe when changing buffers
Previously subscribeToBuffer() returned early
in certain cases without first unsubscribing to
the current buffer.
2013-03-01 10:54:52 -08:00
Kevin Sawicki 7bfb07a25a Lock on shared NSSpellChecker and use release pool
Closes #335
2013-03-01 10:45:01 -08:00
Adam Roben 1c13ab8511 Add "rake download-cef-symbols" to...download CEF symbols 2013-03-01 13:19:23 -05:00
Nathan Sobo 305963c66a Merge pull request #336 from github/split-doc-edits
Split Pane Doc Updates
2013-03-01 10:14:43 -08:00
Nathan Sobo a650635c97 Clarify key binding a bit
I added an *or* to make sure it was clear that `ctrl-|` and `ctrl-w v`
are separate bindings.
2013-03-01 11:07:32 -07:00
Adam Roben e27ad21932 Bump prebuilt-cef so we can download debug symbols 2013-03-01 13:03:45 -05:00
Jon Maddox fef9a67914 Updates do split pane docs
Updated this section to include the new (albeit wierd!) key commands
for creating splits and moving through them.
2013-03-01 12:53:09 -05:00
Kevin Sawicki 14bd7741d1 Change octicon based on creating file or folder 2013-02-28 16:04:18 -08:00
Kevin Sawicki 9de3a91c9c Correct typos in comment 2013-02-28 15:28:43 -08:00
976 arquivos alterados com 31370 adições e 99920 exclusões
-2
Ver Arquivo
@@ -1,2 +0,0 @@
[docs]
title = The Guide to Atom
+4 -5
Ver Arquivo
@@ -1,12 +1,11 @@
*.swp
.DS_Store
.project
.svn
.nvm-version
atom-build
atom.xcodeproj
build
.xcodebuild-info
node_modules
npm-debug.log
/tags
/cef/
/atom-shell/
docs/output
spec/fixtures/evil-files/
+3 -72
Ver Arquivo
@@ -1,72 +1,3 @@
[submodule "vendor/packages/text.tmbundle"]
path = vendor/packages/text.tmbundle
url = https://github.com/textmate/text.tmbundle.git
[submodule "vendor/packages/css.tmbundle"]
path = vendor/packages/css.tmbundle
url = https://github.com/textmate/css.tmbundle.git
[submodule "vendor/packages/html.tmbundle"]
path = vendor/packages/html.tmbundle
url = https://github.com/textmate/html.tmbundle.git
[submodule "vendor/packages/javascript.tmbundle"]
path = vendor/packages/javascript.tmbundle
url = https://github.com/textmate/javascript.tmbundle.git
[submodule "vendor/packages/ruby-on-rails-tmbundle"]
path = vendor/packages/ruby-on-rails-tmbundle
url = https://github.com/drnic/ruby-on-rails-tmbundle.git
[submodule "vendor/packages/ruby.tmbundle"]
path = vendor/packages/ruby.tmbundle
url = https://github.com/textmate/ruby.tmbundle.git
[submodule "vendor/packages/coffee-script-tmbundle"]
path = vendor/packages/coffee-script-tmbundle
url = https://github.com/kevinsawicki/coffee-script-tmbundle.git
[submodule "vendor/packages/puppet-textmate.tmbundle"]
path = vendor/packages/puppet-textmate.tmbundle
url = https://github.com/cburyta/puppet-textmate.tmbundle.git
[submodule "vendor/packages/c.tmbundle"]
path = vendor/packages/c.tmbundle
url = https://github.com/textmate/c.tmbundle.git
[submodule "vendor/packages/objective-c.tmbundle"]
path = vendor/packages/objective-c.tmbundle
url = https://github.com/textmate/objective-c.tmbundle.git
[submodule "vendor/packages/git.tmbundle"]
path = vendor/packages/git.tmbundle
url = https://github.com/kevinsawicki/git.tmbundle.git
[submodule "vendor/packages/json.tmbundle"]
path = vendor/packages/json.tmbundle
url = https://github.com/textmate/json.tmbundle.git
[submodule "vendor/packages/shellscript.tmbundle"]
path = vendor/packages/shellscript.tmbundle
url = https://github.com/textmate/shellscript.tmbundle
[submodule "vendor/packages/xml.tmbundle"]
path = vendor/packages/xml.tmbundle
url = https://github.com/textmate/xml.tmbundle.git
[submodule "vendor/packages/property-list.tmbundle"]
path = vendor/packages/property-list.tmbundle
url = https://github.com/textmate/property-list.tmbundle.git
[submodule "vendor/packages/python.tmbundle"]
path = vendor/packages/python.tmbundle
url = https://github.com/textmate/python.tmbundle
[submodule "vendor/packages/clojure.tmbundle"]
path = vendor/packages/clojure.tmbundle
url = https://github.com/mmcgrana/textmate-clojure
[submodule "prebuilt-cef"]
path = prebuilt-cef
url = git@github.com:github/prebuilt-cef.git
[submodule "vendor/packages/yaml.tmbundle"]
path = vendor/packages/yaml.tmbundle
url = https://github.com/textmate/yaml.tmbundle.git
[submodule "vendor/packages/java.tmbundle"]
path = vendor/packages/java.tmbundle
url = https://github.com/textmate/java.tmbundle.git
[submodule "vendor/packages/php.tmbundle"]
path = vendor/packages/php.tmbundle
url = https://github.com/textmate/php.tmbundle.git
[submodule "vendor/packages/perl.tmbundle"]
path = vendor/packages/perl.tmbundle
url = https://github.com/textmate/perl.tmbundle.git
[submodule "vendor/packages/sass.tmbundle"]
path = vendor/packages/sass.tmbundle
url = https://github.com/alexsancho/SASS.tmbundle.git
[submodule "vendor/packages/less.tmbundle"]
path = vendor/packages/less.tmbundle
url = https://github.com/mathewbyrne/less.tmbundle.git
[submodule "vendor/apm"]
path = vendor/apm
url = https://github.com/atom/apm.git
+5 -1
Ver Arquivo
@@ -6,7 +6,11 @@ pairs:
jc: Jerry Cheung; jerry
bl: Brian Lopez; brian
jp: Justin Palmer; justin
gt: Garen Torikian; garen
mc: Matt Colyer; mcolyer
bo: Ben Ogle; benogle
jr: Jason Rudolph; jasonrudolph
jl: Jessica Lord; jlord
email:
domain: github.com
#global: true
Ver Arquivo
+50 -4
Ver Arquivo
@@ -1,5 +1,6 @@
# :rotating_light: Contributing to Atom :rotating_light:
## Issues
* Include screenshots and animated GIFs whenever possible, they are immensely
helpful
@@ -15,9 +16,54 @@
styleguides
* Include thoughtfully worded [Jasmine](http://pivotal.github.com/jasmine/)
specs
* Style new elements in both the light and dark default themes when
appropriate
* New packages go in `src/packages/`
* Add 3rd-party packages by submoduling in `vendor/packages/`
* Add 3rd-party packages as a `package.json` dependency
* Commit messages are in the present tense
* Commit messages that improve the format of the code start with :lipstick:
* Commit messages that improve the performance start with :racehorse:
* Commit messages that remove memory leaks start with :non-potable_water:
* Commit messages that improve documentation start with :memo:
* Files end with a newline
* Class variables and methods should be in the following order:
* Class variables (variables starting with a `@`)
* Class methods (methods starting with a `@`)
* Instance variables
* Instance methods
* Be ware of platform differences
* The home directory is `process.env.USERPROFILE` on Windows, while on OS X
and Linux it's `process.env.HOME`
* Path separator is `\` on Windows, and is `/` on OS X and Linux, so use
`path.join` to concatenate filenames.
* Temporary directory is not `/tmp` on Windows, use `os.tmpdir()` when
possible
## Philosophy
### Write Beautiful Code
Once you get something working, take the time to consider whether you can achieve it in a more elegant way. We're planning on open-sourcing Atom, so let's put our best foot forward.
### When in doubt, pair-up
Pairing can be an effective and fun way to pass on culture, knowledge, and taste. If you can find the time, we encourage you to work synchronously with other community members of all experience levels to help the knowledge-mulching process. It doesn't have to be all the time; a little pairing goes a long way.
### Write tests, and write them first
The test suite keeps protects our codebase from the ravages of entropy, but it only works when we have thorough coverage. Before you write implementation code, write a failing test proving that it's needed.
### Leave the test suite better than you found it
Consider how the specs you are adding fit into the spec-file as a whole. Is this the right place for your spec? Does the spec need to be reorganized now that you're adding this extra dimension? Specs are only as useful as the next person's ability to understand them.
### Solve today's problem
Avoid adding flexibility that isn't needed *today*. Nothing is ever set in stone, and we can always go back and add flexibility later. Adding it early just means we have to pay for complexity that we might not end up using.
### Favor clarity over brevity or cleverness.
Three lines that someone else can read are better than one line that's tricky.
### Don't be defensive
Only catch exceptions that are truly exceptional. Assume that components we control will honor their contracts. If they don't, the solution is to find and fix the problem in code rather than cluttering the code with attempts to foresee all potential issues at runtime.
### Don't be afraid to add classes and methods
Code rarely suffers from too many methods and classes, and often suffers from too few. Err on the side of numerous short, well-named methods. Pull out classes with well-defined roles.
### Rip shit out
Don't be afraid to delete code. Don't be afraid to rewrite something that needs to be refreshed. If it's in version control, we can always resurrect it.
### Maintain a consistent level of abstraction
Every line in a method should read at the same basic level of abstraction. If there's a section of a method that goes into a lot more detail than the rest of the method, consider extracting a new method and giving it a clear name.
+195
Ver Arquivo
@@ -0,0 +1,195 @@
fs = require 'fs'
path = require 'path'
os = require 'os'
fm = require 'json-front-matter'
_ = require 'underscore-plus'
packageJson = require './package.json'
module.exports = (grunt) ->
[major, minor, patch] = packageJson.version.split('.')
if process.platform is 'win32'
appName = 'Atom'
tmpDir = os.tmpdir()
installRoot = process.env.ProgramFiles
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
shellAppDir = path.join(buildDir, appName)
appDir = path.join(shellAppDir, 'resources', 'app')
else
appName = 'Atom.app'
tmpDir = '/tmp'
installRoot = '/Applications'
buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build')
shellAppDir = path.join(buildDir, appName)
contentsDir = path.join(shellAppDir, 'Contents')
appDir = path.join(contentsDir, 'Resources', 'app')
installDir = path.join(installRoot, appName)
coffeeConfig =
options:
sourceMap: true
glob_to_multiple:
expand: true
src: [
'src/**/*.coffee'
'exports/**/*.coffee'
'static/**/*.coffee'
]
dest: appDir
ext: '.js'
lessConfig =
options:
paths: [
'static/variables'
'static'
]
glob_to_multiple:
expand: true
src: [
'static/**/*.less'
]
dest: appDir
ext: '.css'
prebuildLessConfig =
src: [
'static/**/*.less'
'node_modules/bootstrap/less/bootstrap.less'
]
csonConfig =
options:
rootObject: true
glob_to_multiple:
expand: true
src: [
'menus/*.cson'
'keymaps/*.cson'
'static/**/*.cson'
]
dest: appDir
ext: '.json'
for child in fs.readdirSync('node_modules') when child isnt '.bin'
directory = path.join('node_modules', child)
{engines, theme} = grunt.file.readJSON(path.join(directory, 'package.json'))
if engines?.atom?
coffeeConfig.glob_to_multiple.src.push("#{directory}/**/*.coffee")
lessConfig.glob_to_multiple.src.push("#{directory}/**/*.less")
prebuildLessConfig.src.push("#{directory}/**/*.less") unless theme
csonConfig.glob_to_multiple.src.push("#{directory}/**/*.cson")
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
atom: {appDir, appName, buildDir, contentsDir, installDir, shellAppDir}
coffee: coffeeConfig
less: lessConfig
'prebuild-less': prebuildLessConfig
cson: csonConfig
coffeelint:
options:
no_empty_param_list:
level: 'error'
max_line_length:
level: 'ignore'
indentation:
level: 'ignore'
src: [
'dot-atom/**/*.coffee'
'exports/**/*.coffee'
'src/**/*.coffee'
'tasks/**/*.coffee'
'Gruntfile.coffee'
]
test: [
'spec/*.coffee'
]
csslint:
options:
'adjoining-classes': false
'duplicate-background-images': false
'box-model': false
'box-sizing': false
'bulletproof-font-face': false
'compatible-vendor-prefixes': false
'display-property-grouping': false
'fallback-colors': false
'font-sizes': false
'gradients': false
'ids': false
'important': false
'known-properties': false
'outline-none': false
'overqualified-elements': false
'qualified-headings': false
'unique-headings': false
'universal-selector': false
'vendor-prefix': false
src: [
'static/**/*.css'
]
lesslint:
src: [
'static/**/*.less'
]
markdown:
guides:
files: [
expand: true
cwd: 'docs'
src: '**/*.md'
dest: 'docs/output/'
ext: '.html'
]
options:
template: 'docs/template.jst'
templateContext:
tag: "v#{major}.#{minor}"
markdownOptions:
gfm: true
preCompile: (src, context) ->
parsed = fm.parse(src)
_.extend(context, parsed.attributes)
parsed.body
shell:
'kill-atom':
command: 'pkill -9 Atom'
options:
stdout: false
stderr: false
failOnError: false
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-lesslint')
grunt.loadNpmTasks('grunt-cson')
grunt.loadNpmTasks('grunt-contrib-csslint')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-markdown')
grunt.loadNpmTasks('grunt-shell')
grunt.loadTasks('tasks')
grunt.registerTask('compile', ['coffee', 'prebuild-less', 'cson'])
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
grunt.registerTask('test', ['shell:kill-atom', 'run-specs'])
grunt.registerTask('ci', ['update-atom-shell', 'build', 'set-development-version', 'lint', 'test'])
grunt.registerTask('deploy', ['partial-clean', 'update-atom-shell', 'build', 'codesign'])
grunt.registerTask('docs', ['markdown:guides', 'build-docs'])
defaultTasks = ['update-atom-shell', 'build']
defaultTasks.push('set-development-version') if process.platform is 'darwin'
defaultTasks.push('install')
grunt.registerTask('default', defaultTasks)
+16 -9
Ver Arquivo
@@ -1,19 +1,26 @@
# Atom — Futuristic Text Editing
![atom](http://f.cl.ly/items/3h1L1O333p1d0W3D2K3r/atom-sketch.jpg)
![atom](https://s3.amazonaws.com/speakeasy/apps/icons/27/medium/7db16e44-ba57-11e2-8c6f-981faf658e00.png)
Check out our [documentation on the docs tab](https://github.com/github/atom/docs).
Check out our [guides](https://atom-docs.githubapp.com/v26.0/index.html) and [API documentation](https://atom-docs.githubapp.com/v26.0/api/index.html).
## Building from source
## Installing
Requirements
Download the latest Atom release from [speakeasy](https://speakeasy.githubapp.com/apps/27).
**Mountain Lion**
It will automatically update when a new release is available.
**The Setup™**
## Building
**Xcode** (Get Xcode from the App Store (ugh, I know))
### Requirements
1. gh-setup atom
* Mountain Lion
* Boxen (Obviously Atom won't release with this requirement)
2. cd ~/github/atom && `rake install`
### Installation
1. `gh-setup atom`
2. `cd ~/github/atom`
3. `script/build`
-123
Ver Arquivo
@@ -1,123 +0,0 @@
ATOM_SRC_PATH = File.dirname(__FILE__)
BUILD_DIR = 'atom-build'
desc "Build Atom via `xcodebuild`"
task :build => "create-xcode-project" do
command = "xcodebuild -target Atom -configuration Release SYMROOT=#{BUILD_DIR}"
output = `#{command}`
if $?.exitstatus != 0
$stderr.puts "Error #{$?.exitstatus}:\n#{output}"
exit($?.exitstatus)
end
end
desc "Create xcode project from gyp file"
task "create-xcode-project" => "update-cef" do
`rm -rf atom.xcodeproj`
`gyp --depth=. -D CODE_SIGN="#{ENV['CODE_SIGN']}" atom.gyp`
end
desc "Update CEF to the latest version specified by the prebuilt-cef submodule"
task "update-cef" => "bootstrap" do
exit 1 unless system %{prebuilt-cef/script/download -f cef}
Dir.glob('cef/*.gypi').each do |filename|
`sed -i '' -e "s/'include\\//'cef\\/include\\//" -e "s/'libcef_dll\\//'cef\\/libcef_dll\\//" #{filename}`
end
end
task "bootstrap" do
`script/bootstrap`
end
desc "Copies Atom.app to /Applications and creates `atom` cli app"
task :install => [:clean, :build] do
path = application_path()
exit 1 if not path
# Install Atom.app
dest_path = "/Applications/#{File.basename(path)}"
`rm -rf #{dest_path}`
`cp -r #{path} #{File.expand_path(dest_path)}`
# Install atom cli
if File.directory?("/opt/boxen")
cli_path = "/opt/boxen/bin/atom"
else
cli_path = "/opt/github/bin/atom"
end
FileUtils.cp("#{ATOM_SRC_PATH}/atom.sh", cli_path)
FileUtils.chmod(0755, cli_path)
Rake::Task["clone-default-bundles"].invoke()
puts "\033[32mAtom is installed at `#{dest_path}`. Atom cli is installed at `#{cli_path}`\033[0m"
end
desc "Package up the app for speakeasy"
task :package => ["setup-codesigning", "build"] do
path = application_path()
exit 1 if not path
dest_path = '/tmp/atom-for-speakeasy/Atom.tar.bz2'
`mkdir -p $(dirname #{dest_path})`
`rm -rf #{dest_path}`
`tar --directory $(dirname #{path}) -jcf #{dest_path} $(basename #{path})`
`open $(dirname #{dest_path})`
end
task "setup-codesigning" do
ENV['CODE_SIGN'] = "Developer ID Application: GitHub"
end
desc "Clone default bundles into vendor/bundles directory"
task "clone-default-bundles" do
`git submodule --quiet sync`
`git submodule --quiet update --recursive --init`
end
desc "Clean build Atom via `xcodebuild`"
task :clean do
output = `xcodebuild clean`
`rm -rf #{application_path()}`
`rm -rf #{BUILD_DIR}`
`rm -rf /tmp/atom-compiled-scripts`
end
desc "Run the specs"
task :test => ["update-cef", "clone-default-bundles", "build"] do
`pkill Atom`
if path = application_path()
cmd = "#{path}/Contents/MacOS/Atom --test --resource-path=#{ATOM_SRC_PATH} 2> /dev/null"
system(cmd)
exit($?.exitstatus)
else
exit(1)
end
end
desc "Run the benchmarks"
task :benchmark do
Rake::Task["run"].invoke("--benchmark")
end
task :nof do
system %{find . -name *spec.coffee | grep --invert-match --regexp "#{BUILD_DIR}\\|##package-name##" | xargs sed -E -i "" "s/f+(it|describe) +(['\\"])/\\1 \\2/g"}
end
task :tags do
system %{find src native cef vendor -not -name "*spec.coffee" -type f -print0 | xargs -0 ctags}
end
def application_path
applications = FileList["#{BUILD_DIR}/**/Atom.app"]
if applications.size == 0
$stderr.puts "No Atom application found in directory `#{BUILD_DIR}`"
elsif applications.size > 1
$stderr.puts "Multiple Atom applications found \n\t" + applications.join("\n\t")
else
return applications.first
end
return nil
end
+6 -361
Ver Arquivo
@@ -1,369 +1,14 @@
{
'variables': {
'pkg-config': 'pkg-config',
'chromium_code': 1,
'use_aura%': 0,
'conditions': [
['OS=="win"', {
'os_posix': 0,
}, {
'os_posix': 1,
}],
# Set toolkit_uses_gtk for the Chromium browser on Linux.
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
'toolkit_uses_gtk%': 1,
}, {
'toolkit_uses_gtk%': 0,
}],
],
},
'includes': [
'cef/cef_paths2.gypi',
'git2/libgit2.gypi',
],
'target_defaults': {
'default_configuration': 'Debug',
'configurations': {
'Debug': {
'defines': ['DEBUG=1'],
'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL' : '0' },
},
'Release': {
},
},
'xcode_settings': {
'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'COMBINE_HIDPI_IMAGES': 'YES', # Removes 'Validate Project Settings' warning
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES' # Removes 'Reference to global weak symbol vtable' warning
},
},
'targets': [
{
'target_name': 'Atom',
'type': 'executable',
'mac_bundle': 1,
'msvs_guid': 'D22C6F51-AA2D-457C-B579-6C97A96C724D',
'dependencies': [
'libcef_dll_wrapper',
],
'defines': [
'USING_CEF_SHARED',
],
'include_dirs': [ '.', 'cef', 'git2' ],
'mac_framework_dirs': [ 'native/frameworks' ],
'libraries': [ 'native/frameworks/CocoaOniguruma.framework', 'native/frameworks/Sparkle.framework'],
'sources': [
'<@(includes_common)',
'<@(includes_wrapper)',
'native/main_mac.mm',
'native/atom_application.h',
'native/atom_application.mm',
'native/atom_cef_app.h',
'native/atom_window_controller.h',
'native/atom_window_controller.mm',
'native/atom_cef_client_mac.mm',
'native/atom_cef_client.cpp',
'native/atom_cef_client.h',
'native/message_translation.cpp',
'native/message_translation.h',
],
'mac_bundle_resources': [
'native/mac/atom.icns',
'native/mac/file.icns',
'native/mac/speakeasy.pem',
'native/mac/English.lproj/MainMenu.xib',
'native/mac/English.lproj/AtomWindow.xib',
],
'xcode_settings': {
'INFOPLIST_FILE': 'native/mac/info.plist',
'OTHER_LDFLAGS': ['-Wl,-headerpad_max_install_names'], # Necessary to avoid an "install_name_tool: changing install names or rpaths can't be redone" error.
},
'conditions': [
['CODE_SIGN' , {
'xcode_settings': {'CODE_SIGN_IDENTITY': "<(CODE_SIGN)"},
}],
['OS=="win" and win_use_allocator_shim==1', {
'dependencies': [
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
],
}],
['OS=="win"', {
'configurations': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
},
},
},
},
'msvs_settings': {
'VCLinkerTool': {
# Set /SUBSYSTEM:WINDOWS.
'SubSystem': '2',
'EntryPointSymbol' : 'wWinMainCRTStartup',
},
},
'link_settings': {
'libraries': [
'-lcomctl32.lib',
'-lshlwapi.lib',
'-lrpcrt4.lib',
],
},
'sources': [
'<@(includes_win)',
],
}],
['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
'dependencies': [
'<(DEPTH)/sandbox/sandbox.gyp:sandbox',
],
}],
['toolkit_uses_gtk == 1', {
'dependencies': [
'<(DEPTH)/build/linux/system.gyp:gtk',
],
}],
[ 'OS=="mac"', {
'product_name': 'Atom',
'dependencies': [
'AtomHelperApp',
],
'copies': [
{
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/',
'files': [
'cef/Release/libcef.dylib',
'cef/Release/ffmpegsumo.so',
],
},
{
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks',
'files': [
'native/frameworks/CocoaOniguruma.framework',
'native/frameworks/Sparkle.framework',
],
},
{
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks/libgit2.framework/Libraries',
'files': [
'git2/frameworks/libgit2.0.17.0.dylib',
],
},
],
'postbuilds': [
{
'postbuild_name': 'Copy and Compile Static Files',
'action': [
'script/copy-files-to-bundle'
],
},
{
'postbuild_name': 'Copy Helper App',
'action': [
'cp',
'-r',
'${BUILT_PRODUCTS_DIR}/Atom Helper.app',
'${BUILT_PRODUCTS_DIR}/Atom.app/Contents/Frameworks',
],
},
{
'postbuild_name': 'Fix Framework Link',
'action': [
'install_name_tool',
'-change',
'@executable_path/libcef.dylib',
'@executable_path/../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib',
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
],
},
{
'postbuild_name': 'Copy Framework Resources Directory',
'action': [
'cp',
'-r',
'cef/Resources',
'${BUILT_PRODUCTS_DIR}/Atom.app/Contents/Frameworks/Chromium Embedded Framework.framework/'
],
},
{
# This postbuid step is responsible for creating the following
# helpers:
#
# Atom Helper EH.app and Atom Helper NP.app are created
# from Atom Helper.app.
#
# The EH helper is marked for an executable heap. The NP helper
# is marked for no PIE (ASLR).
'postbuild_name': 'Make More Helpers',
'action': [
'tools/mac/make_more_helpers.sh',
'Frameworks',
'Atom',
],
},
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
],
},
'sources': [
'cef/include/cef_application_mac.h',
'cef/include/internal/cef_mac.h',
'cef/include/internal/cef_types_mac.h',
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources': [
'<@(includes_linux)',
],
'copies': [
{
'destination': '<(PRODUCT_DIR)/files',
'files': [
'<@(cefclient_bundle_resources_linux)',
],
},
],
}],
],
},
{
'target_name': 'libcef_dll_wrapper',
'type': 'static_library',
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
'dependencies': [
],
'defines': [
'USING_CEF_SHARED',
],
'include_dirs': [ '.', 'cef' ],
'sources': [
'<@(includes_common)',
'<@(includes_capi)',
'<@(includes_wrapper)',
'<@(libcef_dll_wrapper_sources_common)',
],
'link_settings': {
'libraries': [
'cef/Release/libcef.dylib',
],
}
},
],
'conditions': [
['os_posix==1 and OS!="mac" and OS!="android" and gcc_version==46', {
'target_defaults': {
# Disable warnings about c++0x compatibility, as some names (such
# as nullptr) conflict with upcoming c++0x types.
'cflags_cc': ['-Wno-c++0x-compat'],
},
}],
['OS=="mac"', {
'targets': [
'type': 'none',
'postbuilds': [
{
'target_name': 'AtomHelperApp',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'product_name': 'Atom Helper',
'mac_bundle': 1,
'dependencies': [
'libcef_dll_wrapper',
],
'defines': [
'USING_CEF_SHARED',
'PROCESS_HELPER_APP',
],
'include_dirs': [ '.', 'cef', 'git2' ],
'mac_framework_dirs': [ 'native/frameworks' ],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
],
},
'libraries': [
'native/frameworks/CocoaOniguruma.framework',
'git2/frameworks/libgit2.0.17.0.dylib',
],
'sources': [
'native/atom_cef_app.h',
'native/atom_cef_render_process_handler.h',
'native/atom_cef_render_process_handler.mm',
'native/message_translation.cpp',
'native/message_translation.h',
'native/path_watcher.mm',
'native/path_watcher.h',
'native/main_helper_mac.mm',
'native/v8_extensions/native.mm',
'native/v8_extensions/native.h',
'native/v8_extensions/onig_reg_exp.mm',
'native/v8_extensions/onig_reg_exp.h',
'native/v8_extensions/onig_scanner.mm',
'native/v8_extensions/onig_scanner.h',
'native/v8_extensions/atom.mm',
'native/v8_extensions/atom.h',
'native/v8_extensions/git.mm',
'native/v8_extensions/git.h',
'native/v8_extensions/readtags.h',
'native/v8_extensions/readtags.c',
'native/v8_extensions/tags.h',
'native/v8_extensions/tags.mm',
],
# TODO(mark): For now, don't put any resources into this app. Its
# resources directory will be a symbolic link to the browser app's
# resources directory.
'mac_bundle_resources/': [
['exclude', '.*'],
],
'xcode_settings': {
'INFOPLIST_FILE': 'native/mac/helper-info.plist',
'OTHER_LDFLAGS': ['-Wl,-headerpad_max_install_names'], # Necessary to avoid an "install_name_tool: changing install names or rpaths can't be redone" error.
},
'copies': [
{
'destination': '<(PRODUCT_DIR)/Atom Helper.app/Contents/Frameworks',
'files': [
'native/frameworks/CocoaOniguruma.framework',
],
},
],
'postbuilds': [
{
# The framework defines its load-time path
# (DYLIB_INSTALL_NAME_BASE) relative to the main executable
# (chrome). A different relative path needs to be used in
# atom_helper_app.
'postbuild_name': 'Fix CEF Framework Link',
'action': [
'install_name_tool',
'-change',
'@executable_path/libcef.dylib',
'@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib',
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
],
},
{
'postbuild_name': 'Fix libgit2 Framework Link',
'action': [
'install_name_tool',
'-change',
'@executable_path/libgit2.0.17.0.dylib',
'@executable_path/../../../../Frameworks/libgit2.framework/Libraries/libgit2.0.17.0.dylib',
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
],
},
{
'postbuild_name': 'Copy and Compile Static Files',
'action': [
'script/copy-files-to-bundle'
],
},
],
}, # target cefclient_helper_app
'postbuild_name': 'Create Atom, basically do everything',
'action': ['script/constructicon/build'],
},
],
}], # OS=="mac"
},
],
}
Arquivo normal → Arquivo executável
+37 -11
Ver Arquivo
@@ -1,5 +1,41 @@
#!/bin/sh
open -a /Applications/Atom.app -n --args --executed-from="$(pwd)" --pid=$$ $@
ATOM_PATH=${ATOM_PATH-/Applications/Atom.app}
ATOM_BINARY=$ATOM_PATH/Contents/MacOS/Atom
if [ ! -d $ATOM_PATH ]; then sleep 5; fi # Wait for Atom to reappear, Sparkle may be replacing it.
if [ ! -d $ATOM_PATH ]; then
echo "Atom application not found at '$ATOM_PATH'" >&2
exit 1
fi
while getopts ":wtfvhs-:" opt; do
case "$opt" in
-)
case "${OPTARG}" in
wait)
WAIT=1
;;
help|version|foreground|test)
EXPECT_OUTPUT=1
;;
esac
;;
w)
WAIT=1
;;
h|v|f|t)
EXPECT_OUTPUT=1
;;
esac
done
if [ $EXPECT_OUTPUT ]; then
$ATOM_BINARY --executed-from="$(pwd)" --pid=$$ $@
exit $?
else
open -a $ATOM_PATH -n --args --executed-from="$(pwd)" --pid=$$ $@
fi
# Used to exit process when atom is used as $EDITOR
on_die() {
@@ -7,16 +43,6 @@ on_die() {
}
trap 'on_die' SIGQUIT SIGTERM
# Don't exit process if we were told to wait.
while [ "$#" -gt "0" ]; do
case $1 in
-W|--wait)
WAIT=1
;;
esac
shift
done
if [ $WAIT ]; then
while true; do
sleep 1
+11 -3
Ver Arquivo
@@ -1,5 +1,13 @@
require 'atom'
{runSpecSuite} = require 'jasmine-helper'
require '../src/window'
Atom = require '../src/atom'
atom = new Atom()
atom.show() unless atom.getLoadSettings().exitWhenDone
window.atom = atom
{runSpecSuite} = require '../spec/jasmine-helper'
atom.openDevTools()
document.title = "Benchmark Suite"
runSpecSuite("benchmark-suite", true)
benchmarkSuite = require.resolve('./benchmark-suite')
runSpecSuite(benchmarkSuite, true)
+14 -31
Ver Arquivo
@@ -1,31 +1,10 @@
nakedLoad 'jasmine-jquery'
$ = require 'jquery'
_ = require 'underscore'
Keymap = require 'keymap'
Point = require 'point'
Config = require 'config'
Project = require 'project'
require '../spec/spec-helper'
require 'window'
requireStylesheet "jasmine.css"
# Load TextMate bundles, which specs rely on (but not other packages)
atom.loadTextMatePackages()
beforeEach ->
# reset config after each benchmark; don't load or save from/to `config.json`
window.config = new Config()
spyOn(config, 'load')
spyOn(config, 'save')
keymap = new Keymap
keymap.bindDefaultKeys()
$(window).on 'keydown', (e) -> keymap.handleKeyEvent(e)
keymap.bindKeys '*',
'meta-w': 'close'
'alt-meta-i': 'show-console'
$(document).on 'close', -> window.close()
$(document).on 'show-console', -> atom.toggleDevTools()
path = require 'path'
{$, _, Point, fs} = require 'atom'
Project = require '../src/project'
fsUtils = require '../src/fs-utils'
TokenizedBuffer = require '../src/tokenized-buffer'
defaultCount = 100
window.pbenchmark = (args...) -> window.benchmark(args..., profile: true)
@@ -33,7 +12,13 @@ window.fbenchmark = (args...) -> window.benchmark(args..., focused: true)
window.fpbenchmark = (args...) -> window.benchmark(args..., profile: true, focused: true)
window.pfbenchmark = window.fpbenchmark
window.benchmarkFixturesProject = new Project(require.resolve 'benchmark/fixtures')
window.benchmarkFixturesProject = new Project(path.join(__dirname, 'fixtures'))
beforeEach ->
window.project = window.benchmarkFixturesProject
jasmine.unspy(window, 'setTimeout')
jasmine.unspy(window, 'clearTimeout')
jasmine.unspy(TokenizedBuffer::, 'tokenizeInBackground')
window.benchmark = (args...) ->
description = args.shift()
@@ -44,7 +29,6 @@ window.benchmark = (args...) ->
[fn, options] = args
{ profile, focused } = (options ? {})
atom.showDevTools() if profile
method = if focused then fit else it
method description, ->
total = measure ->
@@ -57,7 +41,7 @@ window.benchmark = (args...) ->
report = "#{fullname}: #{total} / #{count} = #{avg}ms"
console.log(report)
if atom.exitWhenDone
if atom.getLoadSettings().exitWhenDone
url = "https://github.com/_stats"
data = [type: 'timing', metric: "atom.#{fullname}", ms: avg]
$.ajax url,
@@ -127,4 +111,3 @@ $.fn.textInput = (data) ->
event = document.createEvent 'TextEvent'
event.initTextEvent('textInput', true, true, window, data)
this.each -> this.dispatchEvent(event)
+122 -19
Ver Arquivo
@@ -1,32 +1,25 @@
require 'benchmark-helper'
fs = require 'fs'
$ = require 'jquery'
_ = require 'underscore'
TokenizedBuffer = require 'tokenized-buffer'
require './benchmark-helper'
{$, _, RootView} = require 'atom'
TokenizedBuffer = require '../src/tokenized-buffer'
describe "editor.", ->
editor = null
beforeEach ->
window.rootViewParentSelector = '#jasmine-content'
window.attachRootView(require.resolve('benchmark/fixtures'))
window.rootView = new RootView
window.rootView.attachToDom()
rootView.width(1024)
rootView.height(768)
rootView.open() # open blank editor
editor = rootView.getActiveEditor()
rootView.openSync() # open blank editor
editor = rootView.getActiveView()
afterEach ->
if editor.pendingDisplayUpdate
waitsFor "editor to finish rendering", (done) ->
editor.on 'editor:display-updated', done
runs ->
projectPath = project.getPath()
$(window).off 'beforeunload'
window.shutdown()
atom.setRootViewStateForPath(projectPath, null)
describe "keymap.", ->
event = null
@@ -38,7 +31,7 @@ describe "editor.", ->
describe "opening-buffers.", ->
benchmark "300-line-file.", ->
buffer = project.bufferForPath('medium.coffee')
buffer = project.bufferForPathSync('medium.coffee')
describe "empty-file.", ->
benchmark "insert-delete", ->
@@ -47,7 +40,7 @@ describe "editor.", ->
describe "300-line-file.", ->
beforeEach ->
rootView.open('medium.coffee')
rootView.openSync('medium.coffee')
describe "at-begining.", ->
benchmark "insert-delete", ->
@@ -66,13 +59,123 @@ describe "editor.", ->
editor.insertText('"')
editor.backspace()
describe "empty-vs-set-innerHTML.", ->
[firstRow, lastRow] = []
beforeEach ->
firstRow = editor.getFirstVisibleScreenRow()
lastRow = editor.getLastVisibleScreenRow()
benchmark "build-gutter-html.", 1000, ->
editor.gutter.renderLineNumbers(null, firstRow, lastRow)
benchmark "set-innerHTML.", 1000, ->
editor.gutter.renderLineNumbers(null, firstRow, lastRow)
editor.gutter.lineNumbers[0].innerHtml = ''
benchmark "empty.", 1000, ->
editor.gutter.renderLineNumbers(null, firstRow, lastRow)
editor.gutter.lineNumbers.empty()
describe "positionLeftForLineAndColumn.", ->
line = null
beforeEach ->
editor.scrollTop(2000)
editor.resetDisplay()
line = editor.lineElementForScreenRow(106)[0]
describe "one-line.", ->
beforeEach ->
editor.clearCharacterWidthCache()
benchmark "uncached", 5000, ->
editor.positionLeftForLineAndColumn(line, 106, 82)
editor.clearCharacterWidthCache()
benchmark "cached", 5000, ->
editor.positionLeftForLineAndColumn(line, 106, 82)
describe "multiple-lines.", ->
[firstRow, lastRow] = []
beforeEach ->
firstRow = editor.getFirstVisibleScreenRow()
lastRow = editor.getLastVisibleScreenRow()
benchmark "cache-entire-visible-area", 100, ->
for i in [firstRow..lastRow]
line = editor.lineElementForScreenRow(i)[0]
editor.positionLeftForLineAndColumn(line, i, Math.max(0, editor.lineLengthForBufferRow(i)))
describe "text-rendering.", ->
beforeEach ->
editor.scrollTop(2000)
benchmark "resetDisplay", 50, ->
editor.resetDisplay()
benchmark "htmlForScreenRows", 1000, ->
lastRow = editor.getLastScreenRow()
editor.htmlForScreenRows(0, lastRow)
benchmark "htmlForScreenRows.htmlParsing", 50, ->
lastRow = editor.getLastScreenRow()
html = editor.htmlForScreenRows(0, lastRow)
div = document.createElement('div')
div.innerHTML = html
describe "gutter-api.", ->
describe "getLineNumberElementsForClass.", ->
beforeEach ->
editor.gutter.addClassToLine(20, 'omgwow')
editor.gutter.addClassToLine(40, 'omgwow')
benchmark "DOM", 20000, ->
editor.gutter.getLineNumberElementsForClass('omgwow')
benchmark "getLineNumberElement.DOM", 20000, ->
editor.gutter.getLineNumberElement(12)
benchmark "toggle-class", 2000, ->
editor.gutter.addClassToLine(40, 'omgwow')
editor.gutter.removeClassFromLine(40, 'omgwow')
describe "find-then-unset.", ->
classes = ['one', 'two', 'three', 'four']
benchmark "single-class", 200, ->
editor.gutter.addClassToLine(30, 'omgwow')
editor.gutter.addClassToLine(40, 'omgwow')
editor.gutter.removeClassFromAllLines('omgwow')
benchmark "multiple-class", 200, ->
editor.gutter.addClassToLine(30, 'one')
editor.gutter.addClassToLine(30, 'two')
editor.gutter.addClassToLine(40, 'two')
editor.gutter.addClassToLine(40, 'three')
editor.gutter.addClassToLine(40, 'four')
for klass in classes
editor.gutter.removeClassFromAllLines(klass)
describe "line-htmlification.", ->
div = null
html = null
beforeEach ->
lastRow = editor.getLastScreenRow()
html = editor.htmlForScreenRows(0, lastRow)
div = document.createElement('div')
benchmark "setInnerHTML", 1, ->
div.innerHTML = html
describe "9000-line-file.", ->
benchmark "opening.", 5, ->
rootView.open('huge.js')
rootView.openSync('huge.js')
describe "after-opening.", ->
beforeEach ->
rootView.open('huge.js')
rootView.openSync('huge.js')
benchmark "moving-to-eof.", 1, ->
editor.moveCursorToBottom()
@@ -107,7 +210,7 @@ describe "TokenizedBuffer.", ->
[languageMode, buffer] = []
beforeEach ->
editSession = benchmarkFixturesProject.buildEditSessionForPath('medium.coffee')
editSession = benchmarkFixturesProject.openSync('medium.coffee')
{ languageMode, buffer } = editSession
benchmark "construction", 20, ->
+1 -1
Ver Arquivo
@@ -145,7 +145,7 @@ generate_html = (source, sections) ->
# Require our external dependencies, including **Showdown.js**
# (the JavaScript implementation of Markdown).
fs = require 'fs'
fs = require 'fs-utils'
path = require 'path'
showdown = require('./../vendor/showdown').Showdown
{spawn, exec} = require 'child_process'
-133
Ver Arquivo
@@ -1,133 +0,0 @@
# Authoring Packages
A package can contain a variety of different resource types to change Atom's
behavior. The basic package layout is as follows (not every package will
have all of these directories):
```text
my-package/
lib/
config/
stylesheets/
keymaps/
snippets/
grammars/
package.json
index.coffee
```
**NOTE:** NPM behavior is partially implemented until we get a working Node.js
API built into Atom. The goal is to make Atom packages be a superset of NPM
packages
## package.json
Similar to npm packages, Atom packages can contain a `package.json` file in their
top-level directory. This file contains metadata about the package, such as the
path to its "main" module, library dependencies, and manifests specifying the
order in which its resources should be loaded.
## Source Code
If you want to extend Atom's behavior, your package should contain a single
top-level module, which you export from `index.coffee` or another file as
indicated by the `main` key in your `package.json` file. The remainder of your
code should be placed in the `lib` directory, and required from your top-level
file.
Your package's top-level module is a singleton object that manages the lifecycle
of your extensions to Atom. Even if your package creates ten different views and
appends them to different parts of the DOM, it's all managed from your top-level
object. Your package's top-level module should implement the following methods:
- `activate(rootView, state)` **Required**: This method is called when your
package is loaded. It is always passed the window's global `rootView`, and is
sometimes passed state data if the window has been reloaded and your module
implements the `serialize` method.
- `serialize()` **Optional**: This method is called when the window is shutting
down, allowing you to return JSON to represent the state of your component. When
the window is later restored, the data you returned will be passed to your
module's `activate` method so you can restore your view to where the user left
off.
- `deactivate()` **Optional**: This method is called when the window is shutting
down. If your package is watching any files or holding external resources in any
other way, release them here. If you're just subscribing to things on window
you don't need to worry because that's getting torn down anyway.
## A Simple Package Layout:
```text
my-package/
package.json # optional
index.coffee
lib/
my-package.coffee
```
`index.coffee`:
```coffeescript
module.exports = require "./lib/my-package"
```
`my-package/my-package.coffee`:
```coffeescript
module.exports =
activate: (rootView, state) -> # ...
deactivate: -> # ...
serialize: -> # ...
```
Beyond this simple contract, your package has full access to Atom's internal
API. Anything we call internally, you can call as well. Be aware that since we
are early in development, APIs are subject to change and we have not yet
established clear boundaries between what is public and what is private. Also,
Please collaborate with us if you need an API that doesn't exist. Our goal is
to build out Atom's API organically based on the needs of package authors like
you. See [Atom's built-in packages](https://github.com/github/atom/tree/master/src/packages)
for examples of Atom's API in action.
## Stylesheets
Stylesheets for your package should be placed in the `stylesheets` directory.
Any stylesheets in this directory will be loaded and attached to the DOM when
your package is activated. An optional `stylesheets` key in your `package.json`
can list the stylesheets by name in order to specify a load order; otherwise
stylesheets are loaded alphabetically.
## Keymaps
Keymaps are placed in the `keymaps` subdirectory. By default, all keymaps will be
loaded in alphabetical order unless there is a `keymaps` array in `package.json`
specifying which keymaps to load and in what order. It's a good idea to provide
default keymaps for your extension. They can be customized by users later. See
the (main keymaps documentation)[#keymaps] for more information on how keymaps
work.
## Snippets
An extension can supply snippets in a `snippets` directory as `.cson` or `.json`
files:
```coffeescript
".source.coffee .specs":
"Expect":
prefix: "ex"
body: "expect($1).to$2"
"Describe":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
```
A snippets file contains scope selectors at its top level. Each scope selector
contains a hash of snippets keyed by their name. Each snippet specifies a
`prefix` and a `body` key.
All files in the directory will be automatically loaded, unless the
`package.json` supplies a `snippets` key as a manifest. As with all scoped
items, snippets loaded later take precedence over earlier snippets when two
snippets match a scope with the same specificity.
-55
Ver Arquivo
@@ -1,55 +0,0 @@
# Authoring A Theme
If you understand CSS, you can write an Atom theme easily. Your theme can style
Atom's user interface, specify the appearance of syntax-highlighted code, or
both. For making a syntax highlighting theme, refer to
[section 12.4 of the TextMate Manual](http://manual.macromates.com/en/language_grammars.html)
for a list of the common scopes used by TextMate grammars. You'll just need to
translate scope names to CSS classes. To theme Atom's user interface, take a
look at the existing light and dark themes for an example. Pressing `alt-meta-i`
and inspecting the Atom's markup directly can also be helpful.
The most basic theme is just a `.css` file. More complex themes occupy their own
folder, which can contain multiple stylesheets along with an optional
`package.cson` file containing a manifest to control their load-order:
```text
~/.atom/themes/
rockstar.css
rainbow/
package.json
core.css
editor.css
tree-view.css
```
package.cson:
```coffee-script
stylesheets: ["core.css", "editor.less", "tree-view.css"]
```
The `package.cson` file specifies which stylesheets to load and in what order
with the `stylesheets` key. If no manifest is specified, all stylesheets are
loaded in alphabetical order when the user selects the theme.
## Theme Extensions (Not Yet Implemented)
A theme may need to be extended to cover DOM elements that are introduced by a
third-party Atom package. When a package is loaded, stylesheets with the same
name as the package will automatically be loaded from the `packages` directory
of active themes:
```text
~/.atom/themes/
midnight/midnight.less
midnight/packages/terminal.less
midnight/packages/tree-view.less
```
In the example above, if the `midnight` theme is active, its `terminal` and
`tree-view` stylesheets will be loaded automatically if and when those packages
are activated. If you author an extension to a theme consider sending its author
a pull request to have it included in the theme by default. Package-specific
theme stylesheets need not be listed in the theme's `package.json` because they
will be loaded automatically when the package is loaded.
-25
Ver Arquivo
@@ -1,25 +0,0 @@
## Command Panel
A partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam)
*Examples*
`,` selects entire file
`1,4` selects lines 1-4
`/pattern` selects the first match after the cursor/selection
`s/pattern/replacement` replace first text matching pattern in current selection
`s/pattern/replacement/g` replace all text matching pattern in current selection
`,s/pattern/replacement/g` replace all text matching pattern in file
`1,4s/pattern/replacement` replace all text matching pattern in lines 1-4
`x/pattern` selects all matches in the current selections
`,x/pattern` selects all matches in the file
`,x/pattern1/ x/pattern2` "structural regex" - selects all matches of pattern2 inside matches of pattern1
-3
Ver Arquivo
@@ -1,3 +0,0 @@
# Built-In Packages
Atom ships with several optional built-in packages.
-7
Ver Arquivo
@@ -1,7 +0,0 @@
## Markdown Preview
The `markdown-preview` extension displays the rendered HTML for the markdown
in the current editor.
It can be activated from the editor using the `ctrl-m` key-binding and is
currently enabled for `.markdown`, `.md`, `.mkd`, `.mkdown`, and `.ron` files.
-34
Ver Arquivo
@@ -1,34 +0,0 @@
## Wrap Guide
The `wrap-guide` extension places a vertical line in each editor at a certain
column to guide your formatting so lines do not exceed a certain width.
By default the wrap-guide is placed at the 80th column.
### Configuration
You can customize where the column is placed using the `wrapGuide.columns`
config option.
config.cson:
```coffee-cript
"wrap-guide":
columns: [
{ pattern: "\.mm$", column: 200 },
{ pattern: "\.cc$", column: 120 }
]
```
The above config example would place the guide at the 200th column for paths
that end with `.mm` and place the guide at the 120th column for paths that end
with `.cc`.
You can configure the color and/or width of the line by adding the following
CSS to a custom stylesheet:
```css
.wrap-guide {
width: 10px;
background-color: red;
}
```
+395
Ver Arquivo
@@ -0,0 +1,395 @@
# Creating Packages
Packages are at the core of Atom. Nearly everything outside of the main editor
is handled by a package. That includes "core" pieces like the [file tree][file-tree],
[status bar][status-bar], [syntax highlighting][cs-syntax], and more.
A package can contain a variety of different resource types to change Atom's
behavior. The basic package layout is as follows:
```text
my-package/
grammars/
keymaps/
lib/
menus/
spec/
snippets/
stylesheets/
index.coffee
package.json
```
Not every package will have (or need) all of these directories.
We have [a tutorial on creating your first package][first-package].
## package.json
Similar to [npm packages][npm], Atom packages contain a _package.json_ file
in their top-level directory. This file contains metadata about the package,
such as the path to its "main" module, library dependencies, and manifests
specifying the order in which its resources should be loaded.
In addition to the regular [npm package.json keys][npm-keys] available, Atom
package.json files have their own additions.
- `main` (**Required**): the path to the CoffeeScript file that's the entry point
to your package
- `stylesheets` (**Optional**): an Array of Strings identifying the order of the
stylesheets your package needs to load. If not specified, stylesheets in the
_stylesheets_ directory are added alphabetically.
- `keymaps`(**Optional**): an Array of Strings identifying the order of the
key mappings your package needs to load. If not specified, mappings in the
_keymaps_ directory are added alphabetically.
- `menus`(**Optional**): an Array of Strings identifying the order of
the menu mappings your package needs to load. If not specified, mappings
in the _keymap_ directory are added alphabetically.
- `snippets` (**Optional**): an Array of Strings identifying the order of the
snippets your package needs to load. If not specified, snippets in the
_snippets_ directory are added alphabetically.
- `activationEvents` (**Optional**): an Array of Strings identifying events that
trigger your package's activation. You can delay the loading of your package
until one of these events is trigged.
## Source Code
If you want to extend Atom's behavior, your package should contain a single
top-level module, which you export from _index.coffee_ (or whichever file is
indicated by the `main` key in your _package.json_ file). The remainder of your
code should be placed in the `lib` directory, and required from your top-level
file.
Your package's top-level module is a singleton object that manages the lifecycle
of your extensions to Atom. Even if your package creates ten different views and
appends them to different parts of the DOM, it's all managed from your top-level
object.
Your package's top-level module should implement the following methods:
- `activate(rootView, state)`: This **required** method is called when your
package is loaded. It is always passed the window's global `rootView`, and is
sometimes passed state data if the window has been reloaded and your module
implements the `serialize` method. Use this to do initialization work when your
package is started (like setting up DOM elements or binding events).
- `serialize()`: This **optional** method is called when the window is shutting
down, allowing you to return JSON to represent the state of your component. When
the window is later restored, the data you returned is passed to your
module's `activate` method so you can restore your view to where the user left
off.
- `deactivate()`: This **optional** method is called when the window is shutting
down. If your package is watching any files or holding external resources in any
other way, release them here. If you're just subscribing to things on window,
you don't need to worry because that's getting torn down anyway.
### Simple Package Code
Your directory would look like this:
```text
my-package/
package.json
index.coffee
lib/
my-package.coffee
```
`index.coffee` might be:
```coffeescript
module.exports = require "./lib/my-package"
```
`my-package/my-package.coffee` might start:
```coffeescript
module.exports =
activate: (rootView, state) -> # ...
deactivate: -> # ...
serialize: -> # ...
```
Beyond this simple contract, your package has access to Atom's API. Be aware
that since we are early in development, APIs are subject to change and we have
not yet established clear boundaries between what is public and what is private.
Also, please collaborate with us if you need an API that doesn't exist. Our goal
is to build out Atom's API organically based on the needs of package authors
like you.
## Stylesheets
Stylesheets for your package should be placed in the _stylesheets_ directory.
Any stylesheets in this directory will be loaded and attached to the DOM when
your package is activated. Stylesheets can be written as CSS or [LESS] (but LESS
is recommended).
Ideally, you won't need much in the way of styling. We've provided a standard
set of components which define both the colors and UI elements for any package
that fits into Atom seamlessly. You can view all of Atom's UI components by opening
the styleguide: open the command palette (`cmd-p`) and search for _styleguide_,
or just type `cmd-ctrl-G`.
If you _do_ need special styling, try to keep only structural styles in the package
stylesheets. If you _must_ specify colors and sizing, these should be taken from
the active theme's [ui-variables.less][ui-variables]. For more information, see the
[theme variables docs][theme-variables]. If you follow this guideline, your package
will look good out of the box with any theme!
An optional `stylesheets` array in your _package.json_ can list the stylesheets
by name to specify a loading order; otherwise, stylesheets are loaded
alphabetically.
## Keymaps
It's recommended that you provide key bindings for commonly used actions for
your extension, especially if you're also adding a new command:
```coffeescript
'.tree-view-scroller':
'ctrl-V': 'changer:magic'
```
Keymaps are placed in the _keymaps_ subdirectory. By default, all keymaps are
loaded in alphabetical order. An optional `keymaps` array in your _package.json_
can specify which keymaps to load and in what order.
Keybindings are executed by determining which element the keypress occured on. In
the example above, `changer:magic` command is executed when pressing `ctrl-V` on
the `.tree-view-scroller` element.
See the [main keymaps documentation][keymaps] for more detailed information on
how keymaps work.
## Menus
Menus are placed in the _menus_ subdirectory. By default, all menus are loaded
in alphabetical order. An optional `menus` array in your _package.json_ can
specify which menus to load and in what order.
### Application Menu
It's recommended that you create an application menu item for common actions
with your package that aren't tied to a specific element:
```coffee-script
'menu': [
{
'label': 'Packages'
'submenu': [
{
'label': 'My Package'
'submenu': [
{
'label': 'Toggle'
'command': 'my-package:toggle'
}
]
}
]
}
]
```
To add your own item to the application menu, simply create a top level `menu`
key in any menu configuration file in _menus_. This can be a JSON or [CSON] file.
The menu templates you specify are merged with all other templates provided
by other packages in the order which they were loaded.
### Context Menu
It's recommended to specify a context menu item for commands that are linked to
specific parts of the interface, like adding a file in the tree-view:
```coffee-script
'context-menu':
'.tree-view':
'Add file': 'tree-view:add-file'
'#root-view':
'Inspect Element': '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.
In the example above, the `Add file` item will only appear when the focused item
or one of its parents has the `tree-view` class applied to it.
## Snippets
An extension can supply language snippets in the _snippets_ directory which
allows the user to enter repetitive text quickly:
```coffeescript
".source.coffee .specs":
"Expect":
prefix: "ex"
body: "expect($1).to$2"
"Describe":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
```
A snippets file contains scope selectors at its top level (`.source.coffee
.spec`). Each scope selector contains a hash of snippets keyed by their name
(`Expect`, `Describe`). Each snippet also specifies a `prefix` and a `body` key.
The `prefix` represents the first few letters to type before hitting the `tab`
key to autocomplete. The `body` defines the autofilled text. You can use
placeholders like `$1`, `$2`, to indicate regions in the body the user can
navigate to every time they hit `tab`.
All files in the directory are automatically loaded, unless the _package.json_
supplies a `snippets` key. As with all scoped items, snippets loaded later take
precedence over earlier snippets when two snippets match a scope with the same
specificity.
## Language Grammars
If you're developing a new language grammar, you'll want to place your file in
the _grammars_ directory. Each grammar is a pairing of two keys, `match` and
`captures`. `match` is a regular expression identifying the pattern to
highlight, while `captures` is an object representing what to do with each
matching group.
For example:
```coffeescript
{
'match': '(?:^|\\s)(__[^_]+__)'
'captures':
'1': 'name': 'markup.bold.gfm'
}
```
This indicates that the first matching capture (`(__[^_]+__)`) should have the
`markup.bold.gfm` token applied to it.
To capture a single group, simply use the `name` key instead:
```coffeescript
{
'match': '^#{1,6}\\s+.+$'
'name': 'markup.heading.gfm'
}
```
This indicates that Markdown header lines (`#`, `##`, `###`) should be applied
with the `markup.heading.gfm` token.
More information about the significance of these tokens can be found in
[section 12.4 of the TextMate Manual][tm-tokens].
Your grammar should also include a `filetypes` array, which is a list of file
extensions your grammar supports:
```coffeescript
'fileTypes': [
'markdown'
'md'
'mkd'
'mkdown'
'ron'
]
```
## Bundle External Resources
It's common to ship external resources like images and fonts in the package, to
make it easy to reference the resources in HTML or CSS, you can use the `atom`
protocol URLs to load resources in the package.
The URLs should be in the format of
`atom://package-name/relative-path-to-package-of-resource`, for example, the
`atom://image-view/images/transparent-background.gif` would be equivablent to
`~/.atom/packages/image-view/images/transparent-background.gif`.
You can also use the `atom` protocol URLs in themes.
## Writing Tests
Your package **should** have tests, and if they're placed in the _spec_
directory, they can be run by Atom.
Under the hood, [Jasmine] executes your tests, so you can assume that any DSL
available there is available to your package as well.
**FIXME: Explain the following**
* jasmine
* jasmine-focused
* `spec/fixtures` and global.project
* setTimeout
* whatever else is different in spec-helper
## Running Tests
TODO: Probably use the menu option now.
Once you've got your test suite written, the recommended way to run it is `apm
test`. `apm test` prints its output to the console and returns the proper status
code depending on whether tests passed or failed.
## Publishing
Atom bundles a command line utility called [apm] which can be used to publish
Atom packages to the public registry.
Once your package is written and ready for distribution you can run the
following to publish your package:
```sh
cd my-package
apm publish minor
```
This will update your `package.json` to have a new minor `version`, commit the
change, create a new [Git tag][git-tag], and then upload the package to the
registry.
Run `apm help publish` to see all the available options and `apm help` to see
all the other available commands.
## Included Libraries
FIXME: Describe `require 'atom'
In addition to core node.js modules, all packages can `require` the following
popular libraries into their packages:
* [SpacePen] (as `require 'space-pen'`)
* [jQuery] (as `require 'jquery'`)
* [Underscore] (as `require 'underscore'`)
Additional libraries can be found by browsing Atom's *node_modules* folder.
[file-tree]: https://github.com/atom/tree-view
[status-bar]: https://github.com/atom/status-bar
[cs-syntax]: https://github.com/atom/language-coffee-script
[npm]: http://en.wikipedia.org/wiki/Npm_(software)
[npm-keys]: https://npmjs.org/doc/json.html
[apm]: https://github.com/atom/apm
[git-tag]: http://git-scm.com/book/en/Git-Basics-Tagging
[wrap-guide]: https://github.com/atom/wrap-guide/
[keymaps]: internals/keymaps.md
[theme-variables]: theme-variables.md
[tm-tokens]: http://manual.macromates.com/en/language_grammars.html
[spacepen]: https://github.com/nathansobo/space-pen
[path]: http://nodejs.org/docs/latest/api/path.html
[jquery]: http://jquery.com/
[underscore]: http://underscorejs.org/
[jasmine]: https://github.com/pivotal/jasmine
[cson]: https://github.com/atom/season
[less]: http://lesscss.org
[ui-variables]: https://github.com/atom/atom-dark-ui/blob/master/stylesheets/ui-variables.less
[first-package]: your-first-package.html
+135
Ver Arquivo
@@ -0,0 +1,135 @@
# Creating a Theme
Atom's interface is rendered using HTML, and it's styled via [LESS] (a superset
of CSS). Don't worry if you haven't heard of LESS before; it's just like CSS, but
with a few handy extensions.
Since CSS is the basis of the theming system, we can load multiple themes within
Atom, and the themes behave just as they would on a website. Themes loaded first
are overridden by themes which are loaded later. The order of theme loading is
controlled within the Settings/Themes pane.
This flexibility is helpful for users that prefer a light interface with a dark
syntax theme. Atom currently has only interface and syntax themes, but it is
possible to create a theme to style something specific &mdash; say, changing
the colors in the tree view or creating a language specific syntax theme.
## Getting Started
Themes are pretty straight forward but it's still helpful to be familiar with
a few things before starting:
* LESS is a superset of CSS, but it has some really handy features like
variables. If you aren't familiar with its syntax take a few minutes
to [familiarize yourself][less-tutorial].
* You may also want to review the concept of a _[package.json]_, too. This file
is used to help distribute your theme to Atom users.
There are two types of themes you can create: syntax themes and interface themes.
The differences between them are simply a matter of what they target and what
they provide. Syntax themes focus on the entire editor pane, while interface themes
target elements which are outside of the editor.
## Creating a Syntax Theme
Let's create your first theme.
To get started, hit `cmd-p`, and start typing "Generate Theme" to generate
a package. Select "Generate Theme," and you'll be asked for a theme name. Let's
call ours _motif_.
Atom will pop open a new window, showing the _motif_ theme, with a default set of
folders and files created for us. If you hit `cmd-,` and navigate to the Themes
menu option, you'll see the `motif` theme already available. Drag it over from
"Enabled Themes" to "Available Themes."
Open up _stylesheets/colors.less_ to change the various colors variables which
have been already been defined. For example, turn `@red` into `#f4c2c1`.
Then, open _stylesheets/base.less_, and modify the various syntax CSS selectors
that have been already been defined. Each of these selectors represents a different
part of the Atom window. Themes that don't need to modify a particular region
can simply remove the selectors they don't need.
As an example, let's make the `.gutter` `background-color` into `@red`.
Reload Atom by hitting `cmd-r` to see the changes you made reflected in your Atom
window. Pretty neat!
## Creating an Interface Theme
Interface themes **must** provide a `ui-variables.less` file which contains all
of the variables provided by the [core themes][ui-variables].
To create an interface UI theme, do the following:
1. Fork one of the following repos
1. [atom-dark-ui]
1. [atom-light-ui]
1. Open a terminal in the forked theme's directory
1. Open your new theme in a Dev Mode Atom window (run `atom -d .` in the terminal or use the __View > Developer > Open in Dev Mode__ menu)
1. Change the name of the theme in the theme's `package.json` file
1. Run `apm link` to tell Atom about your new theme
1. Reload Atom (`cmd-r`)
1. Enable the theme via the themes panel in settings
1. Make changes! Since you opened the theme in a Dev Mode window, changes will
be instantly reflected in the editor without having to reload.
## Development workflow
There are a few of tools to help make theme development faster.
### Live Reload
Reloading by hitting `cmd-r` after you make changes to your theme is less than ideal.
Atom supports [live updating][livereload] of styles on Dev Mode Atom windows.
To enable a Dev Mode window:
1. Open your theme directory in a dev window by either going to the
__View > Developer > Open in Dev Mode__ menu or by hitting the `cmd-shift-o`
shortcut
1. Make a change to your theme file and save it. Your change should be
immediately applied!
If you'd like to reload all the styles at any time, you can use the shortcut
`cmd-ctrl-R`.
### Developer Tools
Atom is based on the Chrome browser, and supports Chrome's Developer Tools. You
can open them by selecting the __View > Toggle Developer Tools__ menu, or by using
the `cmd-option-i` shortcut.
The dev tools allow you to inspect elements and take a look at their CSS
properties.
![devtools-img]
Check out Google's [extensive tutorial][devtools-tutorial] for a short introduction.
### Atom Styleguide
If you are creating an interface theme, you'll want a way to see how your theme
changes affect all the components in the system. The [styleguide] is a page with
every component Atom supports rendered.
To open the styleguide, open the command palette (`cmd-p`) and search for
_styleguide_, or use the shortcut `cmd-ctrl-shift-g`.
![styleguide-img]
[less]: http://lesscss.org/
[git]: http://git-scm.com/
[atom]: https://atom.io/
[package.json]: ./creating-a-package.html#package-json
[less-tutorial]: https://speakerdeck.com/danmatthews/less-css
[devtools-tutorial]: https://developers.google.com/chrome-developer-tools/docs/elements
[ui-variables]: ./theme-variables.html
[livereload]: https://github.com/atom/dev-live-reload
[styleguide]: https://github.com/atom/styleguide
[atom-dark-ui]: https://github.com/atom/atom-dark-ui
[atom-light-ui]: https://github.com/atom/atom-light-ui
[styleguide-img]: https://f.cloud.github.com/assets/69169/1347390/2d431d98-36af-11e3-8f8e-3f4ce1e67adb.png
[devtools-img]: https://f.cloud.github.com/assets/69169/1347391/2d51f91c-36af-11e3-806f-f7b334af43e9.png
[themesettings-img]: https://f.cloud.github.com/assets/69169/1347569/3150bd0c-36b2-11e3-9d69-423503acfe3f.png
+132
Ver Arquivo
@@ -0,0 +1,132 @@
# Customizing Atom
To change a setting, configure a theme, or install a package just open the
Settings pane in the current window by pressing `cmd+,`.
## Changing The Theme
Because Atom themes are based on CSS, it's possible (and encouraged) to have
multiple themes active at the same time. Atom comes with both light and dark
interface themes as well as several syntax themes (you can also [create your
own][create-theme]).
To change the active themes just open the Settings pane (`cmd-,`) and select the
`Themes` tab. You can install non-bundled themes by going to the `Available
Themes` section on the `Packages` tab within the Settings panel.
## Installing Packages
You can install non-bundled packages by going to the `Available Packages`
section on the `Packages` tab within the Settings panel (`cmd-,`).
## Customizing Key Bindings
Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
to apply styles to elements, Atom keymaps use selectors to associate keystrokes
with events in specific contexts. Here's a small example, excerpted from Atom's
built-in keymaps:
```coffee-script
'.editor':
'enter': 'editor:newline'
'body':
'ctrl-P': 'core:move-up'
'ctrl-p': 'core:move-down'
```
This keymap defines the meaning of `enter` in two different contexts. In a
normal editor, pressing `enter` emits the `editor:newline` event, which causes
the editor to insert a newline. But if the same keystroke occurs inside of a
select list's mini-editor, it instead emits the `core:confirm` event based on
the binding in the more-specific selector.
By default, `~/.atom/keymap.cson` is loaded when Atom is started. It will always
be loaded last, giving you the chance to override bindings that are defined by
Atom's core keymaps or third-party packages.
You'll want to know all the commands available to you. Open the Settings panel
(`cmd-,`) and select the _Keybindings_ tab. It will show you all the keybindings
currently in use.
## Advanced Configuration
Atom loads configuration settings from the `config.cson` file in your _~/.atom_
directory, which contains CoffeeScript-style JSON:
```coffeescript
core:
hideGitIgnoredFiles: true
editor:
fontSize: 18
```
The configuration itself is grouped by the package name or one of the two core
namespaces: `core` and `editor`.
### Configuration Key Reference
- `core`
- `disabledPackages`: An array of package names to disable
- `excludeVcsIgnoredPaths`: Don't search within files specified by _.gitignore_
- `hideGitIgnoredFiles`: Whether files in the _.gitignore_ should be hidden
- `ignoredNames`: File names to ignore across all of Atom
- `projectHome`: The directory where projects are assumed to be located
- `themes`: An array of theme names to load, in cascading order
- `editor`
- `autoIndent`: Enable/disable basic auto-indent (defaults to `true`)
- `autoIndentOnPaste`: Enable/disable auto-indented pasted text (defaults to `false`)
- `nonWordCharacters`: A string of non-word characters to define word boundaries
- `fontSize`: The editor font size
- `fontFamily`: The editor font family
- `invisibles`: Specify characters that Atom renders for invisibles in this hash
- `tab`: Hard tab characters
- `cr`: Carriage return (for Microsoft-style line endings)
- `eol`: `\n` characters
- `space`: Leading and trailing space characters
- `normalizeIndentOnPaste`: Enable/disable conversion of pasted tabs to spaces
- `preferredLineLength`: Identifies the length of a line (defaults to `80`)
- `showInvisibles`: Whether to render placeholders for invisible characters (defaults to `false`)
- `showIndentGuide`: Show/hide indent indicators within the editor
- `showLineNumbers`: Show/hide line numbers within the gutter
- `softWrap`: Enable/disable soft wrapping of text within the editor
- `softWrapAtPreferredLineLength`: Enable/disable soft line wrapping at `preferredLineLength`
- `tabLength`: Number of spaces within a tab (defaults to `2`)
- `fuzzyFinder`
- `ignoredNames`: Files to ignore *only* in the fuzzy-finder
- `whitespace`
- `ensureSingleTrailingNewline`: Whether to reduce multiple newlines to one at the end of files
- `removeTrailingWhitespace`: Enable/disable striping of whitespace at the end of lines (defaults to `true`)
- `wrapGuide`
- `columns`: Array of hashes with a `pattern` and `column` key to match the
the path of the current editor to a column position.
### Quick Personal Hacks
### user.coffee
When Atom finishes loading, it will evaluate _user.coffee_ in your _~/.atom_
directory, giving you a chance to run arbitrary personal CoffeeScript code to
make customizations. You have full access to Atom's API from code in this file.
If customizations become extensive, consider [creating a
package][create-a-package].
### user.less
If you want to apply quick-and-dirty personal styling changes without creating
an entire theme that you intend to distribute, you can add styles to
_user.less_ in your _~/.atom_ directory.
For example, to change the color of the highlighted line number for the line
that contains the cursor, you could add the following style to _user.less_:
```less
@highlight-color: pink;
.editor .line-number.cursor-line {
color: @highlight-color;
}
```
[create-a-package]: creating-packages.md
[create-theme]: creating-a-theme.md
+54 -221
Ver Arquivo
@@ -1,61 +1,42 @@
# Getting Started
Welcome to Atom. This documentation is intended to offer a basic introduction
of how to get productive with this editor. Then we'll delve into more details
about configuring, theming, and extending Atom.
Welcome to Atom! This guide provides a quick introduction so you can be
productive as quickly as possible. There are also guides which cover
[configuring], [theming], and [extending] Atom.
## The Command Palette
If there's one key-command you learn in Atom, it should be `meta-p`. You can
always hit `meta-p` to bring up a list of commands that are relevant to the
currently focused UI element. If there is a key binding for a given command, it
is also displayed. This is a great way to explore the system and get to know the
key commands interactively. If you'd like to add or change a binding for a
command, refer to the [keymaps](#keymaps) section to learn how.
If there's one key-command you must remember in Atom, it should be `cmd-p`. You
can always hit `cmd-p` to bring up a list of commands that are relevant to the
currently focused interface element. If there is a key binding for a given
command, it is also displayed. This is a great way to explore the system and get
to know the key commands interactively. If you'd like to learn about adding or
changing a binding for a command, refer to the [key bindings][key-bindings]
section below.
![Command Palette](http://f.cl.ly/items/32041o3w471F3C0F0V2O/Screen%20Shot%202013-02-13%20at%207.27.41%20PM.png)
![Command Palette]
## Basic Key Bindings
Remember you can always use `meta-p` to explore available commands and their
bindings, but here's a list of a few useful commands.
- `meta-o` : open file/directory
- `meta-n` : new window
- `meta-r` : reload the current window
- `meta-alt-ctrl-s` : run specs
- `meta-t` : open fuzzy file finder
- `meta-;` : open command prompt
- `meta-f` : open command prompt with `/`
- `meta-g` : repeat the last local search
- `meta-shift-f` : open command prompt with `Xx/` for a project-wide search
- `meta-\` : focus/open tree view, or close it when it is focused
- `meta-shift-\` : open tree view with the current file selected
- `ctrl-w v`, `ctrl-|` : split screen vertically
- `ctrl-w s`, `ctrl--` : split screen horizontally
- `meta-l` : go to line
## Usage Basics
### If You See A Rendering Bug
Things are pretty stable, but we think we have a couple rendering bugs lurking
that are hard to reproduce. If you see one, please hit `meta-p` and type
"save debug snapshot". Run that command to save a snapshot of the misbehaving
editor and send it to us, along with a screenshot and your best description of
how you produced the bug. Refreshing with `meta-r` should usually resolve the
issue so you can keep working.
## The Basics
### Working With Files
Atom windows are scoped to the directory in which they're opened from. So if you
launch Atom from the command line, everything will be relative to the current
directory. This means that the tree view on the left will only show files
contained within that directory.
This can be a useful way to organize multiple projects, as each project will be
contained within it's own window and it's state will be unique to that window.
#### Finding Files
The fastest way to find a file in your project is to use the fuzzy finder. Just
hit `meta-t` and start typing the name of the file you're looking for. If you
already have the file open and want to jump to it, hit `meta-b` to bring up a
searchable list of open buffers.
hit `cmd-t` and start typing the name of the file you're looking for. If you
already have the file open as a tab and want to jump to it, hit `cmd-b` to bring
up a searchable list of open buffers.
You can also use the tree view to navigate to a file. To open or move focus to
the tree view, hit `meta-\`. You can then navigate to a file and select it with
the tree view, hit `cmd-\`. You can then navigate to a file and select it with
`return`.
#### Adding, Moving, Deleting Files
@@ -68,202 +49,54 @@ needed.
To move or rename a file or directory, select it in the tree view and hit `m`.
To delete a file, select it in the tree view and hit `delete`.
### Searching For Stuff
### Searching
#### Using the Command Line
#### Find and Replace
Atom has a command line similar to editors Emacs and Vim, which is currently the
only interface for performing searches. Hitting `meta-f` will open the command
line prepopulated with the `/` command, which finds forward in the current
buffer from the location of the cursor. Pressing `meta-g` will repeat the
search. Hitting `meta-shift-f` will open the command line prepopulated with
`Xx/`, which is a composite command that performs a global search. The results
of the search will appear in the operation preview list, which you can focus
with `meta-:`.
Atom's command language is still under construction and is loosely based on
the [Sam editor](http://doc.cat-v.org/bell_labs/sam_lang_tutorial/) from the
Plan 9 operating system. It's similar to Ex mode in Vim, but is selection-based
rather than line-based. It allows you to compose commands together in
interesting ways.
To search within a buffer use `cmd-f`. To search the entire project use
`cmd-shift-f`. To find and replace within the current buffer use `cmd-alt-f`.
#### Navigating By Symbols
If you want to jump to a method, you can use the ctags-based symbols package.
The `meta-j` binding will open a list of all symbols in the current file. The
`meta-shift-j` binding will open a list of all symbols for the current project
based on a tags file. And `meta-.` will jump to the tag for the word currently
under the cursor. Make sure you have a tags file generated for the project for
the latter of these two bindings to work. Also, if you're editing CoffeeScript,
it's a good idea to update your `~/.ctags` file to understand the language. Here
is [a good example](https://github.com/kevinsawicki/dotfiles/blob/master/.ctags).
If you want to jump to a method, the `cmd-j` binding opens a list of all symbols
in the current file. `cmd-.` jumps to the tag for the word currently under the
cursor.
### Replacing Stuff
To perform a replacement, open up the command line with `meta-;` and use the `s`
command, as follows: `s/foo/bar/g`. Note that if you have a selection, the
replacement will only occur inside the selected text. An empty selection will
cause the replacement to occur across the whole buffer. If you want to run the
command on the whole buffer even if you have a selection, precede your
substitution with the `,` address, which specifies that the command following it
operate on the whole buffer.
To search for symbols across your project use `cmd-shift-j`, but you'll need to
make sure you have a tags file generated for the project Also, if you're editing
CoffeeScript, it's a good idea to update your `~/.ctags` file to understand the
language. Here is [a good example][ctags].
### Split Panes
You can split any editor pane horizontally or vertically by using `alt-command`
plus the arrow in the direction you wand to split. Once you have a split pane,
you can move focus between them with `ctrl-w w`. To close a pane, close all tabs
inside it.
You can split any editor pane horizontally or vertically by using `ctrl-w s` or
`ctrl-w v`. Once you have a split pane, you can move focus between them with
`ctrl-tab` or `ctrl-w w`. To close a pane, close all tabs inside it.
### Folding
You can fold everything with `ctrl-shift-[` and unfold everything with
`ctrl-shift-]`. Or, you can fold / unfold by a single level with `ctrl-[` and
`ctrl-]`. The user interaction around folds is still a bit rough, but we're
planning to improve it soon.
You can fold everything with `ctrl-{` and unfold everything with
`ctrl-}`. Or, you can fold / unfold by a single level with `ctrl-[` and
`ctrl-]`.
### Soft-Wrap
If you want to toggle soft wrap, trigger the command from the command palette.
Press `meta-p` to open the palette, then type "wrap" to find the correct
Hit `cmd-p` to open the palette, then type "wrap" to find the correct
command.
## Your .atom Directory
## Configuration
When you install Atom, a `.atom` directory is created in your home directory.
If you press `meta-,`, that directory will be opened in a new window. For the
time being, this will serve as the primary interface for adjusting configuration
settings, adding and changing key bindings, tweaking styles, etc.
If you press `cmd-,`, a configuration panel will appear in the currently focused
pane. This serves as the primary interface for adjusting settings, installing
packages and changing themes.
## Configuration Settings
For more advanced configuration see the [customization guide][customization].
Atom loads configuration settings from the `config.cson` file in your `~/.atom`
directory, which contains CoffeeScript-style JSON:
```coffeescript
core:
hideGitIgnoredFiles: true
editor:
fontSize: 18
```
Configuration is broken into namespaces, which are defined by the config hash's
top-level keys. In addition to Atom's core components, each package may define
its own namespace.
### Glossary of Config Keys
- core
- disablePackages: An array of package names to disable
- hideGitIgnoredFiles: Whether files in the .gitignore should be hidden
- ignoredNames: File names to ignore across all of atom (not fully implemented)
- themes: An array of theme names to load, in cascading order
- editor
- autoIndent: Enable/disable basic auto-indent (defaults to true)
- autoIndentOnPaste: Enable/disable auto-indented pasted text (defaults to false)
- autosave: Save a file when an editor loses focus
- nonWordCharacters: A string of non-word characters to define word boundaries
- fontSize
- fontFamily
- invisibles: Specify characters that Atom renders for invisibles in this hash
- tab: Hard tab characters
- cr: Carriage return (For Microsoft-style line endings)
- eol: `\n` characters
- space: Leading and trailing space characters
- preferredLineLength: Packages such as autoflow use this (defaults to 80)
- showInvisibles: Whether to render placeholders for invisible characters (defaults to false)
- fuzzyFinder
- ignoredNames: Files to ignore *only* in the fuzzy-finder
- stripTrailingWhitespace
- singleTrailingNewline: Whether to reduce multiple newlines to one at the end of files
- wrapGuide
- columns: Array of hashes with a `pattern` and `column` key to match the
the path of the current editor to a column position.
## Customizing Key Bindings
Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
to apply styles to elements, Atom keymaps use selectors to associate keystrokes
with events in specific contexts. Here's a small example, excerpted from Atom's
built-in keymaps:
```coffee-script
'.editor':
'enter': 'editor:newline'
".select-list .editor.mini":
'enter': 'core:confirm',
```
This keymap defines the meaning of `enter` in two different contexts. In a
normal editor, pressing `enter` emits the `editor:newline` event, which causes
the editor to insert a newline. But if the same keystroke occurs inside of a
select list's mini-editor, it instead emits the `core:confirm` event based on
the binding in the more-specific selector.
By default, any keymap files in your `~/.atom/keymaps` directory will be loaded
in alphabetical order when Atom is started. They will always be loaded last,
giving you the chance to override bindings that are defined by Atom's core
keymaps or third-party packages.
## Changing The Theme
Atom comes bundles with two themes `atom-dark-*` and `atom-light-*`.
Because Atom themes are based on CSS, it's possible to have multiple themes
active at the same time. For example, you'll usually select a theme for the UI
and another theme for syntax highlighting. You can select themes by specifying
them in the `core.themes` array in your `config.cson`:
```coffee-script
core:
themes: ["atom-light-ui", "atom-light-syntax"]
# or, if the sun is going down:
# themes: ["atom-dark-ui", "atom-dark-syntax"]
```
You install new themes by placing them in the `~/.atom/themes` directory. A
theme can be a CSS file, a directory containing multiple CSS files, or a
TextMate theme (either `.tmTheme` or `.plist`).
## Installing Packages (Partially Implemented)
To install a package, clone it into the `~/.atom/packages` directory. Atom will
also load grammars and snippets from TextMate bundles. If you want to disable a
package without removing it from the packages directory, insert its name into
`config.core.disabledPackages`:
config.cson:
```coffeescript
core:
disabledPackages: [
"fuzzy-finder",
"tree-view"
]
```
## Quick Personal Hacks
### user.coffee
When Atom finishes loading, it will evaluate `user.coffee` in your `~/.atom`
directory, giving you a chance to run arbitrary personal CoffeeScript code to
make customizations. You have full access to Atom's API from code in this file.
Please refer to the Atom Internals Guide for more information. If your
customizations become extensive, consider creating a package.
### user.css
If you want to apply quick-and-dirty personal styling changes without creating
an entire theme that you intend to distribute, you can add styles to
`user.css` in your `~/.atom` directory.
For example to change the color of the highlighted line number for the line that
contains the cursor, you could add the following style to `user.css`:
```css
.editor .line-number.cursor-line {
color: pink;
}
```
[configuring]: customizing-atom.md
[theming]: creating-a-theme.md
[extending]: creating-a-package.md
[customization]: customizing-atom.md
[key-bindings]: #customizing-key-bindings
[command palette]: https://f.cloud.github.com/assets/1424/1091618/ee7c3554-166a-11e3-9955-aaa61bb5509c.png
[ctags]: https://github.com/kevinsawicki/dotfiles/blob/master/.ctags
+13
Ver Arquivo
@@ -0,0 +1,13 @@
## Guides
* [Getting Started](getting-started.md)
* [Customizing Atom](customizing-atom.md)
* [Creating a Package](creating-a-package.md)
* [Creating a Theme](creating-a-theme.md)
### Advanced Topics
* [Configuration](internals/configuration.md)
* [Keymaps](internals/keymaps.md)
* [Serialization](internals/serialization.md)
* [View System](internals/view-system.md)
+3 -6
Ver Arquivo
@@ -7,7 +7,7 @@ read config settings. You can read a value from `config` with `config.get`:
```coffeescript
# read a value with `config.get`
@autosave() if config.get "editor.autosave"
@showInvisibles() if config.get "edtior.showInvisibles"
```
Or you can use `observeConfig` to track changes from a view object.
@@ -47,12 +47,9 @@ the following way:
```coffeescript
# basic key update
config.set("editor.autosave", true)
config.set("core.showInvisibles", true)
# if you mutate a config key, you'll need to call `config.update` to inform
# observers of the change
config.get("fuzzyFinder.ignoredPaths").push "vendor"
config.update()
config.pushAtKeyPath("core.disabledPackages", "wrap-guide")
```
You can also use `setDefaults`, which will assign default values for keys that
-6
Ver Arquivo
@@ -1,6 +0,0 @@
# Atom Internals
To extend Atom effectively, you'll need to understand how it works internally.
This system is evolving fast and it's unlikely that these docs will cover all
of it any time soon, so view this as a jumping-off point. To really understand
how things work, use the web inspector or dive into the code.
+3 -3
Ver Arquivo
@@ -15,7 +15,7 @@ Note that the last example describes multiple keystrokes in succession:
- `p`
- `2`
- `ctrl-p`
- `ctrl-alt-meta-p`
- `ctrl-alt-cmd-p`
- `tab`
- `escape`
- `enter`
@@ -23,12 +23,12 @@ Note that the last example describes multiple keystrokes in succession:
A semantic event is the name of the custom event that will be triggered on the
target of the keydown event when a key binding matches. You can use the command
palette (bound to `meta-p`), to get a list of relevant events and their bindings
palette (bound to `cmd-p`), to get a list of relevant events and their bindings
in any focused context in Atom.
### Rules for Mapping A Keydown Event to A Semantic Event
A keymap's job is to translate a physical keystroke event (like `meta-D`) into a
A keymap's job is to translate a physical keystroke event (like `cmd-D`) into a
semantic event (like `editor:duplicate-line`). Whenever a keydown event occurs
on a focused element, it bubbles up the DOM as usual. As soon as an element on
the bubble path matches a key binding for the keystroke, the binding's semantic
+97
Ver Arquivo
@@ -0,0 +1,97 @@
## Serialization in Atom
When a window is refreshed or restored from a previous session, the view and its
associated objects are *deserialized* from a JSON representation that was stored
during the window's previous shutdown. For your own views and objects to be
compatible with refreshing, you'll need to make them play nicely with the
serializing and deserializing.
### Package Serialization Hook
Your package's main module can optionally include a `serialize` method, which
will be called before your package is deactivated. You should return JSON, which
will be handed back to you as an argument to `activate` next time it is called.
In the following example, the package keeps an instance of `MyObject` in the
same state across refreshes.
```coffee-script
module.exports =
activate: (state) ->
@myObject =
if state
deserialize(state)
else
new MyObject("Hello")
serialize: ->
@myObject.serialize()
```
### Serialization Methods
```coffee-script
class MyObject
registerDeserializer(this)
@deserialize: ({data}) -> new MyObject(data)
constructor: (@data) ->
serialize: -> { deserializer: 'MyObject', data: @data }
```
#### .serialize()
Objects that you want to serialize should implement `.serialize()`. This method
should return a serializable object, and it must contain a key named
`deserializer` whose value is the name of a registered deserializer that can
convert the rest of the data to an object. It's usually just the name of the
class itself.
#### @deserialize(data)
The other side of the coin is the `deserialize` method, which is usually a
class-level method on the same class that implements `serialize`. This method's
job is to convert a state object returned from a previous call `serialize` back
into a genuine object.
#### registerDeserializer(klass)
You need to call the global `registerDeserializer` method with your class in
order to make it available to the deserialization system. Now you can call the
global `deserialize` method with state returned from `serialize`, and your
class's `deserialize` method will be selected automatically.
### Versioning
```coffee-script
class MyObject
@version: 2
@deserialize: (state) -> ...
serialize: -> { version: MyObject.version, ... }
```
Your serializable class can optionally have a class-level `@version` property
and include a `version` key in its serialized state. When deserializing, Atom
will only attempt to call deserialize if the two versions match, and otherwise
return undefined. We plan on implementing a migration system in the future, but
this at least protects you from improperly deserializing old state. If you find
yourself in dire need of the migration system, let us know.
### Deferred Package Deserializers
If your package defers loading on startup with an `activationEvents` property in
its `package.cson`, your deserializers won't be loaded until your package is
activated. If you want to deserialize an object from your package on startup,
this could be a problem.
The solution is to also supply a `deferredDeserializers` array in your
`package.cson` with the names of all your deserializers. When Atom attempts to
deserialize some state whose `deserializer` matches one of these names, it will
load your package first so it can register any necessary deserializers before
proceeding.
For example, the markdown preview package doesn't fully load until a preview is
triggered. But if you refresh a window with a preview pane, it loads the
markdown package early so Atom can deserialize the view correctly.
```coffee-script
# markdown-preview/package.cson
'activationEvents': 'markdown-preview:toggle': '.editor'
'deferredDeserializers': ['MarkdownPreviewView']
...
```
+9 -8
Ver Arquivo
@@ -2,9 +2,8 @@
### SpacePen Basics
Atom's view system is built around the [SpacePen](http://github.com/nathansobo/space-pen)
view framework. SpacePen view objects inherit from the jQuery prototype, and
wrap DOM nodes
Atom's view system is built around the [SpacePen] view framework. SpacePen
view objects inherit from the jQuery prototype, and wrap DOM nodes
View objects are actually jQuery wrappers around DOM fragments, supporting all
the typical jQuery traversal and manipulation methods. In addition, view objects
@@ -28,17 +27,16 @@ editorView = editorElement.view()
editorView.setCursorBufferPosition([1, 2])
```
Refer to the [SpacePen](http://github.com/nathansobo/space-pen) documentation
for more details.
Refer to the [SpacePen] documentation for more details.
### RootView
The root of Atom's view hiererchy is a global called `rootView`, which is a
The root of Atom's view hierarchy is a global called `rootView`, which is a
singleton instance of the `RootView` view class. The root view fills the entire
window, and contains every other view. If you open Atom's inspector with
`alt-meta-i`, you can see the internal structure of `RootView`:
`alt-cmd-i`, you can see the internal structure of `RootView`:
![RootView in the inspector](http://f.cl.ly/items/2n0s3m0I2d223p3s3W01/root-view-inspector.png)
![RootView in the inspector][rootview-inspector]
#### Panes
@@ -62,3 +60,6 @@ rootView.horizontal.prepend(new MyView)
# place a view below the panes (or use .prepend() to place it above)
rootView.vertical.append(new MyOtherView)
```
[spacepen]: http://github.com/nathansobo/space-pen
[rootview-inspector]: https://f.cloud.github.com/assets/1424/1091631/1932c2d6-166b-11e3-8adf-9690fe82d3b8.png
-11
Ver Arquivo
@@ -1,11 +0,0 @@
getting-started.md
built-in-packages/intro.md
built-in-packages/command-panel.md
built-in-packages/markdown-preview.md
built-in-packages/wrap-guide.md
authoring-themes.md
authoring-packages..md
internals/intro.md
internals/configuration.md
internals/keymaps.md
internals/view-system.md
+63
Ver Arquivo
@@ -0,0 +1,63 @@
## Atom Documentation Format
This document describes our documentation format, which is markdown with
a few rules.
### Philosophy
1. Method and argument names **should** clearly communicate its use.
1. Use documentation to enhance and not correct method/argument names.
#### Basic
In some cases all that's required is a single line. **Do not** feel
obligated to write more because we have a format.
```markdown
# Private: Returns the number of pixels from the top of the screen.
```
* **Each method should declare whether it's public or private by using `Public:`
or `Private:`** prefix.
* Following the colon, there should be a short description (that isn't redundant with the
method name).
* Documentation should be hard wrapped to 80 columns.
### Public vs Private
If a method is public it can be used by other classes (and possibly by
the public API). The appropriate steps should be taken to minimize the impact
when changing public methods. In some cases that might mean adding an
appropriate release note. In other cases it might mean doing the legwork to
ensure all affected packages are updated.
#### Complex
For complex methods it's necessary to explain exactly what arguments
are required and how different inputs effect the operation of the
function.
The idea is to communicate things that the API user might not know about,
so repeating information that can be gleaned from the method or argument names
is not useful.
```markdown
# Private: Determine the accelerator for a given command.
#
# * command:
# The name of the command.
# * keystrokesByCommand:
# An {Object} whose keys are commands and the values are Arrays containing
# the keystrokes.
# * options:
# + accelerators:
# Boolean to determine whether accelerators should be shown.
#
# Returns a String containing the keystroke in a format that can be interpreted
# by atom shell to provide nice icons where available.
#
# Raises an Exception if no window is available.
```
* Use curly brackets `{}` to provide links to other classes.
* Use `+` for the options list.
+70
Ver Arquivo
@@ -0,0 +1,70 @@
**Polish the user experience**
First and foremost, Atom is a **product**. Atom needs to feel familiar and
inviting. This includes a solid introductory experience and parity with the most
important features of Sublime Text.
* First launch UI and flow (actions below should be easily discoverable)
* Create a new file
* Open a project and edit an existing file
* Install a package
* Change settings (adjust theme, change key bindings, set config options)
* How to use command P
* Use collaboration internally
* How and where to edit keyBinding should be obvious to new users
* Finish find and replace in buffer/project
* Atom should start < 300ms
* Match Sublime's multiple selection functionality (#523)
* Fix softwrap bugs
* Menus & Context menus
* Track usage/engagement of our users (make this opted in?)
* Windows support
* Reliably and securely auto-update and list what's new
* Secure access to the keychain (don't give every package access to the keychain)
* Secure access to GitHub (each package can ask to have it's own oauth token)
* Don't crash when opening/editing large (> 10Mb) files
* Send js and native crash reports to a remote server
**Lay solid groundwork for a package and theme ecosystem**
Extensibility is one of Atom's key value propositions, so a smooth experience
for creating and maintaining packages is just as important as the user
experience. The package development, dependency and publishing workflow needs to
be solid. We also want to have a mechanism for clearly communicating with
package authors about breaking API changes.
* Finish APM backend (integrate with GitHub Releases)
* Streamline Dev workflow
* `apm create` - create package scaffolding
* `apm test` - so users can run focused package tests
* `apm publish` - should integrate release best practices (ie npm version)
* Determine which classes and methods should be included in the public API
* Users can find/install/update/fork existing packages and themes
**Tighten up the view layer**
Our current approach to the view layer need some improvement. We want to
actively promote the use of the M-V-VM design pattern, provide some declarative
event binding mechanisms in the view layer, and improve the performance of the
typical package specs. We don't want the current approach to be used as an
example in a bunch of new packages, so it's important to improve it now.
* Add marker view API
**Get atom.io online with some exciting articles and documentation**
We'd love to send our private alpha candidates to a nice site with information
about what Atom is, the philosophies and technologies behind it, and guidance
for how to get started.
* Design and create www.atom.io
* Guides
* Theme & Package creation guide
* Full API per release tag
* Changelog per release
* Explanation of features
* Explain Semver and general plans for the future (reassure developers we care about them)
* General Values/Goals
* Make docs accessible from Atom
* Community/contribution guidelines
* Is all communication to be done through issues?
* When should you publish a plugin?
* Do we need to vet plugins from a security perspective?
+16
Ver Arquivo
@@ -0,0 +1,16 @@
## Proposed Timeline
1. **October 30st** - Internal launch - persuade as many githubbers to switch as
possible.
1. Triage bugs and identify what needs to be fixed before private alpha. Maybe
talk to @chrissiebrodigan about doing a UX study.
1. **November 22st** - Private alpha launch
1. Trickle out invites as people ask/we need more testers.
1. If our usage metrics/engagement metrics decrease, stop, identify the issue
and fix it before continuing.
1. Launch
+151
Ver Arquivo
@@ -0,0 +1,151 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="../../assets/js/html5shiv.js"></script>
<script src="../../assets/js/respond.min.js"></script>
<![endif]-->
<title>Atom - <%= title %></title>
<style>
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
pre code {
display: block; padding: 0.5em;
color: #333;
background: #f8f8ff
}
pre .comment,
pre .template_comment,
pre .diff .header,
pre .javadoc {
color: #998;
font-style: italic
}
pre .keyword,
pre .css .rule .keyword,
pre .winutils,
pre .javascript .title,
pre .nginx .title,
pre .subst,
pre .request,
pre .status {
color: #333;
font-weight: bold
}
pre .number,
pre .hexcolor,
pre .ruby .constant {
color: #099;
}
pre .string,
pre .tag .value,
pre .phpdoc,
pre .tex .formula {
color: #d14
}
pre .title,
pre .id {
color: #900;
font-weight: bold
}
pre .javascript .title,
pre .lisp .title,
pre .clojure .title,
pre .subst {
font-weight: normal
}
pre .class .title,
pre .haskell .type,
pre .vhdl .literal,
pre .tex .command {
color: #458;
font-weight: bold
}
pre .tag,
pre .tag .title,
pre .rules .property,
pre .django .tag .keyword {
color: #000080;
font-weight: normal
}
pre .attribute,
pre .variable,
pre .lisp .body {
color: #008080
}
pre .regexp {
color: #009926
}
pre .class {
color: #458;
font-weight: bold
}
pre .symbol,
pre .ruby .symbol .string,
pre .lisp .keyword,
pre .tex .special,
pre .prompt {
color: #990073
}
pre .built_in,
pre .lisp .title,
pre .clojure .built_in {
color: #0086b3
}
pre .preprocessor,
pre .pi,
pre .doctype,
pre .shebang,
pre .cdata {
color: #999;
font-weight: bold
}
pre .deletion {
background: #fdd
}
pre .addition {
background: #dfd
}
pre .diff .change {
background: #0086b3
}
pre .chunk {
color: #aaa
}
body {
padding-top: 50px;
}
</style>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/<%= tag %>/index.html">Atom Documentation</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/<%= tag %>/index.html">Guides</a></li>
<li><a href="/<%= tag %>/api/index.html">API</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<%= content %>
</div>
</body>
</html>
+116
Ver Arquivo
@@ -0,0 +1,116 @@
# Style variables
Atom's UI provides a set of variables you can use in your own themes and packages.
## Use in Themes
Each custom theme must specify a `ui-variables.less` file with all of the
following variables defined. The top-most theme specified in the theme settings
will be loaded and available for import.
## Use in Packages
In any of your package's `.less` files, you can access the theme variables
by importing the `ui-variables` file from Atom.
Your package should generally only specify structural styling, and these should
come from [the style guide][styleguide]. Your package shouldn't specify colors,
padding sizes, or anything in absolute pixels. You should instead use the theme
variables. If you follow this guideline, your package will look good out of the
box with any theme!
Here's an example `.less` file that a package can define using theme variables:
```css
@import "ui-variables";
.my-selector{
background-color: @base-background-color;
padding: @component-padding;
}
```
## Variables
### Text colors
* `@text-color`
* `@text-color-subtle`
* `@text-color-highlight`
* `@text-color-selected`
* `@text-color-info` - A blue
* `@text-color-success`- A green
* `@text-color-warning`- An orange or yellow
* `@text-color-error` - A red
### Background colors
* `@background-color-info` - A blue
* `@background-color-success` - A green
* `@background-color-warning` - An orange or yellow
* `@background-color-error` - A red
* `@background-color-highlight`
* `@background-color-selected`
* `@app-background-color` - The app's background under all the editor components
### Component colors
* `@base-background-color` -
* `@base-border-color` -
* `@pane-item-background-color` -
* `@pane-item-border-color` -
* `@input-background-color` -
* `@input-border-color` -
* `@tool-panel-background-color` -
* `@tool-panel-border-color` -
* `@inset-panel-background-color` -
* `@inset-panel-border-color` -
* `@panel-heading-background-color` -
* `@panel-heading-border-color` -
* `@overlay-background-color` -
* `@overlay-border-color` -
* `@button-background-color` -
* `@button-background-color-hover` -
* `@button-background-color-selected` -
* `@button-border-color` -
* `@tab-bar-background-color` -
* `@tab-bar-border-color` -
* `@tab-background-color` -
* `@tab-background-color-active` -
* `@tab-border-color` -
* `@tree-view-background-color` -
* `@tree-view-border-color` -
* `@ui-site-color-1` -
* `@ui-site-color-2` -
* `@ui-site-color-3` -
* `@ui-site-color-4` -
* `@ui-site-color-5` -
### Component sizes
* `@disclosure-arrow-size` -
* `@component-padding` -
* `@component-icon-padding` -
* `@component-icon-size` -
* `@component-line-height` -
* `@component-border-radius` -
* `@tab-height` -
### Fonts
* `@font-size` -
* `@font-family` -
[styleguide]: https://github.com/atom/styleguide
+334
Ver Arquivo
@@ -0,0 +1,334 @@
# Creating Your First Package
Let's take a look at creating your first package.
To get started, hit `cmd-p`, and start typing "Generate Package" to generate
a package. Once you select the "Generate Package" command, it'll ask you for a
name for your new package. Let's call ours _changer_.
Atom will pop open a new window, showing the _changer_ package with a default set of
folders and files created for us. Hit `cmd-p` and start typing "Changer." You'll
see a new `Changer:Toggle` command which, if selected, pops up a greeting. So far,
so good!
In order to demonstrate the capabilities of Atom and its API, our Changer plugin
is going to do two things:
1. It'll show only modified files in the file tree
2. It'll append a new pane to the editor with some information about the modified
files
Let's get started!
## Changing Keybindings and Commands
Since Changer is primarily concerned with the file tree, let's write a
key binding that works only when the tree is focused. Instead of using the
default `toggle`, our keybinding executes a new command called `magic`.
_keymaps/changer.cson_ should change to look like this:
```coffeescript
'.tree-view':
'ctrl-V': 'changer:magic'
```
Notice that the keybinding is called `ctrl-V` &mdash; that's actually `ctrl-shift-v`.
You can use capital letters to denote using `shift` for your binding.
`.tree-view` represents the parent container for the tree view.
Keybindings only work within the context of where they're entered. In this case,
hitting `ctrl-V` anywhere other than tree won't do anything. Obviously, you can
bind to any part of the editor using element, id, or class names. For example,
you can map to `body` if you want to scope to anywhere in Atom, or just `.editor`
for the editor portion.
To bind keybindings to a command, we'll need to do a bit of association in our
CoffeeScript code using the `rootView.command` method. This method takes a command
name and executes a callback function. Open up _lib/changer-view.coffee_, and
change `rootView.command "changer:toggle"` to look like this:
```coffeescript
rootView.command "changer:magic", => @magic()
```
It's common practice to namespace your commands with your package name, separated
with a colon (`:`). Make sure to rename your `toggle` method to `magic` as well.
Every time you reload the Atom editor, changes to your package code will be reevaluated,
just as if you were writing a script for the browser. Reload the editor, click on
the tree, hit your keybinding, and...nothing happens! What the heck?!
Open up the _package.json_ file, and find the property called `activationEvents`.
Basically, this key tells Atom to not load a package until it hears a certain event.
Change the event to `changer:magic` and reload the editor:
```json
"activationEvents": ["changer:magic"]
```
Hitting the key binding on the tree now works!
## Working with Styles
The next step is to hide elements in the tree that aren't modified. To do that,
we'll first try and get a list of files that have not changed.
All packages are able to use jQuery in their code. In fact, there's [a list of
the bundled libraries Atom provides by default][bundled-libs].
We bring in jQuery by requiring the `atom` package and binding it to the `$` variable:
```coffeescript
{$, View} = require 'atom'
```
Now, we can define the `magic` method to query the tree to get us a list of every
file that _wasn't_ modified:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("status-modified")
console.log el
```
You can access the dev console by hitting `alt-cmd-i`. Here, you'll see all the
statements from `console` calls. When we execute the `changer:magic` command, the
browser console lists items that are not being modified (_i.e._, those without the
`status-modified` class). Let's add a class to each of these elements called `hide-me`:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("status-modified")
$(el).addClass("hide-me")
```
With our newly added class, we can manipulate the visibility of the elements
with a simple stylesheet. Open up _changer.css_ in the _stylesheets_ directory,
and add a single entry:
```css
ol.entries .hide-me {
display: none;
}
```
Refresh Atom, and run the `changer` command. You'll see all the non-changed
files disappear from the tree. Success!
![Changer_File_View]
There are a number of ways you can get the list back; let's just naively iterate
over the same elements and remove the class:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("status-modified")
if !$(el).hasClass("hide-me")
$(el).addClass("hide-me")
else
$(el).removeClass("hide-me")
```
## Creating a New Panel
The next goal of this package is to append a panel to the Atom editor that lists
some information about the modified files.
To do that, we're going to first open up [the style guide][styleguide]. The Style
Guide lists every type of UI element that can be created by an Atom package. Aside
from helping you avoid writing fresh code from scratch, it ensures that packages
have the same look and feel no matter how they're built.
Every package that extends from the `View` class can provide an optional class
method called `content`. The `content` method constructs the DOM that your
package uses as its UI. The principals of `content` are built entirely on
[SpacePen][space-pen], which we'll touch upon only briefly here.
Our display will simply be an unordered list of the file names, and their
modified times. We'll append this list to a panel on the bottom of the editor. A
basic `panel` element inside a `tool-panel` will work well for us. Let's start by carving out a
`div` to hold the filenames:
```coffeescript
@content: ->
@div class: "changer tool-panel panel-bottom", =>
@div class: "panel", =>
@div class: "panel-heading", "Modified Files"
@div class: "panel-body padded", outlet: 'modifiedFilesContainer', =>
@ul class: 'modified-files-list', outlet: 'modifiedFilesList', =>
@li 'Modified File Test'
@li 'Modified File Test'
```
You can add any HTML attribute you like. `outlet` names the variable your
package can use to manipulate the element directly. The fat arrow (`=>`)
indicates that the next DOM set are nested children.
Once again, you can style `li` elements using your stylesheets. Let's test that
out by adding these lines to the _changer.css_ file:
```css
ul.modified-files-list {
color: white;
}
```
We'll add one more line to the end of the `magic` method to make this pane appear:
```coffeescript
rootView.vertical.append(this)
```
If you refresh Atom and hit the key command, you'll see a box appear right underneath
the editor:
![Changer_Panel_Append]
As you might have guessed, `rootView.vertical.append` tells Atom to append `this`
item (_i.e._, whatever is defined by`@content`) _vertically_ to the editor. If
we had called `rootView.horizontal.append`, the pane would be attached to the
right-hand side of the editor.
Before we populate this panel for real, let's apply some logic to toggle the pane
off and on, just like we did with the tree view. Replace the `rootView.vertical.append`
call with this code:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
rootView.vertical.append(this)
```
There are about a hundred different ways to toggle a pane on and off, and this
might not be the most efficient one. If you know your package needs to be
toggled on and off more freely, it might be better to draw the interface during the
initialization, then immediately call `hide()` on the element to remove it from
the view. You can then swap between `show()` and `hide()`, and instead of
forcing Atom to add and remove the element as we're doing here, it'll just set a
CSS property to control your package's visibility.
Refresh Atom, hit the key combo, and watch your test list appear and disappear.
## Calling Node.js Code
Since Atom is built on top of [Node.js][node], you can call any of its libraries,
including other modules that your package requires.
We'll iterate through our resulting tree, and construct the path to our modified
file based on its depth in the tree. We'll use Node to handle path joining for
directories.
Add the following Node module to the top of your file:
```coffeescript
path = require 'path'
```
Then, add these lines to your `magic` method, _before_ your pane drawing code:
```coffeescript
modifiedFiles = []
# for each single entry...
$('ol.entries li.file.status-modified span.name').each (i, el) ->
filePath = []
# ...grab its name...
filePath.unshift($(el).text())
# ... then find its parent directories, and grab their names
parents = $(el).parents('.directory.status-modified')
parents.each (i, el) ->
filePath.unshift($(el).find('div.header span.name').eq(0).text())
modifiedFilePath = path.join(project.rootDirectory.path, filePath.join(path.sep))
modifiedFiles.push modifiedFilePath
```
`modifiedFiles` is an array containing a list of our modified files. We're also
using the node.js [`path` library][path] to get the proper directory separator
for our system.
Remove the two `@li` elements we added in `@content`, so that we can
populate our `modifiedFilesList` with real information. We'll do that by
iterating over `modifiedFiles`, accessing a file's last modified time, and
appending it to `modifiedFilesList`:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
When you toggle the modified files list, your pane is now populated with the
filenames and modified times of files in your project:
![Changer_Panel_Timestamps]
You might notice that subsequent calls to this command reduplicate information.
We could provide an elegant way of rechecking files already in the list, but for
this demonstration, we'll just clear the `modifiedFilesList` each time it's closed:
```coffeescript
# toggles the pane
if @hasParent()
@modifiedFilesList.empty() # added this to clear the list on close
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
## Coloring UI Elements
For packages that create new UI elements, adhering to the style guide is just one
part to keeping visual consistency. Packages dealing with color, fonts, padding,
margins, and other visual cues should rely on [Theme Variables][theme-vars], instead
of developing individual styles. Theme variables are variables defined by Atom
for use in packages and themes. They're only available in [`LESS`](http://lesscss.org/)
stylesheets.
For our package, let's remove the style defined by `ul.modified-files-list` in
_changer.css_. Create a new file under the _stylesheets_ directory called _text-colors.less_.
Here, we'll import the _ui-variables.less_ file, and define some Atom-specific
styles:
```less
@import "ui-variables";
ul.modified-files-list {
color: @text-color;
background-color: @background-color-info;
}
```
Using theme variables ensures that packages look great alongside any theme.
## Further reading
For more information on the mechanics of packages, check out
[Creating a Package][creating-a-package].
[bundled-libs]: creating-a-package.html#included-libraries
[styleguide]: https://github.com/atom/styleguide
[space-pen]: https://github.com/atom/space-pen
[node]: http://nodejs.org/
[path]: http://nodejs.org/docs/latest/api/path.html
[changer_file_view]: https://f.cloud.github.com/assets/69169/1441187/d7a7cb46-41a7-11e3-8128-d93f70a5d5c1.png
[changer_panel_append]: https://f.cloud.github.com/assets/69169/1441189/db0c74da-41a7-11e3-8286-b82dd9190c34.png
[changer_panel_timestamps]: https://f.cloud.github.com/assets/69169/1441190/dcc8eeb6-41a7-11e3-830f-1f1b33072fcd.png
[theme-vars]: theme-variables.html
[creating-a-package]: creating-a-package.html
+13
Ver Arquivo
@@ -0,0 +1,13 @@
# User keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Here's a small example, excerpted
# from Atom's built-in keymaps:
#
# '.editor':
# 'enter': 'editor:newline'
#
# 'body':
# 'ctrl-P': 'core:move-up'
# 'ctrl-p': 'core:move-down'
-1
Ver Arquivo
@@ -1 +0,0 @@
All themes in this directory will be automatically loaded
+31
Ver Arquivo
@@ -0,0 +1,31 @@
{Document, Point, Range, Site} = require 'telepath'
_ = require 'underscore-plus'
module.exports =
_: _
BufferedNodeProcess: require '../src/buffered-node-process'
BufferedProcess: require '../src/buffered-process'
Directory: require '../src/directory'
Document: Document
File: require '../src/file'
fs: require '../src/fs-utils'
Git: require '../src/git'
Point: Point
Range: Range
Site: Site
# The following classes can't be used from a Task handler and should therefore
# only be exported when not running as a child node process
unless process.env.ATOM_SHELL_INTERNAL_RUN_AS_NODE
{$, $$, $$$, View} = require '../src/space-pen-extensions'
module.exports.$ = $
module.exports.$$ = $$
module.exports.$$$ = $$$
module.exports.Editor = require '../src/editor'
module.exports.pathForRepositoryUrl = require('../src/project').pathForRepositoryUrl
module.exports.RootView = require '../src/root-view'
module.exports.SelectList = require '../src/select-list'
module.exports.ScrollView = require '../src/scroll-view'
module.exports.Task = require '../src/task'
module.exports.View = View
Arquivo binário não exibido.
-60
Ver Arquivo
@@ -1,60 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_git_h__
#define INCLUDE_git_git_h__
#include "git2/version.h"
#include "git2/common.h"
#include "git2/threads.h"
#include "git2/errors.h"
#include "git2/types.h"
#include "git2/oid.h"
#include "git2/signature.h"
#include "git2/odb.h"
#include "git2/repository.h"
#include "git2/revwalk.h"
#include "git2/merge.h"
#include "git2/graph.h"
#include "git2/refs.h"
#include "git2/reflog.h"
#include "git2/revparse.h"
#include "git2/object.h"
#include "git2/blob.h"
#include "git2/commit.h"
#include "git2/tag.h"
#include "git2/tree.h"
#include "git2/diff.h"
#include "git2/index.h"
#include "git2/config.h"
#include "git2/transport.h"
#include "git2/remote.h"
#include "git2/clone.h"
#include "git2/checkout.h"
#include "git2/push.h"
#include "git2/attr.h"
#include "git2/ignore.h"
#include "git2/branch.h"
#include "git2/refspec.h"
#include "git2/net.h"
#include "git2/status.h"
#include "git2/indexer.h"
#include "git2/submodule.h"
#include "git2/notes.h"
#include "git2/reset.h"
#include "git2/message.h"
#include "git2/pack.h"
#include "git2/stash.h"
#endif
-241
Ver Arquivo
@@ -1,241 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_attr_h__
#define INCLUDE_git_attr_h__
#include "common.h"
#include "types.h"
/**
* @file git2/attr.h
* @brief Git attribute management routines
* @defgroup git_attr Git attribute management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* GIT_ATTR_TRUE checks if an attribute is set on. In core git
* parlance, this the value for "Set" attributes.
*
* For example, if the attribute file contains:
*
* *.c foo
*
* Then for file `xyz.c` looking up attribute "foo" gives a value for
* which `GIT_ATTR_TRUE(value)` is true.
*/
#define GIT_ATTR_TRUE(attr) (git_attr_value(attr) == GIT_ATTR_TRUE_T)
/**
* GIT_ATTR_FALSE checks if an attribute is set off. In core git
* parlance, this is the value for attributes that are "Unset" (not to
* be confused with values that a "Unspecified").
*
* For example, if the attribute file contains:
*
* *.h -foo
*
* Then for file `zyx.h` looking up attribute "foo" gives a value for
* which `GIT_ATTR_FALSE(value)` is true.
*/
#define GIT_ATTR_FALSE(attr) (git_attr_value(attr) == GIT_ATTR_FALSE_T)
/**
* GIT_ATTR_UNSPECIFIED checks if an attribute is unspecified. This
* may be due to the attribute not being mentioned at all or because
* the attribute was explicitly set unspecified via the `!` operator.
*
* For example, if the attribute file contains:
*
* *.c foo
* *.h -foo
* onefile.c !foo
*
* Then for `onefile.c` looking up attribute "foo" yields a value with
* `GIT_ATTR_UNSPECIFIED(value)` of true. Also, looking up "foo" on
* file `onefile.rb` or looking up "bar" on any file will all give
* `GIT_ATTR_UNSPECIFIED(value)` of true.
*/
#define GIT_ATTR_UNSPECIFIED(attr) (git_attr_value(attr) == GIT_ATTR_UNSPECIFIED_T)
/**
* GIT_ATTR_HAS_VALUE checks if an attribute is set to a value (as
* opposed to TRUE, FALSE or UNSPECIFIED). This would be the case if
* for a file with something like:
*
* *.txt eol=lf
*
* Given this, looking up "eol" for `onefile.txt` will give back the
* string "lf" and `GIT_ATTR_SET_TO_VALUE(attr)` will return true.
*/
#define GIT_ATTR_HAS_VALUE(attr) (git_attr_value(attr) == GIT_ATTR_VALUE_T)
typedef enum {
GIT_ATTR_UNSPECIFIED_T = 0,
GIT_ATTR_TRUE_T,
GIT_ATTR_FALSE_T,
GIT_ATTR_VALUE_T,
} git_attr_t;
/*
* Return the value type for a given attribute.
*
* This can be either `TRUE`, `FALSE`, `UNSPECIFIED` (if the attribute
* was not set at all), or `VALUE`, if the attribute was set to
* an actual string.
*
* If the attribute has a `VALUE` string, it can be accessed normally
* as a NULL-terminated C string.
*
* @param attr The attribute
* @return the value type for the attribute
*/
GIT_EXTERN(git_attr_t) git_attr_value(const char *attr);
/**
* Check attribute flags: Reading values from index and working directory.
*
* When checking attributes, it is possible to check attribute files
* in both the working directory (if there is one) and the index (if
* there is one). You can explicitly choose where to check and in
* which order using the following flags.
*
* Core git usually checks the working directory then the index,
* except during a checkout when it checks the index first. It will
* use index only for creating archives or for a bare repo (if an
* index has been specified for the bare repo).
*/
#define GIT_ATTR_CHECK_FILE_THEN_INDEX 0
#define GIT_ATTR_CHECK_INDEX_THEN_FILE 1
#define GIT_ATTR_CHECK_INDEX_ONLY 2
/**
* Check attribute flags: Using the system attributes file.
*
* Normally, attribute checks include looking in the /etc (or system
* equivalent) directory for a `gitattributes` file. Passing this
* flag will cause attribute checks to ignore that file.
*/
#define GIT_ATTR_CHECK_NO_SYSTEM (1 << 2)
/**
* Look up the value of one git attribute for path.
*
* @param value_out Output of the value of the attribute. Use the GIT_ATTR_...
* macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just
* use the string value for attributes set to a value. You
* should NOT modify or free this value.
* @param repo The repository containing the path.
* @param flags A combination of GIT_ATTR_CHECK... flags.
* @param path The path to check for attributes. Relative paths are
* interpreted relative to the repo root. The file does
* not have to exist, but if it does not, then it will be
* treated as a plain file (not a directory).
* @param name The name of the attribute to look up.
*/
GIT_EXTERN(int) git_attr_get(
const char **value_out,
git_repository *repo,
uint32_t flags,
const char *path,
const char *name);
/**
* Look up a list of git attributes for path.
*
* Use this if you have a known list of attributes that you want to
* look up in a single call. This is somewhat more efficient than
* calling `git_attr_get()` multiple times.
*
* For example, you might write:
*
* const char *attrs[] = { "crlf", "diff", "foo" };
* const char **values[3];
* git_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);
*
* Then you could loop through the 3 values to get the settings for
* the three attributes you asked about.
*
* @param values An array of num_attr entries that will have string
* pointers written into it for the values of the attributes.
* You should not modify or free the values that are written
* into this array (although of course, you should free the
* array itself if you allocated it).
* @param repo The repository containing the path.
* @param flags A combination of GIT_ATTR_CHECK... flags.
* @param path The path inside the repo to check attributes. This
* does not have to exist, but if it does not, then
* it will be treated as a plain file (i.e. not a directory).
* @param num_attr The number of attributes being looked up
* @param names An array of num_attr strings containing attribute names.
*/
GIT_EXTERN(int) git_attr_get_many(
const char **values_out,
git_repository *repo,
uint32_t flags,
const char *path,
size_t num_attr,
const char **names);
typedef int (*git_attr_foreach_cb)(const char *name, const char *value, void *payload);
/**
* Loop over all the git attributes for a path.
*
* @param repo The repository containing the path.
* @param flags A combination of GIT_ATTR_CHECK... flags.
* @param path Path inside the repo to check attributes. This does not have
* to exist, but if it does not, then it will be treated as a
* plain file (i.e. not a directory).
* @param callback Function to invoke on each attribute name and value. The
* value may be NULL is the attribute is explicitly set to
* UNSPECIFIED using the '!' sign. Callback will be invoked
* only once per attribute name, even if there are multiple
* rules for a given file. The highest priority rule will be
* used. Return a non-zero value from this to stop looping.
* @param payload Passed on as extra parameter to callback function.
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_attr_foreach(
git_repository *repo,
uint32_t flags,
const char *path,
git_attr_foreach_cb callback,
void *payload);
/**
* Flush the gitattributes cache.
*
* Call this if you have reason to believe that the attributes files on
* disk no longer match the cached contents of memory. This will cause
* the attributes files to be reloaded the next time that an attribute
* access function is called.
*/
GIT_EXTERN(void) git_attr_cache_flush(
git_repository *repo);
/**
* Add a macro definition.
*
* Macros will automatically be loaded from the top level `.gitattributes`
* file of the repository (plus the build-in "binary" macro). This
* function allows you to add others. For example, to add the default
* macro, you would call:
*
* git_attr_add_macro(repo, "binary", "-diff -crlf");
*/
GIT_EXTERN(int) git_attr_add_macro(
git_repository *repo,
const char *name,
const char *values);
/** @} */
GIT_END_DECL
#endif
-201
Ver Arquivo
@@ -1,201 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_blob_h__
#define INCLUDE_git_blob_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "object.h"
/**
* @file git2/blob.h
* @brief Git blob load and write routines
* @defgroup git_blob Git blob load and write routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Lookup a blob object from a repository.
*
* @param blob pointer to the looked up blob
* @param repo the repo to use when locating the blob.
* @param id identity of the blob to locate.
* @return 0 or an error code
*/
GIT_INLINE(int) git_blob_lookup(git_blob **blob, git_repository *repo, const git_oid *id)
{
return git_object_lookup((git_object **)blob, repo, id, GIT_OBJ_BLOB);
}
/**
* Lookup a blob object from a repository,
* given a prefix of its identifier (short id).
*
* @see git_object_lookup_prefix
*
* @param blob pointer to the looked up blob
* @param repo the repo to use when locating the blob.
* @param id identity of the blob to locate.
* @param len the length of the short identifier
* @return 0 or an error code
*/
GIT_INLINE(int) git_blob_lookup_prefix(git_blob **blob, git_repository *repo, const git_oid *id, size_t len)
{
return git_object_lookup_prefix((git_object **)blob, repo, id, len, GIT_OBJ_BLOB);
}
/**
* Close an open blob
*
* This is a wrapper around git_object_free()
*
* IMPORTANT:
* It *is* necessary to call this method when you stop
* using a blob. Failure to do so will cause a memory leak.
*
* @param blob the blob to close
*/
GIT_INLINE(void) git_blob_free(git_blob *blob)
{
git_object_free((git_object *) blob);
}
/**
* Get the id of a blob.
*
* @param blob a previously loaded blob.
* @return SHA1 hash for this blob.
*/
GIT_INLINE(const git_oid *) git_blob_id(const git_blob *blob)
{
return git_object_id((const git_object *)blob);
}
/**
* Get a read-only buffer with the raw content of a blob.
*
* A pointer to the raw content of a blob is returned;
* this pointer is owned internally by the object and shall
* not be free'd. The pointer may be invalidated at a later
* time.
*
* @param blob pointer to the blob
* @return the pointer; NULL if the blob has no contents
*/
GIT_EXTERN(const void *) git_blob_rawcontent(const git_blob *blob);
/**
* Get the size in bytes of the contents of a blob
*
* @param blob pointer to the blob
* @return size on bytes
*/
GIT_EXTERN(git_off_t) git_blob_rawsize(const git_blob *blob);
/**
* Read a file from the working folder of a repository
* and write it to the Object Database as a loose blob
*
* @param id return the id of the written blob
* @param repo repository where the blob will be written.
* this repository cannot be bare
* @param relative_path file from which the blob will be created,
* relative to the repository's working dir
* @return 0 or an error code
*/
GIT_EXTERN(int) git_blob_create_fromworkdir(git_oid *id, git_repository *repo, const char *relative_path);
/**
* Read a file from the filesystem and write its content
* to the Object Database as a loose blob
*
* @param id return the id of the written blob
* @param repo repository where the blob will be written.
* this repository can be bare or not
* @param path file from which the blob will be created
* @return 0 or an error code
*/
GIT_EXTERN(int) git_blob_create_fromdisk(git_oid *id, git_repository *repo, const char *path);
typedef int (*git_blob_chunk_cb)(char *content, size_t max_length, void *payload);
/**
* Write a loose blob to the Object Database from a
* provider of chunks of data.
*
* Provided the `hintpath` parameter is filled, its value
* will help to determine what git filters should be applied
* to the object before it can be placed to the object database.
*
*
* The implementation of the callback has to respect the
* following rules:
*
* - `content` will have to be filled by the consumer. The maximum number
* of bytes that the buffer can accept per call is defined by the
* `max_length` parameter. Allocation and freeing of the buffer will be taken
* care of by the function.
*
* - The callback is expected to return the number of bytes
* that `content` have been filled with.
*
* - When there is no more data to stream, the callback should
* return 0. This will prevent it from being invoked anymore.
*
* - When an error occurs, the callback should return -1.
*
*
* @param id Return the id of the written blob
*
* @param repo repository where the blob will be written.
* This repository can be bare or not.
*
* @param hintpath if not NULL, will help selecting the filters
* to apply onto the content of the blob to be created.
*
* @return GIT_SUCCESS or an error code
*/
GIT_EXTERN(int) git_blob_create_fromchunks(
git_oid *id,
git_repository *repo,
const char *hintpath,
git_blob_chunk_cb callback,
void *payload);
/**
* Write an in-memory buffer to the ODB as a blob
*
* @param oid return the oid of the written blob
* @param repo repository where to blob will be written
* @param buffer data to be written into the blob
* @param len length of the data
* @return 0 or an error code
*/
GIT_EXTERN(int) git_blob_create_frombuffer(git_oid *oid, git_repository *repo, const void *buffer, size_t len);
/**
* Determine if the blob content is most certainly binary or not.
*
* The heuristic used to guess if a file is binary is taken from core git:
* Searching for NUL bytes and looking for a reasonable ratio of printable
* to non-printable characters among the first 4000 bytes.
*
* @param blob The blob which content should be analyzed
* @return 1 if the content of the blob is detected
* as binary; 0 otherwise.
*/
GIT_EXTERN(int) git_blob_is_binary(git_blob *blob);
/** @} */
GIT_END_DECL
#endif
-173
Ver Arquivo
@@ -1,173 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_branch_h__
#define INCLUDE_git_branch_h__
#include "common.h"
#include "oid.h"
#include "types.h"
/**
* @file git2/branch.h
* @brief Git branch parsing routines
* @defgroup git_branch Git branch management
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Create a new branch pointing at a target commit
*
* A new direct reference will be created pointing to
* this target commit. If `force` is true and a reference
* already exists with the given name, it'll be replaced.
*
* The returned reference must be freed by the user.
*
* The branch name will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* @param out Pointer where to store the underlying reference.
*
* @param branch_name Name for the branch; this name is
* validated for consistency. It should also not conflict with
* an already existing branch name.
*
* @param target Object to which this branch should point. This object
* must belong to the given `repo` and can either be a git_commit or a
* git_tag. When a git_tag is being passed, it should be dereferencable
* to a git_commit which oid will be used as the target of the branch.
*
* @param force Overwrite existing branch.
*
* @return 0, GIT_EINVALIDSPEC or an error code.
* A proper reference is written in the refs/heads namespace
* pointing to the provided target commit.
*/
GIT_EXTERN(int) git_branch_create(
git_reference **out,
git_repository *repo,
const char *branch_name,
const git_commit *target,
int force);
/**
* Delete an existing branch reference.
*
* If the branch is successfully deleted, the passed reference
* object will be freed and invalidated.
*
* @param branch A valid reference representing a branch
* @return 0 on success, or an error code.
*/
GIT_EXTERN(int) git_branch_delete(git_reference *branch);
/**
* Loop over all the branches and issue a callback for each one.
*
* If the callback returns a non-zero value, this will stop looping.
*
* @param repo Repository where to find the branches.
*
* @param list_flags Filtering flags for the branch
* listing. Valid values are GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE
* or a combination of the two.
*
* @param branch_cb Callback to invoke per found branch.
*
* @param payload Extra parameter to callback function.
*
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_branch_foreach(
git_repository *repo,
unsigned int list_flags,
int (*branch_cb)(
const char *branch_name,
git_branch_t branch_type,
void *payload),
void *payload
);
/**
* Move/rename an existing local branch reference.
*
* The new branch name will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* @param branch Current underlying reference of the branch.
*
* @param new_branch_name Target name of the branch once the move
* is performed; this name is validated for consistency.
*
* @param force Overwrite existing branch.
*
* @return 0 on success, GIT_EINVALIDSPEC or an error code.
*/
GIT_EXTERN(int) git_branch_move(
git_reference *branch,
const char *new_branch_name,
int force);
/**
* Lookup a branch by its name in a repository.
*
* The generated reference must be freed by the user.
*
* The branch name will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* @param out pointer to the looked-up branch reference
*
* @param repo the repository to look up the branch
*
* @param branch_name Name of the branch to be looked-up;
* this name is validated for consistency.
*
* @param branch_type Type of the considered branch. This should
* be valued with either GIT_BRANCH_LOCAL or GIT_BRANCH_REMOTE.
*
* @return 0 on success; GIT_ENOTFOUND when no matching branch
* exists, GIT_EINVALIDSPEC, otherwise an error code.
*/
GIT_EXTERN(int) git_branch_lookup(
git_reference **out,
git_repository *repo,
const char *branch_name,
git_branch_t branch_type);
/**
* Return the reference supporting the remote tracking branch,
* given a local branch reference.
*
* @param out Pointer where to store the retrieved
* reference.
*
* @param branch Current underlying reference of the branch.
*
* @return 0 on success; GIT_ENOTFOUND when no remote tracking
* reference exists, otherwise an error code.
*/
GIT_EXTERN(int) git_branch_tracking(
git_reference **out,
git_reference *branch);
/**
* Determine if the current local branch is pointed at by HEAD.
*
* @param branch Current underlying reference of the branch.
*
* @return 1 if HEAD points at the branch, 0 if it isn't,
* error code otherwise.
*/
GIT_EXTERN(int) git_branch_is_head(
git_reference *branch);
/** @} */
GIT_END_DECL
#endif
-281
Ver Arquivo
@@ -1,281 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_checkout_h__
#define INCLUDE_git_checkout_h__
#include "common.h"
#include "types.h"
#include "diff.h"
/**
* @file git2/checkout.h
* @brief Git checkout routines
* @defgroup git_checkout Git checkout routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Checkout behavior flags
*
* In libgit2, checkout is used to update the working directory and index
* to match a target tree. Unlike git checkout, it does not move the HEAD
* commit for you - use `git_repository_set_head` or the like to do that.
*
* Checkout looks at (up to) four things: the "target" tree you want to
* check out, the "baseline" tree of what was checked out previously, the
* working directory for actual files, and the index for staged changes.
*
* You give checkout one of four strategies for update:
*
* - `GIT_CHECKOUT_NONE` is a dry-run strategy that checks for conflicts,
* etc., but doesn't make any actual changes.
*
* - `GIT_CHECKOUT_FORCE` is at the opposite extreme, taking any action to
* make the working directory match the target (including potentially
* discarding modified files).
*
* In between those are `GIT_CHECKOUT_SAFE` and `GIT_CHECKOUT_SAFE_CREATE`
* both of which only make modifications that will not lose changes.
*
* | target == baseline | target != baseline |
* ---------------------|-----------------------|----------------------|
* workdir == baseline | no action | create, update, or |
* | | delete file |
* ---------------------|-----------------------|----------------------|
* workdir exists and | no action | conflict (notify |
* is != baseline | notify dirty MODIFIED | and cancel checkout) |
* ---------------------|-----------------------|----------------------|
* workdir missing, | create if SAFE_CREATE | create file |
* baseline present | notify dirty DELETED | |
* ---------------------|-----------------------|----------------------|
*
* The only difference between SAFE and SAFE_CREATE is that SAFE_CREATE
* will cause a file to be checked out if it is missing from the working
* directory even if it is not modified between the target and baseline.
*
*
* To emulate `git checkout`, use `GIT_CHECKOUT_SAFE` with a checkout
* notification callback (see below) that displays information about dirty
* files. The default behavior will cancel checkout on conflicts.
*
* To emulate `git checkout-index`, use `GIT_CHECKOUT_SAFE_CREATE` with a
* notification callback that cancels the operation if a dirty-but-existing
* file is found in the working directory. This core git command isn't
* quite "force" but is sensitive about some types of changes.
*
* To emulate `git checkout -f`, use `GIT_CHECKOUT_FORCE`.
*
* To emulate `git clone` use `GIT_CHECKOUT_SAFE_CREATE` in the options.
*
*
* There are some additional flags to modified the behavior of checkout:
*
* - GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates
* even if there are conflicts (instead of cancelling the checkout).
*
* - GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not
* in target, baseline, or index, and not ignored) from the working dir.
*
* - GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also
* untracked) from the working directory as well.
*
* - GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that
* already exist. Files will not be created nor deleted. This just skips
* applying adds, deletes, and typechanges.
*
* - GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the
* updated files' information to the index.
*
* - Normally, checkout will reload the index and git attributes from disk
* before any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.
*
* - Unmerged index entries are conflicts. GIT_CHECKOUT_SKIP_UNMERGED skips
* files with unmerged index entries instead. GIT_CHECKOUT_USE_OURS and
* GIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the
* stage 2 ("ours") or stage 3 ("theirs") version of files in the index.
*/
typedef enum {
GIT_CHECKOUT_NONE = 0, /** default is a dry run, no actual updates */
/** Allow safe updates that cannot overwrite uncommitted data */
GIT_CHECKOUT_SAFE = (1u << 0),
/** Allow safe updates plus creation of missing files */
GIT_CHECKOUT_SAFE_CREATE = (1u << 1),
/** Allow all updates to force working directory to look like index */
GIT_CHECKOUT_FORCE = (1u << 2),
/** Allow checkout to make safe updates even if conflicts are found */
GIT_CHECKOUT_ALLOW_CONFLICTS = (1u << 4),
/** Remove untracked files not in index (that are not ignored) */
GIT_CHECKOUT_REMOVE_UNTRACKED = (1u << 5),
/** Remove ignored files not in index */
GIT_CHECKOUT_REMOVE_IGNORED = (1u << 6),
/** Only update existing files, don't create new ones */
GIT_CHECKOUT_UPDATE_ONLY = (1u << 7),
/** Normally checkout updates index entries as it goes; this stops that */
GIT_CHECKOUT_DONT_UPDATE_INDEX = (1u << 8),
/** Don't refresh index/config/etc before doing checkout */
GIT_CHECKOUT_NO_REFRESH = (1u << 9),
/**
* THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED
*/
/** Allow checkout to skip unmerged files (NOT IMPLEMENTED) */
GIT_CHECKOUT_SKIP_UNMERGED = (1u << 10),
/** For unmerged files, checkout stage 2 from index (NOT IMPLEMENTED) */
GIT_CHECKOUT_USE_OURS = (1u << 11),
/** For unmerged files, checkout stage 3 from index (NOT IMPLEMENTED) */
GIT_CHECKOUT_USE_THEIRS = (1u << 12),
/** Recursively checkout submodules with same options (NOT IMPLEMENTED) */
GIT_CHECKOUT_UPDATE_SUBMODULES = (1u << 16),
/** Recursively checkout submodules if HEAD moved in super repo (NOT IMPLEMENTED) */
GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED = (1u << 17),
} git_checkout_strategy_t;
/**
* Checkout notification flags
*
* Checkout will invoke an options notification callback (`notify_cb`) for
* certain cases - you pick which ones via `notify_flags`:
*
* - GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.
*
* - GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that
* do not need an update but no longer match the baseline. Core git
* displays these files when checkout runs, but won't stop the checkout.
*
* - GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.
*
* - GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.
*
* - GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.
*
* Returning a non-zero value from this callback will cancel the checkout.
* Notification callbacks are made prior to modifying any files on disk.
*/
typedef enum {
GIT_CHECKOUT_NOTIFY_NONE = 0,
GIT_CHECKOUT_NOTIFY_CONFLICT = (1u << 0),
GIT_CHECKOUT_NOTIFY_DIRTY = (1u << 1),
GIT_CHECKOUT_NOTIFY_UPDATED = (1u << 2),
GIT_CHECKOUT_NOTIFY_UNTRACKED = (1u << 3),
GIT_CHECKOUT_NOTIFY_IGNORED = (1u << 4),
} git_checkout_notify_t;
/** Checkout notification callback function */
typedef int (*git_checkout_notify_cb)(
git_checkout_notify_t why,
const char *path,
const git_diff_file *baseline,
const git_diff_file *target,
const git_diff_file *workdir,
void *payload);
/** Checkout progress notification function */
typedef void (*git_checkout_progress_cb)(
const char *path,
size_t completed_steps,
size_t total_steps,
void *payload);
/**
* Checkout options structure
*
* Zero out for defaults. Initialize with `GIT_CHECKOUT_OPTS_INIT` macro to
* correctly set the `version` field. E.g.
*
* git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
*/
typedef struct git_checkout_opts {
unsigned int version;
unsigned int checkout_strategy; /** default will be a dry run */
int disable_filters; /** don't apply filters like CRLF conversion */
unsigned int dir_mode; /** default is 0755 */
unsigned int file_mode; /** default is 0644 or 0755 as dictated by blob */
int file_open_flags; /** default is O_CREAT | O_TRUNC | O_WRONLY */
unsigned int notify_flags; /** see `git_checkout_notify_t` above */
git_checkout_notify_cb notify_cb;
void *notify_payload;
/* Optional callback to notify the consumer of checkout progress. */
git_checkout_progress_cb progress_cb;
void *progress_payload;
/** When not zeroed out, array of fnmatch patterns specifying which
* paths should be taken into account, otherwise all files.
*/
git_strarray paths;
git_tree *baseline; /** expected content of workdir, defaults to HEAD */
} git_checkout_opts;
#define GIT_CHECKOUT_OPTS_VERSION 1
#define GIT_CHECKOUT_OPTS_INIT {GIT_CHECKOUT_OPTS_VERSION}
/**
* Updates files in the index and the working tree to match the content of
* the commit pointed at by HEAD.
*
* @param repo repository to check out (must be non-bare)
* @param opts specifies checkout options (may be NULL)
* @return 0 on success, GIT_EORPHANEDHEAD when HEAD points to a non existing
* branch, GIT_ERROR otherwise (use giterr_last for information
* about the error)
*/
GIT_EXTERN(int) git_checkout_head(
git_repository *repo,
git_checkout_opts *opts);
/**
* Updates files in the working tree to match the content of the index.
*
* @param repo repository into which to check out (must be non-bare)
* @param index index to be checked out (or NULL to use repository index)
* @param opts specifies checkout options (may be NULL)
* @return 0 on success, GIT_ERROR otherwise (use giterr_last for information
* about the error)
*/
GIT_EXTERN(int) git_checkout_index(
git_repository *repo,
git_index *index,
git_checkout_opts *opts);
/**
* Updates files in the index and working tree to match the content of the
* tree pointed at by the treeish.
*
* @param repo repository to check out (must be non-bare)
* @param treeish a commit, tag or tree which content will be used to update
* the working directory
* @param opts specifies checkout options (may be NULL)
* @return 0 on success, GIT_ERROR otherwise (use giterr_last for information
* about the error)
*/
GIT_EXTERN(int) git_checkout_tree(
git_repository *repo,
const git_object *treeish,
git_checkout_opts *opts);
/** @} */
GIT_END_DECL
#endif
-104
Ver Arquivo
@@ -1,104 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_clone_h__
#define INCLUDE_git_clone_h__
#include "common.h"
#include "types.h"
#include "indexer.h"
#include "checkout.h"
#include "remote.h"
/**
* @file git2/clone.h
* @brief Git cloning routines
* @defgroup git_clone Git cloning routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Clone options structure
*
* Use zeros to indicate default settings. It's easiest to use the
* `GIT_CLONE_OPTIONS_INIT` macro:
*
* git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
*
* - `checkout_opts` is options for the checkout step. To disable checkout,
* set the `checkout_strategy` to GIT_CHECKOUT_DEFAULT.
* - `bare` should be set to zero to create a standard repo, non-zero for
* a bare repo
* - `fetch_progress_cb` is optional callback for fetch progress. Be aware that
* this is called inline with network and indexing operations, so performance
* may be affected.
* - `fetch_progress_payload` is payload for fetch_progress_cb
*
* ** "origin" remote options: **
* - `remote_name` is the name given to the "origin" remote. The default is
* "origin".
* - `pushurl` is a URL to be used for pushing. NULL means use the fetch url.
* - `fetch_spec` is the fetch specification to be used for fetching. NULL
* results in the same behavior as GIT_REMOTE_DEFAULT_FETCH.
* - `push_spec` is the fetch specification to be used for pushing. NULL means
* use the same spec as for fetching.
* - `cred_acquire_cb` is a callback to be used if credentials are required
* during the initial fetch.
* - `cred_acquire_payload` is the payload for the above callback.
* - `transport` is a custom transport to be used for the initial fetch. NULL
* means use the transport autodetected from the URL.
* - `remote_callbacks` may be used to specify custom progress callbacks for
* the origin remote before the fetch is initiated.
* - `remote_autotag` may be used to specify the autotag setting before the
* initial fetch.
*/
typedef struct git_clone_options {
unsigned int version;
git_checkout_opts checkout_opts;
int bare;
git_transfer_progress_callback fetch_progress_cb;
void *fetch_progress_payload;
const char *remote_name;
const char *pushurl;
const char *fetch_spec;
const char *push_spec;
git_cred_acquire_cb cred_acquire_cb;
void *cred_acquire_payload;
git_transport *transport;
git_remote_callbacks *remote_callbacks;
git_remote_autotag_option_t remote_autotag;
} git_clone_options;
#define GIT_CLONE_OPTIONS_VERSION 1
#define GIT_CLONE_OPTIONS_INIT {GIT_CLONE_OPTIONS_VERSION, {GIT_CHECKOUT_OPTS_VERSION, GIT_CHECKOUT_SAFE}}
/**
* Clone a remote repository, and checkout the branch pointed to by the remote
* HEAD.
*
* @param out pointer that will receive the resulting repository object
* @param origin_remote a remote which will act as the initial fetch source
* @param local_path local directory to clone to
* @param options configuration options for the clone. If NULL, the function
* works as though GIT_OPTIONS_INIT were passed.
* @return 0 on success, GIT_ERROR otherwise (use giterr_last for information
* about the error)
*/
GIT_EXTERN(int) git_clone(
git_repository **out,
const char *url,
const char *local_path,
const git_clone_options *options);
/** @} */
GIT_END_DECL
#endif
-292
Ver Arquivo
@@ -1,292 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_commit_h__
#define INCLUDE_git_commit_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "object.h"
/**
* @file git2/commit.h
* @brief Git commit parsing, formatting routines
* @defgroup git_commit Git commit parsing, formatting routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Lookup a commit object from a repository.
*
* @param commit pointer to the looked up commit
* @param repo the repo to use when locating the commit.
* @param id identity of the commit to locate. If the object is
* an annotated tag it will be peeled back to the commit.
* @return 0 or an error code
*/
GIT_INLINE(int) git_commit_lookup(git_commit **commit, git_repository *repo, const git_oid *id)
{
return git_object_lookup((git_object **)commit, repo, id, GIT_OBJ_COMMIT);
}
/**
* Lookup a commit object from a repository,
* given a prefix of its identifier (short id).
*
* @see git_object_lookup_prefix
*
* @param commit pointer to the looked up commit
* @param repo the repo to use when locating the commit.
* @param id identity of the commit to locate. If the object is
* an annotated tag it will be peeled back to the commit.
* @param len the length of the short identifier
* @return 0 or an error code
*/
GIT_INLINE(int) git_commit_lookup_prefix(git_commit **commit, git_repository *repo, const git_oid *id, size_t len)
{
return git_object_lookup_prefix((git_object **)commit, repo, id, len, GIT_OBJ_COMMIT);
}
/**
* Close an open commit
*
* This is a wrapper around git_object_free()
*
* IMPORTANT:
* It *is* necessary to call this method when you stop
* using a commit. Failure to do so will cause a memory leak.
*
* @param commit the commit to close
*/
GIT_INLINE(void) git_commit_free(git_commit *commit)
{
git_object_free((git_object *) commit);
}
/**
* Get the id of a commit.
*
* @param commit a previously loaded commit.
* @return object identity for the commit.
*/
GIT_INLINE(const git_oid *) git_commit_id(const git_commit *commit)
{
return git_object_id((const git_object *)commit);
}
/**
* Get the encoding for the message of a commit,
* as a string representing a standard encoding name.
*
* The encoding may be NULL if the `encoding` header
* in the commit is missing; in that case UTF-8 is assumed.
*
* @param commit a previously loaded commit.
* @return NULL, or the encoding
*/
GIT_EXTERN(const char *) git_commit_message_encoding(const git_commit *commit);
/**
* Get the full message of a commit.
*
* @param commit a previously loaded commit.
* @return the message of a commit
*/
GIT_EXTERN(const char *) git_commit_message(const git_commit *commit);
/**
* Get the commit time (i.e. committer time) of a commit.
*
* @param commit a previously loaded commit.
* @return the time of a commit
*/
GIT_EXTERN(git_time_t) git_commit_time(const git_commit *commit);
/**
* Get the commit timezone offset (i.e. committer's preferred timezone) of a commit.
*
* @param commit a previously loaded commit.
* @return positive or negative timezone offset, in minutes from UTC
*/
GIT_EXTERN(int) git_commit_time_offset(const git_commit *commit);
/**
* Get the committer of a commit.
*
* @param commit a previously loaded commit.
* @return the committer of a commit
*/
GIT_EXTERN(const git_signature *) git_commit_committer(const git_commit *commit);
/**
* Get the author of a commit.
*
* @param commit a previously loaded commit.
* @return the author of a commit
*/
GIT_EXTERN(const git_signature *) git_commit_author(const git_commit *commit);
/**
* Get the tree pointed to by a commit.
*
* @param tree_out pointer where to store the tree object
* @param commit a previously loaded commit.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_commit_tree(git_tree **tree_out, const git_commit *commit);
/**
* Get the id of the tree pointed to by a commit. This differs from
* `git_commit_tree` in that no attempts are made to fetch an object
* from the ODB.
*
* @param commit a previously loaded commit.
* @return the id of tree pointed to by commit.
*/
GIT_EXTERN(const git_oid *) git_commit_tree_id(const git_commit *commit);
/**
* Get the number of parents of this commit
*
* @param commit a previously loaded commit.
* @return integer of count of parents
*/
GIT_EXTERN(unsigned int) git_commit_parentcount(const git_commit *commit);
/**
* Get the specified parent of the commit.
*
* @param out Pointer where to store the parent commit
* @param commit a previously loaded commit.
* @param n the position of the parent (from 0 to `parentcount`)
* @return 0 or an error code
*/
GIT_EXTERN(int) git_commit_parent(git_commit **out, git_commit *commit, unsigned int n);
/**
* Get the oid of a specified parent for a commit. This is different from
* `git_commit_parent`, which will attempt to load the parent commit from
* the ODB.
*
* @param commit a previously loaded commit.
* @param n the position of the parent (from 0 to `parentcount`)
* @return the id of the parent, NULL on error.
*/
GIT_EXTERN(const git_oid *) git_commit_parent_id(git_commit *commit, unsigned int n);
/**
* Get the commit object that is the <n>th generation ancestor
* of the named commit object, following only the first parents.
* The returned commit has to be freed by the caller.
*
* Passing `0` as the generation number returns another instance of the
* base commit itself.
*
* @param ancestor Pointer where to store the ancestor commit
* @param commit a previously loaded commit.
* @param n the requested generation
* @return 0 on success; GIT_ENOTFOUND if no matching ancestor exists
* or an error code
*/
GIT_EXTERN(int) git_commit_nth_gen_ancestor(
git_commit **ancestor,
const git_commit *commit,
unsigned int n);
/**
* Create a new commit in the repository using `git_object`
* instances as parameters.
*
* The message will not be cleaned up. This can be achieved
* through `git_message_prettify()`.
*
* @param id Pointer where to store the OID of the
* newly created commit
*
* @param repo Repository where to store the commit
*
* @param update_ref If not NULL, name of the reference that
* will be updated to point to this commit. If the reference
* is not direct, it will be resolved to a direct reference.
* Use "HEAD" to update the HEAD of the current branch and
* make it point to this commit. If the reference doesn't
* exist yet, it will be created.
*
* @param author Signature representing the author and the authory
* time of this commit
*
* @param committer Signature representing the committer and the
* commit time of this commit
*
* @param message_encoding The encoding for the message in the
* commit, represented with a standard encoding name.
* E.g. "UTF-8". If NULL, no encoding header is written and
* UTF-8 is assumed.
*
* @param message Full message for this commit
*
* @param tree An instance of a `git_tree` object that will
* be used as the tree for the commit. This tree object must
* also be owned by the given `repo`.
*
* @param parent_count Number of parents for this commit
*
* @param parents[] Array of `parent_count` pointers to `git_commit`
* objects that will be used as the parents for this commit. This
* array may be NULL if `parent_count` is 0 (root commit). All the
* given commits must be owned by the `repo`.
*
* @return 0 or an error code
* The created commit will be written to the Object Database and
* the given reference will be updated to point to it
*/
GIT_EXTERN(int) git_commit_create(
git_oid *id,
git_repository *repo,
const char *update_ref,
const git_signature *author,
const git_signature *committer,
const char *message_encoding,
const char *message,
const git_tree *tree,
int parent_count,
const git_commit *parents[]);
/**
* Create a new commit in the repository using a variable
* argument list.
*
* The message will be cleaned up from excess whitespace
* it will be made sure that the last line ends with a '\n'.
*
* The parents for the commit are specified as a variable
* list of pointers to `const git_commit *`. Note that this
* is a convenience method which may not be safe to export
* for certain languages or compilers
*
* All other parameters remain the same
*
* @see git_commit_create
*/
GIT_EXTERN(int) git_commit_create_v(
git_oid *id,
git_repository *repo,
const char *update_ref,
const git_signature *author,
const git_signature *committer,
const char *message_encoding,
const char *message,
const git_tree *tree,
int parent_count,
...);
/** @} */
GIT_END_DECL
#endif
-129
Ver Arquivo
@@ -1,129 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_common_h__
#define INCLUDE_git_common_h__
#include <time.h>
#include <stdlib.h>
#ifdef _MSC_VER
# include "inttypes.h"
#else
# include <inttypes.h>
#endif
#ifdef __cplusplus
# define GIT_BEGIN_DECL extern "C" {
# define GIT_END_DECL }
#else
/** Start declarations in C mode */
# define GIT_BEGIN_DECL /* empty */
/** End declarations in C mode */
# define GIT_END_DECL /* empty */
#endif
/** Declare a public function exported for application use. */
#if __GNUC__ >= 4
# define GIT_EXTERN(type) extern \
__attribute__((visibility("default"))) \
type
#elif defined(_MSC_VER)
# define GIT_EXTERN(type) __declspec(dllexport) type
#else
# define GIT_EXTERN(type) extern type
#endif
/** Declare a function as always inlined. */
#if defined(_MSC_VER)
# define GIT_INLINE(type) static __inline type
#else
# define GIT_INLINE(type) static inline type
#endif
/** Declare a function's takes printf style arguments. */
#ifdef __GNUC__
# define GIT_FORMAT_PRINTF(a,b) __attribute__((format (printf, a, b)))
#else
# define GIT_FORMAT_PRINTF(a,b) /* empty */
#endif
#if (defined(_WIN32)) && !defined(__CYGWIN__)
#define GIT_WIN32 1
#endif
#ifdef __amigaos4__
#include <netinet/in.h>
#endif
/**
* @file git2/common.h
* @brief Git common platform definitions
* @defgroup git_common Git common platform definitions
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* The separator used in path list strings (ie like in the PATH
* environment variable). A semi-colon ";" is used on Windows, and
* a colon ":" for all other systems.
*/
#ifdef GIT_WIN32
#define GIT_PATH_LIST_SEPARATOR ';'
#else
#define GIT_PATH_LIST_SEPARATOR ':'
#endif
/**
* The maximum length of a valid git path.
*/
#define GIT_PATH_MAX 4096
/**
* The string representation of the null object ID.
*/
#define GIT_OID_HEX_ZERO "0000000000000000000000000000000000000000"
/**
* Return the version of the libgit2 library
* being currently used.
*
* @param major Store the major version number
* @param minor Store the minor version number
* @param rev Store the revision (patch) number
*/
GIT_EXTERN(void) git_libgit2_version(int *major, int *minor, int *rev);
/**
* Combinations of these values describe the capabilities of libgit2.
*/
enum {
GIT_CAP_THREADS = ( 1 << 0 ),
GIT_CAP_HTTPS = ( 1 << 1 )
};
/**
* Query compile time options for libgit2.
*
* @return A combination of GIT_CAP_* values.
*
* - GIT_CAP_THREADS
* Libgit2 was compiled with thread support. Note that thread support is still to be seen as a
* 'work in progress'.
*
* - GIT_CAP_HTTPS
* Libgit2 supports the https:// protocol. This requires the open ssl library to be
* found when compiling libgit2.
*/
GIT_EXTERN(int) git_libgit2_capabilities(void);
/** @} */
GIT_END_DECL
#endif
-554
Ver Arquivo
@@ -1,554 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_config_h__
#define INCLUDE_git_config_h__
#include "common.h"
#include "types.h"
/**
* @file git2/config.h
* @brief Git config management routines
* @defgroup git_config Git config management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Priority level of a config file.
* These priority levels correspond to the natural escalation logic
* (from higher to lower) when searching for config entries in git.git.
*
* git_config_open_default() and git_repository_config() honor those
* priority levels as well.
*/
enum {
GIT_CONFIG_LEVEL_SYSTEM = 1, /**< System-wide configuration file. */
GIT_CONFIG_LEVEL_XDG = 2, /**< XDG compatible configuration file (.config/git/config). */
GIT_CONFIG_LEVEL_GLOBAL = 3, /**< User-specific configuration file, also called Global configuration file. */
GIT_CONFIG_LEVEL_LOCAL = 4, /**< Repository specific configuration file. */
GIT_CONFIG_HIGHEST_LEVEL = -1, /**< Represents the highest level of a config file. */
};
typedef struct {
const char *name;
const char *value;
unsigned int level;
} git_config_entry;
typedef int (*git_config_foreach_cb)(const git_config_entry *, void *);
/**
* Generic backend that implements the interface to
* access a configuration file
*/
struct git_config_backend {
unsigned int version;
struct git_config *cfg;
/* Open means open the file/database and parse if necessary */
int (*open)(struct git_config_backend *, unsigned int level);
int (*get)(const struct git_config_backend *, const char *key, const git_config_entry **entry);
int (*get_multivar)(struct git_config_backend *, const char *key, const char *regexp, git_config_foreach_cb callback, void *payload);
int (*set)(struct git_config_backend *, const char *key, const char *value);
int (*set_multivar)(git_config_backend *cfg, const char *name, const char *regexp, const char *value);
int (*del)(struct git_config_backend *, const char *key);
int (*foreach)(struct git_config_backend *, const char *, git_config_foreach_cb callback, void *payload);
int (*refresh)(struct git_config_backend *);
void (*free)(struct git_config_backend *);
};
#define GIT_CONFIG_BACKEND_VERSION 1
#define GIT_CONFIG_BACKEND_INIT {GIT_CONFIG_BACKEND_VERSION}
typedef enum {
GIT_CVAR_FALSE = 0,
GIT_CVAR_TRUE = 1,
GIT_CVAR_INT32,
GIT_CVAR_STRING
} git_cvar_t;
typedef struct {
git_cvar_t cvar_type;
const char *str_match;
int map_value;
} git_cvar_map;
/**
* Locate the path to the global configuration file
*
* The user or global configuration file is usually
* located in `$HOME/.gitconfig`.
*
* This method will try to guess the full path to that
* file, if the file exists. The returned path
* may be used on any `git_config` call to load the
* global configuration file.
*
* This method will not guess the path to the xdg compatible
* config file (.config/git/config).
*
* @param out Buffer to store the path in
* @param length size of the buffer in bytes
* @return 0 if a global configuration file has been found. Its path will be stored in `buffer`.
*/
GIT_EXTERN(int) git_config_find_global(char *out, size_t length);
/**
* Locate the path to the global xdg compatible configuration file
*
* The xdg compatible configuration file is usually
* located in `$HOME/.config/git/config`.
*
* This method will try to guess the full path to that
* file, if the file exists. The returned path
* may be used on any `git_config` call to load the
* xdg compatible configuration file.
*
* @param out Buffer to store the path in
* @param length size of the buffer in bytes
* @return 0 if a xdg compatible configuration file has been
* found. Its path will be stored in `buffer`.
*/
GIT_EXTERN(int) git_config_find_xdg(char *out, size_t length);
/**
* Locate the path to the system configuration file
*
* If /etc/gitconfig doesn't exist, it will look for
* %PROGRAMFILES%\Git\etc\gitconfig.
* @param global_config_path Buffer to store the path in
* @param length size of the buffer in bytes
* @return 0 if a system configuration file has been
* found. Its path will be stored in `buffer`.
*/
GIT_EXTERN(int) git_config_find_system(char *out, size_t length);
/**
* Open the global, XDG and system configuration files
*
* Utility wrapper that finds the global, XDG and system configuration files
* and opens them into a single prioritized config object that can be
* used when accessing default config data outside a repository.
*
* @param out Pointer to store the config instance
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_open_default(git_config **out);
/**
* Allocate a new configuration object
*
* This object is empty, so you have to add a file to it before you
* can do anything with it.
*
* @param out pointer to the new configuration
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_new(git_config **out);
/**
* Add a generic config file instance to an existing config
*
* Note that the configuration object will free the file
* automatically.
*
* Further queries on this config object will access each
* of the config file instances in order (instances with
* a higher priority level will be accessed first).
*
* @param cfg the configuration to add the file to
* @param file the configuration file (backend) to add
* @param level the priority level of the backend
* @param force if a config file already exists for the given
* priority level, replace it
* @return 0 on success, GIT_EEXISTS when adding more than one file
* for a given priority level (and force_replace set to 0), or error code
*/
GIT_EXTERN(int) git_config_add_backend(
git_config *cfg,
git_config_backend *file,
unsigned int level,
int force);
/**
* Add an on-disk config file instance to an existing config
*
* The on-disk file pointed at by `path` will be opened and
* parsed; it's expected to be a native Git config file following
* the default Git config syntax (see man git-config).
*
* Note that the configuration object will free the file
* automatically.
*
* Further queries on this config object will access each
* of the config file instances in order (instances with
* a higher priority level will be accessed first).
*
* @param cfg the configuration to add the file to
* @param path path to the configuration file (backend) to add
* @param level the priority level of the backend
* @param force if a config file already exists for the given
* priority level, replace it
* @return 0 on success, GIT_EEXISTS when adding more than one file
* for a given priority level (and force_replace set to 0),
* GIT_ENOTFOUND when the file doesn't exist or error code
*/
GIT_EXTERN(int) git_config_add_file_ondisk(
git_config *cfg,
const char *path,
unsigned int level,
int force);
/**
* Create a new config instance containing a single on-disk file
*
* This method is a simple utility wrapper for the following sequence
* of calls:
* - git_config_new
* - git_config_add_file_ondisk
*
* @param out The configuration instance to create
* @param path Path to the on-disk file to open
* @return 0 on success, GIT_ENOTFOUND when the file doesn't exist
* or an error code
*/
GIT_EXTERN(int) git_config_open_ondisk(git_config **out, const char *path);
/**
* Build a single-level focused config object from a multi-level one.
*
* The returned config object can be used to perform get/set/delete operations
* on a single specific level.
*
* Getting several times the same level from the same parent multi-level config
* will return different config instances, but containing the same config_file
* instance.
*
* @param out The configuration instance to create
* @param parent Multi-level config to search for the given level
* @param level Configuration level to search for
* @return 0, GIT_ENOTFOUND if the passed level cannot be found in the
* multi-level parent config, or an error code
*/
GIT_EXTERN(int) git_config_open_level(
git_config **out,
const git_config *parent,
unsigned int level);
/**
* Reload changed config files
*
* A config file may be changed on disk out from under the in-memory
* config object. This function causes us to look for files that have
* been modified since we last loaded them and refresh the config with
* the latest information.
*
* @param cfg The configuration to refresh
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_refresh(git_config *cfg);
/**
* Free the configuration and its associated memory and files
*
* @param cfg the configuration to free
*/
GIT_EXTERN(void) git_config_free(git_config *cfg);
/**
* Get the git_config_entry of a config variable.
*
* The git_config_entry is owned by the config and should not be freed by the
* user.
* @param out pointer to the variable git_config_entry
* @param cfg where to look for the variable
* @param name the variable's name
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_get_entry(
const git_config_entry **out,
const git_config *cfg,
const char *name);
/**
* Get the value of an integer config variable.
*
* All config files will be looked into, in the order of their
* defined level. A higher level means a higher priority. The
* first occurence of the variable will be returned here.
*
* @param out pointer to the variable where the value should be stored
* @param cfg where to look for the variable
* @param name the variable's name
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_get_int32(int32_t *out, const git_config *cfg, const char *name);
/**
* Get the value of a long integer config variable.
*
* All config files will be looked into, in the order of their
* defined level. A higher level means a higher priority. The
* first occurrence of the variable will be returned here.
*
* @param out pointer to the variable where the value should be stored
* @param cfg where to look for the variable
* @param name the variable's name
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_get_int64(int64_t *out, const git_config *cfg, const char *name);
/**
* Get the value of a boolean config variable.
*
* This function uses the usual C convention of 0 being false and
* anything else true.
*
* All config files will be looked into, in the order of their
* defined level. A higher level means a higher priority. The
* first occurrence of the variable will be returned here.
*
* @param out pointer to the variable where the value should be stored
* @param cfg where to look for the variable
* @param name the variable's name
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_get_bool(int *out, const git_config *cfg, const char *name);
/**
* Get the value of a string config variable.
*
* The string is owned by the variable and should not be freed by the
* user.
*
* All config files will be looked into, in the order of their
* defined level. A higher level means a higher priority. The
* first occurrence of the variable will be returned here.
*
* @param out pointer to the variable's value
* @param cfg where to look for the variable
* @param name the variable's name
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_get_string(const char **out, const git_config *cfg, const char *name);
/**
* Get each value of a multivar.
*
* The callback will be called on each variable found
*
* @param cfg where to look for the variable
* @param name the variable's name
* @param regexp regular expression to filter which variables we're
* interested in. Use NULL to indicate all
* @param fn the function to be called on each value of the variable
* @param data opaque pointer to pass to the callback
*/
GIT_EXTERN(int) git_config_get_multivar(const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload);
/**
* Set the value of an integer config variable in the config file
* with the highest level (usually the local one).
*
* @param cfg where to look for the variable
* @param name the variable's name
* @param value Integer value for the variable
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_set_int32(git_config *cfg, const char *name, int32_t value);
/**
* Set the value of a long integer config variable in the config file
* with the highest level (usually the local one).
*
* @param cfg where to look for the variable
* @param name the variable's name
* @param value Long integer value for the variable
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_set_int64(git_config *cfg, const char *name, int64_t value);
/**
* Set the value of a boolean config variable in the config file
* with the highest level (usually the local one).
*
* @param cfg where to look for the variable
* @param name the variable's name
* @param value the value to store
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_set_bool(git_config *cfg, const char *name, int value);
/**
* Set the value of a string config variable in the config file
* with the highest level (usually the local one).
*
* A copy of the string is made and the user is free to use it
* afterwards.
*
* @param cfg where to look for the variable
* @param name the variable's name
* @param value the string to store.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_config_set_string(git_config *cfg, const char *name, const char *value);
/**
* Set a multivar in the local config file.
*
* @param cfg where to look for the variable
* @param name the variable's name
* @param regexp a regular expression to indicate which values to replace
* @param value the new value.
*/
GIT_EXTERN(int) git_config_set_multivar(git_config *cfg, const char *name, const char *regexp, const char *value);
/**
* Delete a config variable from the config file
* with the highest level (usually the local one).
*
* @param cfg the configuration
* @param name the variable to delete
*/
GIT_EXTERN(int) git_config_delete_entry(git_config *cfg, const char *name);
/**
* Perform an operation on each config variable.
*
* The callback receives the normalized name and value of each variable
* in the config backend, and the data pointer passed to this function.
* As soon as one of the callback functions returns something other than 0,
* this function stops iterating and returns `GIT_EUSER`.
*
* @param cfg where to get the variables from
* @param callback the function to call on each variable
* @param payload the data to pass to the callback
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_config_foreach(
const git_config *cfg,
git_config_foreach_cb callback,
void *payload);
/**
* Perform an operation on each config variable matching a regular expression.
*
* This behaviors like `git_config_foreach` with an additional filter of a
* regular expression that filters which config keys are passed to the
* callback.
*
* @param cfg where to get the variables from
* @param regexp regular expression to match against config names
* @param callback the function to call on each variable
* @param payload the data to pass to the callback
* @return 0 or the return value of the callback which didn't return 0
*/
GIT_EXTERN(int) git_config_foreach_match(
const git_config *cfg,
const char *regexp,
git_config_foreach_cb callback,
void *payload);
/**
* Query the value of a config variable and return it mapped to
* an integer constant.
*
* This is a helper method to easily map different possible values
* to a variable to integer constants that easily identify them.
*
* A mapping array looks as follows:
*
* git_cvar_map autocrlf_mapping[] = {
* {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},
* {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},
* {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},
* {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};
*
* On any "false" value for the variable (e.g. "false", "FALSE", "no"), the
* mapping will store `GIT_AUTO_CRLF_FALSE` in the `out` parameter.
*
* The same thing applies for any "true" value such as "true", "yes" or "1", storing
* the `GIT_AUTO_CRLF_TRUE` variable.
*
* Otherwise, if the value matches the string "input" (with case insensitive comparison),
* the given constant will be stored in `out`, and likewise for "default".
*
* If not a single match can be made to store in `out`, an error code will be
* returned.
*
* @param out place to store the result of the mapping
* @param cfg config file to get the variables from
* @param name name of the config variable to lookup
* @param maps array of `git_cvar_map` objects specifying the possible mappings
* @param map_n number of mapping objects in `maps`
* @return 0 on success, error code otherwise
*/
GIT_EXTERN(int) git_config_get_mapped(
int *out,
const git_config *cfg,
const char *name,
const git_cvar_map *maps,
size_t map_n);
/**
* Maps a string value to an integer constant
*
* @param out place to store the result of the parsing
* @param maps array of `git_cvar_map` objects specifying the possible mappings
* @param map_n number of mapping objects in `maps`
* @param value value to parse
*/
GIT_EXTERN(int) git_config_lookup_map_value(
int *out,
const git_cvar_map *maps,
size_t map_n,
const char *value);
/**
* Parse a string value as a bool.
*
* Valid values for true are: 'true', 'yes', 'on', 1 or any
* number different from 0
* Valid values for false are: 'false', 'no', 'off', 0
*
* @param out place to store the result of the parsing
* @param value value to parse
*/
GIT_EXTERN(int) git_config_parse_bool(int *out, const char *value);
/**
* Parse a string value as an int32.
*
* An optional value suffix of 'k', 'm', or 'g' will
* cause the value to be multiplied by 1024, 1048576,
* or 1073741824 prior to output.
*
* @param out place to store the result of the parsing
* @param value value to parse
*/
GIT_EXTERN(int) git_config_parse_int32(int32_t *out, const char *value);
/**
* Parse a string value as an int64.
*
* An optional value suffix of 'k', 'm', or 'g' will
* cause the value to be multiplied by 1024, 1048576,
* or 1073741824 prior to output.
*
* @param out place to store the result of the parsing
* @param value value to parse
*/
GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value);
/** @} */
GIT_END_DECL
#endif
-853
Ver Arquivo
@@ -1,853 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_diff_h__
#define INCLUDE_git_diff_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "tree.h"
#include "refs.h"
/**
* @file git2/diff.h
* @brief Git tree and file differencing routines.
*
* Overview
* --------
*
* Calculating diffs is generally done in two phases: building a diff list
* then traversing the diff list. This makes is easier to share logic
* across the various types of diffs (tree vs tree, workdir vs index, etc.),
* and also allows you to insert optional diff list post-processing phases,
* such as rename detected, in between the steps. When you are done with a
* diff list object, it must be freed.
*
* Terminology
* -----------
*
* To understand the diff APIs, you should know the following terms:
*
* - A `diff` or `diff list` represents the cumulative list of differences
* between two snapshots of a repository (possibly filtered by a set of
* file name patterns). This is the `git_diff_list` object.
* - A `delta` is a file pair with an old and new revision. The old version
* may be absent if the file was just created and the new version may be
* absent if the file was deleted. A diff is mostly just a list of deltas.
* - A `binary` file / delta is a file (or pair) for which no text diffs
* should be generated. A diff list can contain delta entries that are
* binary, but no diff content will be output for those files. There is
* a base heuristic for binary detection and you can further tune the
* behavior with git attributes or diff flags and option settings.
* - A `hunk` is a span of modified lines in a delta along with some stable
* surrounding context. You can configure the amount of context and other
* properties of how hunks are generated. Each hunk also comes with a
* header that described where it starts and ends in both the old and new
* versions in the delta.
* - A `line` is a range of characters inside a hunk. It could be a context
* line (i.e. in both old and new versions), an added line (i.e. only in
* the new version), or a removed line (i.e. only in the old version).
* Unfortunately, we don't know anything about the encoding of data in the
* file being diffed, so we cannot tell you much about the line content.
* Line data will not be NUL-byte terminated, however, because it will be
* just a span of bytes inside the larger file.
*
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Flags for diff options. A combination of these flags can be passed
* in via the `flags` value in the `git_diff_options`.
*/
typedef enum {
/** Normal diff, the default */
GIT_DIFF_NORMAL = 0,
/** Reverse the sides of the diff */
GIT_DIFF_REVERSE = (1 << 0),
/** Treat all files as text, disabling binary attributes & detection */
GIT_DIFF_FORCE_TEXT = (1 << 1),
/** Ignore all whitespace */
GIT_DIFF_IGNORE_WHITESPACE = (1 << 2),
/** Ignore changes in amount of whitespace */
GIT_DIFF_IGNORE_WHITESPACE_CHANGE = (1 << 3),
/** Ignore whitespace at end of line */
GIT_DIFF_IGNORE_WHITESPACE_EOL = (1 << 4),
/** Exclude submodules from the diff completely */
GIT_DIFF_IGNORE_SUBMODULES = (1 << 5),
/** Use the "patience diff" algorithm (currently unimplemented) */
GIT_DIFF_PATIENCE = (1 << 6),
/** Include ignored files in the diff list */
GIT_DIFF_INCLUDE_IGNORED = (1 << 7),
/** Include untracked files in the diff list */
GIT_DIFF_INCLUDE_UNTRACKED = (1 << 8),
/** Include unmodified files in the diff list */
GIT_DIFF_INCLUDE_UNMODIFIED = (1 << 9),
/** Even with the GIT_DIFF_INCLUDE_UNTRACKED flag, when an untracked
* directory is found, only a single entry for the directory is added
* to the diff list; with this flag, all files under the directory will
* be included, too.
*/
GIT_DIFF_RECURSE_UNTRACKED_DIRS = (1 << 10),
/** If the pathspec is set in the diff options, this flags means to
* apply it as an exact match instead of as an fnmatch pattern.
*/
GIT_DIFF_DISABLE_PATHSPEC_MATCH = (1 << 11),
/** Use case insensitive filename comparisons */
GIT_DIFF_DELTAS_ARE_ICASE = (1 << 12),
/** When generating patch text, include the content of untracked files */
GIT_DIFF_INCLUDE_UNTRACKED_CONTENT = (1 << 13),
/** Disable updating of the `binary` flag in delta records. This is
* useful when iterating over a diff if you don't need hunk and data
* callbacks and want to avoid having to load file completely.
*/
GIT_DIFF_SKIP_BINARY_CHECK = (1 << 14),
/** Normally, a type change between files will be converted into a
* DELETED record for the old and an ADDED record for the new; this
* options enabled the generation of TYPECHANGE delta records.
*/
GIT_DIFF_INCLUDE_TYPECHANGE = (1 << 15),
/** Even with GIT_DIFF_INCLUDE_TYPECHANGE, blob->tree changes still
* generally show as a DELETED blob. This flag tries to correctly
* label blob->tree transitions as TYPECHANGE records with new_file's
* mode set to tree. Note: the tree SHA will not be available.
*/
GIT_DIFF_INCLUDE_TYPECHANGE_TREES = (1 << 16),
/** Ignore file mode changes */
GIT_DIFF_IGNORE_FILEMODE = (1 << 17),
} git_diff_option_t;
/**
* Structure describing options about how the diff should be executed.
*
* Setting all values of the structure to zero will yield the default
* values. Similarly, passing NULL for the options structure will
* give the defaults. The default values are marked below.
*
* - `flags` is a combination of the `git_diff_option_t` values above
* - `context_lines` is the number of unchanged lines that define the
* boundary of a hunk (and to display before and after)
* - `interhunk_lines` is the maximum number of unchanged lines between
* hunk boundaries before the hunks will be merged into a one.
* - `old_prefix` is the virtual "directory" to prefix to old file names
* in hunk headers (default "a")
* - `new_prefix` is the virtual "directory" to prefix to new file names
* in hunk headers (default "b")
* - `pathspec` is an array of paths / fnmatch patterns to constrain diff
* - `max_size` is a file size (in bytes) above which a blob will be marked
* as binary automatically; pass a negative value to disable.
*/
typedef struct {
unsigned int version; /**< version for the struct */
uint32_t flags; /**< defaults to GIT_DIFF_NORMAL */
uint16_t context_lines; /**< defaults to 3 */
uint16_t interhunk_lines; /**< defaults to 0 */
const char *old_prefix; /**< defaults to "a" */
const char *new_prefix; /**< defaults to "b" */
git_strarray pathspec; /**< defaults to include all paths */
git_off_t max_size; /**< defaults to 512MB */
} git_diff_options;
#define GIT_DIFF_OPTIONS_VERSION 1
#define GIT_DIFF_OPTIONS_INIT {GIT_DIFF_OPTIONS_VERSION}
/**
* The diff list object that contains all individual file deltas.
*
* This is an opaque structure which will be allocated by one of the diff
* generator functions below (such as `git_diff_tree_to_tree`). You are
* responsible for releasing the object memory when done, using the
* `git_diff_list_free()` function.
*/
typedef struct git_diff_list git_diff_list;
/**
* Flags for the file object on each side of a diff.
*
* Note: most of these flags are just for **internal** consumption by
* libgit2, but some of them may be interesting to external users.
*/
typedef enum {
GIT_DIFF_FILE_VALID_OID = (1 << 0), /** `oid` value is known correct */
GIT_DIFF_FILE_FREE_PATH = (1 << 1), /** `path` is allocated memory */
GIT_DIFF_FILE_BINARY = (1 << 2), /** should be considered binary data */
GIT_DIFF_FILE_NOT_BINARY = (1 << 3), /** should be considered text data */
GIT_DIFF_FILE_FREE_DATA = (1 << 4), /** internal file data is allocated */
GIT_DIFF_FILE_UNMAP_DATA = (1 << 5), /** internal file data is mmap'ed */
GIT_DIFF_FILE_NO_DATA = (1 << 6), /** file data should not be loaded */
} git_diff_file_flag_t;
/**
* What type of change is described by a git_diff_delta?
*
* `GIT_DELTA_RENAMED` and `GIT_DELTA_COPIED` will only show up if you run
* `git_diff_find_similar()` on the diff list object.
*
* `GIT_DELTA_TYPECHANGE` only shows up given `GIT_DIFF_INCLUDE_TYPECHANGE`
* in the option flags (otherwise type changes will be split into ADDED /
* DELETED pairs).
*/
typedef enum {
GIT_DELTA_UNMODIFIED = 0, /** no changes */
GIT_DELTA_ADDED = 1, /** entry does not exist in old version */
GIT_DELTA_DELETED = 2, /** entry does not exist in new version */
GIT_DELTA_MODIFIED = 3, /** entry content changed between old and new */
GIT_DELTA_RENAMED = 4, /** entry was renamed between old and new */
GIT_DELTA_COPIED = 5, /** entry was copied from another old entry */
GIT_DELTA_IGNORED = 6, /** entry is ignored item in workdir */
GIT_DELTA_UNTRACKED = 7, /** entry is untracked item in workdir */
GIT_DELTA_TYPECHANGE = 8, /** type of entry changed between old and new */
} git_delta_t;
/**
* Description of one side of a diff entry.
*
* Although this is called a "file", it may actually represent a file, a
* symbolic link, a submodule commit id, or even a tree (although that only
* if you are tracking type changes or ignored/untracked directories).
*
* The `oid` is the `git_oid` of the item. If the entry represents an
* absent side of a diff (e.g. the `old_file` of a `GIT_DELTA_ADDED` delta),
* then the oid will be zeroes.
*
* `path` is the NUL-terminated path to the entry relative to the working
* directory of the repository.
*
* `size` is the size of the entry in bytes.
*
* `flags` is a combination of the `git_diff_file_flag_t` types, but those
* are largely internal values.
*
* `mode` is, roughly, the stat() `st_mode` value for the item. This will
* be restricted to one of the `git_filemode_t` values.
*/
typedef struct {
git_oid oid;
const char *path;
git_off_t size;
unsigned int flags;
uint16_t mode;
} git_diff_file;
/**
* Description of changes to one entry.
*
* When iterating over a diff list object, this will be passed to most
* callback functions and you can use the contents to understand exactly
* what has changed.
*
* The `old_file` represents the "from" side of the diff and the `new_file`
* represents to "to" side of the diff. What those means depend on the
* function that was used to generate the diff and will be documented below.
* You can also use the `GIT_DIFF_REVERSE` flag to flip it around.
*
* Although the two sides of the delta are named "old_file" and "new_file",
* they actually may correspond to entries that represent a file, a symbolic
* link, a submodule commit id, or even a tree (if you are tracking type
* changes or ignored/untracked directories).
*
* Under some circumstances, in the name of efficiency, not all fields will
* be filled in, but we generally try to fill in as much as possible. One
* example is that the "binary" field will not examine file contents if you
* do not pass in hunk and/or line callbacks to the diff foreach iteration
* function. It will just use the git attributes for those files.
*/
typedef struct {
git_diff_file old_file;
git_diff_file new_file;
git_delta_t status;
unsigned int similarity; /**< for RENAMED and COPIED, value 0-100 */
int binary;
} git_diff_delta;
/**
* When iterating over a diff, callback that will be made per file.
*
* @param delta A pointer to the delta data for the file
* @param progress Goes from 0 to 1 over the diff list
* @param payload User-specified pointer from foreach function
*/
typedef int (*git_diff_file_cb)(
const git_diff_delta *delta,
float progress,
void *payload);
/**
* Structure describing a hunk of a diff.
*/
typedef struct {
int old_start; /** Starting line number in old_file */
int old_lines; /** Number of lines in old_file */
int new_start; /** Starting line number in new_file */
int new_lines; /** Number of lines in new_file */
} git_diff_range;
/**
* When iterating over a diff, callback that will be made per hunk.
*/
typedef int (*git_diff_hunk_cb)(
const git_diff_delta *delta,
const git_diff_range *range,
const char *header,
size_t header_len,
void *payload);
/**
* Line origin constants.
*
* These values describe where a line came from and will be passed to
* the git_diff_data_cb when iterating over a diff. There are some
* special origin constants at the end that are used for the text
* output callbacks to demarcate lines that are actually part of
* the file or hunk headers.
*/
typedef enum {
/* These values will be sent to `git_diff_data_cb` along with the line */
GIT_DIFF_LINE_CONTEXT = ' ',
GIT_DIFF_LINE_ADDITION = '+',
GIT_DIFF_LINE_DELETION = '-',
GIT_DIFF_LINE_ADD_EOFNL = '\n', /**< Removed line w/o LF & added one with */
GIT_DIFF_LINE_DEL_EOFNL = '\0', /**< LF was removed at end of file */
/* The following values will only be sent to a `git_diff_data_cb` when
* the content of a diff is being formatted (eg. through
* git_diff_print_patch() or git_diff_print_compact(), for instance).
*/
GIT_DIFF_LINE_FILE_HDR = 'F',
GIT_DIFF_LINE_HUNK_HDR = 'H',
GIT_DIFF_LINE_BINARY = 'B'
} git_diff_line_t;
/**
* When iterating over a diff, callback that will be made per text diff
* line. In this context, the provided range will be NULL.
*
* When printing a diff, callback that will be made to output each line
* of text. This uses some extra GIT_DIFF_LINE_... constants for output
* of lines of file and hunk headers.
*/
typedef int (*git_diff_data_cb)(
const git_diff_delta *delta, /** delta that contains this data */
const git_diff_range *range, /** range of lines containing this data */
char line_origin, /** git_diff_list_t value from above */
const char *content, /** diff data - not NUL terminated */
size_t content_len, /** number of bytes of diff data */
void *payload); /** user reference data */
/**
* The diff patch is used to store all the text diffs for a delta.
*
* You can easily loop over the content of patches and get information about
* them.
*/
typedef struct git_diff_patch git_diff_patch;
/**
* Flags to control the behavior of diff rename/copy detection.
*/
typedef enum {
/** look for renames? (`--find-renames`) */
GIT_DIFF_FIND_RENAMES = (1 << 0),
/** consider old size of modified for renames? (`--break-rewrites=N`) */
GIT_DIFF_FIND_RENAMES_FROM_REWRITES = (1 << 1),
/** look for copies? (a la `--find-copies`) */
GIT_DIFF_FIND_COPIES = (1 << 2),
/** consider unmodified as copy sources? (`--find-copies-harder`) */
GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED = (1 << 3),
/** split large rewrites into delete/add pairs (`--break-rewrites=/M`) */
GIT_DIFF_FIND_AND_BREAK_REWRITES = (1 << 4),
} git_diff_find_t;
/**
* Control behavior of rename and copy detection
*/
typedef struct {
unsigned int version;
/** Combination of git_diff_find_t values (default FIND_RENAMES) */
unsigned int flags;
/** Similarity to consider a file renamed (default 50) */
unsigned int rename_threshold;
/** Similarity of modified to be eligible rename source (default 50) */
unsigned int rename_from_rewrite_threshold;
/** Similarity to consider a file a copy (default 50) */
unsigned int copy_threshold;
/** Similarity to split modify into delete/add pair (default 60) */
unsigned int break_rewrite_threshold;
/** Maximum similarity sources to examine (a la diff's `-l` option or
* the `diff.renameLimit` config) (default 200)
*/
unsigned int target_limit;
} git_diff_find_options;
#define GIT_DIFF_FIND_OPTIONS_VERSION 1
#define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION}
/** @name Diff List Generator Functions
*
* These are the functions you would use to create (or destroy) a
* git_diff_list from various objects in a repository.
*/
/**@{*/
/**
* Deallocate a diff list.
*/
GIT_EXTERN(void) git_diff_list_free(git_diff_list *diff);
/**
* Create a diff list with the difference between two tree objects.
*
* This is equivalent to `git diff <old-tree> <new-tree>`
*
* The first tree will be used for the "old_file" side of the delta and the
* second tree will be used for the "new_file" side of the delta.
*
* @param diff Output pointer to a git_diff_list pointer to be allocated.
* @param repo The repository containing the trees.
* @param old_tree A git_tree object to diff from.
* @param new_tree A git_tree object to diff to.
* @param opts Structure with options to influence diff or NULL for defaults.
*/
GIT_EXTERN(int) git_diff_tree_to_tree(
git_diff_list **diff,
git_repository *repo,
git_tree *old_tree,
git_tree *new_tree,
const git_diff_options *opts); /**< can be NULL for defaults */
/**
* Create a diff list between a tree and repository index.
*
* This is equivalent to `git diff --cached <treeish>` or if you pass
* the HEAD tree, then like `git diff --cached`.
*
* The tree you pass will be used for the "old_file" side of the delta, and
* the index will be used for the "new_file" side of the delta.
*
* @param diff Output pointer to a git_diff_list pointer to be allocated.
* @param repo The repository containing the tree and index.
* @param old_tree A git_tree object to diff from.
* @param index The index to diff with; repo index used if NULL.
* @param opts Structure with options to influence diff or NULL for defaults.
*/
GIT_EXTERN(int) git_diff_tree_to_index(
git_diff_list **diff,
git_repository *repo,
git_tree *old_tree,
git_index *index,
const git_diff_options *opts); /**< can be NULL for defaults */
/**
* Create a diff list between the repository index and the workdir directory.
*
* This matches the `git diff` command. See the note below on
* `git_diff_tree_to_workdir` for a discussion of the difference between
* `git diff` and `git diff HEAD` and how to emulate a `git diff <treeish>`
* using libgit2.
*
* The index will be used for the "old_file" side of the delta, and the
* working directory will be used for the "new_file" side of the delta.
*
* @param diff Output pointer to a git_diff_list pointer to be allocated.
* @param repo The repository.
* @param index The index to diff from; repo index used if NULL.
* @param opts Structure with options to influence diff or NULL for defaults.
*/
GIT_EXTERN(int) git_diff_index_to_workdir(
git_diff_list **diff,
git_repository *repo,
git_index *index,
const git_diff_options *opts); /**< can be NULL for defaults */
/**
* Create a diff list between a tree and the working directory.
*
* The tree you provide will be used for the "old_file" side of the delta,
* and the working directory will be used for the "new_file" side.
*
* Please note: this is *NOT* the same as `git diff <treeish>`. Running
* `git diff HEAD` or the like actually uses information from the index,
* along with the tree and working directory info.
*
* This function returns strictly the differences between the tree and the
* files contained in the working directory, regardless of the state of
* files in the index. It may come as a surprise, but there is no direct
* equivalent in core git.
*
* To emulate `git diff <treeish>`, call both `git_diff_tree_to_index` and
* `git_diff_index_to_workdir`, then call `git_diff_merge` on the results.
* That will yield a `git_diff_list` that matches the git output.
*
* If this seems confusing, take the case of a file with a staged deletion
* where the file has then been put back into the working dir and modified.
* The tree-to-workdir diff for that file is 'modified', but core git would
* show status 'deleted' since there is a pending deletion in the index.
*
* @param diff A pointer to a git_diff_list pointer that will be allocated.
* @param repo The repository containing the tree.
* @param old_tree A git_tree object to diff from.
* @param opts Structure with options to influence diff or NULL for defaults.
*/
GIT_EXTERN(int) git_diff_tree_to_workdir(
git_diff_list **diff,
git_repository *repo,
git_tree *old_tree,
const git_diff_options *opts); /**< can be NULL for defaults */
/**
* Merge one diff list into another.
*
* This merges items from the "from" list into the "onto" list. The
* resulting diff list will have all items that appear in either list.
* If an item appears in both lists, then it will be "merged" to appear
* as if the old version was from the "onto" list and the new version
* is from the "from" list (with the exception that if the item has a
* pending DELETE in the middle, then it will show as deleted).
*
* @param onto Diff to merge into.
* @param from Diff to merge.
*/
GIT_EXTERN(int) git_diff_merge(
git_diff_list *onto,
const git_diff_list *from);
/**
* Transform a diff list marking file renames, copies, etc.
*
* This modifies a diff list in place, replacing old entries that look
* like renames or copies with new entries reflecting those changes.
* This also will, if requested, break modified files into add/remove
* pairs if the amount of change is above a threshold.
*
* @param diff Diff list to run detection algorithms on
* @param options Control how detection should be run, NULL for defaults
* @return 0 on success, -1 on failure
*/
GIT_EXTERN(int) git_diff_find_similar(
git_diff_list *diff,
git_diff_find_options *options);
/**@}*/
/** @name Diff List Processor Functions
*
* These are the functions you apply to a diff list to process it
* or read it in some way.
*/
/**@{*/
/**
* Loop over all deltas in a diff list issuing callbacks.
*
* This will iterate through all of the files described in a diff. You
* should provide a file callback to learn about each file.
*
* The "hunk" and "line" callbacks are optional, and the text diff of the
* files will only be calculated if they are not NULL. Of course, these
* callbacks will not be invoked for binary files on the diff list or for
* files whose only changed is a file mode change.
*
* Returning a non-zero value from any of the callbacks will terminate
* the iteration and cause this return `GIT_EUSER`.
*
* @param diff A git_diff_list generated by one of the above functions.
* @param file_cb Callback function to make per file in the diff.
* @param hunk_cb Optional callback to make per hunk of text diff. This
* callback is called to describe a range of lines in the
* diff. It will not be issued for binary files.
* @param line_cb Optional callback to make per line of diff text. This
* same callback will be made for context lines, added, and
* removed lines, and even for a deleted trailing newline.
* @param payload Reference pointer that will be passed to your callbacks.
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_diff_foreach(
git_diff_list *diff,
git_diff_file_cb file_cb,
git_diff_hunk_cb hunk_cb,
git_diff_data_cb line_cb,
void *payload);
/**
* Iterate over a diff generating text output like "git diff --name-status".
*
* Returning a non-zero value from the callbacks will terminate the
* iteration and cause this return `GIT_EUSER`.
*
* @param diff A git_diff_list generated by one of the above functions.
* @param print_cb Callback to make per line of diff text.
* @param payload Reference pointer that will be passed to your callback.
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_diff_print_compact(
git_diff_list *diff,
git_diff_data_cb print_cb,
void *payload);
/**
* Look up the single character abbreviation for a delta status code.
*
* When you call `git_diff_print_compact` it prints single letter codes into
* the output such as 'A' for added, 'D' for deleted, 'M' for modified, etc.
* It is sometimes convenient to convert a git_delta_t value into these
* letters for your own purposes. This function does just that. By the
* way, unmodified will return a space (i.e. ' ').
*
* @param delta_t The git_delta_t value to look up
* @return The single character label for that code
*/
GIT_EXTERN(char) git_diff_status_char(git_delta_t status);
/**
* Iterate over a diff generating text output like "git diff".
*
* This is a super easy way to generate a patch from a diff.
*
* Returning a non-zero value from the callbacks will terminate the
* iteration and cause this return `GIT_EUSER`.
*
* @param diff A git_diff_list generated by one of the above functions.
* @param payload Reference pointer that will be passed to your callbacks.
* @param print_cb Callback function to output lines of the diff. This
* same function will be called for file headers, hunk
* headers, and diff lines. Fortunately, you can probably
* use various GIT_DIFF_LINE constants to determine what
* text you are given.
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_diff_print_patch(
git_diff_list *diff,
git_diff_data_cb print_cb,
void *payload);
/**
* Query how many diff records are there in a diff list.
*
* @param diff A git_diff_list generated by one of the above functions
* @return Count of number of deltas in the list
*/
GIT_EXTERN(size_t) git_diff_num_deltas(git_diff_list *diff);
/**
* Query how many diff deltas are there in a diff list filtered by type.
*
* This works just like `git_diff_entrycount()` with an extra parameter
* that is a `git_delta_t` and returns just the count of how many deltas
* match that particular type.
*
* @param diff A git_diff_list generated by one of the above functions
* @param type A git_delta_t value to filter the count
* @return Count of number of deltas matching delta_t type
*/
GIT_EXTERN(size_t) git_diff_num_deltas_of_type(
git_diff_list *diff,
git_delta_t type);
/**
* Return the diff delta and patch for an entry in the diff list.
*
* The `git_diff_patch` is a newly created object contains the text diffs
* for the delta. You have to call `git_diff_patch_free()` when you are
* done with it. You can use the patch object to loop over all the hunks
* and lines in the diff of the one delta.
*
* For an unchanged file or a binary file, no `git_diff_patch` will be
* created, the output will be set to NULL, and the `binary` flag will be
* set true in the `git_diff_delta` structure.
*
* The `git_diff_delta` pointer points to internal data and you do not have
* to release it when you are done with it. It will go away when the
* `git_diff_list` and `git_diff_patch` go away.
*
* It is okay to pass NULL for either of the output parameters; if you pass
* NULL for the `git_diff_patch`, then the text diff will not be calculated.
*
* @param patch_out Output parameter for the delta patch object
* @param delta_out Output parameter for the delta object
* @param diff Diff list object
* @param idx Index into diff list
* @return 0 on success, other value < 0 on error
*/
GIT_EXTERN(int) git_diff_get_patch(
git_diff_patch **patch_out,
const git_diff_delta **delta_out,
git_diff_list *diff,
size_t idx);
/**
* Free a git_diff_patch object.
*/
GIT_EXTERN(void) git_diff_patch_free(
git_diff_patch *patch);
/**
* Get the delta associated with a patch
*/
GIT_EXTERN(const git_diff_delta *) git_diff_patch_delta(
git_diff_patch *patch);
/**
* Get the number of hunks in a patch
*/
GIT_EXTERN(size_t) git_diff_patch_num_hunks(
git_diff_patch *patch);
/**
* Get the information about a hunk in a patch
*
* Given a patch and a hunk index into the patch, this returns detailed
* information about that hunk. Any of the output pointers can be passed
* as NULL if you don't care about that particular piece of information.
*
* @param range Output pointer to git_diff_range of hunk
* @param header Output pointer to header string for hunk. Unlike the
* content pointer for each line, this will be NUL-terminated
* @param header_len Output value of characters in header string
* @param lines_in_hunk Output count of total lines in this hunk
* @param patch Input pointer to patch object
* @param hunk_idx Input index of hunk to get information about
* @return 0 on success, GIT_ENOTFOUND if hunk_idx out of range, <0 on error
*/
GIT_EXTERN(int) git_diff_patch_get_hunk(
const git_diff_range **range,
const char **header,
size_t *header_len,
size_t *lines_in_hunk,
git_diff_patch *patch,
size_t hunk_idx);
/**
* Get the number of lines in a hunk.
*
* @param patch The git_diff_patch object
* @param hunk_idx Index of the hunk
* @return Number of lines in hunk or -1 if invalid hunk index
*/
GIT_EXTERN(int) git_diff_patch_num_lines_in_hunk(
git_diff_patch *patch,
size_t hunk_idx);
/**
* Get data about a line in a hunk of a patch.
*
* Given a patch, a hunk index, and a line index in the hunk, this
* will return a lot of details about that line. If you pass a hunk
* index larger than the number of hunks or a line index larger than
* the number of lines in the hunk, this will return -1.
*
* @param line_origin A GIT_DIFF_LINE constant from above
* @param content Pointer to content of diff line, not NUL-terminated
* @param content_len Number of characters in content
* @param old_lineno Line number in old file or -1 if line is added
* @param new_lineno Line number in new file or -1 if line is deleted
* @param patch The patch to look in
* @param hunk_idx The index of the hunk
* @param line_of_index The index of the line in the hunk
* @return 0 on success, <0 on failure
*/
GIT_EXTERN(int) git_diff_patch_get_line_in_hunk(
char *line_origin,
const char **content,
size_t *content_len,
int *old_lineno,
int *new_lineno,
git_diff_patch *patch,
size_t hunk_idx,
size_t line_of_hunk);
/**
* Serialize the patch to text via callback.
*
* Returning a non-zero value from the callback will terminate the iteration
* and cause this return `GIT_EUSER`.
*
* @param patch A git_diff_patch representing changes to one file
* @param print_cb Callback function to output lines of the patch. Will be
* called for file headers, hunk headers, and diff lines.
* @param payload Reference pointer that will be passed to your callbacks.
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_diff_patch_print(
git_diff_patch *patch,
git_diff_data_cb print_cb,
void *payload);
/**
* Get the content of a patch as a single diff text.
*
* @param string Allocated string; caller must free.
* @param patch A git_diff_patch representing changes to one file
* @return 0 on success, <0 on failure.
*/
GIT_EXTERN(int) git_diff_patch_to_str(
char **string,
git_diff_patch *patch);
/**@}*/
/*
* Misc
*/
/**
* Directly run a diff on two blobs.
*
* Compared to a file, a blob lacks some contextual information. As such,
* the `git_diff_file` given to the callback will have some fake data; i.e.
* `mode` will be 0 and `path` will be NULL.
*
* NULL is allowed for either `old_blob` or `new_blob` and will be treated
* as an empty blob, with the `oid` set to NULL in the `git_diff_file` data.
*
* We do run a binary content check on the two blobs and if either of the
* blobs looks like binary data, the `git_diff_delta` binary attribute will
* be set to 1 and no call to the hunk_cb nor line_cb will be made (unless
* you pass `GIT_DIFF_FORCE_TEXT` of course).
*
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_diff_blobs(
const git_blob *old_blob,
const git_blob *new_blob,
const git_diff_options *options,
git_diff_file_cb file_cb,
git_diff_hunk_cb hunk_cb,
git_diff_data_cb line_cb,
void *payload);
/**
* Directly run a diff between a blob and a buffer.
*
* As with `git_diff_blobs`, comparing a blob and buffer lacks some context,
* so the `git_diff_file` parameters to the callbacks will be faked a la the
* rules for `git_diff_blobs()`.
*
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_diff_blob_to_buffer(
const git_blob *old_blob,
const char *buffer,
size_t buffer_len,
const git_diff_options *options,
git_diff_file_cb file_cb,
git_diff_hunk_cb hunk_cb,
git_diff_data_cb data_cb,
void *payload);
GIT_END_DECL
/** @} */
#endif
-119
Ver Arquivo
@@ -1,119 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_errors_h__
#define INCLUDE_git_errors_h__
#include "common.h"
/**
* @file git2/errors.h
* @brief Git error handling routines and variables
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/** Generic return codes */
enum {
GIT_OK = 0,
GIT_ERROR = -1,
GIT_ENOTFOUND = -3,
GIT_EEXISTS = -4,
GIT_EAMBIGUOUS = -5,
GIT_EBUFS = -6,
GIT_EUSER = -7,
GIT_EBAREREPO = -8,
GIT_EORPHANEDHEAD = -9,
GIT_EUNMERGED = -10,
GIT_ENONFASTFORWARD = -11,
GIT_EINVALIDSPEC = -12,
GIT_PASSTHROUGH = -30,
GIT_ITEROVER = -31,
};
typedef struct {
char *message;
int klass;
} git_error;
/** Error classes */
typedef enum {
GITERR_NOMEMORY,
GITERR_OS,
GITERR_INVALID,
GITERR_REFERENCE,
GITERR_ZLIB,
GITERR_REPOSITORY,
GITERR_CONFIG,
GITERR_REGEX,
GITERR_ODB,
GITERR_INDEX,
GITERR_OBJECT,
GITERR_NET,
GITERR_TAG,
GITERR_TREE,
GITERR_INDEXER,
GITERR_SSL,
GITERR_SUBMODULE,
GITERR_THREAD,
GITERR_STASH,
GITERR_CHECKOUT,
GITERR_FETCHHEAD,
GITERR_MERGE,
} git_error_t;
/**
* Return the last `git_error` object that was generated for the
* current thread or NULL if no error has occurred.
*
* @return A git_error object.
*/
GIT_EXTERN(const git_error *) giterr_last(void);
/**
* Clear the last library error that occurred for this thread.
*/
GIT_EXTERN(void) giterr_clear(void);
/**
* Set the error message string for this thread.
*
* This function is public so that custom ODB backends and the like can
* relay an error message through libgit2. Most regular users of libgit2
* will never need to call this function -- actually, calling it in most
* circumstances (for example, calling from within a callback function)
* will just end up having the value overwritten by libgit2 internals.
*
* This error message is stored in thread-local storage and only applies
* to the particular thread that this libgit2 call is made from.
*
* NOTE: Passing the `error_class` as GITERR_OS has a special behavior: we
* attempt to append the system default error message for the last OS error
* that occurred and then clear the last error. The specific implementation
* of looking up and clearing this last OS error will vary by platform.
*
* @param error_class One of the `git_error_t` enum above describing the
* general subsystem that is responsible for the error.
* @param message The formatted error message to keep
*/
GIT_EXTERN(void) giterr_set_str(int error_class, const char *string);
/**
* Set the error message to a special value for memory allocation failure.
*
* The normal `giterr_set_str()` function attempts to `strdup()` the string
* that is passed in. This is not a good idea when the error in question
* is a memory allocation failure. That circumstance has a special setter
* function that sets the error string to a known and statically allocated
* internal value.
*/
GIT_EXTERN(void) giterr_set_oom(void);
/** @} */
GIT_END_DECL
#endif
-36
Ver Arquivo
@@ -1,36 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_graph_h__
#define INCLUDE_git_graph_h__
#include "common.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/graph.h
* @brief Git graph traversal routines
* @defgroup git_revwalk Git graph traversal routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Count the number of unique commits between two commit objects
*
* @param ahead number of commits, starting at `one`, unique from commits in `two`
* @param behind number of commits, starting at `two`, unique from commits in `one`
* @param repo the repository where the commits exist
* @param one one of the commits
* @param two the other commit
*/
GIT_EXTERN(int) git_graph_ahead_behind(size_t *ahead, size_t *behind, git_repository *repo, const git_oid *one, const git_oid *two);
/** @} */
GIT_END_DECL
#endif
-78
Ver Arquivo
@@ -1,78 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_ignore_h__
#define INCLUDE_git_ignore_h__
#include "common.h"
#include "types.h"
GIT_BEGIN_DECL
/**
* Add ignore rules for a repository.
*
* Excludesfile rules (i.e. .gitignore rules) are generally read from
* .gitignore files in the repository tree or from a shared system file
* only if a "core.excludesfile" config value is set. The library also
* keeps a set of per-repository internal ignores that can be configured
* in-memory and will not persist. This function allows you to add to
* that internal rules list.
*
* Example usage:
*
* error = git_ignore_add_rule(myrepo, "*.c\ndir/\nFile with space\n");
*
* This would add three rules to the ignores.
*
* @param repo The repository to add ignore rules to.
* @param rules Text of rules, a la the contents of a .gitignore file.
* It is okay to have multiple rules in the text; if so,
* each rule should be terminated with a newline.
* @return 0 on success
*/
GIT_EXTERN(int) git_ignore_add_rule(
git_repository *repo,
const char *rules);
/**
* Clear ignore rules that were explicitly added.
*
* Resets to the default internal ignore rules. This will not turn off
* rules in .gitignore files that actually exist in the filesystem.
*
* The default internal ignores ignore ".", ".." and ".git" entries.
*
* @param repo The repository to remove ignore rules from.
* @return 0 on success
*/
GIT_EXTERN(int) git_ignore_clear_internal_rules(
git_repository *repo);
/**
* Test if the ignore rules apply to a given path.
*
* This function checks the ignore rules to see if they would apply to the
* given file. This indicates if the file would be ignored regardless of
* whether the file is already in the index or committed to the repository.
*
* One way to think of this is if you were to do "git add ." on the
* directory containing the file, would it be added or not?
*
* @param ignored boolean returning 0 if the file is not ignored, 1 if it is
* @param repo a repository object
* @param path the file to check ignores for, relative to the repo's workdir.
* @return 0 if ignore rules could be processed for the file (regardless
* of whether it exists or not), or an error < 0 if they could not.
*/
GIT_EXTERN(int) git_ignore_path_is_ignored(
int *ignored,
git_repository *repo,
const char *path);
GIT_END_DECL
#endif
-552
Ver Arquivo
@@ -1,552 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_index_h__
#define INCLUDE_git_index_h__
#include "common.h"
#include "indexer.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/index.h
* @brief Git index parsing and manipulation routines
* @defgroup git_index Git index parsing and manipulation routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
#define GIT_IDXENTRY_NAMEMASK (0x0fff)
#define GIT_IDXENTRY_STAGEMASK (0x3000)
#define GIT_IDXENTRY_EXTENDED (0x4000)
#define GIT_IDXENTRY_VALID (0x8000)
#define GIT_IDXENTRY_STAGESHIFT 12
/*
* Flags are divided into two parts: in-memory flags and
* on-disk ones. Flags in GIT_IDXENTRY_EXTENDED_FLAGS
* will get saved on-disk.
*
* In-memory only flags:
*/
#define GIT_IDXENTRY_UPDATE (1 << 0)
#define GIT_IDXENTRY_REMOVE (1 << 1)
#define GIT_IDXENTRY_UPTODATE (1 << 2)
#define GIT_IDXENTRY_ADDED (1 << 3)
#define GIT_IDXENTRY_HASHED (1 << 4)
#define GIT_IDXENTRY_UNHASHED (1 << 5)
#define GIT_IDXENTRY_WT_REMOVE (1 << 6) /* remove in work directory */
#define GIT_IDXENTRY_CONFLICTED (1 << 7)
#define GIT_IDXENTRY_UNPACKED (1 << 8)
#define GIT_IDXENTRY_NEW_SKIP_WORKTREE (1 << 9)
/*
* Extended on-disk flags:
*/
#define GIT_IDXENTRY_INTENT_TO_ADD (1 << 13)
#define GIT_IDXENTRY_SKIP_WORKTREE (1 << 14)
/* GIT_IDXENTRY_EXTENDED2 is for future extension */
#define GIT_IDXENTRY_EXTENDED2 (1 << 15)
#define GIT_IDXENTRY_EXTENDED_FLAGS (GIT_IDXENTRY_INTENT_TO_ADD | GIT_IDXENTRY_SKIP_WORKTREE)
/** Time used in a git index entry */
typedef struct {
git_time_t seconds;
/* nsec should not be stored as time_t compatible */
unsigned int nanoseconds;
} git_index_time;
/** Memory representation of a file entry in the index. */
typedef struct git_index_entry {
git_index_time ctime;
git_index_time mtime;
unsigned int dev;
unsigned int ino;
unsigned int mode;
unsigned int uid;
unsigned int gid;
git_off_t file_size;
git_oid oid;
unsigned short flags;
unsigned short flags_extended;
char *path;
} git_index_entry;
/** Representation of a resolve undo entry in the index. */
typedef struct git_index_reuc_entry {
unsigned int mode[3];
git_oid oid[3];
char *path;
} git_index_reuc_entry;
/** Capabilities of system that affect index actions. */
enum {
GIT_INDEXCAP_IGNORE_CASE = 1,
GIT_INDEXCAP_NO_FILEMODE = 2,
GIT_INDEXCAP_NO_SYMLINKS = 4,
GIT_INDEXCAP_FROM_OWNER = ~0u
};
/** @name Index File Functions
*
* These functions work on the index file itself.
*/
/**@{*/
/**
* Create a new bare Git index object as a memory representation
* of the Git index file in 'index_path', without a repository
* to back it.
*
* Since there is no ODB or working directory behind this index,
* any Index methods which rely on these (e.g. index_add) will
* fail with the GIT_EBAREINDEX error code.
*
* If you need to access the index of an actual repository,
* use the `git_repository_index` wrapper.
*
* The index must be freed once it's no longer in use.
*
* @param out the pointer for the new index
* @param index_path the path to the index file in disk
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_open(git_index **out, const char *index_path);
/**
* Create an in-memory index object.
*
* This index object cannot be read/written to the filesystem,
* but may be used to perform in-memory index operations.
*
* The index must be freed once it's no longer in use.
*
* @param out the pointer for the new index
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_new(git_index **out);
/**
* Free an existing index object.
*
* @param index an existing index object
*/
GIT_EXTERN(void) git_index_free(git_index *index);
/**
* Get the repository this index relates to
*
* @param index The index
* @return A pointer to the repository
*/
GIT_EXTERN(git_repository *) git_index_owner(const git_index *index);
/**
* Read index capabilities flags.
*
* @param index An existing index object
* @return A combination of GIT_INDEXCAP values
*/
GIT_EXTERN(unsigned int) git_index_caps(const git_index *index);
/**
* Set index capabilities flags.
*
* If you pass `GIT_INDEXCAP_FROM_OWNER` for the caps, then the
* capabilities will be read from the config of the owner object,
* looking at `core.ignorecase`, `core.filemode`, `core.symlinks`.
*
* @param index An existing index object
* @param caps A combination of GIT_INDEXCAP values
* @return 0 on success, -1 on failure
*/
GIT_EXTERN(int) git_index_set_caps(git_index *index, unsigned int caps);
/**
* Update the contents of an existing index object in memory
* by reading from the hard disk.
*
* @param index an existing index object
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_read(git_index *index);
/**
* Write an existing index object from memory back to disk
* using an atomic file lock.
*
* @param index an existing index object
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_write(git_index *index);
/**
* Read a tree into the index file with stats
*
* The current index contents will be replaced by the specified tree.
*
* @param index an existing index object
* @param tree tree to read
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_read_tree(git_index *index, const git_tree *tree);
/**
* Write the index as a tree
*
* This method will scan the index and write a representation
* of its current state back to disk; it recursively creates
* tree objects for each of the subtrees stored in the index,
* but only returns the OID of the root tree. This is the OID
* that can be used e.g. to create a commit.
*
* The index instance cannot be bare, and needs to be associated
* to an existing repository.
*
* The index must not contain any file in conflict.
*
* @param out Pointer where to store the OID of the written tree
* @param index Index to write
* @return 0 on success, GIT_EUNMERGED when the index is not clean
* or an error code
*/
GIT_EXTERN(int) git_index_write_tree(git_oid *out, git_index *index);
/**
* Write the index as a tree to the given repository
*
* This method will do the same as `git_index_write_tree`, but
* letting the user choose the repository where the tree will
* be written.
*
* The index must not contain any file in conflict.
*
* @param out Pointer where to store OID of the the written tree
* @param index Index to write
* @param repo Repository where to write the tree
* @return 0 on success, GIT_EUNMERGED when the index is not clean
* or an error code
*/
GIT_EXTERN(int) git_index_write_tree_to(git_oid *out, git_index *index, git_repository *repo);
/**@}*/
/** @name Raw Index Entry Functions
*
* These functions work on index entries, and allow for raw manipulation
* of the entries.
*/
/**@{*/
/* Index entry manipulation */
/**
* Get the count of entries currently in the index
*
* @param index an existing index object
* @return integer of count of current entries
*/
GIT_EXTERN(size_t) git_index_entrycount(const git_index *index);
/**
* Clear the contents (all the entries) of an index object.
* This clears the index object in memory; changes must be manually
* written to disk for them to take effect.
*
* @param index an existing index object
*/
GIT_EXTERN(void) git_index_clear(git_index *index);
/**
* Get a pointer to one of the entries in the index
*
* The values of this entry can be modified (except the path)
* and the changes will be written back to disk on the next
* write() call.
*
* The entry should not be freed by the caller.
*
* @param index an existing index object
* @param n the position of the entry
* @return a pointer to the entry; NULL if out of bounds
*/
GIT_EXTERN(const git_index_entry *) git_index_get_byindex(
git_index *index, size_t n);
/**
* Get a pointer to one of the entries in the index
*
* The values of this entry can be modified (except the path)
* and the changes will be written back to disk on the next
* write() call.
*
* The entry should not be freed by the caller.
*
* @param index an existing index object
* @param path path to search
* @param stage stage to search
* @return a pointer to the entry; NULL if it was not found
*/
GIT_EXTERN(const git_index_entry *) git_index_get_bypath(
git_index *index, const char *path, int stage);
/**
* Remove an entry from the index
*
* @param index an existing index object
* @param path path to search
* @param stage stage to search
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_remove(git_index *index, const char *path, int stage);
/**
* Remove all entries from the index under a given directory
*
* @param index an existing index object
* @param dir container directory path
* @param stage stage to search
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_remove_directory(
git_index *index, const char *dir, int stage);
/**
* Add or update an index entry from an in-memory struct
*
* If a previous index entry exists that has the same path and stage
* as the given 'source_entry', it will be replaced. Otherwise, the
* 'source_entry' will be added.
*
* A full copy (including the 'path' string) of the given
* 'source_entry' will be inserted on the index.
*
* @param index an existing index object
* @param source_entry new entry object
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_add(git_index *index, const git_index_entry *source_entry);
/**
* Return the stage number from a git index entry
*
* This entry is calculated from the entry's flag
* attribute like this:
*
* (entry->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT
*
* @param entry The entry
* @returns the stage number
*/
GIT_EXTERN(int) git_index_entry_stage(const git_index_entry *entry);
/**@}*/
/** @name Workdir Index Entry Functions
*
* These functions work on index entries specifically in the working
* directory (ie, stage 0).
*/
/**@{*/
/**
* Add or update an index entry from a file in disk
*
* The file `path` must be relative to the repository's
* working folder and must be readable.
*
* This method will fail in bare index instances.
*
* This forces the file to be added to the index, not looking
* at gitignore rules. Those rules can be evaluated through
* the git_status APIs (in status.h) before calling this.
*
* If this file currently is the result of a merge conflict, this
* file will no longer be marked as conflicting. The data about
* the conflict will be moved to the "resolve undo" (REUC) section.
*
* @param index an existing index object
* @param path filename to add
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_add_from_workdir(git_index *index, const char *path);
/**
* Find the first index of any entries which point to given
* path in the Git index.
*
* @param index an existing index object
* @param path path to search
* @return an index >= 0 if found, -1 otherwise
*/
GIT_EXTERN(int) git_index_find(git_index *index, const char *path);
/**@}*/
/** @name Conflict Index Entry Functions
*
* These functions work on conflict index entries specifically (ie, stages 1-3)
*/
/**@{*/
/**
* Add or update index entries to represent a conflict
*
* The entries are the entries from the tree included in the merge. Any
* entry may be null to indicate that that file was not present in the
* trees during the merge. For example, ancestor_entry may be NULL to
* indicate that a file was added in both branches and must be resolved.
*
* @param index an existing index object
* @param ancestor_entry the entry data for the ancestor of the conflict
* @param our_entry the entry data for our side of the merge conflict
* @param their_entry the entry data for their side of the merge conflict
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_conflict_add(
git_index *index,
const git_index_entry *ancestor_entry,
const git_index_entry *our_entry,
const git_index_entry *their_entry);
/**
* Get the index entries that represent a conflict of a single file.
*
* The values of this entry can be modified (except the paths)
* and the changes will be written back to disk on the next
* write() call.
*
* @param ancestor_out Pointer to store the ancestor entry
* @param our_out Pointer to store the our entry
* @param their_out Pointer to store the their entry
* @param index an existing index object
* @param path path to search
*/
GIT_EXTERN(int) git_index_conflict_get(git_index_entry **ancestor_out, git_index_entry **our_out, git_index_entry **their_out, git_index *index, const char *path);
/**
* Removes the index entries that represent a conflict of a single file.
*
* @param index an existing index object
* @param path to search
*/
GIT_EXTERN(int) git_index_conflict_remove(git_index *index, const char *path);
/**
* Remove all conflicts in the index (entries with a stage greater than 0.)
*
* @param index an existing index object
*/
GIT_EXTERN(void) git_index_conflict_cleanup(git_index *index);
/**
* Determine if the index contains entries representing file conflicts.
*
* @return 1 if at least one conflict is found, 0 otherwise.
*/
GIT_EXTERN(int) git_index_has_conflicts(const git_index *index);
/**@}*/
/** @name Resolve Undo (REUC) index entry manipulation.
*
* These functions work on the Resolve Undo index extension and contains
* data about the original files that led to a merge conflict.
*/
/**@{*/
/**
* Get the count of resolve undo entries currently in the index.
*
* @param index an existing index object
* @return integer of count of current resolve undo entries
*/
GIT_EXTERN(unsigned int) git_index_reuc_entrycount(git_index *index);
/**
* Finds the resolve undo entry that points to the given path in the Git
* index.
*
* @param index an existing index object
* @param path path to search
* @return an index >= 0 if found, -1 otherwise
*/
GIT_EXTERN(int) git_index_reuc_find(git_index *index, const char *path);
/**
* Get a resolve undo entry from the index.
*
* The returned entry is read-only and should not be modified
* or freed by the caller.
*
* @param index an existing index object
* @param path path to search
* @return the resolve undo entry; NULL if not found
*/
GIT_EXTERN(const git_index_reuc_entry *) git_index_reuc_get_bypath(git_index *index, const char *path);
/**
* Get a resolve undo entry from the index.
*
* The returned entry is read-only and should not be modified
* or freed by the caller.
*
* @param index an existing index object
* @param n the position of the entry
* @return a pointer to the resolve undo entry; NULL if out of bounds
*/
GIT_EXTERN(const git_index_reuc_entry *) git_index_reuc_get_byindex(git_index *index, size_t n);
/**
* Adds a resolve undo entry for a file based on the given parameters.
*
* The resolve undo entry contains the OIDs of files that were involved
* in a merge conflict after the conflict has been resolved. This allows
* conflicts to be re-resolved later.
*
* If there exists a resolve undo entry for the given path in the index,
* it will be removed.
*
* This method will fail in bare index instances.
*
* @param index an existing index object
* @param path filename to add
* @param ancestor_mode mode of the ancestor file
* @param ancestor_id oid of the ancestor file
* @param our_mode mode of our file
* @param our_id oid of our file
* @param their_mode mode of their file
* @param their_id oid of their file
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_reuc_add(git_index *index, const char *path,
int ancestor_mode, git_oid *ancestor_id,
int our_mode, git_oid *our_id,
int their_mode, git_oid *their_id);
/**
* Remove an resolve undo entry from the index
*
* @param index an existing index object
* @param n position of the resolve undo entry to remove
* @return 0 or an error code
*/
GIT_EXTERN(int) git_index_reuc_remove(git_index *index, size_t n);
/**@}*/
/** @} */
GIT_END_DECL
#endif
-134
Ver Arquivo
@@ -1,134 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef _INCLUDE_git_indexer_h__
#define _INCLUDE_git_indexer_h__
#include "common.h"
#include "oid.h"
GIT_BEGIN_DECL
/**
* This is passed as the first argument to the callback to allow the
* user to see the progress.
*/
typedef struct git_transfer_progress {
unsigned int total_objects;
unsigned int indexed_objects;
unsigned int received_objects;
size_t received_bytes;
} git_transfer_progress;
/**
* Type for progress callbacks during indexing
*/
typedef void (*git_transfer_progress_callback)(const git_transfer_progress *stats, void *payload);
typedef struct git_indexer git_indexer;
typedef struct git_indexer_stream git_indexer_stream;
/**
* Create a new streaming indexer instance
*
* @param out where to store the indexer instance
* @param path to the directory where the packfile should be stored
* @param progress_cb function to call with progress information
* @param progress_payload payload for the progress callback
*/
GIT_EXTERN(int) git_indexer_stream_new(
git_indexer_stream **out,
const char *path,
git_transfer_progress_callback progress_cb,
void *progress_cb_payload);
/**
* Add data to the indexer
*
* @param idx the indexer
* @param data the data to add
* @param size the size of the data in bytes
* @param stats stat storage
*/
GIT_EXTERN(int) git_indexer_stream_add(git_indexer_stream *idx, const void *data, size_t size, git_transfer_progress *stats);
/**
* Finalize the pack and index
*
* Resolve any pending deltas and write out the index file
*
* @param idx the indexer
*/
GIT_EXTERN(int) git_indexer_stream_finalize(git_indexer_stream *idx, git_transfer_progress *stats);
/**
* Get the packfile's hash
*
* A packfile's name is derived from the sorted hashing of all object
* names. This is only correct after the index has been finalized.
*
* @param idx the indexer instance
*/
GIT_EXTERN(const git_oid *) git_indexer_stream_hash(const git_indexer_stream *idx);
/**
* Free the indexer and its resources
*
* @param idx the indexer to free
*/
GIT_EXTERN(void) git_indexer_stream_free(git_indexer_stream *idx);
/**
* Create a new indexer instance
*
* @param out where to store the indexer instance
* @param packname the absolute filename of the packfile to index
*/
GIT_EXTERN(int) git_indexer_new(git_indexer **out, const char *packname);
/**
* Iterate over the objects in the packfile and extract the information
*
* Indexing a packfile can be very expensive so this function is
* expected to be run in a worker thread and the stats used to provide
* feedback the user.
*
* @param idx the indexer instance
* @param stats storage for the running state
*/
GIT_EXTERN(int) git_indexer_run(git_indexer *idx, git_transfer_progress *stats);
/**
* Write the index file to disk.
*
* The file will be stored as pack-$hash.idx in the same directory as
* the packfile.
*
* @param idx the indexer instance
*/
GIT_EXTERN(int) git_indexer_write(git_indexer *idx);
/**
* Get the packfile's hash
*
* A packfile's name is derived from the sorted hashing of all object
* names. This is only correct after the index has been written to disk.
*
* @param idx the indexer instance
*/
GIT_EXTERN(const git_oid *) git_indexer_hash(const git_indexer *idx);
/**
* Free the indexer and its resources
*
* @param idx the indexer to free
*/
GIT_EXTERN(void) git_indexer_free(git_indexer *idx);
GIT_END_DECL
#endif
-55
Ver Arquivo
@@ -1,55 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_merge_h__
#define INCLUDE_git_merge_h__
#include "common.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/merge.h
* @brief Git merge-base routines
* @defgroup git_revwalk Git merge-base routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Find a merge base between two commits
*
* @param out the OID of a merge base between 'one' and 'two'
* @param repo the repository where the commits exist
* @param one one of the commits
* @param two the other commit
* @return Zero on success; GIT_ENOTFOUND or -1 on failure.
*/
GIT_EXTERN(int) git_merge_base(
git_oid *out,
git_repository *repo,
const git_oid *one,
const git_oid *two);
/**
* Find a merge base given a list of commits
*
* @param out the OID of a merge base considering all the commits
* @param repo the repository where the commits exist
* @param input_array oids of the commits
* @param length The number of commits in the provided `input_array`
* @return Zero on success; GIT_ENOTFOUND or -1 on failure.
*/
GIT_EXTERN(int) git_merge_base_many(
git_oid *out,
git_repository *repo,
const git_oid input_array[],
size_t length);
/** @} */
GIT_END_DECL
#endif
-49
Ver Arquivo
@@ -1,49 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_message_h__
#define INCLUDE_git_message_h__
#include "common.h"
/**
* @file git2/message.h
* @brief Git message management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Clean up message from excess whitespace and make sure that the last line
* ends with a '\n'.
*
* Optionally, can remove lines starting with a "#".
*
* @param out The user-allocated buffer which will be filled with the
* cleaned up message. Pass NULL if you just want to get the needed
* size of the prettified message as the output value.
*
* @param out_size Size of the `out` buffer in bytes.
*
* @param message The message to be prettified.
*
* @param strip_comments Non-zero to remove lines starting with "#", 0 to
* leave them in.
*
* @return -1 on error, else number of characters in prettified message
* including the trailing NUL byte
*/
GIT_EXTERN(int) git_message_prettify(
char *out,
size_t out_size,
const char *message,
int strip_comments);
/** @} */
GIT_END_DECL
#endif /* INCLUDE_git_message_h__ */
-53
Ver Arquivo
@@ -1,53 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_net_h__
#define INCLUDE_git_net_h__
#include "common.h"
#include "oid.h"
#include "types.h"
/**
* @file git2/net.h
* @brief Git networking declarations
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
#define GIT_DEFAULT_PORT "9418"
/*
* We need this because we need to know whether we should call
* git-upload-pack or git-receive-pack on the remote end when get_refs
* gets called.
*/
typedef enum {
GIT_DIRECTION_FETCH = 0,
GIT_DIRECTION_PUSH = 1
} git_direction;
/**
* Remote head description, given out on `ls` calls.
*/
struct git_remote_head {
int local:1; /* available locally */
git_oid oid;
git_oid loid;
char *name;
};
/**
* Callback for listing the remote heads
*/
typedef int (*git_headlist_cb)(git_remote_head *rhead, void *payload);
/** @} */
GIT_END_DECL
#endif
-154
Ver Arquivo
@@ -1,154 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_note_h__
#define INCLUDE_git_note_h__
#include "oid.h"
/**
* @file git2/notes.h
* @brief Git notes management routines
* @defgroup git_note Git notes management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Callback for git_note_foreach.
*
* Receives:
* - blob_id: Oid of the blob containing the message
* - annotated_object_id: Oid of the git object being annotated
* - payload: Payload data passed to `git_note_foreach`
*/
typedef int (*git_note_foreach_cb)(
const git_oid *blob_id, const git_oid *annotated_object_id, void *payload);
/**
* Read the note for an object
*
* The note must be freed manually by the user.
*
* @param out pointer to the read note; NULL in case of error
* @param repo repository where to look up the note
* @param notes_ref canonical name of the reference to use (optional); defaults to
* "refs/notes/commits"
* @param oid OID of the git object to read the note from
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_note_read(
git_note **out,
git_repository *repo,
const char *notes_ref,
const git_oid *oid);
/**
* Get the note message
*
* @param note
* @return the note message
*/
GIT_EXTERN(const char *) git_note_message(const git_note *note);
/**
* Get the note object OID
*
* @param note
* @return the note object OID
*/
GIT_EXTERN(const git_oid *) git_note_oid(const git_note *note);
/**
* Add a note for an object
*
* @param out pointer to store the OID (optional); NULL in case of error
* @param repo repository where to store the note
* @param author signature of the notes commit author
* @param committer signature of the notes commit committer
* @param notes_ref canonical name of the reference to use (optional);
* defaults to "refs/notes/commits"
* @param oid OID of the git object to decorate
* @param note Content of the note to add for object oid
* @param force Overwrite existing note
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_note_create(
git_oid *out,
git_repository *repo,
const git_signature *author,
const git_signature *committer,
const char *notes_ref,
const git_oid *oid,
const char *note,
int force);
/**
* Remove the note for an object
*
* @param repo repository where the note lives
* @param notes_ref canonical name of the reference to use (optional);
* defaults to "refs/notes/commits"
* @param author signature of the notes commit author
* @param committer signature of the notes commit committer
* @param oid OID of the git object to remove the note from
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_note_remove(
git_repository *repo,
const char *notes_ref,
const git_signature *author,
const git_signature *committer,
const git_oid *oid);
/**
* Free a git_note object
*
* @param note git_note object
*/
GIT_EXTERN(void) git_note_free(git_note *note);
/**
* Get the default notes reference for a repository
*
* @param out Pointer to the default notes reference
* @param repo The Git repository
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_note_default_ref(const char **out, git_repository *repo);
/**
* Loop over all the notes within a specified namespace
* and issue a callback for each one.
*
* @param repo Repository where to find the notes.
*
* @param notes_ref Reference to read from (optional); defaults to
* "refs/notes/commits".
*
* @param note_cb Callback to invoke per found annotation. Return non-zero
* to stop looping.
*
* @param payload Extra parameter to callback function.
*
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_note_foreach(
git_repository *repo,
const char *notes_ref,
git_note_foreach_cb note_cb,
void *payload);
/** @} */
GIT_END_DECL
#endif
-194
Ver Arquivo
@@ -1,194 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_object_h__
#define INCLUDE_git_object_h__
#include "common.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/object.h
* @brief Git revision object management routines
* @defgroup git_object Git revision object management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Lookup a reference to one of the objects in a repository.
*
* The generated reference is owned by the repository and
* should be closed with the `git_object_free` method
* instead of free'd manually.
*
* The 'type' parameter must match the type of the object
* in the odb; the method will fail otherwise.
* The special value 'GIT_OBJ_ANY' may be passed to let
* the method guess the object's type.
*
* @param object pointer to the looked-up object
* @param repo the repository to look up the object
* @param id the unique identifier for the object
* @param type the type of the object
* @return a reference to the object
*/
GIT_EXTERN(int) git_object_lookup(
git_object **object,
git_repository *repo,
const git_oid *id,
git_otype type);
/**
* Lookup a reference to one of the objects in a repository,
* given a prefix of its identifier (short id).
*
* The object obtained will be so that its identifier
* matches the first 'len' hexadecimal characters
* (packets of 4 bits) of the given 'id'.
* 'len' must be at least GIT_OID_MINPREFIXLEN, and
* long enough to identify a unique object matching
* the prefix; otherwise the method will fail.
*
* The generated reference is owned by the repository and
* should be closed with the `git_object_free` method
* instead of free'd manually.
*
* The 'type' parameter must match the type of the object
* in the odb; the method will fail otherwise.
* The special value 'GIT_OBJ_ANY' may be passed to let
* the method guess the object's type.
*
* @param object_out pointer where to store the looked-up object
* @param repo the repository to look up the object
* @param id a short identifier for the object
* @param len the length of the short identifier
* @param type the type of the object
* @return 0 or an error code
*/
GIT_EXTERN(int) git_object_lookup_prefix(
git_object **object_out,
git_repository *repo,
const git_oid *id,
size_t len,
git_otype type);
/**
* Get the id (SHA1) of a repository object
*
* @param obj the repository object
* @return the SHA1 id
*/
GIT_EXTERN(const git_oid *) git_object_id(const git_object *obj);
/**
* Get the object type of an object
*
* @param obj the repository object
* @return the object's type
*/
GIT_EXTERN(git_otype) git_object_type(const git_object *obj);
/**
* Get the repository that owns this object
*
* Freeing or calling `git_repository_close` on the
* returned pointer will invalidate the actual object.
*
* Any other operation may be run on the repository without
* affecting the object.
*
* @param obj the object
* @return the repository who owns this object
*/
GIT_EXTERN(git_repository *) git_object_owner(const git_object *obj);
/**
* Close an open object
*
* This method instructs the library to close an existing
* object; note that git_objects are owned and cached by the repository
* so the object may or may not be freed after this library call,
* depending on how aggressive is the caching mechanism used
* by the repository.
*
* IMPORTANT:
* It *is* necessary to call this method when you stop using
* an object. Failure to do so will cause a memory leak.
*
* @param object the object to close
*/
GIT_EXTERN(void) git_object_free(git_object *object);
/**
* Convert an object type to it's string representation.
*
* The result is a pointer to a string in static memory and
* should not be free()'ed.
*
* @param type object type to convert.
* @return the corresponding string representation.
*/
GIT_EXTERN(const char *) git_object_type2string(git_otype type);
/**
* Convert a string object type representation to it's git_otype.
*
* @param str the string to convert.
* @return the corresponding git_otype.
*/
GIT_EXTERN(git_otype) git_object_string2type(const char *str);
/**
* Determine if the given git_otype is a valid loose object type.
*
* @param type object type to test.
* @return true if the type represents a valid loose object type,
* false otherwise.
*/
GIT_EXTERN(int) git_object_typeisloose(git_otype type);
/**
* Get the size in bytes for the structure which
* acts as an in-memory representation of any given
* object type.
*
* For all the core types, this would the equivalent
* of calling `sizeof(git_commit)` if the core types
* were not opaque on the external API.
*
* @param type object type to get its size
* @return size in bytes of the object
*/
GIT_EXTERN(size_t) git_object__size(git_otype type);
/**
* Recursively peel an object until an object of the specified type is met.
*
* The retrieved `peeled` object is owned by the repository and should be
* closed with the `git_object_free` method.
*
* If you pass `GIT_OBJ_ANY` as the target type, then the object will be
* peeled until the type changes (e.g. a tag will be chased until the
* referenced object is no longer a tag).
*
* @param peeled Pointer to the peeled git_object
* @param object The object to be processed
* @param target_type The type of the requested object (GIT_OBJ_COMMIT,
* GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY).
* @return 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code
*/
GIT_EXTERN(int) git_object_peel(
git_object **peeled,
const git_object *object,
git_otype target_type);
/** @} */
GIT_END_DECL
#endif
-391
Ver Arquivo
@@ -1,391 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_odb_h__
#define INCLUDE_git_odb_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "odb_backend.h"
#include "indexer.h"
/**
* @file git2/odb.h
* @brief Git object database routines
* @defgroup git_odb Git object database routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Create a new object database with no backends.
*
* Before the ODB can be used for read/writing, a custom database
* backend must be manually added using `git_odb_add_backend()`
*
* @param out location to store the database pointer, if opened.
* Set to NULL if the open failed.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_odb_new(git_odb **out);
/**
* Create a new object database and automatically add
* the two default backends:
*
* - git_odb_backend_loose: read and write loose object files
* from disk, assuming `objects_dir` as the Objects folder
*
* - git_odb_backend_pack: read objects from packfiles,
* assuming `objects_dir` as the Objects folder which
* contains a 'pack/' folder with the corresponding data
*
* @param out location to store the database pointer, if opened.
* Set to NULL if the open failed.
* @param objects_dir path of the backends' "objects" directory.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_odb_open(git_odb **out, const char *objects_dir);
/**
* Add a custom backend to an existing Object DB
*
* The backends are checked in relative ordering, based on the
* value of the `priority` parameter.
*
* Read <odb_backends.h> for more information.
*
* @param odb database to add the backend to
* @param backend pointer to a git_odb_backend instance
* @param priority Value for ordering the backends queue
* @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_odb_add_backend(git_odb *odb, git_odb_backend *backend, int priority);
/**
* Add a custom backend to an existing Object DB; this
* backend will work as an alternate.
*
* Alternate backends are always checked for objects *after*
* all the main backends have been exhausted.
*
* The backends are checked in relative ordering, based on the
* value of the `priority` parameter.
*
* Writing is disabled on alternate backends.
*
* Read <odb_backends.h> for more information.
*
* @param odb database to add the backend to
* @param backend pointer to a git_odb_backend instance
* @param priority Value for ordering the backends queue
* @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_odb_add_alternate(git_odb *odb, git_odb_backend *backend, int priority);
/**
* Add an on-disk alternate to an existing Object DB.
*
* Note that the added path must point to an `objects`, not
* to a full repository, to use it as an alternate store.
*
* Alternate backends are always checked for objects *after*
* all the main backends have been exhausted.
*
* Writing is disabled on alternate backends.
*
* @param odb database to add the backend to
* @param path path to the objects folder for the alternate
* @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_odb_add_disk_alternate(git_odb *odb, const char *path);
/**
* Close an open object database.
*
* @param db database pointer to close. If NULL no action is taken.
*/
GIT_EXTERN(void) git_odb_free(git_odb *db);
/**
* Read an object from the database.
*
* This method queries all available ODB backends
* trying to read the given OID.
*
* The returned object is reference counted and
* internally cached, so it should be closed
* by the user once it's no longer in use.
*
* @param out pointer where to store the read object
* @param db database to search for the object in.
* @param id identity of the object to read.
* @return
* - 0 if the object was read;
* - GIT_ENOTFOUND if the object is not in the database.
*/
GIT_EXTERN(int) git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id);
/**
* Read an object from the database, given a prefix
* of its identifier.
*
* This method queries all available ODB backends
* trying to match the 'len' first hexadecimal
* characters of the 'short_id'.
* The remaining (GIT_OID_HEXSZ-len)*4 bits of
* 'short_id' must be 0s.
* 'len' must be at least GIT_OID_MINPREFIXLEN,
* and the prefix must be long enough to identify
* a unique object in all the backends; the
* method will fail otherwise.
*
* The returned object is reference counted and
* internally cached, so it should be closed
* by the user once it's no longer in use.
*
* @param out pointer where to store the read object
* @param db database to search for the object in.
* @param short_id a prefix of the id of the object to read.
* @param len the length of the prefix
* @return
* - 0 if the object was read;
* - GIT_ENOTFOUND if the object is not in the database.
* - GIT_EAMBIGUOUS if the prefix is ambiguous (several objects match the prefix)
*/
GIT_EXTERN(int) git_odb_read_prefix(git_odb_object **out, git_odb *db, const git_oid *short_id, size_t len);
/**
* Read the header of an object from the database, without
* reading its full contents.
*
* The header includes the length and the type of an object.
*
* Note that most backends do not support reading only the header
* of an object, so the whole object will be read and then the
* header will be returned.
*
* @param len_out pointer where to store the length
* @param type_out pointer where to store the type
* @param db database to search for the object in.
* @param id identity of the object to read.
* @return
* - 0 if the object was read;
* - GIT_ENOTFOUND if the object is not in the database.
*/
GIT_EXTERN(int) git_odb_read_header(size_t *len_out, git_otype *type_out, git_odb *db, const git_oid *id);
/**
* Determine if the given object can be found in the object database.
*
* @param db database to be searched for the given object.
* @param id the object to search for.
* @return
* - 1, if the object was found
* - 0, otherwise
*/
GIT_EXTERN(int) git_odb_exists(git_odb *db, const git_oid *id);
/**
* List all objects available in the database
*
* The callback will be called for each object available in the
* database. Note that the objects are likely to be returned in the index
* order, which would make accessing the objects in that order inefficient.
* Return a non-zero value from the callback to stop looping.
*
* @param db database to use
* @param cb the callback to call for each object
* @param payload data to pass to the callback
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_odb_foreach(git_odb *db, git_odb_foreach_cb cb, void *payload);
/**
* Write an object directly into the ODB
*
* This method writes a full object straight into the ODB.
* For most cases, it is preferred to write objects through a write
* stream, which is both faster and less memory intensive, specially
* for big objects.
*
* This method is provided for compatibility with custom backends
* which are not able to support streaming writes
*
* @param out pointer to store the OID result of the write
* @param odb object database where to store the object
* @param data buffer with the data to store
* @param len size of the buffer
* @param type type of the data to store
* @return 0 or an error code
*/
GIT_EXTERN(int) git_odb_write(git_oid *out, git_odb *odb, const void *data, size_t len, git_otype type);
/**
* Open a stream to write an object into the ODB
*
* The type and final length of the object must be specified
* when opening the stream.
*
* The returned stream will be of type `GIT_STREAM_WRONLY` and
* will have the following methods:
*
* - stream->write: write `n` bytes into the stream
* - stream->finalize_write: close the stream and store the object in
* the odb
* - stream->free: free the stream
*
* The streaming write won't be effective until `stream->finalize_write`
* is called and returns without an error
*
* The stream must always be free'd or will leak memory.
*
* @see git_odb_stream
*
* @param out pointer where to store the stream
* @param db object database where the stream will write
* @param size final size of the object that will be written
* @param type type of the object that will be written
* @return 0 if the stream was created; error code otherwise
*/
GIT_EXTERN(int) git_odb_open_wstream(git_odb_stream **out, git_odb *db, size_t size, git_otype type);
/**
* Open a stream to read an object from the ODB
*
* Note that most backends do *not* support streaming reads
* because they store their objects as compressed/delta'ed blobs.
*
* It's recommended to use `git_odb_read` instead, which is
* assured to work on all backends.
*
* The returned stream will be of type `GIT_STREAM_RDONLY` and
* will have the following methods:
*
* - stream->read: read `n` bytes from the stream
* - stream->free: free the stream
*
* The stream must always be free'd or will leak memory.
*
* @see git_odb_stream
*
* @param out pointer where to store the stream
* @param db object database where the stream will read from
* @param oid oid of the object the stream will read from
* @return 0 if the stream was created; error code otherwise
*/
GIT_EXTERN(int) git_odb_open_rstream(git_odb_stream **out, git_odb *db, const git_oid *oid);
/**
* Open a stream for writing a pack file to the ODB.
*
* If the ODB layer understands pack files, then the given
* packfile will likely be streamed directly to disk (and a
* corresponding index created). If the ODB layer does not
* understand pack files, the objects will be stored in whatever
* format the ODB layer uses.
*
* @see git_odb_writepack
*
* @param out pointer to the writepack functions
* @param db object database where the stream will read from
* @param progress_cb function to call with progress information.
* Be aware that this is called inline with network and indexing operations,
* so performance may be affected.
* @param progress_payload payload for the progress callback
*/
GIT_EXTERN(int) git_odb_write_pack(
git_odb_writepack **out,
git_odb *db,
git_transfer_progress_callback progress_cb,
void *progress_payload);
/**
* Determine the object-ID (sha1 hash) of a data buffer
*
* The resulting SHA-1 OID will be the identifier for the data
* buffer as if the data buffer it were to written to the ODB.
*
* @param out the resulting object-ID.
* @param data data to hash
* @param len size of the data
* @param type of the data to hash
* @return 0 or an error code
*/
GIT_EXTERN(int) git_odb_hash(git_oid *out, const void *data, size_t len, git_otype type);
/**
* Read a file from disk and fill a git_oid with the object id
* that the file would have if it were written to the Object
* Database as an object of the given type (w/o applying filters).
* Similar functionality to git.git's `git hash-object` without
* the `-w` flag, however, with the --no-filters flag.
* If you need filters, see git_repository_hashfile.
*
* @param out oid structure the result is written into.
* @param path file to read and determine object id for
* @param type the type of the object that will be hashed
* @return 0 or an error code
*/
GIT_EXTERN(int) git_odb_hashfile(git_oid *out, const char *path, git_otype type);
/**
* Close an ODB object
*
* This method must always be called once a `git_odb_object` is no
* longer needed, otherwise memory will leak.
*
* @param object object to close
*/
GIT_EXTERN(void) git_odb_object_free(git_odb_object *object);
/**
* Return the OID of an ODB object
*
* This is the OID from which the object was read from
*
* @param object the object
* @return a pointer to the OID
*/
GIT_EXTERN(const git_oid *) git_odb_object_id(git_odb_object *object);
/**
* Return the data of an ODB object
*
* This is the uncompressed, raw data as read from the ODB,
* without the leading header.
*
* This pointer is owned by the object and shall not be free'd.
*
* @param object the object
* @return a pointer to the data
*/
GIT_EXTERN(const void *) git_odb_object_data(git_odb_object *object);
/**
* Return the size of an ODB object
*
* This is the real size of the `data` buffer, not the
* actual size of the object.
*
* @param object the object
* @return the size
*/
GIT_EXTERN(size_t) git_odb_object_size(git_odb_object *object);
/**
* Return the type of an ODB object
*
* @param object the object
* @return the type
*/
GIT_EXTERN(git_otype) git_odb_object_type(git_odb_object *object);
/** @} */
GIT_END_DECL
#endif
-147
Ver Arquivo
@@ -1,147 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_odb_backend_h__
#define INCLUDE_git_odb_backend_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "indexer.h"
/**
* @file git2/backend.h
* @brief Git custom backend functions
* @defgroup git_backend Git custom backend API
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
struct git_odb_stream;
struct git_odb_writepack;
/**
* Function type for callbacks from git_odb_foreach.
*/
typedef int (*git_odb_foreach_cb)(const git_oid *id, void *payload);
/**
* An instance for a custom backend
*/
struct git_odb_backend {
unsigned int version;
git_odb *odb;
/* read and read_prefix each return to libgit2 a buffer which
* will be freed later. The buffer should be allocated using
* the function git_odb_backend_malloc to ensure that it can
* be safely freed later. */
int (* read)(
void **, size_t *, git_otype *,
struct git_odb_backend *,
const git_oid *);
/* To find a unique object given a prefix
* of its oid.
* The oid given must be so that the
* remaining (GIT_OID_HEXSZ - len)*4 bits
* are 0s.
*/
int (* read_prefix)(
git_oid *,
void **, size_t *, git_otype *,
struct git_odb_backend *,
const git_oid *,
size_t);
int (* read_header)(
size_t *, git_otype *,
struct git_odb_backend *,
const git_oid *);
/* The writer may assume that the object
* has already been hashed and is passed
* in the first parameter.
*/
int (* write)(
git_oid *,
struct git_odb_backend *,
const void *,
size_t,
git_otype);
int (* writestream)(
struct git_odb_stream **,
struct git_odb_backend *,
size_t,
git_otype);
int (* readstream)(
struct git_odb_stream **,
struct git_odb_backend *,
const git_oid *);
int (* exists)(
struct git_odb_backend *,
const git_oid *);
int (* foreach)(
struct git_odb_backend *,
git_odb_foreach_cb cb,
void *payload);
int (* writepack)(
struct git_odb_writepack **,
struct git_odb_backend *,
git_transfer_progress_callback progress_cb,
void *progress_payload);
void (* free)(struct git_odb_backend *);
};
#define GIT_ODB_BACKEND_VERSION 1
#define GIT_ODB_BACKEND_INIT {GIT_ODB_BACKEND_VERSION}
/** Streaming mode */
enum {
GIT_STREAM_RDONLY = (1 << 1),
GIT_STREAM_WRONLY = (1 << 2),
GIT_STREAM_RW = (GIT_STREAM_RDONLY | GIT_STREAM_WRONLY),
};
/** A stream to read/write from a backend */
struct git_odb_stream {
struct git_odb_backend *backend;
unsigned int mode;
int (*read)(struct git_odb_stream *stream, char *buffer, size_t len);
int (*write)(struct git_odb_stream *stream, const char *buffer, size_t len);
int (*finalize_write)(git_oid *oid_p, struct git_odb_stream *stream);
void (*free)(struct git_odb_stream *stream);
};
/** A stream to write a pack file to the ODB */
struct git_odb_writepack {
struct git_odb_backend *backend;
int (*add)(struct git_odb_writepack *writepack, const void *data, size_t size, git_transfer_progress *stats);
int (*commit)(struct git_odb_writepack *writepack, git_transfer_progress *stats);
void (*free)(struct git_odb_writepack *writepack);
};
GIT_EXTERN(void *) git_odb_backend_malloc(git_odb_backend *backend, size_t len);
/**
* Constructors for in-box ODB backends.
*/
GIT_EXTERN(int) git_odb_backend_pack(git_odb_backend **out, const char *objects_dir);
GIT_EXTERN(int) git_odb_backend_loose(git_odb_backend **out, const char *objects_dir, int compression_level, int do_fsync);
GIT_EXTERN(int) git_odb_backend_one_pack(git_odb_backend **out, const char *index_file);
GIT_END_DECL
#endif
-248
Ver Arquivo
@@ -1,248 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_oid_h__
#define INCLUDE_git_oid_h__
#include "common.h"
#include "types.h"
/**
* @file git2/oid.h
* @brief Git object id routines
* @defgroup git_oid Git object id routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/** Size (in bytes) of a raw/binary oid */
#define GIT_OID_RAWSZ 20
/** Size (in bytes) of a hex formatted oid */
#define GIT_OID_HEXSZ (GIT_OID_RAWSZ * 2)
/** Minimum length (in number of hex characters,
* i.e. packets of 4 bits) of an oid prefix */
#define GIT_OID_MINPREFIXLEN 4
/** Unique identity of any object (commit, tree, blob, tag). */
typedef struct git_oid {
/** raw binary formatted id */
unsigned char id[GIT_OID_RAWSZ];
} git_oid;
/**
* Parse a hex formatted object id into a git_oid.
*
* @param out oid structure the result is written into.
* @param str input hex string; must be pointing at the start of
* the hex sequence and have at least the number of bytes
* needed for an oid encoded in hex (40 bytes).
* @return 0 or an error code
*/
GIT_EXTERN(int) git_oid_fromstr(git_oid *out, const char *str);
/**
* Parse N characters of a hex formatted object id into a git_oid
*
* If N is odd, N-1 characters will be parsed instead.
* The remaining space in the git_oid will be set to zero.
*
* @param out oid structure the result is written into.
* @param str input hex string of at least size `length`
* @param length length of the input string
* @return 0 or an error code
*/
GIT_EXTERN(int) git_oid_fromstrn(git_oid *out, const char *str, size_t length);
/**
* Copy an already raw oid into a git_oid structure.
*
* @param out oid structure the result is written into.
* @param raw the raw input bytes to be copied.
*/
GIT_EXTERN(void) git_oid_fromraw(git_oid *out, const unsigned char *raw);
/**
* Format a git_oid into a hex string.
*
* @param out output hex string; must be pointing at the start of
* the hex sequence and have at least the number of bytes
* needed for an oid encoded in hex (40 bytes). Only the
* oid digits are written; a '\\0' terminator must be added
* by the caller if it is required.
* @param oid oid structure to format.
*/
GIT_EXTERN(void) git_oid_fmt(char *out, const git_oid *id);
/**
* Format a git_oid into a loose-object path string.
*
* The resulting string is "aa/...", where "aa" is the first two
* hex digits of the oid and "..." is the remaining 38 digits.
*
* @param out output hex string; must be pointing at the start of
* the hex sequence and have at least the number of bytes
* needed for an oid encoded in hex (41 bytes). Only the
* oid digits are written; a '\\0' terminator must be added
* by the caller if it is required.
* @param id oid structure to format.
*/
GIT_EXTERN(void) git_oid_pathfmt(char *out, const git_oid *id);
/**
* Format a git_oid into a newly allocated c-string.
*
* @param oid the oid structure to format
* @return the c-string; NULL if memory is exhausted. Caller must
* deallocate the string with git__free().
*/
GIT_EXTERN(char *) git_oid_allocfmt(const git_oid *id);
/**
* Format a git_oid into a buffer as a hex format c-string.
*
* If the buffer is smaller than GIT_OID_HEXSZ+1, then the resulting
* oid c-string will be truncated to n-1 characters. If there are
* any input parameter errors (out == NULL, n == 0, oid == NULL),
* then a pointer to an empty string is returned, so that the return
* value can always be printed.
*
* @param out the buffer into which the oid string is output.
* @param n the size of the out buffer.
* @param id the oid structure to format.
* @return the out buffer pointer, assuming no input parameter
* errors, otherwise a pointer to an empty string.
*/
GIT_EXTERN(char *) git_oid_tostr(char *out, size_t n, const git_oid *id);
/**
* Copy an oid from one structure to another.
*
* @param out oid structure the result is written into.
* @param src oid structure to copy from.
*/
GIT_EXTERN(void) git_oid_cpy(git_oid *out, const git_oid *src);
/**
* Compare two oid structures.
*
* @param a first oid structure.
* @param b second oid structure.
* @return <0, 0, >0 if a < b, a == b, a > b.
*/
GIT_INLINE(int) git_oid_cmp(const git_oid *a, const git_oid *b)
{
const unsigned char *sha1 = a->id;
const unsigned char *sha2 = b->id;
int i;
for (i = 0; i < GIT_OID_RAWSZ; i++, sha1++, sha2++) {
if (*sha1 != *sha2)
return *sha1 - *sha2;
}
return 0;
}
/**
* Compare two oid structures for equality
*
* @param a first oid structure.
* @param b second oid structure.
* @return true if equal, false otherwise
*/
GIT_INLINE(int) git_oid_equal(const git_oid *a, const git_oid *b)
{
return !git_oid_cmp(a, b);
}
/**
* Compare the first 'len' hexadecimal characters (packets of 4 bits)
* of two oid structures.
*
* @param a first oid structure.
* @param b second oid structure.
* @param len the number of hex chars to compare
* @return 0 in case of a match
*/
GIT_EXTERN(int) git_oid_ncmp(const git_oid *a, const git_oid *b, size_t len);
/**
* Check if an oid equals an hex formatted object id.
*
* @param id oid structure.
* @param str input hex string of an object id.
* @return GIT_ENOTOID if str is not a valid hex string,
* 0 in case of a match, GIT_ERROR otherwise.
*/
GIT_EXTERN(int) git_oid_streq(const git_oid *id, const char *str);
/**
* Check is an oid is all zeros.
*
* @return 1 if all zeros, 0 otherwise.
*/
GIT_EXTERN(int) git_oid_iszero(const git_oid *id);
/**
* OID Shortener object
*/
typedef struct git_oid_shorten git_oid_shorten;
/**
* Create a new OID shortener.
*
* The OID shortener is used to process a list of OIDs
* in text form and return the shortest length that would
* uniquely identify all of them.
*
* E.g. look at the result of `git log --abbrev`.
*
* @param min_length The minimal length for all identifiers,
* which will be used even if shorter OIDs would still
* be unique.
* @return a `git_oid_shorten` instance, NULL if OOM
*/
GIT_EXTERN(git_oid_shorten *) git_oid_shorten_new(size_t min_length);
/**
* Add a new OID to set of shortened OIDs and calculate
* the minimal length to uniquely identify all the OIDs in
* the set.
*
* The OID is expected to be a 40-char hexadecimal string.
* The OID is owned by the user and will not be modified
* or freed.
*
* For performance reasons, there is a hard-limit of how many
* OIDs can be added to a single set (around ~22000, assuming
* a mostly randomized distribution), which should be enough
* for any kind of program, and keeps the algorithm fast and
* memory-efficient.
*
* Attempting to add more than those OIDs will result in a
* GIT_ENOMEM error
*
* @param os a `git_oid_shorten` instance
* @param text_id an OID in text form
* @return the minimal length to uniquely identify all OIDs
* added so far to the set; or an error code (<0) if an
* error occurs.
*/
GIT_EXTERN(int) git_oid_shorten_add(git_oid_shorten *os, const char *text_id);
/**
* Free an OID shortener instance
*
* @param os a `git_oid_shorten` instance
*/
GIT_EXTERN(void) git_oid_shorten_free(git_oid_shorten *os);
/** @} */
GIT_END_DECL
#endif
-117
Ver Arquivo
@@ -1,117 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_pack_h__
#define INCLUDE_git_pack_h__
#include "common.h"
#include "oid.h"
/**
* @file git2/pack.h
* @brief Git pack management routines
* @defgroup git_pack Git pack management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Initialize a new packbuilder
*
* @param out The new packbuilder object
* @param repo The repository
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_packbuilder_new(git_packbuilder **out, git_repository *repo);
/**
* Set number of threads to spawn
*
* By default, libgit2 won't spawn any threads at all;
* when set to 0, libgit2 will autodetect the number of
* CPUs.
*
* @param pb The packbuilder
* @param n Number of threads to spawn
* @return number of actual threads to be used
*/
GIT_EXTERN(unsigned int) git_packbuilder_set_threads(git_packbuilder *pb, unsigned int n);
/**
* Insert a single object
*
* For an optimal pack it's mandatory to insert objects in recency order,
* commits followed by trees and blobs.
*
* @param pb The packbuilder
* @param id The oid of the commit
* @param name The name; might be NULL
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_packbuilder_insert(git_packbuilder *pb, const git_oid *id, const char *name);
/**
* Insert a root tree object
*
* This will add the tree as well as all referenced trees and blobs.
*
* @param pb The packbuilder
* @param id The oid of the root tree
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_packbuilder_insert_tree(git_packbuilder *pb, const git_oid *id);
/**
* Write the new pack and the corresponding index to path
*
* @param pb The packbuilder
* @param path Directory to store the new pack and index
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_packbuilder_write(git_packbuilder *pb, const char *file);
/**
* Create the new pack and pass each object to the callback
*
* @param pb the packbuilder
* @param cb the callback to call with each packed object's buffer
* @param payload the callback's data
* @return 0 or an error code
*/
typedef int (*git_packbuilder_foreach_cb)(void *buf, size_t size, void *payload);
GIT_EXTERN(int) git_packbuilder_foreach(git_packbuilder *pb, git_packbuilder_foreach_cb cb, void *payload);
/**
* Get the total number of objects the packbuilder will write out
*
* @param pb the packbuilder
* @return
*/
GIT_EXTERN(uint32_t) git_packbuilder_object_count(git_packbuilder *pb);
/**
* Get the number of objects the packbuilder has already written out
*
* @param pb the packbuilder
* @return
*/
GIT_EXTERN(uint32_t) git_packbuilder_written(git_packbuilder *pb);
/**
* Free the packbuilder and all associated data
*
* @param pb The packbuilder
*/
GIT_EXTERN(void) git_packbuilder_free(git_packbuilder *pb);
/** @} */
GIT_END_DECL
#endif
-80
Ver Arquivo
@@ -1,80 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_push_h__
#define INCLUDE_git_push_h__
#include "common.h"
/**
* @file git2/push.h
* @brief Git push management functions
* @defgroup git_push push management functions
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Create a new push object
*
* @param out New push object
* @param remote Remote instance
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_push_new(git_push **out, git_remote *remote);
/**
* Add a refspec to be pushed
*
* @param push The push object
* @param refspec Refspec string
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_push_add_refspec(git_push *push, const char *refspec);
/**
* Actually push all given refspecs
*
* @param push The push object
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_push_finish(git_push *push);
/**
* Check if remote side successfully unpacked
*
* @param push The push object
*
* @return true if equal, false otherwise
*/
GIT_EXTERN(int) git_push_unpack_ok(git_push *push);
/**
* Call callback `cb' on each status
*
* @param push The push object
* @param cb The callback to call on each object
*
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_push_status_foreach(git_push *push,
int (*cb)(const char *ref, const char *msg, void *data),
void *data);
/**
* Free the given push object
*
* @param push The push object
*/
GIT_EXTERN(void) git_push_free(git_push *push);
/** @} */
GIT_END_DECL
#endif
-167
Ver Arquivo
@@ -1,167 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_reflog_h__
#define INCLUDE_git_reflog_h__
#include "common.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/reflog.h
* @brief Git reflog management routines
* @defgroup git_reflog Git reflog management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Read the reflog for the given reference
*
* If there is no reflog file for the given
* reference yet, an empty reflog object will
* be returned.
*
* The reflog must be freed manually by using
* git_reflog_free().
*
* @param out pointer to reflog
* @param ref reference to read the reflog for
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reflog_read(git_reflog **out, const git_reference *ref);
/**
* Write an existing in-memory reflog object back to disk
* using an atomic file lock.
*
* @param reflog an existing reflog object
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reflog_write(git_reflog *reflog);
/**
* Add a new entry to the reflog.
*
* `msg` is optional and can be NULL.
*
* @param reflog an existing reflog object
* @param id the OID the reference is now pointing to
* @param committer the signature of the committer
* @param msg the reflog message
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reflog_append(git_reflog *reflog, const git_oid *id, const git_signature *committer, const char *msg);
/**
* Rename the reflog for the given reference
*
* The reflog to be renamed is expected to already exist
*
* The new name will be checked for validity.
* See `git_reference_create_symbolic()` for rules about valid names.
*
* @param ref the reference
* @param name the new name of the reference
* @return 0 on success, GIT_EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_reflog_rename(git_reference *ref, const char *name);
/**
* Delete the reflog for the given reference
*
* @param ref the reference
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reflog_delete(git_reference *ref);
/**
* Get the number of log entries in a reflog
*
* @param reflog the previously loaded reflog
* @return the number of log entries
*/
GIT_EXTERN(size_t) git_reflog_entrycount(git_reflog *reflog);
/**
* Lookup an entry by its index
*
* Requesting the reflog entry with an index of 0 (zero) will
* return the most recently created entry.
*
* @param reflog a previously loaded reflog
* @param idx the position of the entry to lookup. Should be greater than or
* equal to 0 (zero) and less than `git_reflog_entrycount()`.
* @return the entry; NULL if not found
*/
GIT_EXTERN(const git_reflog_entry *) git_reflog_entry_byindex(git_reflog *reflog, size_t idx);
/**
* Remove an entry from the reflog by its index
*
* To ensure there's no gap in the log history, set `rewrite_previous_entry`
* param value to 1. When deleting entry `n`, member old_oid of entry `n-1`
* (if any) will be updated with the value of member new_oid of entry `n+1`.
*
* @param reflog a previously loaded reflog.
*
* @param idx the position of the entry to remove. Should be greater than or
* equal to 0 (zero) and less than `git_reflog_entrycount()`.
*
* @param rewrite_previous_entry 1 to rewrite the history; 0 otherwise.
*
* @return 0 on success, GIT_ENOTFOUND if the entry doesn't exist
* or an error code.
*/
GIT_EXTERN(int) git_reflog_drop(
git_reflog *reflog,
size_t idx,
int rewrite_previous_entry);
/**
* Get the old oid
*
* @param entry a reflog entry
* @return the old oid
*/
GIT_EXTERN(const git_oid *) git_reflog_entry_id_old(const git_reflog_entry *entry);
/**
* Get the new oid
*
* @param entry a reflog entry
* @return the new oid at this time
*/
GIT_EXTERN(const git_oid *) git_reflog_entry_id_new(const git_reflog_entry *entry);
/**
* Get the committer of this entry
*
* @param entry a reflog entry
* @return the committer
*/
GIT_EXTERN(const git_signature *) git_reflog_entry_committer(const git_reflog_entry *entry);
/**
* Get the log message
*
* @param entry a reflog entry
* @return the log msg
*/
GIT_EXTERN(const char *) git_reflog_entry_message(const git_reflog_entry *entry);
/**
* Free the reflog
*
* @param reflog reflog to free
*/
GIT_EXTERN(void) git_reflog_free(git_reflog *reflog);
/** @} */
GIT_END_DECL
#endif
-509
Ver Arquivo
@@ -1,509 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_refs_h__
#define INCLUDE_git_refs_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "strarray.h"
/**
* @file git2/refs.h
* @brief Git reference management routines
* @defgroup git_reference Git reference management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Lookup a reference by name in a repository.
*
* The returned reference must be freed by the user.
*
* The name will be checked for validity.
* See `git_reference_create_symbolic()` for rules about valid names.
*
* @param out pointer to the looked-up reference
* @param repo the repository to look up the reference
* @param name the long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)
* @return 0 on success, ENOTFOUND, EINVALIDSPEC or an error code.
*/
GIT_EXTERN(int) git_reference_lookup(git_reference **out, git_repository *repo, const char *name);
/**
* Lookup a reference by name and resolve immediately to OID.
*
* This function provides a quick way to resolve a reference name straight
* through to the object id that it refers to. This avoids having to
* allocate or free any `git_reference` objects for simple situations.
*
* The name will be checked for validity.
* See `git_reference_create_symbolic()` for rules about valid names.
*
* @param out Pointer to oid to be filled in
* @param repo The repository in which to look up the reference
* @param name The long name for the reference
* @return 0 on success, ENOTFOUND, EINVALIDSPEC or an error code.
*/
GIT_EXTERN(int) git_reference_name_to_id(
git_oid *out, git_repository *repo, const char *name);
/**
* Create a new symbolic reference.
*
* A symbolic reference is a reference name that refers to another
* reference name. If the other name moves, the symbolic name will move,
* too. As a simple example, the "HEAD" reference might refer to
* "refs/heads/master" while on the "master" branch of a repository.
*
* The symbolic reference will be created in the repository and written to
* the disk. The generated reference object must be freed by the user.
*
* Valid reference names must follow one of two patterns:
*
* 1. Top-level names must contain only capital letters and underscores,
* and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
* 2. Names prefixed with "refs/" can be almost anything. You must avoid
* the characters '~', '^', ':', '\\', '?', '[', and '*', and the
* sequences ".." and "@{" which have special meaning to revparse.
*
* This function will return an error if a reference already exists with the
* given name unless `force` is true, in which case it will be overwritten.
*
* @param out Pointer to the newly created reference
* @param repo Repository where that reference will live
* @param name The name of the reference
* @param target The target of the reference
* @param force Overwrite existing references
* @return 0 on success, EEXISTS, EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_reference_symbolic_create(git_reference **out, git_repository *repo, const char *name, const char *target, int force);
/**
* Create a new direct reference.
*
* A direct reference (also called an object id reference) refers directly
* to a specific object id (a.k.a. OID or SHA) in the repository. The id
* permanently refers to the object (although the reference itself can be
* moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"
* refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.
*
* The direct reference will be created in the repository and written to
* the disk. The generated reference object must be freed by the user.
*
* Valid reference names must follow one of two patterns:
*
* 1. Top-level names must contain only capital letters and underscores,
* and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
* 2. Names prefixed with "refs/" can be almost anything. You must avoid
* the characters '~', '^', ':', '\\', '?', '[', and '*', and the
* sequences ".." and "@{" which have special meaning to revparse.
*
* This function will return an error if a reference already exists with the
* given name unless `force` is true, in which case it will be overwritten.
*
* @param out Pointer to the newly created reference
* @param repo Repository where that reference will live
* @param name The name of the reference
* @param id The object id pointed to by the reference.
* @param force Overwrite existing references
* @return 0 on success, EEXISTS, EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_reference_create(git_reference **out, git_repository *repo, const char *name, const git_oid *id, int force);
/**
* Get the OID pointed to by a direct reference.
*
* Only available if the reference is direct (i.e. an object id reference,
* not a symbolic one).
*
* To find the OID of a symbolic ref, call `git_reference_resolve()` and
* then this function (or maybe use `git_reference_name_to_oid()` to
* directly resolve a reference name all the way through to an OID).
*
* @param ref The reference
* @return a pointer to the oid if available, NULL otherwise
*/
GIT_EXTERN(const git_oid *) git_reference_target(const git_reference *ref);
/**
* Get full name to the reference pointed to by a symbolic reference.
*
* Only available if the reference is symbolic.
*
* @param ref The reference
* @return a pointer to the name if available, NULL otherwise
*/
GIT_EXTERN(const char *) git_reference_symbolic_target(const git_reference *ref);
/**
* Get the type of a reference.
*
* Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC)
*
* @param ref The reference
* @return the type
*/
GIT_EXTERN(git_ref_t) git_reference_type(const git_reference *ref);
/**
* Get the full name of a reference.
*
* See `git_reference_create_symbolic()` for rules about valid names.
*
* @param ref The reference
* @return the full name for the ref
*/
GIT_EXTERN(const char *) git_reference_name(const git_reference *ref);
/**
* Resolve a symbolic reference to a direct reference.
*
* This method iteratively peels a symbolic reference until it resolves to
* a direct reference to an OID.
*
* The peeled reference is returned in the `resolved_ref` argument, and
* must be freed manually once it's no longer needed.
*
* If a direct reference is passed as an argument, a copy of that
* reference is returned. This copy must be manually freed too.
*
* @param resolved_ref Pointer to the peeled reference
* @param ref The reference
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reference_resolve(git_reference **out, const git_reference *ref);
/**
* Get the repository where a reference resides.
*
* @param ref The reference
* @return a pointer to the repo
*/
GIT_EXTERN(git_repository *) git_reference_owner(const git_reference *ref);
/**
* Set the symbolic target of a reference.
*
* The reference must be a symbolic reference, otherwise this will fail.
*
* The reference will be automatically updated in memory and on disk.
*
* The target name will be checked for validity.
* See `git_reference_create_symbolic()` for rules about valid names.
*
* @param ref The reference
* @param target The new target for the reference
* @return 0 on success, EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_reference_symbolic_set_target(git_reference *ref, const char *target);
/**
* Set the OID target of a reference.
*
* The reference must be a direct reference, otherwise this will fail.
*
* The reference will be automatically updated in memory and on disk.
*
* @param ref The reference
* @param id The new target OID for the reference
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reference_set_target(git_reference *ref, const git_oid *id);
/**
* Rename an existing reference.
*
* This method works for both direct and symbolic references.
*
* The new name will be checked for validity.
* See `git_reference_create_symbolic()` for rules about valid names.
*
* The given git_reference will be updated in place.
*
* The reference will be immediately renamed in-memory and on disk.
*
* If the `force` flag is not enabled, and there's already
* a reference with the given name, the renaming will fail.
*
* IMPORTANT:
* The user needs to write a proper reflog entry if the
* reflog is enabled for the repository. We only rename
* the reflog if it exists.
*
* @param ref The reference to rename
* @param name The new name for the reference
* @param force Overwrite an existing reference
* @return 0 on success, EINVALIDSPEC, EEXISTS or an error code
*
*/
GIT_EXTERN(int) git_reference_rename(git_reference *ref, const char *name, int force);
/**
* Delete an existing reference.
*
* This method works for both direct and symbolic references.
*
* The reference will be immediately removed on disk and from memory
* (i.e. freed). The given reference pointer will no longer be valid.
*
* @param ref The reference to remove
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reference_delete(git_reference *ref);
/**
* Pack all the loose references in the repository.
*
* This method will load into the cache all the loose
* references on the repository and update the
* `packed-refs` file with them.
*
* Once the `packed-refs` file has been written properly,
* the loose references will be removed from disk.
*
* @param repo Repository where the loose refs will be packed
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reference_packall(git_repository *repo);
/**
* Fill a list with all the references that can be found in a repository.
*
* Using the `list_flags` parameter, the listed references may be filtered
* by type (`GIT_REF_OID` or `GIT_REF_SYMBOLIC`) or using a bitwise OR of
* `git_ref_t` values. To include packed refs, include `GIT_REF_PACKED`.
* For convenience, use the value `GIT_REF_LISTALL` to obtain all
* references, including packed ones.
*
* The string array will be filled with the names of all references; these
* values are owned by the user and should be free'd manually when no
* longer needed, using `git_strarray_free()`.
*
* @param array Pointer to a git_strarray structure where
* the reference names will be stored
* @param repo Repository where to find the refs
* @param list_flags Filtering flags for the reference listing
* @return 0 or an error code
*/
GIT_EXTERN(int) git_reference_list(git_strarray *array, git_repository *repo, unsigned int list_flags);
typedef int (*git_reference_foreach_cb)(const char *refname, void *payload);
/**
* Perform a callback on each reference in the repository.
*
* Using the `list_flags` parameter, the references may be filtered by
* type (`GIT_REF_OID` or `GIT_REF_SYMBOLIC`) or using a bitwise OR of
* `git_ref_t` values. To include packed refs, include `GIT_REF_PACKED`.
* For convenience, use the value `GIT_REF_LISTALL` to obtain all
* references, including packed ones.
*
* The `callback` function will be called for each reference in the
* repository, receiving the name of the reference and the `payload` value
* passed to this method. Returning a non-zero value from the callback
* will terminate the iteration.
*
* @param repo Repository where to find the refs
* @param list_flags Filtering flags for the reference listing.
* @param callback Function which will be called for every listed ref
* @param payload Additional data to pass to the callback
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_reference_foreach(
git_repository *repo,
unsigned int list_flags,
git_reference_foreach_cb callback,
void *payload);
/**
* Check if a reference has been loaded from a packfile.
*
* @param ref A git reference
* @return 0 in case it's not packed; 1 otherwise
*/
GIT_EXTERN(int) git_reference_is_packed(git_reference *ref);
/**
* Reload a reference from disk.
*
* Reference pointers can become outdated if the Git repository is
* accessed simultaneously by other clients while the library is open.
*
* This method forces a reload of the reference from disk, to ensure that
* the provided information is still reliable.
*
* If the reload fails (e.g. the reference no longer exists on disk, or
* has become corrupted), an error code will be returned and the reference
* pointer will be invalidated and freed.
*
* @param ref The reference to reload
* @return 0 on success, or an error code
*/
GIT_EXTERN(int) git_reference_reload(git_reference *ref);
/**
* Free the given reference.
*
* @param ref git_reference
*/
GIT_EXTERN(void) git_reference_free(git_reference *ref);
/**
* Compare two references.
*
* @param ref1 The first git_reference
* @param ref2 The second git_reference
* @return 0 if the same, else a stable but meaningless ordering.
*/
GIT_EXTERN(int) git_reference_cmp(git_reference *ref1, git_reference *ref2);
/**
* Perform a callback on each reference in the repository whose name
* matches the given pattern.
*
* This function acts like `git_reference_foreach()` with an additional
* pattern match being applied to the reference name before issuing the
* callback function. See that function for more information.
*
* The pattern is matched using fnmatch or "glob" style where a '*' matches
* any sequence of letters, a '?' matches any letter, and square brackets
* can be used to define character ranges (such as "[0-9]" for digits).
*
* @param repo Repository where to find the refs
* @param glob Pattern to match (fnmatch-style) against reference name.
* @param list_flags Filtering flags for the reference listing.
* @param callback Function which will be called for every listed ref
* @param payload Additional data to pass to the callback
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_reference_foreach_glob(
git_repository *repo,
const char *glob,
unsigned int list_flags,
git_reference_foreach_cb callback,
void *payload);
/**
* Check if a reflog exists for the specified reference.
*
* @param ref A git reference
*
* @return 0 when no reflog can be found, 1 when it exists;
* otherwise an error code.
*/
GIT_EXTERN(int) git_reference_has_log(git_reference *ref);
/**
* Check if a reference is a local branch.
*
* @param ref A git reference
*
* @return 1 when the reference lives in the refs/heads
* namespace; 0 otherwise.
*/
GIT_EXTERN(int) git_reference_is_branch(git_reference *ref);
/**
* Check if a reference is a remote tracking branch
*
* @param ref A git reference
*
* @return 1 when the reference lives in the refs/remotes
* namespace; 0 otherwise.
*/
GIT_EXTERN(int) git_reference_is_remote(git_reference *ref);
typedef enum {
GIT_REF_FORMAT_NORMAL = 0,
/**
* Control whether one-level refnames are accepted
* (i.e., refnames that do not contain multiple /-separated
* components). Those are expected to be written only using
* uppercase letters and underscore (FETCH_HEAD, ...)
*/
GIT_REF_FORMAT_ALLOW_ONELEVEL = (1 << 0),
/**
* Interpret the provided name as a reference pattern for a
* refspec (as used with remote repositories). If this option
* is enabled, the name is allowed to contain a single * (<star>)
* in place of a one full pathname component
* (e.g., foo/<star>/bar but not foo/bar<star>).
*/
GIT_REF_FORMAT_REFSPEC_PATTERN = (1 << 1),
} git_reference_normalize_t;
/**
* Normalize reference name and check validity.
*
* This will normalize the reference name by removing any leading slash
* '/' characters and collapsing runs of adjacent slashes between name
* components into a single slash.
*
* Once normalized, if the reference name is valid, it will be returned in
* the user allocated buffer.
*
* See `git_reference_create_symbolic()` for rules about valid names.
*
* @param buffer_out User allocated buffer to store normalized name
* @param buffer_size Size of buffer_out
* @param name Reference name to be checked.
* @param flags Flags to constrain name validation rules - see the
* GIT_REF_FORMAT constants above.
* @return 0 on success, GIT_EBUFS if buffer is too small, EINVALIDSPEC
* or an error code.
*/
GIT_EXTERN(int) git_reference_normalize_name(
char *buffer_out,
size_t buffer_size,
const char *name,
unsigned int flags);
/**
* Recursively peel reference until object of the specified type is found.
*
* The retrieved `peeled` object is owned by the repository
* and should be closed with the `git_object_free` method.
*
* If you pass `GIT_OBJ_ANY` as the target type, then the object
* will be peeled until a non-tag object is met.
*
* @param peeled Pointer to the peeled git_object
* @param ref The reference to be processed
* @param target_type The type of the requested object (GIT_OBJ_COMMIT,
* GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY).
* @return 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code
*/
GIT_EXTERN(int) git_reference_peel(
git_object **out,
git_reference *ref,
git_otype type);
/**
* Ensure the reference name is well-formed.
*
* Valid reference names must follow one of two patterns:
*
* 1. Top-level names must contain only capital letters and underscores,
* and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
* 2. Names prefixed with "refs/" can be almost anything. You must avoid
* the characters '~', '^', ':', '\\', '?', '[', and '*', and the
* sequences ".." and "@{" which have special meaning to revparse.
*
* @param refname name to be checked.
* @return 1 if the reference name is acceptable; 0 if it isn't
*/
GIT_EXTERN(int) git_reference_is_valid_name(const char *refname);
/** @} */
GIT_END_DECL
#endif
-68
Ver Arquivo
@@ -1,68 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_refspec_h__
#define INCLUDE_git_refspec_h__
#include "common.h"
#include "types.h"
/**
* @file git2/refspec.h
* @brief Git refspec attributes
* @defgroup git_refspec Git refspec attributes
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Get the source specifier
*
* @param refspec the refspec
* @return the refspec's source specifier
*/
GIT_EXTERN(const char *) git_refspec_src(const git_refspec *refspec);
/**
* Get the destination specifier
*
* @param refspec the refspec
* @return the refspec's destination specifier
*/
GIT_EXTERN(const char *) git_refspec_dst(const git_refspec *refspec);
/**
* Get the force update setting
*
* @param refspec the refspec
* @return 1 if force update has been set, 0 otherwise
*/
GIT_EXTERN(int) git_refspec_force(const git_refspec *refspec);
/**
* Check if a refspec's source descriptor matches a reference
*
* @param refspec the refspec
* @param refname the name of the reference to check
* @return 1 if the refspec matches, 0 otherwise
*/
GIT_EXTERN(int) git_refspec_src_matches(const git_refspec *refspec, const char *refname);
/**
* Transform a reference to its target following the refspec's rules
*
* @param out where to store the target name
* @param outlen the size of the `out` buffer
* @param spec the refspec
* @param name the name of the reference to transform
* @return 0, GIT_EBUFS or another error
*/
GIT_EXTERN(int) git_refspec_transform(char *out, size_t outlen, const git_refspec *spec, const char *name);
GIT_END_DECL
#endif
-465
Ver Arquivo
@@ -1,465 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_remote_h__
#define INCLUDE_git_remote_h__
#include "common.h"
#include "repository.h"
#include "refspec.h"
#include "net.h"
#include "indexer.h"
#include "strarray.h"
#include "transport.h"
/**
* @file git2/remote.h
* @brief Git remote management functions
* @defgroup git_remote remote management functions
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
typedef int (*git_remote_rename_problem_cb)(const char *problematic_refspec, void *payload);
/*
* TODO: This functions still need to be implemented:
* - _listcb/_foreach
* - _add
* - _rename
* - _del (needs support from config)
*/
/**
* Add a remote with the default fetch refspec to the repository's configuration. This
* calls git_remote_save before returning.
*
* @param out the resulting remote
* @param repo the repository in which to create the remote
* @param name the remote's name
* @param url the remote's url
* @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code
*/
GIT_EXTERN(int) git_remote_create(
git_remote **out,
git_repository *repo,
const char *name,
const char *url);
/**
* Create a remote in memory
*
* Create a remote with the given refspec in memory. You can use
* this when you have a URL instead of a remote's name. Note that in-memory
* remotes cannot be converted to persisted remotes.
*
* The name, when provided, will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* @param out pointer to the new remote object
* @param repo the associated repository. May be NULL for a "dangling" remote.
* @param fetch the fetch refspec to use for this remote. May be NULL for defaults.
* @param url the remote repository's URL
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_create_inmemory(
git_remote **out,
git_repository *repo,
const char *fetch,
const char *url);
/**
* Sets the owning repository for the remote. This is only allowed on
* dangling remotes.
*
* @param remote the remote to configure
* @param repo the repository that will own the remote
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_set_repository(git_remote *remote, git_repository *repo);
/**
* Get the information for a particular remote
*
* The name will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* @param out pointer to the new remote object
* @param repo the associated repository
* @param name the remote's name
* @return 0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_remote_load(git_remote **out, git_repository *repo, const char *name);
/**
* Save a remote to its repository's configuration
*
* One can't save a in-memory remote. Doing so will
* result in a GIT_EINVALIDSPEC being returned.
*
* @param remote the remote to save to config
* @return 0, GIT_EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_remote_save(const git_remote *remote);
/**
* Get the remote's name
*
* @param remote the remote
* @return a pointer to the name or NULL for in-memory remotes
*/
GIT_EXTERN(const char *) git_remote_name(const git_remote *remote);
/**
* Get the remote's url
*
* @param remote the remote
* @return a pointer to the url
*/
GIT_EXTERN(const char *) git_remote_url(const git_remote *remote);
/**
* Get the remote's url for pushing
*
* @param remote the remote
* @return a pointer to the url or NULL if no special url for pushing is set
*/
GIT_EXTERN(const char *) git_remote_pushurl(const git_remote *remote);
/**
* Set the remote's url
*
* Existing connections will not be updated.
*
* @param remote the remote
* @param url the url to set
* @return 0 or an error value
*/
GIT_EXTERN(int) git_remote_set_url(git_remote *remote, const char* url);
/**
* Set the remote's url for pushing
*
* Existing connections will not be updated.
*
* @param remote the remote
* @param url the url to set or NULL to clear the pushurl
* @return 0 or an error value
*/
GIT_EXTERN(int) git_remote_set_pushurl(git_remote *remote, const char* url);
/**
* Set the remote's fetch refspec
*
* @param remote the remote
* @apram spec the new fetch refspec
* @return 0 or an error value
*/
GIT_EXTERN(int) git_remote_set_fetchspec(git_remote *remote, const char *spec);
/**
* Get the fetch refspec
*
* @param remote the remote
* @return a pointer to the fetch refspec or NULL if it doesn't exist
*/
GIT_EXTERN(const git_refspec *) git_remote_fetchspec(const git_remote *remote);
/**
* Set the remote's push refspec
*
* @param remote the remote
* @param spec the new push refspec
* @return 0 or an error value
*/
GIT_EXTERN(int) git_remote_set_pushspec(git_remote *remote, const char *spec);
/**
* Get the push refspec
*
* @param remote the remote
* @return a pointer to the push refspec or NULL if it doesn't exist
*/
GIT_EXTERN(const git_refspec *) git_remote_pushspec(const git_remote *remote);
/**
* Open a connection to a remote
*
* The transport is selected based on the URL. The direction argument
* is due to a limitation of the git protocol (over TCP or SSH) which
* starts up a specific binary which can only do the one or the other.
*
* @param remote the remote to connect to
* @param direction whether you want to receive or send data
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction);
/**
* Get a list of refs at the remote
*
* The remote (or more exactly its transport) must be connected. The
* memory belongs to the remote.
*
* If you a return a non-zero value from the callback, this will stop
* looping over the refs.
*
* @param remote the remote
* @param list_cb function to call with each ref discovered at the remote
* @param payload additional data to pass to the callback
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void *payload);
/**
* Download the packfile
*
* Negotiate what objects should be downloaded and download the
* packfile with those objects. The packfile is downloaded with a
* temporary filename, as it's final name is not known yet. If there
* was no packfile needed (all the objects were available locally),
* filename will be NULL and the function will return success.
*
* @param remote the remote to download from
* @param progress_cb function to call with progress information. Be aware that
* this is called inline with network and indexing operations, so performance
* may be affected.
* @param progress_payload payload for the progress callback
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_download(
git_remote *remote,
git_transfer_progress_callback progress_cb,
void *payload);
/**
* Check whether the remote is connected
*
* Check whether the remote's underlying transport is connected to the
* remote host.
*
* @param remote the remote
* @return 1 if it's connected, 0 otherwise.
*/
GIT_EXTERN(int) git_remote_connected(git_remote *remote);
/**
* Cancel the operation
*
* At certain points in its operation, the network code checks whether
* the operation has been cancelled and if so stops the operation.
*
* @param remote the remote
*/
GIT_EXTERN(void) git_remote_stop(git_remote *remote);
/**
* Disconnect from the remote
*
* Close the connection to the remote and free the underlying
* transport.
*
* @param remote the remote to disconnect from
*/
GIT_EXTERN(void) git_remote_disconnect(git_remote *remote);
/**
* Free the memory associated with a remote
*
* This also disconnects from the remote, if the connection
* has not been closed yet (using git_remote_disconnect).
*
* @param remote the remote to free
*/
GIT_EXTERN(void) git_remote_free(git_remote *remote);
/**
* Update the tips to the new state
*
* @param remote the remote to update
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_update_tips(git_remote *remote);
/**
* Return whether a string is a valid remote URL
*
* @param url the url to check
* @param 1 if the url is valid, 0 otherwise
*/
GIT_EXTERN(int) git_remote_valid_url(const char *url);
/**
* Return whether the passed URL is supported by this version of the library.
*
* @param url the url to check
* @return 1 if the url is supported, 0 otherwise
*/
GIT_EXTERN(int) git_remote_supported_url(const char* url);
/**
* Get a list of the configured remotes for a repo
*
* The string array must be freed by the user.
*
* @param out a string array which receives the names of the remotes
* @param repo the repository to query
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_list(git_strarray *out, git_repository *repo);
/**
* Choose whether to check the server's certificate (applies to HTTPS only)
*
* @param remote the remote to configure
* @param check whether to check the server's certificate (defaults to yes)
*/
GIT_EXTERN(void) git_remote_check_cert(git_remote *remote, int check);
/**
* Set a credentials acquisition callback for this remote. If the remote is
* not available for anonymous access, then you must set this callback in order
* to provide credentials to the transport at the time of authentication
* failure so that retry can be performed.
*
* @param remote the remote to configure
* @param cred_acquire_cb The credentials acquisition callback to use (defaults
* to NULL)
*/
GIT_EXTERN(void) git_remote_set_cred_acquire_cb(
git_remote *remote,
git_cred_acquire_cb cred_acquire_cb,
void *payload);
/**
* Sets a custom transport for the remote. The caller can use this function
* to bypass the automatic discovery of a transport by URL scheme (i.e.
* http://, https://, git://) and supply their own transport to be used
* instead. After providing the transport to a remote using this function,
* the transport object belongs exclusively to that remote, and the remote will
* free it when it is freed with git_remote_free.
*
* @param remote the remote to configure
* @param transport the transport object for the remote to use
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_set_transport(
git_remote *remote,
git_transport *transport);
/**
* Argument to the completion callback which tells it which operation
* finished.
*/
typedef enum git_remote_completion_type {
GIT_REMOTE_COMPLETION_DOWNLOAD,
GIT_REMOTE_COMPLETION_INDEXING,
GIT_REMOTE_COMPLETION_ERROR,
} git_remote_completion_type;
/**
* The callback settings structure
*
* Set the calbacks to be called by the remote.
*/
struct git_remote_callbacks {
unsigned int version;
void (*progress)(const char *str, int len, void *data);
int (*completion)(git_remote_completion_type type, void *data);
int (*update_tips)(const char *refname, const git_oid *a, const git_oid *b, void *data);
void *payload;
};
#define GIT_REMOTE_CALLBACKS_VERSION 1
#define GIT_REMOTE_CALLBACKS_INIT {GIT_REMOTE_CALLBACKS_VERSION}
/**
* Set the callbacks for a remote
*
* Note that the remote keeps its own copy of the data and you need to
* call this function again if you want to change the callbacks.
*
* @param remote the remote to configure
* @param callbacks a pointer to the user's callback settings
* @return 0 or an error code
*/
GIT_EXTERN(int) git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks);
/**
* Get the statistics structure that is filled in by the fetch operation.
*/
GIT_EXTERN(const git_transfer_progress *) git_remote_stats(git_remote *remote);
typedef enum {
GIT_REMOTE_DOWNLOAD_TAGS_UNSET,
GIT_REMOTE_DOWNLOAD_TAGS_NONE,
GIT_REMOTE_DOWNLOAD_TAGS_AUTO,
GIT_REMOTE_DOWNLOAD_TAGS_ALL
} git_remote_autotag_option_t;
/**
* Retrieve the tag auto-follow setting
*
* @param remote the remote to query
* @return the auto-follow setting
*/
GIT_EXTERN(git_remote_autotag_option_t) git_remote_autotag(git_remote *remote);
/**
* Set the tag auto-follow setting
*
* @param remote the remote to configure
* @param value a GIT_REMOTE_DOWNLOAD_TAGS value
*/
GIT_EXTERN(void) git_remote_set_autotag(
git_remote *remote,
git_remote_autotag_option_t value);
/**
* Give the remote a new name
*
* All remote-tracking branches and configuration settings
* for the remote are updated.
*
* The new name will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* A temporary in-memory remote cannot be given a name with this method.
*
* @param remote the remote to rename
* @param new_name the new name the remote should bear
* @param callback Optional callback to notify the consumer of fetch refspecs
* that haven't been automatically updated and need potential manual tweaking.
* @param payload Additional data to pass to the callback
* @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code
*/
GIT_EXTERN(int) git_remote_rename(
git_remote *remote,
const char *new_name,
git_remote_rename_problem_cb callback,
void *payload);
/**
* Retrieve the update FETCH_HEAD setting.
*
* @param remote the remote to query
* @return the update FETCH_HEAD setting
*/
GIT_EXTERN(int) git_remote_update_fetchhead(git_remote *remote);
/**
* Sets the update FETCH_HEAD setting. By default, FETCH_HEAD will be
* updated on every fetch. Set to 0 to disable.
*
* @param remote the remote to configure
* @param value 0 to disable updating FETCH_HEAD
*/
GIT_EXTERN(void) git_remote_set_update_fetchhead(git_remote *remote, int value);
/** @} */
GIT_END_DECL
#endif
-647
Ver Arquivo
@@ -1,647 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_repository_h__
#define INCLUDE_git_repository_h__
#include "common.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/repository.h
* @brief Git repository management routines
* @defgroup git_repository Git repository management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Open a git repository.
*
* The 'path' argument must point to either a git repository
* folder, or an existing work dir.
*
* The method will automatically detect if 'path' is a normal
* or bare repository or fail is 'path' is neither.
*
* @param out pointer to the repo which will be opened
* @param path the path to the repository
* @return 0 or an error code
*/
GIT_EXTERN(int) git_repository_open(git_repository **out, const char *path);
/**
* Create a "fake" repository to wrap an object database
*
* Create a repository object to wrap an object database to be used
* with the API when all you have is an object database. This doesn't
* have any paths associated with it, so use with care.
*
* @param out pointer to the repo
* @param odb the object database to wrap
* @return 0 or an error code
*/
GIT_EXTERN(int) git_repository_wrap_odb(git_repository **out, git_odb *odb);
/**
* Look for a git repository and copy its path in the given buffer.
* The lookup start from base_path and walk across parent directories
* if nothing has been found. The lookup ends when the first repository
* is found, or when reaching a directory referenced in ceiling_dirs
* or when the filesystem changes (in case across_fs is true).
*
* The method will automatically detect if the repository is bare
* (if there is a repository).
*
* @param path_out The user allocated buffer which will
* contain the found path.
*
* @param path_size repository_path size
*
* @param start_path The base path where the lookup starts.
*
* @param across_fs If true, then the lookup will not stop when a
* filesystem device change is detected while exploring parent directories.
*
* @param ceiling_dirs A GIT_PATH_LIST_SEPARATOR separated list of
* absolute symbolic link free paths. The lookup will stop when any
* of this paths is reached. Note that the lookup always performs on
* start_path no matter start_path appears in ceiling_dirs ceiling_dirs
* might be NULL (which is equivalent to an empty string)
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_repository_discover(
char *path_out,
size_t path_size,
const char *start_path,
int across_fs,
const char *ceiling_dirs);
/**
* Option flags for `git_repository_open_ext`.
*
* * GIT_REPOSITORY_OPEN_NO_SEARCH - Only open the repository if it can be
* immediately found in the start_path. Do not walk up from the
* start_path looking at parent directories.
* * GIT_REPOSITORY_OPEN_CROSS_FS - Unless this flag is set, open will not
* continue searching across filesystem boundaries (i.e. when `st_dev`
* changes from the `stat` system call). (E.g. Searching in a user's home
* directory "/home/user/source/" will not return "/.git/" as the found
* repo if "/" is a different filesystem than "/home".)
*/
typedef enum {
GIT_REPOSITORY_OPEN_NO_SEARCH = (1 << 0),
GIT_REPOSITORY_OPEN_CROSS_FS = (1 << 1),
} git_repository_open_flag_t;
/**
* Find and open a repository with extended controls.
*
* @param out Pointer to the repo which will be opened. This can
* actually be NULL if you only want to use the error code to
* see if a repo at this path could be opened.
* @param path Path to open as git repository. If the flags
* permit "searching", then this can be a path to a subdirectory
* inside the working directory of the repository.
* @param flags A combination of the GIT_REPOSITORY_OPEN flags above.
* @param ceiling_dirs A GIT_PATH_LIST_SEPARATOR delimited list of path
* prefixes at which the search for a containing repository should
* terminate.
* @return 0 on success, GIT_ENOTFOUND if no repository could be found,
* or -1 if there was a repository but open failed for some reason
* (such as repo corruption or system errors).
*/
GIT_EXTERN(int) git_repository_open_ext(
git_repository **out,
const char *path,
unsigned int flags,
const char *ceiling_dirs);
/**
* Free a previously allocated repository
*
* Note that after a repository is free'd, all the objects it has spawned
* will still exist until they are manually closed by the user
* with `git_object_free`, but accessing any of the attributes of
* an object without a backing repository will result in undefined
* behavior
*
* @param repo repository handle to close. If NULL nothing occurs.
*/
GIT_EXTERN(void) git_repository_free(git_repository *repo);
/**
* Creates a new Git repository in the given folder.
*
* TODO:
* - Reinit the repository
*
* @param out pointer to the repo which will be created or reinitialized
* @param path the path to the repository
* @param is_bare if true, a Git repository without a working directory is
* created at the pointed path. If false, provided path will be
* considered as the working directory into which the .git directory
* will be created.
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_repository_init(
git_repository **out,
const char *path,
unsigned is_bare);
/**
* Option flags for `git_repository_init_ext`.
*
* These flags configure extra behaviors to `git_repository_init_ext`.
* In every case, the default behavior is the zero value (i.e. flag is
* not set). Just OR the flag values together for the `flags` parameter
* when initializing a new repo. Details of individual values are:
*
* * BARE - Create a bare repository with no working directory.
* * NO_REINIT - Return an EEXISTS error if the repo_path appears to
* already be an git repository.
* * NO_DOTGIT_DIR - Normally a "/.git/" will be appended to the repo
* path for non-bare repos (if it is not already there), but
* passing this flag prevents that behavior.
* * MKDIR - Make the repo_path (and workdir_path) as needed. Init is
* always willing to create the ".git" directory even without this
* flag. This flag tells init to create the trailing component of
* the repo and workdir paths as needed.
* * MKPATH - Recursively make all components of the repo and workdir
* paths as necessary.
* * EXTERNAL_TEMPLATE - libgit2 normally uses internal templates to
* initialize a new repo. This flags enables external templates,
* looking the "template_path" from the options if set, or the
* `init.templatedir` global config if not, or falling back on
* "/usr/share/git-core/templates" if it exists.
*/
typedef enum {
GIT_REPOSITORY_INIT_BARE = (1u << 0),
GIT_REPOSITORY_INIT_NO_REINIT = (1u << 1),
GIT_REPOSITORY_INIT_NO_DOTGIT_DIR = (1u << 2),
GIT_REPOSITORY_INIT_MKDIR = (1u << 3),
GIT_REPOSITORY_INIT_MKPATH = (1u << 4),
GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE = (1u << 5),
} git_repository_init_flag_t;
/**
* Mode options for `git_repository_init_ext`.
*
* Set the mode field of the `git_repository_init_options` structure
* either to the custom mode that you would like, or to one of the
* following modes:
*
* * SHARED_UMASK - Use permissions configured by umask - the default.
* * SHARED_GROUP - Use "--shared=group" behavior, chmod'ing the new repo
* to be group writable and "g+sx" for sticky group assignment.
* * SHARED_ALL - Use "--shared=all" behavior, adding world readability.
* * Anything else - Set to custom value.
*/
typedef enum {
GIT_REPOSITORY_INIT_SHARED_UMASK = 0,
GIT_REPOSITORY_INIT_SHARED_GROUP = 0002775,
GIT_REPOSITORY_INIT_SHARED_ALL = 0002777,
} git_repository_init_mode_t;
/**
* Extended options structure for `git_repository_init_ext`.
*
* This contains extra options for `git_repository_init_ext` that enable
* additional initialization features. The fields are:
*
* * flags - Combination of GIT_REPOSITORY_INIT flags above.
* * mode - Set to one of the standard GIT_REPOSITORY_INIT_SHARED_...
* constants above, or to a custom value that you would like.
* * workdir_path - The path to the working dir or NULL for default (i.e.
* repo_path parent on non-bare repos). IF THIS IS RELATIVE PATH,
* IT WILL BE EVALUATED RELATIVE TO THE REPO_PATH. If this is not
* the "natural" working directory, a .git gitlink file will be
* created here linking to the repo_path.
* * description - If set, this will be used to initialize the "description"
* file in the repository, instead of using the template content.
* * template_path - When GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE is set,
* this contains the path to use for the template directory. If
* this is NULL, the config or default directory options will be
* used instead.
* * initial_head - The name of the head to point HEAD at. If NULL, then
* this will be treated as "master" and the HEAD ref will be set
* to "refs/heads/master". If this begins with "refs/" it will be
* used verbatim; otherwise "refs/heads/" will be prefixed.
* * origin_url - If this is non-NULL, then after the rest of the
* repository initialization is completed, an "origin" remote
* will be added pointing to this URL.
*/
typedef struct {
unsigned int version;
uint32_t flags;
uint32_t mode;
const char *workdir_path;
const char *description;
const char *template_path;
const char *initial_head;
const char *origin_url;
} git_repository_init_options;
#define GIT_REPOSITORY_INIT_OPTIONS_VERSION 1
#define GIT_REPOSITORY_INIT_OPTIONS_INIT {GIT_REPOSITORY_INIT_OPTIONS_VERSION}
/**
* Create a new Git repository in the given folder with extended controls.
*
* This will initialize a new git repository (creating the repo_path
* if requested by flags) and working directory as needed. It will
* auto-detect the case sensitivity of the file system and if the
* file system supports file mode bits correctly.
*
* @param out Pointer to the repo which will be created or reinitialized.
* @param repo_path The path to the repository.
* @param opts Pointer to git_repository_init_options struct.
* @return 0 or an error code on failure.
*/
GIT_EXTERN(int) git_repository_init_ext(
git_repository **out,
const char *repo_path,
git_repository_init_options *opts);
/**
* Retrieve and resolve the reference pointed at by HEAD.
*
* The returned `git_reference` will be owned by caller and
* `git_reference_free()` must be called when done with it to release the
* allocated memory and prevent a leak.
*
* @param out pointer to the reference which will be retrieved
* @param repo a repository object
*
* @return 0 on success, GIT_EORPHANEDHEAD when HEAD points to a non existing
* branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise
*/
GIT_EXTERN(int) git_repository_head(git_reference **out, git_repository *repo);
/**
* Check if a repository's HEAD is detached
*
* A repository's HEAD is detached when it points directly to a commit
* instead of a branch.
*
* @param repo Repo to test
* @return 1 if HEAD is detached, 0 if it's not; error code if there
* was an error.
*/
GIT_EXTERN(int) git_repository_head_detached(git_repository *repo);
/**
* Check if the current branch is an orphan
*
* An orphan branch is one named from HEAD but which doesn't exist in
* the refs namespace, because it doesn't have any commit to point to.
*
* @param repo Repo to test
* @return 1 if the current branch is an orphan, 0 if it's not; error
* code if there was an error
*/
GIT_EXTERN(int) git_repository_head_orphan(git_repository *repo);
/**
* Check if a repository is empty
*
* An empty repository has just been initialized and contains
* no references.
*
* @param repo Repo to test
* @return 1 if the repository is empty, 0 if it isn't, error code
* if the repository is corrupted
*/
GIT_EXTERN(int) git_repository_is_empty(git_repository *repo);
/**
* Get the path of this repository
*
* This is the path of the `.git` folder for normal repositories,
* or of the repository itself for bare repositories.
*
* @param repo A repository object
* @return the path to the repository
*/
GIT_EXTERN(const char *) git_repository_path(git_repository *repo);
/**
* Get the path of the working directory for this repository
*
* If the repository is bare, this function will always return
* NULL.
*
* @param repo A repository object
* @return the path to the working dir, if it exists
*/
GIT_EXTERN(const char *) git_repository_workdir(git_repository *repo);
/**
* Set the path to the working directory for this repository
*
* The working directory doesn't need to be the same one
* that contains the `.git` folder for this repository.
*
* If this repository is bare, setting its working directory
* will turn it into a normal repository, capable of performing
* all the common workdir operations (checkout, status, index
* manipulation, etc).
*
* @param repo A repository object
* @param workdir The path to a working directory
* @param update_gitlink Create/update gitlink in workdir and set config
* "core.worktree" (if workdir is not the parent of the .git directory)
* @return 0, or an error code
*/
GIT_EXTERN(int) git_repository_set_workdir(
git_repository *repo, const char *workdir, int update_gitlink);
/**
* Check if a repository is bare
*
* @param repo Repo to test
* @return 1 if the repository is bare, 0 otherwise.
*/
GIT_EXTERN(int) git_repository_is_bare(git_repository *repo);
/**
* Get the configuration file for this repository.
*
* If a configuration file has not been set, the default
* config set for the repository will be returned, including
* global and system configurations (if they are available).
*
* The configuration file must be freed once it's no longer
* being used by the user.
*
* @param out Pointer to store the loaded config file
* @param repo A repository object
* @return 0, or an error code
*/
GIT_EXTERN(int) git_repository_config(git_config **out, git_repository *repo);
/**
* Set the configuration file for this repository
*
* This configuration file will be used for all configuration
* queries involving this repository.
*
* The repository will keep a reference to the config file;
* the user must still free the config after setting it
* to the repository, or it will leak.
*
* @param repo A repository object
* @param config A Config object
*/
GIT_EXTERN(void) git_repository_set_config(git_repository *repo, git_config *config);
/**
* Get the Object Database for this repository.
*
* If a custom ODB has not been set, the default
* database for the repository will be returned (the one
* located in `.git/objects`).
*
* The ODB must be freed once it's no longer being used by
* the user.
*
* @param out Pointer to store the loaded ODB
* @param repo A repository object
* @return 0, or an error code
*/
GIT_EXTERN(int) git_repository_odb(git_odb **out, git_repository *repo);
/**
* Set the Object Database for this repository
*
* The ODB will be used for all object-related operations
* involving this repository.
*
* The repository will keep a reference to the ODB; the user
* must still free the ODB object after setting it to the
* repository, or it will leak.
*
* @param repo A repository object
* @param odb An ODB object
*/
GIT_EXTERN(void) git_repository_set_odb(git_repository *repo, git_odb *odb);
/**
* Get the Index file for this repository.
*
* If a custom index has not been set, the default
* index for the repository will be returned (the one
* located in `.git/index`).
*
* The index must be freed once it's no longer being used by
* the user.
*
* @param out Pointer to store the loaded index
* @param repo A repository object
* @return 0, or an error code
*/
GIT_EXTERN(int) git_repository_index(git_index **out, git_repository *repo);
/**
* Set the index file for this repository
*
* This index will be used for all index-related operations
* involving this repository.
*
* The repository will keep a reference to the index file;
* the user must still free the index after setting it
* to the repository, or it will leak.
*
* @param repo A repository object
* @param index An index object
*/
GIT_EXTERN(void) git_repository_set_index(git_repository *repo, git_index *index);
/**
* Retrieve git's prepared message
*
* Operations such as git revert/cherry-pick/merge with the -n option
* stop just short of creating a commit with the changes and save
* their prepared message in .git/MERGE_MSG so the next git-commit
* execution can present it to the user for them to amend if they
* wish.
*
* Use this function to get the contents of this file. Don't forget to
* remove the file after you create the commit.
*
* @param out Buffer to write data into or NULL to just read required size
* @param len Length of buffer in bytes
* @param repo Repository to read prepared message from
* @return Bytes written to buffer, GIT_ENOTFOUND if no message, or -1 on error
*/
GIT_EXTERN(int) git_repository_message(char *out, size_t len, git_repository *repo);
/**
* Remove git's prepared message.
*
* Remove the message that `git_repository_message` retrieves.
*/
GIT_EXTERN(int) git_repository_message_remove(git_repository *repo);
/**
* Remove all the metadata associated with an ongoing git merge, including
* MERGE_HEAD, MERGE_MSG, etc.
*
* @param repo A repository object
* @return 0 on success, or error
*/
GIT_EXTERN(int) git_repository_merge_cleanup(git_repository *repo);
typedef int (*git_repository_fetchhead_foreach_cb)(const char *ref_name,
const char *remote_url,
const git_oid *oid,
unsigned int is_merge,
void *payload);
/**
* Call callback 'callback' for each entry in the given FETCH_HEAD file.
*
* @param repo A repository object
* @param callback Callback function
* @param payload Pointer to callback data (optional)
* @return 0 on success, GIT_ENOTFOUND, GIT_EUSER or error
*/
GIT_EXTERN(int) git_repository_fetchhead_foreach(git_repository *repo,
git_repository_fetchhead_foreach_cb callback,
void *payload);
typedef int (*git_repository_mergehead_foreach_cb)(const git_oid *oid,
void *payload);
/**
* If a merge is in progress, call callback 'cb' for each commit ID in the
* MERGE_HEAD file.
*
* @param repo A repository object
* @param callback Callback function
* @param apyload Pointer to callback data (optional)
* @return 0 on success, GIT_ENOTFOUND, GIT_EUSER or error
*/
GIT_EXTERN(int) git_repository_mergehead_foreach(git_repository *repo,
git_repository_mergehead_foreach_cb callback,
void *payload);
/**
* Calculate hash of file using repository filtering rules.
*
* If you simply want to calculate the hash of a file on disk with no filters,
* you can just use the `git_odb_hashfile()` API. However, if you want to
* hash a file in the repository and you want to apply filtering rules (e.g.
* crlf filters) before generating the SHA, then use this function.
*
* @param out Output value of calculated SHA
* @param repo Repository pointer
* @param path Path to file on disk whose contents should be hashed. If the
* repository is not NULL, this can be a relative path.
* @param type The object type to hash as (e.g. GIT_OBJ_BLOB)
* @param as_path The path to use to look up filtering rules. If this is
* NULL, then the `path` parameter will be used instead. If
* this is passed as the empty string, then no filters will be
* applied when calculating the hash.
*/
GIT_EXTERN(int) git_repository_hashfile(
git_oid *out,
git_repository *repo,
const char *path,
git_otype type,
const char *as_path);
/**
* Make the repository HEAD point to the specified reference.
*
* If the provided reference points to a Tree or a Blob, the HEAD is
* unaltered and -1 is returned.
*
* If the provided reference points to a branch, the HEAD will point
* to that branch, staying attached, or become attached if it isn't yet.
* If the branch doesn't exist yet, no error will be return. The HEAD
* will then be attached to an unborn branch.
*
* Otherwise, the HEAD will be detached and will directly point to
* the Commit.
*
* @param repo Repository pointer
* @param refname Canonical name of the reference the HEAD should point at
* @return 0 on success, or an error code
*/
GIT_EXTERN(int) git_repository_set_head(
git_repository* repo,
const char* refname);
/**
* Make the repository HEAD directly point to the Commit.
*
* If the provided committish cannot be found in the repository, the HEAD
* is unaltered and GIT_ENOTFOUND is returned.
*
* If the provided commitish cannot be peeled into a commit, the HEAD
* is unaltered and -1 is returned.
*
* Otherwise, the HEAD will eventually be detached and will directly point to
* the peeled Commit.
*
* @param repo Repository pointer
* @param commitish Object id of the Commit the HEAD should point to
* @return 0 on success, or an error code
*/
GIT_EXTERN(int) git_repository_set_head_detached(
git_repository* repo,
const git_oid* commitish);
/**
* Detach the HEAD.
*
* If the HEAD is already detached and points to a Commit, 0 is returned.
*
* If the HEAD is already detached and points to a Tag, the HEAD is
* updated into making it point to the peeled Commit, and 0 is returned.
*
* If the HEAD is already detached and points to a non commitish, the HEAD is
* unaltered, and -1 is returned.
*
* Otherwise, the HEAD will be detached and point to the peeled Commit.
*
* @param repo Repository pointer
* @return 0 on success, GIT_EORPHANEDHEAD when HEAD points to a non existing
* branch or an error code
*/
GIT_EXTERN(int) git_repository_detach_head(
git_repository* repo);
typedef enum {
GIT_REPOSITORY_STATE_NONE,
GIT_REPOSITORY_STATE_MERGE,
GIT_REPOSITORY_STATE_REVERT,
GIT_REPOSITORY_STATE_CHERRY_PICK,
GIT_REPOSITORY_STATE_BISECT,
GIT_REPOSITORY_STATE_REBASE,
GIT_REPOSITORY_STATE_REBASE_INTERACTIVE,
GIT_REPOSITORY_STATE_REBASE_MERGE,
GIT_REPOSITORY_STATE_APPLY_MAILBOX,
GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE,
} git_repository_state_t;
/**
* Determines the status of a git repository - ie, whether an operation
* (merge, cherry-pick, etc) is in progress.
*
* @param repo Repository pointer
* @return The state of the repository
*/
GIT_EXTERN(int) git_repository_state(git_repository *repo);
/** @} */
GIT_END_DECL
#endif
-58
Ver Arquivo
@@ -1,58 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_reset_h__
#define INCLUDE_git_reset_h__
/**
* @file git2/reset.h
* @brief Git reset management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Kinds of reset operation
*/
typedef enum {
GIT_RESET_SOFT = 1, /** Move the head to the given commit */
GIT_RESET_MIXED = 2, /** SOFT plus reset index to the commit */
GIT_RESET_HARD = 3, /** MIXED plus changes in working tree discarded */
} git_reset_t;
/**
* Sets the current head to the specified commit oid and optionally
* resets the index and working tree to match.
*
* SOFT reset means the head will be moved to the commit.
*
* MIXED reset will trigger a SOFT reset, plus the index will be replaced
* with the content of the commit tree.
*
* HARD reset will trigger a MIXED reset and the working directory will be
* replaced with the content of the index. (Untracked and ignored files
* will be left alone, however.)
*
* TODO: Implement remaining kinds of resets.
*
* @param repo Repository where to perform the reset operation.
*
* @param target Object to which the Head should be moved to. This object
* must belong to the given `repo` and can either be a git_commit or a
* git_tag. When a git_tag is being passed, it should be dereferencable
* to a git_commit which oid will be used as the target of the branch.
*
* @param reset_type Kind of reset operation to perform.
*
* @return 0 on success or an error code < 0
*/
GIT_EXTERN(int) git_reset(
git_repository *repo, git_object *target, git_reset_t reset_type);
/** @} */
GIT_END_DECL
#endif
-37
Ver Arquivo
@@ -1,37 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_revparse_h__
#define INCLUDE_git_revparse_h__
#include "common.h"
#include "types.h"
/**
* @file git2/revparse.h
* @brief Git revision parsing routines
* @defgroup git_revparse Git revision parsing routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Find an object, as specified by a revision string. See `man gitrevisions`, or the documentation
* for `git rev-parse` for information on the syntax accepted.
*
* @param out pointer to output object
* @param repo the repository to search in
* @param spec the textual specification for an object
* @return 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS,
* GIT_EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_revparse_single(git_object **out, git_repository *repo, const char *spec);
/** @} */
GIT_END_DECL
#endif
-237
Ver Arquivo
@@ -1,237 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_revwalk_h__
#define INCLUDE_git_revwalk_h__
#include "common.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/revwalk.h
* @brief Git revision traversal routines
* @defgroup git_revwalk Git revision traversal routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Sort the repository contents in no particular ordering;
* this sorting is arbitrary, implementation-specific
* and subject to change at any time.
* This is the default sorting for new walkers.
*/
#define GIT_SORT_NONE (0)
/**
* Sort the repository contents in topological order
* (parents before children); this sorting mode
* can be combined with time sorting.
*/
#define GIT_SORT_TOPOLOGICAL (1 << 0)
/**
* Sort the repository contents by commit time;
* this sorting mode can be combined with
* topological sorting.
*/
#define GIT_SORT_TIME (1 << 1)
/**
* Iterate through the repository contents in reverse
* order; this sorting mode can be combined with
* any of the above.
*/
#define GIT_SORT_REVERSE (1 << 2)
/**
* Allocate a new revision walker to iterate through a repo.
*
* This revision walker uses a custom memory pool and an internal
* commit cache, so it is relatively expensive to allocate.
*
* For maximum performance, this revision walker should be
* reused for different walks.
*
* This revision walker is *not* thread safe: it may only be
* used to walk a repository on a single thread; however,
* it is possible to have several revision walkers in
* several different threads walking the same repository.
*
* @param out pointer to the new revision walker
* @param repo the repo to walk through
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_new(git_revwalk **out, git_repository *repo);
/**
* Reset the revision walker for reuse.
*
* This will clear all the pushed and hidden commits, and
* leave the walker in a blank state (just like at
* creation) ready to receive new commit pushes and
* start a new walk.
*
* The revision walk is automatically reset when a walk
* is over.
*
* @param walker handle to reset.
*/
GIT_EXTERN(void) git_revwalk_reset(git_revwalk *walker);
/**
* Mark a commit to start traversal from.
*
* The given OID must belong to a commit on the walked
* repository.
*
* The given commit will be used as one of the roots
* when starting the revision walk. At least one commit
* must be pushed the repository before a walk can
* be started.
*
* @param walk the walker being used for the traversal.
* @param id the oid of the commit to start from.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_push(git_revwalk *walk, const git_oid *id);
/**
* Push matching references
*
* The OIDs pointed to by the references that match the given glob
* pattern will be pushed to the revision walker.
*
* A leading 'refs/' is implied if not present as well as a trailing
* '/ *' if the glob lacks '?', '*' or '['.
*
* @param walk the walker being used for the traversal
* @param glob the glob pattern references should match
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_push_glob(git_revwalk *walk, const char *glob);
/**
* Push the repository's HEAD
*
* @param walk the walker being used for the traversal
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_push_head(git_revwalk *walk);
/**
* Mark a commit (and its ancestors) uninteresting for the output.
*
* The given OID must belong to a commit on the walked
* repository.
*
* The resolved commit and all its parents will be hidden from the
* output on the revision walk.
*
* @param walk the walker being used for the traversal.
* @param commit_id the oid of commit that will be ignored during the traversal
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide(git_revwalk *walk, const git_oid *commit_id);
/**
* Hide matching references.
*
* The OIDs pointed to by the references that match the given glob
* pattern and their ancestors will be hidden from the output on the
* revision walk.
*
* A leading 'refs/' is implied if not present as well as a trailing
* '/ *' if the glob lacks '?', '*' or '['.
*
* @param walk the walker being used for the traversal
* @param glob the glob pattern references should match
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide_glob(git_revwalk *walk, const char *glob);
/**
* Hide the repository's HEAD
*
* @param walk the walker being used for the traversal
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide_head(git_revwalk *walk);
/**
* Push the OID pointed to by a reference
*
* The reference must point to a commit.
*
* @param walk the walker being used for the traversal
* @param refname the reference to push
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_push_ref(git_revwalk *walk, const char *refname);
/**
* Hide the OID pointed to by a reference
*
* The reference must point to a commit.
*
* @param walk the walker being used for the traversal
* @param refname the reference to hide
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide_ref(git_revwalk *walk, const char *refname);
/**
* Get the next commit from the revision walk.
*
* The initial call to this method is *not* blocking when
* iterating through a repo with a time-sorting mode.
*
* Iterating with Topological or inverted modes makes the initial
* call blocking to preprocess the commit list, but this block should be
* mostly unnoticeable on most repositories (topological preprocessing
* times at 0.3s on the git.git repo).
*
* The revision walker is reset when the walk is over.
*
* @param out Pointer where to store the oid of the next commit
* @param walk the walker to pop the commit from.
* @return 0 if the next commit was found;
* GIT_ITEROVER if there are no commits left to iterate
*/
GIT_EXTERN(int) git_revwalk_next(git_oid *out, git_revwalk *walk);
/**
* Change the sorting mode when iterating through the
* repository's contents.
*
* Changing the sorting mode resets the walker.
*
* @param walk the walker being used for the traversal.
* @param sort_mode combination of GIT_SORT_XXX flags
*/
GIT_EXTERN(void) git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode);
/**
* Free a revision walker previously allocated.
*
* @param walk traversal handle to close. If NULL nothing occurs.
*/
GIT_EXTERN(void) git_revwalk_free(git_revwalk *walk);
/**
* Return the repository on which this walker
* is operating.
*
* @param walk the revision walker
* @return the repository being walked
*/
GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
/** @} */
GIT_END_DECL
#endif
-76
Ver Arquivo
@@ -1,76 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_signature_h__
#define INCLUDE_git_signature_h__
#include "common.h"
#include "types.h"
/**
* @file git2/signature.h
* @brief Git signature creation
* @defgroup git_signature Git signature creation
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Create a new action signature.
*
* Call `git_signature_free()` to free the data.
*
* Note: angle brackets ('<' and '>') characters are not allowed
* to be used in either the `name` or the `email` parameter.
*
* @param out new signature, in case of error NULL
* @param name name of the person
* @param email email of the person
* @param time time when the action happened
* @param offset timezone offset in minutes for the time
* @return 0 or an error code
*/
GIT_EXTERN(int) git_signature_new(git_signature **out, const char *name, const char *email, git_time_t time, int offset);
/**
* Create a new action signature with a timestamp of 'now'.
*
* Call `git_signature_free()` to free the data.
*
* @param out new signature, in case of error NULL
* @param name name of the person
* @param email email of the person
* @return 0 or an error code
*/
GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const char *email);
/**
* Create a copy of an existing signature. All internal strings are also
* duplicated.
*
* Call `git_signature_free()` to free the data.
*
* @param sig signature to duplicated
* @return a copy of sig, NULL on out of memory
*/
GIT_EXTERN(git_signature *) git_signature_dup(const git_signature *sig);
/**
* Free an existing signature.
*
* Because the signature is not an opaque structure, it is legal to free it
* manually, but be sure to free the "name" and "email" strings in addition
* to the structure itself.
*
* @param sig signature to free
*/
GIT_EXTERN(void) git_signature_free(git_signature *sig);
/** @} */
GIT_END_DECL
#endif
-121
Ver Arquivo
@@ -1,121 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_stash_h__
#define INCLUDE_git_stash_h__
#include "common.h"
#include "types.h"
/**
* @file git2/stash.h
* @brief Git stash management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
typedef enum {
GIT_STASH_DEFAULT = 0,
/* All changes already added to the index
* are left intact in the working directory
*/
GIT_STASH_KEEP_INDEX = (1 << 0),
/* All untracked files are also stashed and then
* cleaned up from the working directory
*/
GIT_STASH_INCLUDE_UNTRACKED = (1 << 1),
/* All ignored files are also stashed and then
* cleaned up from the working directory
*/
GIT_STASH_INCLUDE_IGNORED = (1 << 2),
} git_stash_flags;
/**
* Save the local modifications to a new stash.
*
* @param out Object id of the commit containing the stashed state.
* This commit is also the target of the direct reference refs/stash.
*
* @param repo The owning repository.
*
* @param stasher The identity of the person performing the stashing.
*
* @param message Optional description along with the stashed state.
*
* @param flags Flags to control the stashing process. (see GIT_STASH_* above)
*
* @return 0 on success, GIT_ENOTFOUND where there's nothing to stash,
* or error code.
*/
GIT_EXTERN(int) git_stash_save(
git_oid *out,
git_repository *repo,
git_signature *stasher,
const char *message,
unsigned int flags);
/**
* When iterating over all the stashed states, callback that will be
* issued per entry.
*
* @param index The position within the stash list. 0 points to the
* most recent stashed state.
*
* @param message The stash message.
*
* @param stash_id The commit oid of the stashed state.
*
* @param payload Extra parameter to callback function.
*
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
typedef int (*git_stash_cb)(
size_t index,
const char* message,
const git_oid *stash_id,
void *payload);
/**
* Loop over all the stashed states and issue a callback for each one.
*
* If the callback returns a non-zero value, this will stop looping.
*
* @param repo Repository where to find the stash.
*
* @param callabck Callback to invoke per found stashed state. The most recent
* stash state will be enumerated first.
*
* @param payload Extra parameter to callback function.
*
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_stash_foreach(
git_repository *repo,
git_stash_cb callback,
void *payload);
/**
* Remove a single stashed state from the stash list.
*
* @param repo The owning repository.
*
* @param index The position within the stash list. 0 points to the
* most recent stashed state.
*
* @return 0 on success, or error code
*/
GIT_EXTERN(int) git_stash_drop(
git_repository *repo,
size_t index);
/** @} */
GIT_END_DECL
#endif
-231
Ver Arquivo
@@ -1,231 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_status_h__
#define INCLUDE_git_status_h__
#include "common.h"
#include "types.h"
/**
* @file git2/status.h
* @brief Git file status routines
* @defgroup git_status Git file status routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Status flags for a single file.
*
* A combination of these values will be returned to indicate the status of
* a file. Status compares the working directory, the index, and the
* current HEAD of the repository. The `GIT_STATUS_INDEX` set of flags
* represents the status of file in the index relative to the HEAD, and the
* `GIT_STATUS_WT` set of flags represent the status of the file in the
* working directory relative to the index.
*/
typedef enum {
GIT_STATUS_CURRENT = 0,
GIT_STATUS_INDEX_NEW = (1u << 0),
GIT_STATUS_INDEX_MODIFIED = (1u << 1),
GIT_STATUS_INDEX_DELETED = (1u << 2),
GIT_STATUS_INDEX_RENAMED = (1u << 3),
GIT_STATUS_INDEX_TYPECHANGE = (1u << 4),
GIT_STATUS_WT_NEW = (1u << 7),
GIT_STATUS_WT_MODIFIED = (1u << 8),
GIT_STATUS_WT_DELETED = (1u << 9),
GIT_STATUS_WT_TYPECHANGE = (1u << 10),
GIT_STATUS_IGNORED = (1u << 14),
} git_status_t;
/**
* Function pointer to receive status on individual files
*
* `path` is the relative path to the file from the root of the repository.
*
* `status_flags` is a combination of `git_status_t` values that apply.
*
* `payload` is the value you passed to the foreach function as payload.
*/
typedef int (*git_status_cb)(
const char *path, unsigned int status_flags, void *payload);
/**
* Gather file statuses and run a callback for each one.
*
* The callback is passed the path of the file, the status (a combination of
* the `git_status_t` values above) and the `payload` data pointer passed
* into this function.
*
* If the callback returns a non-zero value, this function will stop looping
* and return GIT_EUSER.
*
* @param repo A repository object
* @param callback The function to call on each file
* @param payload Pointer to pass through to callback function
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_status_foreach(
git_repository *repo,
git_status_cb callback,
void *payload);
/**
* For extended status, select the files on which to report status.
*
* - GIT_STATUS_SHOW_INDEX_AND_WORKDIR is the default. This is the
* rough equivalent of `git status --porcelain` where each file
* will receive a callback indicating its status in the index and
* in the workdir.
* - GIT_STATUS_SHOW_INDEX_ONLY will only make callbacks for index
* side of status. The status of the index contents relative to
* the HEAD will be given.
* - GIT_STATUS_SHOW_WORKDIR_ONLY will only make callbacks for the
* workdir side of status, reporting the status of workdir content
* relative to the index.
* - GIT_STATUS_SHOW_INDEX_THEN_WORKDIR behaves like index-only
* followed by workdir-only, causing two callbacks to be issued
* per file (first index then workdir). This is slightly more
* efficient than making separate calls. This makes it easier to
* emulate the output of a plain `git status`.
*/
typedef enum {
GIT_STATUS_SHOW_INDEX_AND_WORKDIR = 0,
GIT_STATUS_SHOW_INDEX_ONLY = 1,
GIT_STATUS_SHOW_WORKDIR_ONLY = 2,
GIT_STATUS_SHOW_INDEX_THEN_WORKDIR = 3,
} git_status_show_t;
/**
* Flags to control status callbacks
*
* - GIT_STATUS_OPT_INCLUDE_UNTRACKED says that callbacks should be made
* on untracked files. These will only be made if the workdir files are
* included in the status "show" option.
* - GIT_STATUS_OPT_INCLUDE_IGNORED says that ignored files should get
* callbacks. Again, these callbacks will only be made if the workdir
* files are included in the status "show" option. Right now, there is
* no option to include all files in directories that are ignored
* completely.
* - GIT_STATUS_OPT_INCLUDE_UNMODIFIED indicates that callback should be
* made even on unmodified files.
* - GIT_STATUS_OPT_EXCLUDE_SUBMODULES indicates that directories which
* appear to be submodules should just be skipped over.
* - GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS indicates that the contents of
* untracked directories should be included in the status. Normally if
* an entire directory is new, then just the top-level directory will be
* included (with a trailing slash on the entry name). Given this flag,
* the directory itself will not be included, but all the files in it
* will.
* - GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH indicates that the given path
* will be treated as a literal path, and not as a pathspec.
*
* Calling `git_status_foreach()` is like calling the extended version
* with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,
* and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS.
*/
typedef enum {
GIT_STATUS_OPT_INCLUDE_UNTRACKED = (1 << 0),
GIT_STATUS_OPT_INCLUDE_IGNORED = (1 << 1),
GIT_STATUS_OPT_INCLUDE_UNMODIFIED = (1 << 2),
GIT_STATUS_OPT_EXCLUDE_SUBMODULES = (1 << 3),
GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS = (1 << 4),
GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH = (1 << 5),
} git_status_opt_t;
/**
* Options to control how `git_status_foreach_ext()` will issue callbacks.
*
* This structure is set so that zeroing it out will give you relatively
* sane defaults.
*
* The `show` value is one of the `git_status_show_t` constants that
* control which files to scan and in what order.
*
* The `flags` value is an OR'ed combination of the `git_status_opt_t`
* values above.
*
* The `pathspec` is an array of path patterns to match (using
* fnmatch-style matching), or just an array of paths to match exactly if
* `GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH` is specified in the flags.
*/
typedef struct {
unsigned int version;
git_status_show_t show;
unsigned int flags;
git_strarray pathspec;
} git_status_options;
#define GIT_STATUS_OPTIONS_VERSION 1
#define GIT_STATUS_OPTIONS_INIT {GIT_STATUS_OPTIONS_VERSION}
/**
* Gather file status information and run callbacks as requested.
*
* This is an extended version of the `git_status_foreach()` API that
* allows for more granular control over which paths will be processed and
* in what order. See the `git_status_options` structure for details
* about the additional controls that this makes available.
*
* @param repo Repository object
* @param opts Status options structure
* @param callback The function to call on each file
* @param payload Pointer to pass through to callback function
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN(int) git_status_foreach_ext(
git_repository *repo,
const git_status_options *opts,
git_status_cb callback,
void *payload);
/**
* Get file status for a single file.
*
* This is not quite the same as calling `git_status_foreach_ext()` with
* the pathspec set to the specified path.
*
* @param status_flags The status value for the file
* @param repo A repository object
* @param path The file to retrieve status for, rooted at the repo's workdir
* @return 0 on success, GIT_ENOTFOUND if the file is not found in the HEAD,
* index, and work tree, GIT_EINVALIDPATH if `path` points at a folder,
* GIT_EAMBIGUOUS if "path" matches multiple files, -1 on other error.
*/
GIT_EXTERN(int) git_status_file(
unsigned int *status_flags,
git_repository *repo,
const char *path);
/**
* Test if the ignore rules apply to a given file.
*
* This function checks the ignore rules to see if they would apply to the
* given file. This indicates if the file would be ignored regardless of
* whether the file is already in the index or committed to the repository.
*
* One way to think of this is if you were to do "git add ." on the
* directory containing the file, would it be added or not?
*
* @param ignored Boolean returning 0 if the file is not ignored, 1 if it is
* @param repo A repository object
* @param path The file to check ignores for, rooted at the repo's workdir.
* @return 0 if ignore rules could be processed for the file (regardless
* of whether it exists or not), or an error < 0 if they could not.
*/
GIT_EXTERN(int) git_status_should_ignore(
int *ignored,
git_repository *repo,
const char *path);
/** @} */
GIT_END_DECL
#endif
-60
Ver Arquivo
@@ -1,60 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_strarray_h__
#define INCLUDE_git_strarray_h__
#include "common.h"
/**
* @file git2/strarray.h
* @brief Git string array routines
* @defgroup git_strarray Git string array routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/** Array of strings */
typedef struct git_strarray {
char **strings;
size_t count;
} git_strarray;
/**
* Close a string array object
*
* This method should be called on `git_strarray` objects where the strings
* array is allocated and contains allocated strings, such as what you
* would get from `git_strarray_copy()`. Not doing so, will result in a
* memory leak.
*
* This does not free the `git_strarray` itself, since the library will
* never allocate that object directly itself (it is more commonly embedded
* inside another struct or created on the stack).
*
* @param array git_strarray from which to free string data
*/
GIT_EXTERN(void) git_strarray_free(git_strarray *array);
/**
* Copy a string array object from source to target.
*
* Note: target is overwritten and hence should be empty,
* otherwise its contents are leaked.
*
* @param tgt target
* @param src source
* @return 0 on success, < 0 on allocation failure
*/
GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);
/** @} */
GIT_END_DECL
#endif
-527
Ver Arquivo
@@ -1,527 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_submodule_h__
#define INCLUDE_git_submodule_h__
#include "common.h"
#include "types.h"
#include "oid.h"
/**
* @file git2/submodule.h
* @brief Git submodule management utilities
* @defgroup git_submodule Git submodule management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Opaque structure representing a submodule.
*
* Submodule support in libgit2 builds a list of known submodules and keeps
* it in the repository. The list is built from the .gitmodules file, the
* .git/config file, the index, and the HEAD tree. Items in the working
* directory that look like submodules (i.e. a git repo) but are not
* mentioned in those places won't be tracked.
*/
typedef struct git_submodule git_submodule;
/**
* Values that could be specified for the update rule of a submodule.
*
* Use the DEFAULT value if you have altered the update value via
* `git_submodule_set_update()` and wish to reset to the original default.
*/
typedef enum {
GIT_SUBMODULE_UPDATE_DEFAULT = -1,
GIT_SUBMODULE_UPDATE_CHECKOUT = 0,
GIT_SUBMODULE_UPDATE_REBASE = 1,
GIT_SUBMODULE_UPDATE_MERGE = 2,
GIT_SUBMODULE_UPDATE_NONE = 3
} git_submodule_update_t;
/**
* Values that could be specified for how closely to examine the
* working directory when getting submodule status.
*
* Use the DEFUALT value if you have altered the ignore value via
* `git_submodule_set_ignore()` and wish to reset to the original value.
*/
typedef enum {
GIT_SUBMODULE_IGNORE_DEFAULT = -1, /* reset to default */
GIT_SUBMODULE_IGNORE_NONE = 0, /* any change or untracked == dirty */
GIT_SUBMODULE_IGNORE_UNTRACKED = 1, /* dirty if tracked files change */
GIT_SUBMODULE_IGNORE_DIRTY = 2, /* only dirty if HEAD moved */
GIT_SUBMODULE_IGNORE_ALL = 3 /* never dirty */
} git_submodule_ignore_t;
/**
* Return codes for submodule status.
*
* A combination of these flags will be returned to describe the status of a
* submodule. Depending on the "ignore" property of the submodule, some of
* the flags may never be returned because they indicate changes that are
* supposed to be ignored.
*
* Submodule info is contained in 4 places: the HEAD tree, the index, config
* files (both .git/config and .gitmodules), and the working directory. Any
* or all of those places might be missing information about the submodule
* depending on what state the repo is in. We consider all four places to
* build the combination of status flags.
*
* There are four values that are not really status, but give basic info
* about what sources of submodule data are available. These will be
* returned even if ignore is set to "ALL".
*
* * IN_HEAD - superproject head contains submodule
* * IN_INDEX - superproject index contains submodule
* * IN_CONFIG - superproject gitmodules has submodule
* * IN_WD - superproject workdir has submodule
*
* The following values will be returned so long as ignore is not "ALL".
*
* * INDEX_ADDED - in index, not in head
* * INDEX_DELETED - in head, not in index
* * INDEX_MODIFIED - index and head don't match
* * WD_UNINITIALIZED - workdir contains empty directory
* * WD_ADDED - in workdir, not index
* * WD_DELETED - in index, not workdir
* * WD_MODIFIED - index and workdir head don't match
*
* The following can only be returned if ignore is "NONE" or "UNTRACKED".
*
* * WD_INDEX_MODIFIED - submodule workdir index is dirty
* * WD_WD_MODIFIED - submodule workdir has modified files
*
* Lastly, the following will only be returned for ignore "NONE".
*
* * WD_UNTRACKED - wd contains untracked files
*/
typedef enum {
GIT_SUBMODULE_STATUS_IN_HEAD = (1u << 0),
GIT_SUBMODULE_STATUS_IN_INDEX = (1u << 1),
GIT_SUBMODULE_STATUS_IN_CONFIG = (1u << 2),
GIT_SUBMODULE_STATUS_IN_WD = (1u << 3),
GIT_SUBMODULE_STATUS_INDEX_ADDED = (1u << 4),
GIT_SUBMODULE_STATUS_INDEX_DELETED = (1u << 5),
GIT_SUBMODULE_STATUS_INDEX_MODIFIED = (1u << 6),
GIT_SUBMODULE_STATUS_WD_UNINITIALIZED = (1u << 7),
GIT_SUBMODULE_STATUS_WD_ADDED = (1u << 8),
GIT_SUBMODULE_STATUS_WD_DELETED = (1u << 9),
GIT_SUBMODULE_STATUS_WD_MODIFIED = (1u << 10),
GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED = (1u << 11),
GIT_SUBMODULE_STATUS_WD_WD_MODIFIED = (1u << 12),
GIT_SUBMODULE_STATUS_WD_UNTRACKED = (1u << 13),
} git_submodule_status_t;
#define GIT_SUBMODULE_STATUS_IS_UNMODIFIED(S) \
(((S) & ~(GIT_SUBMODULE_STATUS_IN_HEAD | \
GIT_SUBMODULE_STATUS_IN_INDEX | \
GIT_SUBMODULE_STATUS_IN_CONFIG | \
GIT_SUBMODULE_STATUS_IN_WD)) == 0)
#define GIT_SUBMODULE_STATUS_IS_WD_DIRTY(S) \
(((S) & (GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED | \
GIT_SUBMODULE_STATUS_WD_WD_MODIFIED | \
GIT_SUBMODULE_STATUS_WD_UNTRACKED)) != 0)
/**
* Lookup submodule information by name or path.
*
* Given either the submodule name or path (they are usually the same), this
* returns a structure describing the submodule.
*
* There are two expected error scenarios:
*
* - The submodule is not mentioned in the HEAD, the index, and the config,
* but does "exist" in the working directory (i.e. there is a subdirectory
* that is a valid self-contained git repo). In this case, this function
* returns GIT_EEXISTS to indicate the the submodule exists but not in a
* state where a git_submodule can be instantiated.
* - The submodule is not mentioned in the HEAD, index, or config and the
* working directory doesn't contain a value git repo at that path.
* There may or may not be anything else at that path, but nothing that
* looks like a submodule. In this case, this returns GIT_ENOTFOUND.
*
* The submodule object is owned by the containing repo and will be freed
* when the repo is freed. The caller need not free the submodule.
*
* @param submodule Pointer to submodule description object pointer..
* @param repo The repository.
* @param name The name of the submodule. Trailing slashes will be ignored.
* @return 0 on success, GIT_ENOTFOUND if submodule does not exist,
* GIT_EEXISTS if submodule exists in working directory only, -1 on
* other errors.
*/
GIT_EXTERN(int) git_submodule_lookup(
git_submodule **submodule,
git_repository *repo,
const char *name);
/**
* Iterate over all tracked submodules of a repository.
*
* See the note on `git_submodule` above. This iterates over the tracked
* submodules as decribed therein.
*
* If you are concerned about items in the working directory that look like
* submodules but are not tracked, the diff API will generate a diff record
* for workdir items that look like submodules but are not tracked, showing
* them as added in the workdir. Also, the status API will treat the entire
* subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.
*
* @param repo The repository
* @param callback Function to be called with the name of each submodule.
* Return a non-zero value to terminate the iteration.
* @param payload Extra data to pass to callback
* @return 0 on success, -1 on error, or non-zero return value of callback
*/
GIT_EXTERN(int) git_submodule_foreach(
git_repository *repo,
int (*callback)(git_submodule *sm, const char *name, void *payload),
void *payload);
/**
* Set up a new git submodule for checkout.
*
* This does "git submodule add" up to the fetch and checkout of the
* submodule contents. It preps a new submodule, creates an entry in
* .gitmodules and creates an empty initialized repository either at the
* given path in the working directory or in .git/modules with a gitlink
* from the working directory to the new repo.
*
* To fully emulate "git submodule add" call this function, then open the
* submodule repo and perform the clone step as needed. Lastly, call
* `git_submodule_add_finalize()` to wrap up adding the new submodule and
* .gitmodules to the index to be ready to commit.
*
* @param submodule The newly created submodule ready to open for clone
* @param repo Superproject repository to contain the new submodule
* @param url URL for the submodules remote
* @param path Path at which the submodule should be created
* @param use_gitlink Should workdir contain a gitlink to the repo in
* .git/modules vs. repo directly in workdir.
* @return 0 on success, GIT_EEXISTS if submodule already exists,
* -1 on other errors.
*/
GIT_EXTERN(int) git_submodule_add_setup(
git_submodule **submodule,
git_repository *repo,
const char *url,
const char *path,
int use_gitlink);
/**
* Resolve the setup of a new git submodule.
*
* This should be called on a submodule once you have called add setup
* and done the clone of the submodule. This adds the .gitmodules file
* and the newly cloned submodule to the index to be ready to be committed
* (but doesn't actually do the commit).
*
* @param submodule The submodule to finish adding.
*/
GIT_EXTERN(int) git_submodule_add_finalize(git_submodule *submodule);
/**
* Add current submodule HEAD commit to index of superproject.
*
* @param submodule The submodule to add to the index
* @param write_index Boolean if this should immediately write the index
* file. If you pass this as false, you will have to get the
* git_index and explicitly call `git_index_write()` on it to
* save the change.
* @return 0 on success, <0 on failure
*/
GIT_EXTERN(int) git_submodule_add_to_index(
git_submodule *submodule,
int write_index);
/**
* Write submodule settings to .gitmodules file.
*
* This commits any in-memory changes to the submodule to the gitmodules
* file on disk. You may also be interested in `git_submodule_init()` which
* writes submodule info to ".git/config" (which is better for local changes
* to submodule settings) and/or `git_submodule_sync()` which writes
* settings about remotes to the actual submodule repository.
*
* @param submodule The submodule to write.
* @return 0 on success, <0 on failure.
*/
GIT_EXTERN(int) git_submodule_save(git_submodule *submodule);
/**
* Get the containing repository for a submodule.
*
* This returns a pointer to the repository that contains the submodule.
* This is a just a reference to the repository that was passed to the
* original `git_submodule_lookup()` call, so if that repository has been
* freed, then this may be a dangling reference.
*
* @param submodule Pointer to submodule object
* @return Pointer to `git_repository`
*/
GIT_EXTERN(git_repository *) git_submodule_owner(git_submodule *submodule);
/**
* Get the name of submodule.
*
* @param submodule Pointer to submodule object
* @return Pointer to the submodule name
*/
GIT_EXTERN(const char *) git_submodule_name(git_submodule *submodule);
/**
* Get the path to the submodule.
*
* The path is almost always the same as the submodule name, but the
* two are actually not required to match.
*
* @param submodule Pointer to submodule object
* @return Pointer to the submodule path
*/
GIT_EXTERN(const char *) git_submodule_path(git_submodule *submodule);
/**
* Get the URL for the submodule.
*
* @param submodule Pointer to submodule object
* @return Pointer to the submodule url
*/
GIT_EXTERN(const char *) git_submodule_url(git_submodule *submodule);
/**
* Set the URL for the submodule.
*
* This sets the URL in memory for the submodule. This will be used for
* any following submodule actions while this submodule data is in memory.
*
* After calling this, you may wish to call `git_submodule_save()` to write
* the changes back to the ".gitmodules" file and `git_submodule_sync()` to
* write the changes to the checked out submodule repository.
*
* @param submodule Pointer to the submodule object
* @param url URL that should be used for the submodule
* @return 0 on success, <0 on failure
*/
GIT_EXTERN(int) git_submodule_set_url(git_submodule *submodule, const char *url);
/**
* Get the OID for the submodule in the index.
*
* @param submodule Pointer to submodule object
* @return Pointer to git_oid or NULL if submodule is not in index.
*/
GIT_EXTERN(const git_oid *) git_submodule_index_id(git_submodule *submodule);
/**
* Get the OID for the submodule in the current HEAD tree.
*
* @param submodule Pointer to submodule object
* @return Pointer to git_oid or NULL if submodule is not in the HEAD.
*/
GIT_EXTERN(const git_oid *) git_submodule_head_id(git_submodule *submodule);
/**
* Get the OID for the submodule in the current working directory.
*
* This returns the OID that corresponds to looking up 'HEAD' in the checked
* out submodule. If there are pending changes in the index or anything
* else, this won't notice that. You should call `git_submodule_status()`
* for a more complete picture about the state of the working directory.
*
* @param submodule Pointer to submodule object
* @return Pointer to git_oid or NULL if submodule is not checked out.
*/
GIT_EXTERN(const git_oid *) git_submodule_wd_id(git_submodule *submodule);
/**
* Get the ignore rule for the submodule.
*
* There are four ignore values:
*
* - **GIT_SUBMODULE_IGNORE_NONE** will consider any change to the contents
* of the submodule from a clean checkout to be dirty, including the
* addition of untracked files. This is the default if unspecified.
* - **GIT_SUBMODULE_IGNORE_UNTRACKED** examines the contents of the
* working tree (i.e. call `git_status_foreach()` on the submodule) but
* UNTRACKED files will not count as making the submodule dirty.
* - **GIT_SUBMODULE_IGNORE_DIRTY** means to only check if the HEAD of the
* submodule has moved for status. This is fast since it does not need to
* scan the working tree of the submodule at all.
* - **GIT_SUBMODULE_IGNORE_ALL** means not to open the submodule repo.
* The working directory will be consider clean so long as there is a
* checked out version present.
*/
GIT_EXTERN(git_submodule_ignore_t) git_submodule_ignore(
git_submodule *submodule);
/**
* Set the ignore rule for the submodule.
*
* This sets the ignore rule in memory for the submodule. This will be used
* for any following actions (such as `git_submodule_status()`) while the
* submodule is in memory. You should call `git_submodule_save()` if you
* want to persist the new ignore role.
*
* Calling this again with GIT_SUBMODULE_IGNORE_DEFAULT or calling
* `git_submodule_reload()` will revert the rule to the value that was in the
* original config.
*
* @return old value for ignore
*/
GIT_EXTERN(git_submodule_ignore_t) git_submodule_set_ignore(
git_submodule *submodule,
git_submodule_ignore_t ignore);
/**
* Get the update rule for the submodule.
*/
GIT_EXTERN(git_submodule_update_t) git_submodule_update(
git_submodule *submodule);
/**
* Set the update rule for the submodule.
*
* This sets the update rule in memory for the submodule. You should call
* `git_submodule_save()` if you want to persist the new update rule.
*
* Calling this again with GIT_SUBMODULE_UPDATE_DEFAULT or calling
* `git_submodule_reload()` will revert the rule to the value that was in the
* original config.
*
* @return old value for update
*/
GIT_EXTERN(git_submodule_update_t) git_submodule_set_update(
git_submodule *submodule,
git_submodule_update_t update);
/**
* Read the fetchRecurseSubmodules rule for a submodule.
*
* This accesses the submodule.<name>.fetchRecurseSubmodules value for
* the submodule that controls fetching behavior for the submodule.
*
* Note that at this time, libgit2 does not honor this setting and the
* fetch functionality current ignores submodules.
*
* @return 0 if fetchRecurseSubmodules is false, 1 if true
*/
GIT_EXTERN(int) git_submodule_fetch_recurse_submodules(
git_submodule *submodule);
/**
* Set the fetchRecurseSubmodules rule for a submodule.
*
* This sets the submodule.<name>.fetchRecurseSubmodules value for
* the submodule. You should call `git_submodule_save()` if you want
* to persist the new value.
*
* @param submodule The submodule to modify
* @param fetch_recurse_submodules Boolean value
* @return old value for fetchRecurseSubmodules
*/
GIT_EXTERN(int) git_submodule_set_fetch_recurse_submodules(
git_submodule *submodule,
int fetch_recurse_submodules);
/**
* Copy submodule info into ".git/config" file.
*
* Just like "git submodule init", this copies information about the
* submodule into ".git/config". You can use the accessor functions
* above to alter the in-memory git_submodule object and control what
* is written to the config, overriding what is in .gitmodules.
*
* @param submodule The submodule to write into the superproject config
* @param overwrite By default, existing entries will not be overwritten,
* but setting this to true forces them to be updated.
* @return 0 on success, <0 on failure.
*/
GIT_EXTERN(int) git_submodule_init(git_submodule *submodule, int overwrite);
/**
* Copy submodule remote info into submodule repo.
*
* This copies the information about the submodules URL into the checked out
* submodule config, acting like "git submodule sync". This is useful if
* you have altered the URL for the submodule (or it has been altered by a
* fetch of upstream changes) and you need to update your local repo.
*/
GIT_EXTERN(int) git_submodule_sync(git_submodule *submodule);
/**
* Open the repository for a submodule.
*
* This is a newly opened repository object. The caller is responsible for
* calling `git_repository_free()` on it when done. Multiple calls to this
* function will return distinct `git_repository` objects. This will only
* work if the submodule is checked out into the working directory.
*
* @param subrepo Pointer to the submodule repo which was opened
* @param submodule Submodule to be opened
* @return 0 on success, <0 if submodule repo could not be opened.
*/
GIT_EXTERN(int) git_submodule_open(
git_repository **repo,
git_submodule *submodule);
/**
* Reread submodule info from config, index, and HEAD.
*
* Call this to reread cached submodule information for this submodule if
* you have reason to believe that it has changed.
*/
GIT_EXTERN(int) git_submodule_reload(git_submodule *submodule);
/**
* Reread all submodule info.
*
* Call this to reload all cached submodule information for the repo.
*/
GIT_EXTERN(int) git_submodule_reload_all(git_repository *repo);
/**
* Get the status for a submodule.
*
* This looks at a submodule and tries to determine the status. It
* will return a combination of the `GIT_SUBMODULE_STATUS` values above.
* How deeply it examines the working directory to do this will depend
* on the `git_submodule_ignore_t` value for the submodule - which can be
* set either temporarily or permanently with `git_submodule_set_ignore()`.
*
* @param status Combination of `GIT_SUBMODULE_STATUS` flags
* @param submodule Submodule for which to get status
* @return 0 on success, <0 on error
*/
GIT_EXTERN(int) git_submodule_status(
unsigned int *status,
git_submodule *submodule);
/**
* Get the locations of submodule information.
*
* This is a bit like a very lightweight version of `git_submodule_status`.
* It just returns a made of the first four submodule status values (i.e.
* the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the
* submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.).
* This can be useful if you want to know if the submodule is present in the
* working directory at this point in time, etc.
*
* @param status Combination of first four `GIT_SUBMODULE_STATUS` flags
* @param submodule Submodule for which to get status
* @return 0 on success, <0 on error
*/
GIT_EXTERN(int) git_submodule_location(
unsigned int *location_status,
git_submodule *submodule);
/** @} */
GIT_END_DECL
#endif
-326
Ver Arquivo
@@ -1,326 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_tag_h__
#define INCLUDE_git_tag_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "object.h"
#include "strarray.h"
/**
* @file git2/tag.h
* @brief Git tag parsing routines
* @defgroup git_tag Git tag management
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Lookup a tag object from the repository.
*
* @param out pointer to the looked up tag
* @param repo the repo to use when locating the tag.
* @param id identity of the tag to locate.
* @return 0 or an error code
*/
GIT_INLINE(int) git_tag_lookup(
git_tag **out, git_repository *repo, const git_oid *id)
{
return git_object_lookup(
(git_object **)out, repo, id, (git_otype)GIT_OBJ_TAG);
}
/**
* Lookup a tag object from the repository,
* given a prefix of its identifier (short id).
*
* @see git_object_lookup_prefix
*
* @param out pointer to the looked up tag
* @param repo the repo to use when locating the tag.
* @param id identity of the tag to locate.
* @param len the length of the short identifier
* @return 0 or an error code
*/
GIT_INLINE(int) git_tag_lookup_prefix(
git_tag **out, git_repository *repo, const git_oid *id, size_t len)
{
return git_object_lookup_prefix(
(git_object **)out, repo, id, len, (git_otype)GIT_OBJ_TAG);
}
/**
* Close an open tag
*
* You can no longer use the git_tag pointer after this call.
*
* IMPORTANT: You MUST call this method when you are through with a tag to
* release memory. Failure to do so will cause a memory leak.
*
* @param tag the tag to close
*/
GIT_INLINE(void) git_tag_free(git_tag *tag)
{
git_object_free((git_object *)tag);
}
/**
* Get the id of a tag.
*
* @param tag a previously loaded tag.
* @return object identity for the tag.
*/
GIT_EXTERN(const git_oid *) git_tag_id(const git_tag *tag);
/**
* Get the tagged object of a tag
*
* This method performs a repository lookup for the
* given object and returns it
*
* @param target_out pointer where to store the target
* @param tag a previously loaded tag.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tag_target(git_object **target_out, const git_tag *tag);
/**
* Get the OID of the tagged object of a tag
*
* @param tag a previously loaded tag.
* @return pointer to the OID
*/
GIT_EXTERN(const git_oid *) git_tag_target_id(const git_tag *tag);
/**
* Get the type of a tag's tagged object
*
* @param tag a previously loaded tag.
* @return type of the tagged object
*/
GIT_EXTERN(git_otype) git_tag_target_type(const git_tag *tag);
/**
* Get the name of a tag
*
* @param tag a previously loaded tag.
* @return name of the tag
*/
GIT_EXTERN(const char *) git_tag_name(const git_tag *tag);
/**
* Get the tagger (author) of a tag
*
* @param tag a previously loaded tag.
* @return reference to the tag's author
*/
GIT_EXTERN(const git_signature *) git_tag_tagger(const git_tag *tag);
/**
* Get the message of a tag
*
* @param tag a previously loaded tag.
* @return message of the tag
*/
GIT_EXTERN(const char *) git_tag_message(const git_tag *tag);
/**
* Create a new tag in the repository from an object
*
* A new reference will also be created pointing to
* this tag object. If `force` is true and a reference
* already exists with the given name, it'll be replaced.
*
* The message will not be cleaned up. This can be achieved
* through `git_message_prettify()`.
*
* The tag name will be checked for validity. You must avoid
* the characters '~', '^', ':', '\\', '?', '[', and '*', and the
* sequences ".." and "@{" which have special meaning to revparse.
*
* @param oid Pointer where to store the OID of the
* newly created tag. If the tag already exists, this parameter
* will be the oid of the existing tag, and the function will
* return a GIT_EEXISTS error code.
*
* @param repo Repository where to store the tag
*
* @param tag_name Name for the tag; this name is validated
* for consistency. It should also not conflict with an
* already existing tag name
*
* @param target Object to which this tag points. This object
* must belong to the given `repo`.
*
* @param tagger Signature of the tagger for this tag, and
* of the tagging time
*
* @param message Full message for this tag
*
* @param force Overwrite existing references
*
* @return 0 on success, GIT_EINVALIDSPEC or an error code
* A tag object is written to the ODB, and a proper reference
* is written in the /refs/tags folder, pointing to it
*/
GIT_EXTERN(int) git_tag_create(
git_oid *oid,
git_repository *repo,
const char *tag_name,
const git_object *target,
const git_signature *tagger,
const char *message,
int force);
/**
* Create a new tag in the repository from a buffer
*
* @param oid Pointer where to store the OID of the newly created tag
* @param repo Repository where to store the tag
* @param buffer Raw tag data
* @param force Overwrite existing tags
* @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_tag_create_frombuffer(
git_oid *oid,
git_repository *repo,
const char *buffer,
int force);
/**
* Create a new lightweight tag pointing at a target object
*
* A new direct reference will be created pointing to
* this target object. If `force` is true and a reference
* already exists with the given name, it'll be replaced.
*
* The tag name will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* @param oid Pointer where to store the OID of the provided
* target object. If the tag already exists, this parameter
* will be filled with the oid of the existing pointed object
* and the function will return a GIT_EEXISTS error code.
*
* @param repo Repository where to store the lightweight tag
*
* @param tag_name Name for the tag; this name is validated
* for consistency. It should also not conflict with an
* already existing tag name
*
* @param target Object to which this tag points. This object
* must belong to the given `repo`.
*
* @param force Overwrite existing references
*
* @return 0 on success, GIT_EINVALIDSPEC or an error code
* A proper reference is written in the /refs/tags folder,
* pointing to the provided target object
*/
GIT_EXTERN(int) git_tag_create_lightweight(
git_oid *oid,
git_repository *repo,
const char *tag_name,
const git_object *target,
int force);
/**
* Delete an existing tag reference.
*
* The tag name will be checked for validity.
* See `git_tag_create()` for rules about valid names.
*
* @param repo Repository where lives the tag
*
* @param tag_name Name of the tag to be deleted;
* this name is validated for consistency.
*
* @return 0 on success, GIT_EINVALIDSPEC or an error code
*/
GIT_EXTERN(int) git_tag_delete(
git_repository *repo,
const char *tag_name);
/**
* Fill a list with all the tags in the Repository
*
* The string array will be filled with the names of the
* matching tags; these values are owned by the user and
* should be free'd manually when no longer needed, using
* `git_strarray_free`.
*
* @param tag_names Pointer to a git_strarray structure where
* the tag names will be stored
* @param repo Repository where to find the tags
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tag_list(
git_strarray *tag_names,
git_repository *repo);
/**
* Fill a list with all the tags in the Repository
* which name match a defined pattern
*
* If an empty pattern is provided, all the tags
* will be returned.
*
* The string array will be filled with the names of the
* matching tags; these values are owned by the user and
* should be free'd manually when no longer needed, using
* `git_strarray_free`.
*
* @param tag_names Pointer to a git_strarray structure where
* the tag names will be stored
* @param pattern Standard fnmatch pattern
* @param repo Repository where to find the tags
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tag_list_match(
git_strarray *tag_names,
const char *pattern,
git_repository *repo);
typedef int (*git_tag_foreach_cb)(const char *name, git_oid *oid, void *payload);
/**
* Call callback `cb' for each tag in the repository
*
* @param repo Repository
* @param callback Callback function
* @param payload Pointer to callback data (optional)
*/
GIT_EXTERN(int) git_tag_foreach(
git_repository *repo,
git_tag_foreach_cb callback,
void *payload);
/**
* Recursively peel a tag until a non tag git_object is found
*
* The retrieved `tag_target` object is owned by the repository
* and should be closed with the `git_object_free` method.
*
* @param tag_target_out Pointer to the peeled git_object
* @param tag The tag to be processed
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tag_peel(
git_object **tag_target_out,
const git_tag *tag);
/** @} */
GIT_END_DECL
#endif
-50
Ver Arquivo
@@ -1,50 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_threads_h__
#define INCLUDE_git_threads_h__
#include "common.h"
/**
* @file git2/threads.h
* @brief Library level thread functions
* @defgroup git_thread Threading functions
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Init the threading system.
*
* If libgit2 has been built with GIT_THREADS
* on, this function must be called once before
* any other library functions.
*
* If libgit2 has been built without GIT_THREADS
* support, this function is a no-op.
*
* @return 0 or an error code
*/
GIT_EXTERN(int) git_threads_init(void);
/**
* Shutdown the threading system.
*
* If libgit2 has been built with GIT_THREADS
* on, this function must be called before shutting
* down the library.
*
* If libgit2 has been built without GIT_THREADS
* support, this function is a no-op.
*/
GIT_EXTERN(void) git_threads_shutdown(void);
/** @} */
GIT_END_DECL
#endif
-331
Ver Arquivo
@@ -1,331 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_transport_h__
#define INCLUDE_git_transport_h__
#include "indexer.h"
#include "net.h"
#include "types.h"
/**
* @file git2/transport.h
* @brief Git transport interfaces and functions
* @defgroup git_transport interfaces and functions
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/*
*** Begin interface for credentials acquisition ***
*/
typedef enum {
/* git_cred_userpass_plaintext */
GIT_CREDTYPE_USERPASS_PLAINTEXT = 1,
} git_credtype_t;
/* The base structure for all credential types */
typedef struct git_cred {
git_credtype_t credtype;
void (*free)(
struct git_cred *cred);
} git_cred;
/* A plaintext username and password */
typedef struct git_cred_userpass_plaintext {
git_cred parent;
char *username;
char *password;
} git_cred_userpass_plaintext;
/**
* Creates a new plain-text username and password credential object.
*
* @param out The newly created credential object.
* @param username The username of the credential.
* @param password The password of the credential.
*/
GIT_EXTERN(int) git_cred_userpass_plaintext_new(
git_cred **out,
const char *username,
const char *password);
/**
* Signature of a function which acquires a credential object.
*
* @param cred The newly created credential object.
* @param url The resource for which we are demanding a credential.
* @param allowed_types A bitmask stating which cred types are OK to return.
*/
typedef int (*git_cred_acquire_cb)(
git_cred **cred,
const char *url,
unsigned int allowed_types,
void *payload);
/*
*** End interface for credentials acquisition ***
*** Begin base transport interface ***
*/
typedef enum {
GIT_TRANSPORTFLAGS_NONE = 0,
/* If the connection is secured with SSL/TLS, the authenticity
* of the server certificate should not be verified. */
GIT_TRANSPORTFLAGS_NO_CHECK_CERT = 1
} git_transport_flags_t;
typedef void (*git_transport_message_cb)(const char *str, int len, void *data);
typedef struct git_transport {
unsigned int version;
/* Set progress and error callbacks */
int (*set_callbacks)(struct git_transport *transport,
git_transport_message_cb progress_cb,
git_transport_message_cb error_cb,
void *payload);
/* Connect the transport to the remote repository, using the given
* direction. */
int (*connect)(struct git_transport *transport,
const char *url,
git_cred_acquire_cb cred_acquire_cb,
void *cred_acquire_payload,
int direction,
int flags);
/* This function may be called after a successful call to connect(). The
* provided callback is invoked for each ref discovered on the remote
* end. */
int (*ls)(struct git_transport *transport,
git_headlist_cb list_cb,
void *payload);
/* Executes the push whose context is in the git_push object. */
int (*push)(struct git_transport *transport, git_push *push);
/* This function may be called after a successful call to connect(), when
* the direction is FETCH. The function performs a negotiation to calculate
* the wants list for the fetch. */
int (*negotiate_fetch)(struct git_transport *transport,
git_repository *repo,
const git_remote_head * const *refs,
size_t count);
/* This function may be called after a successful call to negotiate_fetch(),
* when the direction is FETCH. This function retrieves the pack file for
* the fetch from the remote end. */
int (*download_pack)(struct git_transport *transport,
git_repository *repo,
git_transfer_progress *stats,
git_transfer_progress_callback progress_cb,
void *progress_payload);
/* Checks to see if the transport is connected */
int (*is_connected)(struct git_transport *transport);
/* Reads the flags value previously passed into connect() */
int (*read_flags)(struct git_transport *transport, int *flags);
/* Cancels any outstanding transport operation */
void (*cancel)(struct git_transport *transport);
/* This function is the reverse of connect() -- it terminates the
* connection to the remote end. */
int (*close)(struct git_transport *transport);
/* Frees/destructs the git_transport object. */
void (*free)(struct git_transport *transport);
} git_transport;
#define GIT_TRANSPORT_VERSION 1
#define GIT_TRANSPORT_INIT {GIT_TRANSPORT_VERSION}
/**
* Function to use to create a transport from a URL. The transport database
* is scanned to find a transport that implements the scheme of the URI (i.e.
* git:// or http://) and a transport object is returned to the caller.
*
* @param out The newly created transport (out)
* @param owner The git_remote which will own this transport
* @param url The URL to connect to
* @return 0 or an error code
*/
GIT_EXTERN(int) git_transport_new(git_transport **out, git_remote *owner, const char *url);
/**
* Function which checks to see if a transport could be created for the
* given URL (i.e. checks to see if libgit2 has a transport that supports
* the given URL's scheme)
*
* @param url The URL to check
* @return Zero if the URL is not valid; nonzero otherwise
*/
GIT_EXTERN(int) git_transport_valid_url(const char *url);
/* Signature of a function which creates a transport */
typedef int (*git_transport_cb)(git_transport **out, git_remote *owner, void *param);
/* Transports which come with libgit2 (match git_transport_cb). The expected
* value for "param" is listed in-line below. */
/**
* Create an instance of the dummy transport.
*
* @param out The newly created transport (out)
* @param owner The git_remote which will own this transport
* @param payload You must pass NULL for this parameter.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_transport_dummy(
git_transport **out,
git_remote *owner,
/* NULL */ void *payload);
/**
* Create an instance of the local transport.
*
* @param out The newly created transport (out)
* @param owner The git_remote which will own this transport
* @param payload You must pass NULL for this parameter.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_transport_local(
git_transport **out,
git_remote *owner,
/* NULL */ void *payload);
/**
* Create an instance of the smart transport.
*
* @param out The newly created transport (out)
* @param owner The git_remote which will own this transport
* @param payload A pointer to a git_smart_subtransport_definition
* @return 0 or an error code
*/
GIT_EXTERN(int) git_transport_smart(
git_transport **out,
git_remote *owner,
/* (git_smart_subtransport_definition *) */ void *payload);
/*
*** End of base transport interface ***
*** Begin interface for subtransports for the smart transport ***
*/
/* The smart transport knows how to speak the git protocol, but it has no
* knowledge of how to establish a connection between it and another endpoint,
* or how to move data back and forth. For this, a subtransport interface is
* declared, and the smart transport delegates this work to the subtransports.
* Three subtransports are implemented: git, http, and winhttp. (The http and
* winhttp transports each implement both http and https.) */
/* Subtransports can either be RPC = 0 (persistent connection) or RPC = 1
* (request/response). The smart transport handles the differences in its own
* logic. The git subtransport is RPC = 0, while http and winhttp are both
* RPC = 1. */
/* Actions that the smart transport can ask
* a subtransport to perform */
typedef enum {
GIT_SERVICE_UPLOADPACK_LS = 1,
GIT_SERVICE_UPLOADPACK = 2,
GIT_SERVICE_RECEIVEPACK_LS = 3,
GIT_SERVICE_RECEIVEPACK = 4,
} git_smart_service_t;
struct git_smart_subtransport;
/* A stream used by the smart transport to read and write data
* from a subtransport */
typedef struct git_smart_subtransport_stream {
/* The owning subtransport */
struct git_smart_subtransport *subtransport;
int (*read)(
struct git_smart_subtransport_stream *stream,
char *buffer,
size_t buf_size,
size_t *bytes_read);
int (*write)(
struct git_smart_subtransport_stream *stream,
const char *buffer,
size_t len);
void (*free)(
struct git_smart_subtransport_stream *stream);
} git_smart_subtransport_stream;
/* An implementation of a subtransport which carries data for the
* smart transport */
typedef struct git_smart_subtransport {
int (* action)(
git_smart_subtransport_stream **out,
struct git_smart_subtransport *transport,
const char *url,
git_smart_service_t action);
/* Subtransports are guaranteed a call to close() between
* calls to action(), except for the following two "natural" progressions
* of actions against a constant URL.
*
* 1. UPLOADPACK_LS -> UPLOADPACK
* 2. RECEIVEPACK_LS -> RECEIVEPACK */
int (* close)(struct git_smart_subtransport *transport);
void (* free)(struct git_smart_subtransport *transport);
} git_smart_subtransport;
/* A function which creates a new subtransport for the smart transport */
typedef int (*git_smart_subtransport_cb)(
git_smart_subtransport **out,
git_transport* owner);
typedef struct git_smart_subtransport_definition {
/* The function to use to create the git_smart_subtransport */
git_smart_subtransport_cb callback;
/* True if the protocol is stateless; false otherwise. For example,
* http:// is stateless, but git:// is not. */
unsigned rpc : 1;
} git_smart_subtransport_definition;
/* Smart transport subtransports that come with libgit2 */
/**
* Create an instance of the http subtransport. This subtransport
* also supports https. On Win32, this subtransport may be implemented
* using the WinHTTP library.
*
* @param out The newly created subtransport
* @param owner The smart transport to own this subtransport
* @return 0 or an error code
*/
GIT_EXTERN(int) git_smart_subtransport_http(
git_smart_subtransport **out,
git_transport* owner);
/**
* Create an instance of the git subtransport.
*
* @param out The newly created subtransport
* @param owner The smart transport to own this subtransport
* @return 0 or an error code
*/
GIT_EXTERN(int) git_smart_subtransport_git(
git_smart_subtransport **out,
git_transport* owner);
/*
*** End interface for subtransports for the smart transport ***
*/
/** @} */
GIT_END_DECL
#endif
-387
Ver Arquivo
@@ -1,387 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_tree_h__
#define INCLUDE_git_tree_h__
#include "common.h"
#include "types.h"
#include "oid.h"
#include "object.h"
/**
* @file git2/tree.h
* @brief Git tree parsing, loading routines
* @defgroup git_tree Git tree parsing, loading routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Lookup a tree object from the repository.
*
* @param out Pointer to the looked up tree
* @param repo The repo to use when locating the tree.
* @param id Identity of the tree to locate.
* @return 0 or an error code
*/
GIT_INLINE(int) git_tree_lookup(
git_tree **out, git_repository *repo, const git_oid *id)
{
return git_object_lookup((git_object **)out, repo, id, GIT_OBJ_TREE);
}
/**
* Lookup a tree object from the repository,
* given a prefix of its identifier (short id).
*
* @see git_object_lookup_prefix
*
* @param tree pointer to the looked up tree
* @param repo the repo to use when locating the tree.
* @param id identity of the tree to locate.
* @param len the length of the short identifier
* @return 0 or an error code
*/
GIT_INLINE(int) git_tree_lookup_prefix(
git_tree **out,
git_repository *repo,
const git_oid *id,
size_t len)
{
return git_object_lookup_prefix(
(git_object **)out, repo, id, len, GIT_OBJ_TREE);
}
/**
* Close an open tree
*
* You can no longer use the git_tree pointer after this call.
*
* IMPORTANT: You MUST call this method when you stop using a tree to
* release memory. Failure to do so will cause a memory leak.
*
* @param tree The tree to close
*/
GIT_INLINE(void) git_tree_free(git_tree *tree)
{
git_object_free((git_object *)tree);
}
/**
* Get the id of a tree.
*
* @param tree a previously loaded tree.
* @return object identity for the tree.
*/
GIT_EXTERN(const git_oid *) git_tree_id(const git_tree *tree);
/**
* Get the repository that contains the tree.
*
* @param tree A previously loaded tree.
* @return Repository that contains this tree.
*/
GIT_EXTERN(git_repository *) git_tree_owner(const git_tree *tree);
/**
* Get the number of entries listed in a tree
*
* @param tree a previously loaded tree.
* @return the number of entries in the tree
*/
GIT_EXTERN(size_t) git_tree_entrycount(const git_tree *tree);
/**
* Lookup a tree entry by its filename
*
* This returns a git_tree_entry that is owned by the git_tree. You don't
* have to free it, but you must not use it after the git_tree is released.
*
* @param tree a previously loaded tree.
* @param filename the filename of the desired entry
* @return the tree entry; NULL if not found
*/
GIT_EXTERN(const git_tree_entry *) git_tree_entry_byname(
git_tree *tree, const char *filename);
/**
* Lookup a tree entry by its position in the tree
*
* This returns a git_tree_entry that is owned by the git_tree. You don't
* have to free it, but you must not use it after the git_tree is released.
*
* @param tree a previously loaded tree.
* @param idx the position in the entry list
* @return the tree entry; NULL if not found
*/
GIT_EXTERN(const git_tree_entry *) git_tree_entry_byindex(
git_tree *tree, size_t idx);
/**
* Lookup a tree entry by SHA value.
*
* This returns a git_tree_entry that is owned by the git_tree. You don't
* have to free it, but you must not use it after the git_tree is released.
*
* Warning: this must examine every entry in the tree, so it is not fast.
*
* @param tree a previously loaded tree.
* @param oid the sha being looked for
* @return the tree entry; NULL if not found
*/
GIT_EXTERN(const git_tree_entry *) git_tree_entry_byoid(
const git_tree *tree, const git_oid *oid);
/**
* Retrieve a tree entry contained in a tree or in any of its subtrees,
* given its relative path.
*
* Unlike the other lookup functions, the returned tree entry is owned by
* the user and must be freed explicitly with `git_tree_entry_free()`.
*
* @param out Pointer where to store the tree entry
* @param root Previously loaded tree which is the root of the relative path
* @param subtree_path Path to the contained entry
* @return 0 on success; GIT_ENOTFOUND if the path does not exist
*/
GIT_EXTERN(int) git_tree_entry_bypath(
git_tree_entry **out,
git_tree *root,
const char *path);
/**
* Duplicate a tree entry
*
* Create a copy of a tree entry. The returned copy is owned by the user,
* and must be freed explicitly with `git_tree_entry_free()`.
*
* @param entry A tree entry to duplicate
* @return a copy of the original entry or NULL on error (alloc failure)
*/
GIT_EXTERN(git_tree_entry *) git_tree_entry_dup(const git_tree_entry *entry);
/**
* Free a user-owned tree entry
*
* IMPORTANT: This function is only needed for tree entries owned by the
* user, such as the ones returned by `git_tree_entry_dup()` or
* `git_tree_entry_bypath()`.
*
* @param entry The entry to free
*/
GIT_EXTERN(void) git_tree_entry_free(git_tree_entry *entry);
/**
* Get the filename of a tree entry
*
* @param entry a tree entry
* @return the name of the file
*/
GIT_EXTERN(const char *) git_tree_entry_name(const git_tree_entry *entry);
/**
* Get the id of the object pointed by the entry
*
* @param entry a tree entry
* @return the oid of the object
*/
GIT_EXTERN(const git_oid *) git_tree_entry_id(const git_tree_entry *entry);
/**
* Get the type of the object pointed by the entry
*
* @param entry a tree entry
* @return the type of the pointed object
*/
GIT_EXTERN(git_otype) git_tree_entry_type(const git_tree_entry *entry);
/**
* Get the UNIX file attributes of a tree entry
*
* @param entry a tree entry
* @return filemode as an integer
*/
GIT_EXTERN(git_filemode_t) git_tree_entry_filemode(const git_tree_entry *entry);
/**
* Convert a tree entry to the git_object it points too.
*
* You must call `git_object_free()` on the object when you are done with it.
*
* @param object pointer to the converted object
* @param repo repository where to lookup the pointed object
* @param entry a tree entry
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tree_entry_to_object(
git_object **object_out,
git_repository *repo,
const git_tree_entry *entry);
/**
* Create a new tree builder.
*
* The tree builder can be used to create or modify trees in memory and
* write them as tree objects to the database.
*
* If the `source` parameter is not NULL, the tree builder will be
* initialized with the entries of the given tree.
*
* If the `source` parameter is NULL, the tree builder will start with no
* entries and will have to be filled manually.
*
* @param out Pointer where to store the tree builder
* @param source Source tree to initialize the builder (optional)
* @return 0 on success; error code otherwise
*/
GIT_EXTERN(int) git_treebuilder_create(
git_treebuilder **out, const git_tree *source);
/**
* Clear all the entires in the builder
*
* @param bld Builder to clear
*/
GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);
/**
* Free a tree builder
*
* This will clear all the entries and free to builder.
* Failing to free the builder after you're done using it
* will result in a memory leak
*
* @param bld Builder to free
*/
GIT_EXTERN(void) git_treebuilder_free(git_treebuilder *bld);
/**
* Get an entry from the builder from its filename
*
* The returned entry is owned by the builder and should
* not be freed manually.
*
* @param bld Tree builder
* @param filename Name of the entry
* @return pointer to the entry; NULL if not found
*/
GIT_EXTERN(const git_tree_entry *) git_treebuilder_get(
git_treebuilder *bld, const char *filename);
/**
* Add or update an entry to the builder
*
* Insert a new entry for `filename` in the builder with the
* given attributes.
*
* If an entry named `filename` already exists, its attributes
* will be updated with the given ones.
*
* The optional pointer `out` can be used to retrieve a pointer to
* the newly created/updated entry. Pass NULL if you do not need it.
*
* No attempt is being made to ensure that the provided oid points
* to an existing git object in the object database, nor that the
* attributes make sense regarding the type of the pointed at object.
*
* @param out Pointer to store the entry (optional)
* @param bld Tree builder
* @param filename Filename of the entry
* @param id SHA1 oid of the entry
* @param filemode Folder attributes of the entry. This parameter must
* be valued with one of the following entries: 0040000, 0100644,
* 0100755, 0120000 or 0160000.
* @return 0 or an error code
*/
GIT_EXTERN(int) git_treebuilder_insert(
const git_tree_entry **out,
git_treebuilder *bld,
const char *filename,
const git_oid *id,
git_filemode_t filemode);
/**
* Remove an entry from the builder by its filename
*
* @param bld Tree builder
* @param filename Filename of the entry to remove
*/
GIT_EXTERN(int) git_treebuilder_remove(
git_treebuilder *bld, const char *filename);
typedef int (*git_treebuilder_filter_cb)(
const git_tree_entry *entry, void *payload);
/**
* Filter the entries in the tree
*
* The `filter` callback will be called for each entry in the tree with a
* pointer to the entry and the provided `payload`; if the callback returns
* non-zero, the entry will be filtered (removed from the builder).
*
* @param bld Tree builder
* @param filter Callback to filter entries
* @param payload Extra data to pass to filter
*/
GIT_EXTERN(void) git_treebuilder_filter(
git_treebuilder *bld,
git_treebuilder_filter_cb filter,
void *payload);
/**
* Write the contents of the tree builder as a tree object
*
* The tree builder will be written to the given `repo`, and its
* identifying SHA1 hash will be stored in the `id` pointer.
*
* @param id Pointer to store the OID of the newly written tree
* @param repo Repository in which to store the object
* @param bld Tree builder to write
* @return 0 or an error code
*/
GIT_EXTERN(int) git_treebuilder_write(
git_oid *id, git_repository *repo, git_treebuilder *bld);
/** Callback for the tree traversal method */
typedef int (*git_treewalk_cb)(
const char *root, const git_tree_entry *entry, void *payload);
/** Tree traversal modes */
typedef enum {
GIT_TREEWALK_PRE = 0, /* Pre-order */
GIT_TREEWALK_POST = 1, /* Post-order */
} git_treewalk_mode;
/**
* Traverse the entries in a tree and its subtrees in post or pre order.
*
* The entries will be traversed in the specified order, children subtrees
* will be automatically loaded as required, and the `callback` will be
* called once per entry with the current (relative) root for the entry and
* the entry data itself.
*
* If the callback returns a positive value, the passed entry will be
* skipped on the traversal (in pre mode). A negative value stops the walk.
*
* @param tree The tree to walk
* @param mode Traversal mode (pre or post-order)
* @param callback Function to call on each tree entry
* @param payload Opaque pointer to be passed on each callback
* @return 0 or an error code
*/
GIT_EXTERN(int) git_tree_walk(
const git_tree *tree,
git_treewalk_mode mode,
git_treewalk_cb callback,
void *payload);
/** @} */
GIT_END_DECL
#endif
-198
Ver Arquivo
@@ -1,198 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_types_h__
#define INCLUDE_git_types_h__
#include "common.h"
/**
* @file git2/types.h
* @brief libgit2 base & compatibility types
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Cross-platform compatibility types for off_t / time_t
*
* NOTE: This needs to be in a public header so that both the library
* implementation and client applications both agree on the same types.
* Otherwise we get undefined behavior.
*
* Use the "best" types that each platform provides. Currently we truncate
* these intermediate representations for compatibility with the git ABI, but
* if and when it changes to support 64 bit types, our code will naturally
* adapt.
* NOTE: These types should match those that are returned by our internal
* stat() functions, for all platforms.
*/
#include <sys/types.h>
#ifdef __amigaos4__
#include <stdint.h>
#endif
#if defined(_MSC_VER)
typedef __int64 git_off_t;
typedef __time64_t git_time_t;
#elif defined(__MINGW32__)
typedef off64_t git_off_t;
typedef __time64_t git_time_t;
#elif defined(__HAIKU__)
typedef __haiku_std_int64 git_off_t;
typedef __haiku_std_int64 git_time_t;
#else /* POSIX */
/*
* Note: Can't use off_t since if a client program includes <sys/types.h>
* before us (directly or indirectly), they'll get 32 bit off_t in their client
* app, even though /we/ define _FILE_OFFSET_BITS=64.
*/
typedef int64_t git_off_t;
typedef int64_t git_time_t;
#endif
/** Basic type (loose or packed) of any Git object. */
typedef enum {
GIT_OBJ_ANY = -2, /**< Object can be any of the following */
GIT_OBJ_BAD = -1, /**< Object is invalid. */
GIT_OBJ__EXT1 = 0, /**< Reserved for future use. */
GIT_OBJ_COMMIT = 1, /**< A commit object. */
GIT_OBJ_TREE = 2, /**< A tree (directory listing) object. */
GIT_OBJ_BLOB = 3, /**< A file revision object. */
GIT_OBJ_TAG = 4, /**< An annotated tag object. */
GIT_OBJ__EXT2 = 5, /**< Reserved for future use. */
GIT_OBJ_OFS_DELTA = 6, /**< A delta, base is given by an offset. */
GIT_OBJ_REF_DELTA = 7, /**< A delta, base is given by object id. */
} git_otype;
/** An open object database handle. */
typedef struct git_odb git_odb;
/** A custom backend in an ODB */
typedef struct git_odb_backend git_odb_backend;
/** An object read from the ODB */
typedef struct git_odb_object git_odb_object;
/** A stream to read/write from the ODB */
typedef struct git_odb_stream git_odb_stream;
/** A stream to write a packfile to the ODB */
typedef struct git_odb_writepack git_odb_writepack;
/**
* Representation of an existing git repository,
* including all its object contents
*/
typedef struct git_repository git_repository;
/** Representation of a generic object in a repository */
typedef struct git_object git_object;
/** Representation of an in-progress walk through the commits in a repo */
typedef struct git_revwalk git_revwalk;
/** Parsed representation of a tag object. */
typedef struct git_tag git_tag;
/** In-memory representation of a blob object. */
typedef struct git_blob git_blob;
/** Parsed representation of a commit object. */
typedef struct git_commit git_commit;
/** Representation of each one of the entries in a tree object. */
typedef struct git_tree_entry git_tree_entry;
/** Representation of a tree object. */
typedef struct git_tree git_tree;
/** Constructor for in-memory trees */
typedef struct git_treebuilder git_treebuilder;
/** Memory representation of an index file. */
typedef struct git_index git_index;
/** Memory representation of a set of config files */
typedef struct git_config git_config;
/** Interface to access a configuration file */
typedef struct git_config_backend git_config_backend;
/** Representation of a reference log entry */
typedef struct git_reflog_entry git_reflog_entry;
/** Representation of a reference log */
typedef struct git_reflog git_reflog;
/** Representation of a git note */
typedef struct git_note git_note;
/** Representation of a git packbuilder */
typedef struct git_packbuilder git_packbuilder;
/** Time in a signature */
typedef struct git_time {
git_time_t time; /** time in seconds from epoch */
int offset; /** timezone offset, in minutes */
} git_time;
/** An action signature (e.g. for committers, taggers, etc) */
typedef struct git_signature {
char *name; /** full name of the author */
char *email; /** email of the author */
git_time when; /** time when the action happened */
} git_signature;
/** In-memory representation of a reference. */
typedef struct git_reference git_reference;
/** Basic type of any Git reference. */
typedef enum {
GIT_REF_INVALID = 0, /** Invalid reference */
GIT_REF_OID = 1, /** A reference which points at an object id */
GIT_REF_SYMBOLIC = 2, /** A reference which points at another reference */
GIT_REF_PACKED = 4,
GIT_REF_HAS_PEEL = 8,
GIT_REF_LISTALL = GIT_REF_OID|GIT_REF_SYMBOLIC|GIT_REF_PACKED,
} git_ref_t;
/** Basic type of any Git branch. */
typedef enum {
GIT_BRANCH_LOCAL = 1,
GIT_BRANCH_REMOTE = 2,
} git_branch_t;
/** Valid modes for index and tree entries. */
typedef enum {
GIT_FILEMODE_NEW = 0000000,
GIT_FILEMODE_TREE = 0040000,
GIT_FILEMODE_BLOB = 0100644,
GIT_FILEMODE_BLOB_EXECUTABLE = 0100755,
GIT_FILEMODE_LINK = 0120000,
GIT_FILEMODE_COMMIT = 0160000,
} git_filemode_t;
typedef struct git_refspec git_refspec;
typedef struct git_remote git_remote;
typedef struct git_push git_push;
typedef struct git_remote_head git_remote_head;
typedef struct git_remote_callbacks git_remote_callbacks;
/** @} */
GIT_END_DECL
#endif
-15
Ver Arquivo
@@ -1,15 +0,0 @@
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_git_version_h__
#define INCLUDE_git_version_h__
#define LIBGIT2_VERSION "0.17.0"
#define LIBGIT2_VER_MAJOR 0
#define LIBGIT2_VER_MINOR 17
#define LIBGIT2_VER_REVISION 0
#endif
-50
Ver Arquivo
@@ -1,50 +0,0 @@
{
'variables': {
'includes_common': [
'git2/include/git2.h',
'git2/include/git2/attr.h',
'git2/include/git2/blob.h',
'git2/include/git2/branch.h',
'git2/include/git2/commit.h',
'git2/include/git2/common.h',
'git2/include/git2/config.h',
'git2/include/git2/diff.h',
'git2/include/git2/errors.h',
'git2/include/git2/index.h',
'git2/include/git2/indexer.h',
'git2/include/git2/merge.h',
'git2/include/git2/net.h',
'git2/include/git2/notes.h',
'git2/include/git2/object.h',
'git2/include/git2/odb.h',
'git2/include/git2/odb_backend.h',
'git2/include/git2/oid.h',
'git2/include/git2/reflog.h',
'git2/include/git2/refs.h',
'git2/include/git2/refspec.h',
'git2/include/git2/remote.h',
'git2/include/git2/repository.h',
'git2/include/git2/revwalk.h',
'git2/include/git2/signature.h',
'git2/include/git2/status.h',
'git2/include/git2/submodule.h',
'git2/include/git2/tag.h',
'git2/include/git2/threads.h',
'git2/include/git2/tree.h',
'git2/include/git2/types.h',
'git2/include/git2/version.h',
'git2/include/git2/checkout.h',
'git2/include/git2/clone.h',
'git2/include/git2/ignore.h',
'git2/include/git2/message.h',
'git2/include/git2/pack.h',
'git2/include/git2/reset.h',
'git2/include/git2/revparse.h',
'git2/include/git2/strarray.h',
'git2/include/git2/graph.h',
'git2/include/git2/push.h',
'git2/include/git2/stash.h',
'git2/include/git2/transport.h',
],
}
}
+29
Ver Arquivo
@@ -0,0 +1,29 @@
'body':
'meta-up': 'core:move-to-top'
'meta-down': 'core:move-to-bottom'
'meta-shift-up': 'core:select-to-top'
'meta-shift-down': 'core:select-to-bottom'
'.editor':
'meta-left': 'editor:move-to-first-character-of-line'
'meta-right': 'editor:move-to-end-of-line'
'meta-shift-left': 'editor:select-to-first-character-of-line'
'meta-shift-right': 'editor:select-to-end-of-line'
'home': 'editor:move-to-first-character-of-line'
'end': 'editor:move-to-end-of-line'
'shift-home': 'editor:select-to-first-character-of-line'
'shift-end': 'editor:select-to-end-of-line'
'alt-left': 'editor:move-to-previous-word-boundary'
'alt-right': 'editor:move-to-next-word-boundary'
'alt-shift-left': 'editor:select-to-previous-word-boundary'
'alt-shift-right': 'editor:select-to-next-word-boundary'
'alt-backspace': 'editor:backspace-to-beginning-of-word'
'meta-backspace': 'editor:backspace-to-beginning-of-line'
'alt-delete': 'editor:delete-to-end-of-word'
'ctrl-t': 'editor:transpose'
'ctrl-A': 'editor:select-to-first-character-of-line'
'ctrl-E': 'editor:select-to-end-of-line'
+97
Ver Arquivo
@@ -0,0 +1,97 @@
'body':
'meta-q': 'application:quit'
'meta-h': 'application:hide'
'meta-H': 'application:hide-other-applications'
'meta-n': 'application:new-file'
'meta-N': 'application:new-window'
'meta-o': 'application:open'
'meta-O': 'application:open-dev'
'meta-m': 'application:minimize'
'meta-,': 'application:show-settings'
'alt-meta-ctrl-m': 'application:zoom'
'meta-alt-ctrl-s': 'application:run-all-specs'
'meta-s': 'core:save'
'meta-S': 'core:save-as'
'enter': 'core:confirm'
'escape': 'core:cancel'
'meta-w': 'core:close'
'up': 'core:move-up'
'down': 'core:move-down'
'left': 'core:move-left'
'right': 'core:move-right'
'shift-up': 'core:select-up'
'shift-down': 'core:select-down'
'shift-left': 'core:select-left'
'shift-right': 'core:select-right'
'meta-a': 'core:select-all'
'backspace': 'core:backspace'
'shift-backspace': 'core:backspace'
'delete': 'core:delete'
'meta-z': 'core:undo'
'meta-Z': 'core:redo'
'meta-y': 'core:redo'
'meta-x': 'core:cut'
'meta-c': 'core:copy'
'meta-v': 'core:paste'
'pageup': 'core:page-up'
'pagedown': 'core:page-down'
'meta-alt-s': 'window:save-all'
'meta-W': 'window:close'
'meta-+': 'window:increase-font-size'
'meta--': 'window:decrease-font-size'
'ctrl-w w': 'window:focus-next-pane'
'ctrl-tab': 'window:focus-next-pane'
'ctrl-meta-f': 'window:toggle-full-screen'
'ctrl-alt-meta-r': 'window:reload'
'alt-meta-i': 'window:toggle-dev-tools'
'meta-alt-ctrl-p': 'window:run-package-specs'
'ctrl-|': 'pane:split-right'
'ctrl-w v': 'pane:split-right'
'ctrl--': 'pane:split-down'
'ctrl-w s': 'pane:split-down'
'meta-{': 'pane:show-previous-item'
'meta-}': 'pane:show-next-item'
'alt-meta-left': 'pane:show-previous-item'
'alt-meta-right': 'pane:show-next-item'
'meta-1': 'pane:show-item-1'
'meta-2': 'pane:show-item-2'
'meta-3': 'pane:show-item-3'
'meta-4': 'pane:show-item-4'
'meta-5': 'pane:show-item-5'
'meta-6': 'pane:show-item-6'
'meta-7': 'pane:show-item-7'
'meta-8': 'pane:show-item-8'
'meta-9': 'pane:show-item-9'
'meta-T': 'pane:reopen-closed-item'
'alt-meta-w': 'pane:close-other-items'
'meta-P': 'pane:close'
'.tool-panel':
'meta-escape': 'tool-panel:unfocus'
'escape': 'core:close'
'meta-w': 'noop'
# allow standard input fields to work correctly
'input:not(.hidden-input)':
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
'left': 'native!'
'right': 'native!'
'shift-left': 'native!'
'shift-right': 'native!'
'backspace': 'native!'
'shift-backspace': 'native!'
'delete': 'native!'
'meta-z': 'native!'
'meta-Z': 'native!'
'meta-x': 'native!'
'meta-c': 'native!'
'meta-v': 'native!'
'button':
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
@@ -1,54 +1,50 @@
'body':
'meta-T': 'editor:undo-close-session'
'.editor':
'meta-s': 'editor:save'
'meta-S': 'editor:save-as'
'ctrl-K': 'editor:delete-line'
'ctrl-W': 'editor:select-word'
'meta-alt-p': 'editor:log-cursor-scope'
'meta-u': 'editor:upper-case'
'meta-U': 'editor:lower-case'
'.editor:not(.mini)':
'enter': 'editor:newline'
'meta-enter': 'editor:newline-below'
'meta-shift-enter': 'editor:newline-above'
'tab': 'editor:indent'
'meta-=': 'editor:auto-indent'
'meta-d': 'editor:delete-line'
'ctrl-[': 'editor:fold-current-row'
'ctrl-]': 'editor:unfold-current-row'
'ctrl-{': 'editor:fold-all'
'ctrl-}': 'editor:unfold-all'
'ctrl-meta-1': 'editor:fold-at-indent-level-1'
'ctrl-meta-2': 'editor:fold-at-indent-level-2'
'ctrl-meta-3': 'editor:fold-at-indent-level-3'
'ctrl-meta-4': 'editor:fold-at-indent-level-4'
'ctrl-meta-5': 'editor:fold-at-indent-level-5'
'ctrl-meta-6': 'editor:fold-at-indent-level-6'
'ctrl-meta-7': 'editor:fold-at-indent-level-7'
'ctrl-meta-8': 'editor:fold-at-indent-level-8'
'ctrl-meta-9': 'editor:fold-at-indent-level-9'
'alt-shift-down': 'editor:add-selection-below'
'alt-shift-up': 'editor:add-selection-above'
'alt-meta-ctrl-f': 'editor:fold-selection'
'ctrl-|': 'editor:split-right'
'ctrl-w v': 'editor:split-right'
'ctrl--': 'editor:split-down'
'ctrl-w s': 'editor:split-down'
'shift-tab': 'editor:outdent-selected-rows'
'meta-[': 'editor:outdent-selected-rows'
'meta-]': 'editor:indent-selected-rows'
'meta-{': 'editor:show-previous-buffer'
'meta-}': 'editor:show-next-buffer'
'alt-meta-left': 'editor:show-previous-buffer'
'alt-meta-right': 'editor:show-next-buffer'
'meta-1': 'editor:show-buffer-1'
'meta-2': 'editor:show-buffer-2'
'meta-3': 'editor:show-buffer-3'
'meta-4': 'editor:show-buffer-4'
'meta-5': 'editor:show-buffer-5'
'meta-6': 'editor:show-buffer-6'
'meta-7': 'editor:show-buffer-7'
'meta-8': 'editor:show-buffer-8'
'meta-9': 'editor:show-buffer-9'
'meta-/': 'editor:toggle-line-comments'
'ctrl-W': 'editor:select-word'
'meta-alt-p': 'editor:log-cursor-scope'
'meta-u': 'editor:upper-case'
'meta-U': 'editor:lower-case'
'alt-meta-w': 'editor:close-other-edit-sessions'
'meta-P': 'editor:close-all-edit-sessions'
'meta-L': 'editor:select-grammar'
'ctrl-C': 'editor:copy-path'
'ctrl-meta-up': 'editor:move-line-up'
'ctrl-meta-down': 'editor:move-line-down'
'meta-D': 'editor:duplicate-line'
'meta-j': 'editor:join-line'
'meta-<': 'editor:scroll-to-cursor'
'.editor.mini':
'enter': 'core:confirm',
'escape': 'core:cancel'
'meta-w': 'core:cancel'
'.editor !important, .editor.mini !important':
'escape': 'editor:consolidate-selections'
@@ -7,6 +7,8 @@
'ctrl-N': 'core:select-down'
'ctrl-F': 'core:select-right'
'ctrl-B': 'core:select-left'
'alt-ctrl-n': 'editor:add-selection-below'
'alt-ctrl-p': 'editor:add-selection-above'
'ctrl-h': 'core:backspace'
'ctrl-d': 'core:delete'
@@ -20,3 +22,12 @@
'alt-h': 'editor:backspace-to-beginning-of-word'
'alt-d': 'editor:delete-to-end-of-word'
'ctrl-k': 'editor:cut-to-end-of-line'
# allow standard input fields to work correctly
'input:not(.hidden-input)':
'ctrl-b': 'native!'
'ctrl-f': 'native!'
'ctrl-F': 'native!'
'ctrl-B': 'native!'
'ctrl-h': 'native!'
'ctrl-d': 'native!'
+4
Ver Arquivo
@@ -0,0 +1,4 @@
'.select-list .mini.editor':
'enter': 'core:confirm'
'escape': 'core:cancel'
'meta-w': 'core:cancel'
+185
Ver Arquivo
@@ -0,0 +1,185 @@
'menu': [
{
label: 'Atom'
submenu: [
{ label: 'About Atom', command: 'application:about' }
{ label: "VERSION", enabled: false }
{ label: "Install update", command: 'application:install-update', visible: false }
{ type: 'separator' }
{ label: 'Preferences...', command: 'application:show-settings' }
{ type: 'separator' }
{ label: 'Hide Atom', command: 'application:hide' }
{ label: 'Hide Others', command: 'application:hide-other-applications' }
{ label: 'Show All', command: 'application:unhide-all-applications' }
{ type: 'separator' }
{ label: 'Quit', command: 'application:quit' }
]
}
{
label: 'File'
submenu: [
{ label: 'New Window', command: 'application:new-window' }
{ label: 'New File', command: 'application:new-file' }
{ label: 'Open...', command: 'application:open' }
{ label: 'Reopen Last Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: 'Save', command: 'core:save' }
{ label: 'Save As...', command: 'core:save-as' }
{ label: 'Save All', command: 'window:save-all' }
{ type: 'separator' }
{ label: 'Close Buffer', command: 'core:close' }
{ label: 'Close All Buffers', command: 'pane:close' }
{ label: 'Close Window', command: 'window:close' }
]
}
{
label: 'Edit'
submenu: [
{ label: 'Undo', command: 'core:undo' }
{ label: 'Redo', command: 'core:redo' }
{ type: 'separator' }
{ label: 'Cut', command: 'core:cut' }
{ label: 'Copy', command: 'core:copy' }
{ label: 'Copy Path', command: 'editor:copy-path' }
{ label: 'Paste', command: 'core:paste' }
{ label: 'Select All', command: 'core:select-all' }
{ type: 'separator' }
{ label: 'Toggle Comments', command: 'editor:toggle-line-comments' }
{
label: 'Lines',
submenu: [
{ label: 'Indent', command: 'editor:indent-selected-rows' }
{ label: 'Outdent', command: 'editor:outdent-selected-rows' }
{ label: 'Auto Indent', command: 'editor:auto-indent' }
{ type: 'separator' }
{ label: 'Move Line Up', command: 'editor:move-line-up' }
{ label: 'Move Line Down', command: 'editor:move-line-down' }
{ label: 'Duplicate Line', command: 'editor:duplicate-line' }
{ label: 'Delete Line', command: 'editor:delete-line' }
{ label: 'Join Lines', command: 'editor:join-line' }
]
}
{
label: 'Text',
submenu: [
{ label: 'Upper Case', command: 'editor:upper-case' }
{ label: 'Lower Case', command: 'editor:lower-case' }
{ type: 'separator' }
{ label: 'Delete to End of Word', command: 'editor:delete-to-end-of-word' }
{ label: 'Delete Line', command: 'editor:delete-line' }
{ type: 'separator' }
{ label: 'Transpose', command: 'editor:transpose' }
]
}
{
label: 'Folding',
submenu: [
{ label: 'Fold', command: 'editor:fold-current-row' }
{ label: 'Unfold', command: 'editor:unfold-current-row' }
{ label: 'Unfold All', command: 'editor:unfold-all' }
{ type: 'separator' }
{ label: 'Fold All', command: 'editor:fold-all' }
{ label: 'Fold Level 1', command: 'editor:fold-at-indent-level-1' }
{ label: 'Fold Level 2', command: 'editor:fold-at-indent-level-2' }
{ label: 'Fold Level 3', command: 'editor:fold-at-indent-level-3' }
{ label: 'Fold Level 4', command: 'editor:fold-at-indent-level-4' }
{ label: 'Fold Level 5', command: 'editor:fold-at-indent-level-5' }
{ label: 'Fold Level 6', command: 'editor:fold-at-indent-level-6' }
{ label: 'Fold Level 7', command: 'editor:fold-at-indent-level-7' }
{ label: 'Fold Level 8', command: 'editor:fold-at-indent-level-8' }
{ label: 'Fold Level 9', command: 'editor:fold-at-indent-level-9' }
]
}
]
}
{
label: 'Selection'
submenu: [
{ label: 'Add Selection Above', command: 'editor:add-selection-above' }
{ label: 'Add Selection Below', command: 'editor:add-selection-below' }
{ type: 'separator' }
{ label: 'Select to Top', command: 'core:select-to-top' }
{ label: 'Select to Bottom', command: 'core:select-to-bottom' }
{ type: 'separator' }
{ label: 'Select Line', command: 'editor:select-line' }
{ label: 'Select Word', command: 'editor:select-word' }
{ label: 'Select to Beginning of Word', command: 'editor:select-to-beginning-of-word' }
{ label: 'Select to Beginning of Line', command: 'editor:select-to-beginning-of-line' }
{ label: 'Select to First Character of Line', command: 'editor:select-to-first-character-of-line' }
{ label: 'Select to End of Word', command: 'editor:select-to-end-of-word' }
{ label: 'Select to End of Line', command: 'editor:select-to-end-of-line' }
]
}
{
label: 'Movement'
submenu: [
{ label: 'Move to Top', command: 'core:move-to-top' }
{ label: 'Move to Bottom', command: 'core:move-to-bottom' }
{ type: 'separator' }
{ label: 'Move to Beginning of Line', command: 'editor:move-to-beginning-of-line' }
{ label: 'Move to First Character of Line', command: 'editor:move-to-first-character-of-line' }
{ label: 'Move to End of Line', command: 'editor:move-to-end-of-line' }
{ type: 'separator' }
{ label: 'Move to Beginning of Word', command: 'editor:move-to-beginning-of-word' }
{ label: 'Move to End of Word', command: 'editor:move-to-end-of-word' }
{ label: 'Move to Next Word', command: 'editor:move-to-next-word-boundary' }
{ label: 'Move to Previous Word', command: 'editor:move-to-previous-word-boundary' }
]
}
{
label: 'Find'
submenu: []
}
{
label: 'View'
submenu: [
{ label: 'Reload', command: 'window:reload' }
{ label: 'Toggle Full Screen', command: 'window:toggle-full-screen' }
{
label: 'Developer'
submenu: [
{ label: 'Open In Dev Mode...', command: 'application:open-dev' }
{ label: 'Run Atom Specs', command: 'application:run-all-specs' }
{ label: 'Run Package Specs', command: 'window:run-package-specs' }
{ label: 'Toggle Developer Tools', command: 'window:toggle-dev-tools' }
]
}
{ type: 'separator' }
{ label: 'Toggle Soft Wrap', command: 'editor:toggle-soft-wrap' }
]
}
{
label: 'Collaboration'
submenu: []
}
{
label: 'Packages'
submenu: []
}
{
label: 'Window'
submenu: [
{ label: 'Minimize', command: 'application:minimize' }
{ label: 'Zoom', command: 'application:zoom' }
{ type: 'separator' }
{ label: 'Bring All to Front', command: 'application:bring-all-windows-to-front' }
]
}
{
label: 'Help'
submenu: [
{ label: 'Documentation', command: 'application:open-documentation' }
{ label: 'Report an Issue', command: 'application:report-issue' }
{ type: 'separator' }
]
}
]
-30
Ver Arquivo
@@ -1,30 +0,0 @@
#include "include/cef_app.h"
#include "include/cef_application_mac.h"
class AtomCefClient;
@interface AtomApplication : NSApplication <CefAppProtocol, NSApplicationDelegate> {
IBOutlet NSMenuItem *_versionMenuItem;
NSWindowController *_backgroundWindowController;
NSDictionary *_arguments;
NSInvocation *_updateInvocation;
NSString *_updateStatus;
BOOL _filesOpened;
BOOL _handlingSendEvent;
}
+ (AtomApplication *)sharedApplication;
+ (id)applicationWithArguments:(char **)argv count:(int)argc;
+ (CefSettings)createCefSettings;
+ (NSDictionary *)parseArguments:(char **)argv count:(int)argc;
- (void)open:(NSString *)path;
- (void)open:(NSString *)path pidToKillWhenWindowCloses:(NSNumber *)pid;
- (IBAction)runSpecs:(id)sender;
- (IBAction)runBenchmarks:(id)sender;
- (void)runSpecsThenExit:(BOOL)exitWhenDone;
- (NSDictionary *)arguments;
- (void)runBenchmarksThenExit:(BOOL)exitWhenDone;
@property (nonatomic, retain) NSDictionary *arguments;
@end
-289
Ver Arquivo
@@ -1,289 +0,0 @@
#import "include/cef_application_mac.h"
#import "native/atom_cef_client.h"
#import "native/atom_application.h"
#import "native/atom_window_controller.h"
#import "native/atom_cef_app.h"
#import <getopt.h>
#import <Sparkle/Sparkle.h>
@implementation AtomApplication
@synthesize arguments=_arguments;
+ (AtomApplication *)sharedApplication {
return (AtomApplication *)[super sharedApplication];
}
+ (id)applicationWithArguments:(char **)argv count:(int)argc {
AtomApplication *application = [self sharedApplication];
CefInitialize(CefMainArgs(argc, argv), [self createCefSettings], new AtomCefApp);
application.arguments = [self parseArguments:argv count:argc];
return application;
}
+ (NSDictionary *)parseArguments:(char **)argv count:(int)argc {
NSMutableDictionary *arguments = [[NSMutableDictionary alloc] init];
// Remove non-posix (i.e. -long_argument_with_one_leading_hyphen) added by OS X from the command line
int cleanArgc = argc;
size_t argvSize = argc * sizeof(char *);
char **cleanArgv = (char **)alloca(argvSize);
for (int i=0; i < argc; i++) {
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { // Xcode inserts useless command-line args by default: http://trac.wxwidgets.org/ticket/13732
cleanArgc -= 2;
i++;
}
else if (strncmp(argv[i], "-psn_", 5) == 0) { // OS X inserts a -psn_[PID] argument.
cleanArgc -= 1;
}
else {
cleanArgv[i] = argv[i];
}
}
int opt;
int longindex;
static struct option longopts[] = {
{ "executed-from", required_argument, NULL, 'K' },
{ "resource-path", required_argument, NULL, 'R' },
{ "benchmark", no_argument, NULL, 'B' },
{ "test", no_argument, NULL, 'T' },
{ "dev", no_argument, NULL, 'D' },
{ "pid", required_argument, NULL, 'P' },
{ "wait", no_argument, NULL, 'W' },
{ NULL, 0, NULL, 0 }
};
while ((opt = getopt_long(cleanArgc, cleanArgv, "K:R:BYDP:Wh?", longopts, &longindex)) != -1) {
NSString *key, *value;
switch (opt) {
case 'K':
case 'R':
case 'B':
case 'T':
case 'D':
case 'W':
case 'P':
key = [NSString stringWithUTF8String:longopts[longindex].name];
value = optarg ? [NSString stringWithUTF8String:optarg] : @"YES";
[arguments setObject:value forKey:key];
break;
case 0:
break;
default:
NSLog(@"usage: atom [--resource-path=<path>] [<path>]");
}
}
cleanArgc -= optind;
cleanArgv += optind;
if (cleanArgc > 0) {
NSString *path = [NSString stringWithUTF8String:cleanArgv[0]];
path = [self standardizePathToOpen:path withArguments:arguments];
[arguments setObject:path forKey:@"path"];
} else {
NSString *executedFromPath = [arguments objectForKey:@"executed-from"];
if (executedFromPath) {
[arguments setObject:executedFromPath forKey:@"path"];
}
}
return arguments;
}
+ (NSString *)standardizePathToOpen:(NSString *)path withArguments:(NSDictionary *)arguments {
NSString *standardizedPath = path;
NSString *executedFromPath = [arguments objectForKey:@"executed-from"];
if (![standardizedPath isAbsolutePath] && executedFromPath) {
standardizedPath = [executedFromPath stringByAppendingPathComponent:standardizedPath];
}
standardizedPath = [standardizedPath stringByStandardizingPath];
return standardizedPath;
}
+ (NSString *)supportDirectory {
NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *executableName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleExecutable"];
NSString *supportDirectory = [cachePath stringByAppendingPathComponent:executableName];
NSFileManager *fs = [NSFileManager defaultManager];
NSError *error;
BOOL success = [fs createDirectoryAtPath:supportDirectory withIntermediateDirectories:YES attributes:nil error:&error];
if (!success) {
NSLog(@"Warning: Can't create support directory '%@' because %@", supportDirectory, [error localizedDescription]);
supportDirectory = @"";
}
return supportDirectory;
}
+ (CefSettings)createCefSettings {
CefSettings settings;
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
NSString *userAgent = [NSString stringWithFormat:@"GitHubAtom/%@", version];
CefString(&settings.cache_path) = [[self supportDirectory] UTF8String];
CefString(&settings.user_agent) = [userAgent UTF8String];
CefString(&settings.log_file) = "";
CefString(&settings.javascript_flags) = "";
settings.remote_debugging_port = 9090;
settings.log_severity = LOGSEVERITY_ERROR;
return settings;
}
- (void)dealloc {
[_backgroundWindowController release];
[_arguments release];
[_updateInvocation release];
[super dealloc];
}
- (void)open:(NSString *)path pidToKillWhenWindowCloses:(NSNumber *)pid {
for (NSWindow *window in [self windows]) {
if (![window isExcludedFromWindowsMenu]) {
AtomWindowController *controller = [window windowController];
if ([path isEqualToString:controller.pathToOpen]) {
[window makeKeyAndOrderFront:nil];
return;
}
}
}
AtomWindowController *windowController = [[AtomWindowController alloc] initWithPath:path];
[windowController setPidToKillOnClose:pid];
return windowController;
}
- (void)open:(NSString *)path {
[self open:path pidToKillWhenWindowCloses:nil];
}
- (void)openDev:(NSString *)path {
[[AtomWindowController alloc] initDevWithPath:path];
}
- (IBAction)runSpecs:(id)sender {
[self runSpecsThenExit:NO];
}
- (void)runSpecsThenExit:(BOOL)exitWhenDone {
[[AtomWindowController alloc] initSpecsThenExit:exitWhenDone];
}
- (IBAction)runBenchmarks:(id)sender {
[self runBenchmarksThenExit:NO];
}
- (void)runBenchmarksThenExit:(BOOL)exitWhenDone {
[[AtomWindowController alloc] initBenchmarksThenExit:exitWhenDone];
}
# pragma mark NSApplicationDelegate
- (BOOL)shouldOpenFiles {
if ([self.arguments objectForKey:@"benchmark"]) {
return NO;
}
if ([self.arguments objectForKey:@"test"]) {
return NO;
}
return YES;
}
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames {
if ([self shouldOpenFiles]) {
for (NSString *path in filenames) {
path = [[self class] standardizePathToOpen:path withArguments:self.arguments];
NSNumber *pid = [self.arguments objectForKey:@"wait"] ? [self.arguments objectForKey:@"pid"] : nil;
[self open:path pidToKillWhenWindowCloses:pid];
}
if ([filenames count] > 0) {
_filesOpened = YES;
}
}
}
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
if (!_filesOpened && [self shouldOpenFiles]) {
NSString *path = [self.arguments objectForKey:@"path"];
NSNumber *pid = [self.arguments objectForKey:@"wait"] ? [self.arguments objectForKey:@"pid"] : nil;
[self open:path pidToKillWhenWindowCloses:pid];
}
}
- (void)applicationWillFinishLaunching:(NSNotification *)notification {
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
_versionMenuItem.title = [NSString stringWithFormat:@"Version %@", version];
if ([self.arguments objectForKey:@"benchmark"]) {
[self runBenchmarksThenExit:true];
}
else if ([self.arguments objectForKey:@"test"]) {
[self runSpecsThenExit:true];
}
else {
_backgroundWindowController = [[AtomWindowController alloc] initInBackground];
if (![self.arguments objectForKey:@"dev"]) {
SUUpdater.sharedUpdater.delegate = self;
SUUpdater.sharedUpdater.automaticallyChecksForUpdates = YES;
SUUpdater.sharedUpdater.automaticallyDownloadsUpdates = YES;
[SUUpdater.sharedUpdater checkForUpdatesInBackground];
}
}
}
- (void)applicationWillTerminate:(NSNotification *)notification {
for (NSWindow *window in [self windows]) {
[window performClose:self];
}
CefShutdown();
}
# pragma mark CefAppProtocol
- (BOOL)isHandlingSendEvent {
return _handlingSendEvent;
}
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
_handlingSendEvent = handlingSendEvent;
}
- (void)sendEvent:(NSEvent*)event {
CefScopedSendingEvent sendingEventScoper;
if ([[self mainMenu] performKeyEquivalent:event]) return;
if (_backgroundWindowController && ![self keyWindow] && [event type] == NSKeyDown) {
[_backgroundWindowController.window makeKeyWindow];
[_backgroundWindowController.window sendEvent:event];
}
else {
[super sendEvent:event];
}
}
#pragma mark SUUpdaterDelegate
- (void)updaterDidNotFindUpdate:(SUUpdater *)update {
}
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update {
}
- (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update {
}
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation {
_updateInvocation = [invocation retain];
_versionMenuItem.title = [NSString stringWithFormat:@"Update to %@", update.versionString];
_versionMenuItem.target = _updateInvocation;
_versionMenuItem.action = @selector(invoke);
}
- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update {
}
@end
-22
Ver Arquivo
@@ -1,22 +0,0 @@
#ifndef ATOM_CEF_APP_H_
#define ATOM_CEF_APP_H_
#pragma once
#include "include/cef_app.h"
#ifdef PROCESS_HELPER_APP
#include "atom_cef_render_process_handler.h"
#endif
class AtomCefApp : public CefApp {
#ifdef PROCESS_HELPER_APP
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE {
return CefRefPtr<CefRenderProcessHandler>(new AtomCefRenderProcessHandler);
}
#endif
IMPLEMENT_REFCOUNTING(AtomCefApp);
};
#endif
-251
Ver Arquivo
@@ -1,251 +0,0 @@
#include <sstream>
#include <iostream>
#include <assert.h>
#include "include/cef_path_util.h"
#include "include/cef_process_util.h"
#include "include/cef_task.h"
#include "include/cef_runnable.h"
#include "include/cef_trace.h"
#include "cef_types.h"
#include "native/atom_cef_client.h"
#include "cef_v8.h"
#define REQUIRE_UI_THREAD() assert(CefCurrentlyOn(TID_UI));
#define REQUIRE_IO_THREAD() assert(CefCurrentlyOn(TID_IO));
#define REQUIRE_FILE_THREAD() assert(CefCurrentlyOn(TID_FILE));
AtomCefClient::AtomCefClient(){
}
AtomCefClient::AtomCefClient(bool handlePasteboardCommands, bool ignoreTitleChanges) {
m_HandlePasteboardCommands = handlePasteboardCommands;
m_IgnoreTitleChanges = ignoreTitleChanges;
}
AtomCefClient::~AtomCefClient() {
}
bool AtomCefClient::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) {
std::string name = message->GetName().ToString();
CefRefPtr<CefListValue> argumentList = message->GetArgumentList();
int messageId = argumentList->GetInt(0);
if (name == "open") {
bool hasArguments = argumentList->GetSize() > 1;
hasArguments ? Open(argumentList->GetString(1)) : Open();
}
if (name == "openDev") {
bool hasArguments = argumentList->GetSize() > 1;
hasArguments ? OpenDev(argumentList->GetString(1)) : OpenDev();
}
else if (name == "newWindow") {
NewWindow();
}
else if (name == "toggleDevTools") {
ToggleDevTools(browser);
}
else if (name == "showDevTools") {
ShowDevTools(browser);
}
else if (name == "confirm") {
std::string message = argumentList->GetString(1).ToString();
std::string detailedMessage = argumentList->GetString(2).ToString();
std::vector<std::string> buttonLabels(argumentList->GetSize() - 3);
for (int i = 3; i < argumentList->GetSize(); i++) {
buttonLabels[i - 3] = argumentList->GetString(i).ToString();
}
Confirm(messageId, message, detailedMessage, buttonLabels, browser);
}
else if (name == "showSaveDialog") {
ShowSaveDialog(messageId, browser);
}
else if (name == "focus") {
GetBrowser()->GetHost()->SetFocus(true);
}
else if (name == "exit") {
Exit(argumentList->GetInt(1));
}
else if (name == "log") {
std::string message = argumentList->GetString(1).ToString();
Log(message.c_str());
}
else if (name == "beginTracing") {
BeginTracing();
}
else if (name == "endTracing") {
EndTracing();
}
else if (name == "show") {
Show(browser);
}
else if (name == "toggleFullScreen") {
ToggleFullScreen(browser);
}
else if (name == "getVersion") {
GetVersion(messageId, browser);
}
else {
return false;
}
return true;
}
void AtomCefClient::OnBeforeContextMenu(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model) {
model->Clear();
model->AddItem(MENU_ID_USER_FIRST, "&Toggle DevTools");
}
bool AtomCefClient::OnContextMenuCommand(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
int command_id,
EventFlags event_flags) {
if (command_id == MENU_ID_USER_FIRST) {
ToggleDevTools(browser);
return true;
}
else {
return false;
}
}
bool AtomCefClient::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
const CefString& message,
const CefString& source,
int line) {
REQUIRE_UI_THREAD();
Log(message.ToString().c_str());
return true;
}
bool AtomCefClient::OnKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event,
CefEventHandle os_event) {
if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'r') {
browser->SendProcessMessage(PID_RENDERER, CefProcessMessage::Create("reload"));
}
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'x') {
browser->GetFocusedFrame()->Cut();
}
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'c') {
browser->GetFocusedFrame()->Copy();
}
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'v') {
browser->GetFocusedFrame()->Paste();
}
else if (event.modifiers == (EVENTFLAG_COMMAND_DOWN | EVENTFLAG_ALT_DOWN) && event.unmodified_character == 'i') {
ToggleDevTools(browser);
} else if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == '`') {
FocusNextWindow();
} else if (event.modifiers == (EVENTFLAG_COMMAND_DOWN | EVENTFLAG_SHIFT_DOWN) && event.unmodified_character == '~') {
FocusPreviousWindow();
}
else {
return false;
}
return true;
}
void AtomCefClient::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
// REQUIRE_UI_THREAD(); // When uncommented this fails when app is terminated
m_Browser = NULL;
}
void AtomCefClient::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
REQUIRE_UI_THREAD();
AutoLock lock_scope(this);
if (!m_Browser.get()) {
m_Browser = browser;
}
GetBrowser()->GetHost()->SetFocus(true);
}
void AtomCefClient::OnLoadError(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
ErrorCode errorCode,
const CefString& errorText,
const CefString& failedUrl) {
REQUIRE_UI_THREAD();
frame->LoadString(std::string(errorText) + "<br />" + std::string(failedUrl), failedUrl);
}
void AtomCefClient::BeginTracing() {
if (CefCurrentlyOn(TID_UI)) {
class Client : public CefTraceClient,
public CefRunFileDialogCallback {
public:
explicit Client(CefRefPtr<AtomCefClient> handler)
: handler_(handler),
trace_data_("{\"traceEvents\":["),
first_(true) {
}
virtual void OnTraceDataCollected(const char* fragment,
size_t fragment_size) OVERRIDE {
if (first_)
first_ = false;
else
trace_data_.append(",");
trace_data_.append(fragment, fragment_size);
}
virtual void OnEndTracingComplete() OVERRIDE {
REQUIRE_UI_THREAD();
trace_data_.append("]}");
handler_->GetBrowser()->GetHost()->RunFileDialog(
FILE_DIALOG_SAVE, CefString(), "/tmp/atom-trace.txt", std::vector<CefString>(),
this);
}
virtual void OnFileDialogDismissed(
CefRefPtr<CefBrowserHost> browser_host,
const std::vector<CefString>& file_paths) OVERRIDE {
if (!file_paths.empty())
handler_->Save(file_paths.front(), trace_data_);
}
private:
CefRefPtr<AtomCefClient> handler_;
std::string trace_data_;
bool first_;
IMPLEMENT_REFCOUNTING(Callback);
};
CefBeginTracing(new Client(this), CefString());
} else {
CefPostTask(TID_UI, NewCefRunnableMethod(this, &AtomCefClient::BeginTracing));
}
}
void AtomCefClient::EndTracing() {
if (CefCurrentlyOn(TID_UI)) {
CefEndTracingAsync();
} else {
CefPostTask(TID_UI, NewCefRunnableMethod(this, &AtomCefClient::BeginTracing));
}
}
bool AtomCefClient::Save(const std::string& path, const std::string& data) {
FILE* f = fopen(path.c_str(), "w");
if (!f)
return false;
fwrite(data.c_str(), data.size(), 1, f);
fclose(f);
return true;
}
-134
Ver Arquivo
@@ -1,134 +0,0 @@
#ifndef ATOM_CEF_CLIENT_H_
#define ATOM_CEF_CLIENT_H_
#pragma once
#include <set>
#include <string>
#include "include/cef_client.h"
class AtomCefClient : public CefClient,
public CefContextMenuHandler,
public CefDisplayHandler,
public CefJSDialogHandler,
public CefKeyboardHandler,
public CefLifeSpanHandler,
public CefLoadHandler,
public CefRequestHandler {
public:
AtomCefClient();
AtomCefClient(bool handlePasteboardCommands, bool ignoreTitleChanges);
virtual ~AtomCefClient();
CefRefPtr<CefBrowser> GetBrowser() { return m_Browser; }
virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() {
return this;
}
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() OVERRIDE {
return this;
}
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) OVERRIDE;
// CefContextMenuHandler methods
virtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model) OVERRIDE;
virtual bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
int command_id,
EventFlags event_flags) OVERRIDE;
// CefDisplayHandler methods
virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,
const CefString& message,
const CefString& source,
int line) OVERRIDE;
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) OVERRIDE;
// CefJsDialogHandlerMethods
virtual bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser,
const CefString& message_text,
bool is_reload,
CefRefPtr<CefJSDialogCallback> callback) {
callback->Continue(true, "");
return true;
}
// CefKeyboardHandler methods
virtual bool OnKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event,
CefEventHandle os_event) OVERRIDE;
// CefLifeSpanHandler methods
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
// CefLoadHandler methods
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
ErrorCode errorCode,
const CefString& errorText,
const CefString& failedUrl) OVERRIDE;
void BeginTracing();
void EndTracing();
bool Save(const std::string& path, const std::string& data);
protected:
CefRefPtr<CefBrowser> m_Browser;
bool m_HandlePasteboardCommands = false;
bool m_IgnoreTitleChanges = false;
void FocusNextWindow();
void FocusPreviousWindow();
void Open(std::string path);
void Open();
void OpenDev(std::string path);
void OpenDev();
void NewWindow();
void ToggleDevTools(CefRefPtr<CefBrowser> browser);
void ShowDevTools(CefRefPtr<CefBrowser> browser);
void Confirm(int replyId,
std::string message,
std::string detailedMessage,
std::vector<std::string> buttonLabels,
CefRefPtr<CefBrowser> browser);
void ShowSaveDialog(int replyId, CefRefPtr<CefBrowser> browser);
CefRefPtr<CefListValue> CreateReplyDescriptor(int replyId, int callbackIndex);
void Exit(int status);
void Log(const char *message);
void Show(CefRefPtr<CefBrowser> browser);
void ToggleFullScreen(CefRefPtr<CefBrowser> browser);
void GetVersion(int replyId, CefRefPtr<CefBrowser> browser);
IMPLEMENT_REFCOUNTING(AtomCefClient);
IMPLEMENT_LOCKING(AtomCefClient);
};
#endif
-63
Ver Arquivo
@@ -1,63 +0,0 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include <gtk/gtk.h>
#include <string>
#include "cefclient/client_handler.h"
#include "include/cef_browser.h"
#include "include/cef_frame.h"
void ClientHandler::OnAddressChange(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& url) {
REQUIRE_UI_THREAD();
if (m_BrowserId == browser->GetIdentifier() && frame->IsMain()) {
// Set the edit window text
std::string urlStr(url);
gtk_entry_set_text(GTK_ENTRY(m_EditHwnd), urlStr.c_str());
}
}
void ClientHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) {
REQUIRE_UI_THREAD();
GtkWidget* window = gtk_widget_get_ancestor(
GTK_WIDGET(browser->GetHost()->GetWindowHandle()),
GTK_TYPE_WINDOW);
std::string titleStr(title);
gtk_window_set_title(GTK_WINDOW(window), titleStr.c_str());
}
void ClientHandler::SendNotification(NotificationType type) {
// TODO(port): Implement this method.
}
void ClientHandler::SetLoading(bool isLoading) {
if (isLoading)
gtk_widget_set_sensitive(GTK_WIDGET(m_StopHwnd), true);
else
gtk_widget_set_sensitive(GTK_WIDGET(m_StopHwnd), false);
}
void ClientHandler::SetNavState(bool canGoBack, bool canGoForward) {
if (canGoBack)
gtk_widget_set_sensitive(GTK_WIDGET(m_BackHwnd), true);
else
gtk_widget_set_sensitive(GTK_WIDGET(m_BackHwnd), false);
if (canGoForward)
gtk_widget_set_sensitive(GTK_WIDGET(m_ForwardHwnd), true);
else
gtk_widget_set_sensitive(GTK_WIDGET(m_ForwardHwnd), false);
}
void ClientHandler::CloseMainWindow() {
// TODO(port): Close main window.
}
std::string ClientHandler::GetDownloadPath(const std::string& file_name) {
return std::string();
}

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