Commit Graph

21924 Commits

Author SHA1 Message Date
Michael Bolin
746fceb4ed s/repositoryPromisesByDirectory/repositoryPromisesByPath/g 2015-02-11 09:20:50 -08:00
Kevin Sawicki
ce58e7ec78 ⬆️ runas@2
Closes #5493
2015-02-11 09:20:24 -08:00
Michael Bolin
1191db009e Addressing @nathansobo's feedback. 2015-02-11 09:17:25 -08:00
Nathan Sobo
009d945e1e Destroy TextEditorPresenter when unmounting TextEditorComponent
Fixes atom/find-and-replace#348
2015-02-11 09:02:33 -07:00
Nathan Sobo
98e126b40d Remove redundant require 2015-02-11 07:54:54 -07:00
Michael Bolin
e04f17fe5f Set up the atom.repository-provider service and implement GitRepositoryProvider.
I tested this by creating a dummy implementation of an `HgRepositoryProvider`
(with the optional `createRepositorySync()` method implemented) and an `HgRepository`
in an Atom package with the following stanza in the `package.json`:

```
  "providedServices": {
    "atom.repository-provider": {
      "versions": {
        "0.1.0": "createHgRepositoryProvider"
      }
    }
  },
```

I opened a path with an Hg repository from the command line using Atom.
I verified that `atom.project.repositoryProviders` contains both a
`GitRepositoryProvider` and an `HgRepositoryProvider`.

I also verified that running the following printed out an `HgRepository`:

```
var Directory = require('pathwatcher').Directory;
atom.project.repositoryForDirectory(
    new Directory(atom.project.getPath(), /* symlink */ false)).then(
        function(repo) { console.log('repo: %o', repo); });
```

One thing that stands out to me about the current API for the
atom.repository-provider service is that the function used to create
a `RepositoryProvider` does not receive any arguments. If the creation
of the `GitRepositoryProvider` were done via the service, this would
be a problem because it needs a reference to `atom.project`, which is
not defined when it is created. (We work around this because it is
created in `Project`'s constructor, so it can pass `this` to
`new GitRepositoryProvider()`.)

We would have to create a `RepositoryProviderFactory` or something if
we wanted to specify arguments when creating a `RepositoryProvider`,
in general. Maybe that's too crazy / not an issue, in practice.

Though note that `GitRepository` cannot access `atom.project` lazily
because it uses it in its constructor to do the following:

```
if @project?
  @subscriptions.add @project.eachBuffer (buffer) => @subscribeToBuffer(buffer)
```

So long as we can guarantee that `atom.project` is defined before the
other providers are initialized, I think we should be OK.

Follow-up work:
* Replace the use of `RepositoryProvider.createRepositorySync()` with
`RepositoryProvider.repositoryForDirectory()` in `Project.setPaths()`.
* Replace all uses of `Project.getRepositories()` with
`Project.repositoryForDirectory()` in packages that are bundled with Atom
by default.
* Implement `Directory.exists()` and/or `Directory.existsSync()` and update
`git-repositor-provider.coffee`, as appropriate.
* Eliminate `GitRepositoryProvider.repositoryForDirectory()`'s use of
synchronous methods.
* Somewhat orthogonal to this diff, but the following fields need to be
removed from `Project` because they enforce the idea of a single root:
`path`, `rootDirectory`, and `repo`. This has implications around the
existing use of `@rootDirectory?.off()` and `@destroyRepo()`.
2015-02-10 21:46:02 -08:00
Kevin Sawicki
090561eb00 Merge pull request #5487 from atom/ks-dedupe-q
Upgrade and dedupe q
2015-02-10 16:25:38 -08:00
Kevin Sawicki
d0b56ba9af Dedupe q 2015-02-10 16:06:18 -08:00
Kevin Sawicki
0d7a1cb8ca ⬆️ text-buffer@4.1.1 2015-02-10 16:00:23 -08:00
Kevin Sawicki
d2241fca54 ⬆️ settings-view@0.176 2015-02-10 15:57:29 -08:00
Kevin Sawicki
29bf81a7bf ⬆️ symbols-view@0.82 2015-02-10 15:49:18 -08:00
Kevin Sawicki
9e8d6a0a5b ⬆️ pathwatcher@3.1.1 2015-02-10 15:49:04 -08:00
Kevin Sawicki
78c66943a7 ⬆️ q@1.1.2 2015-02-10 15:49:04 -08:00
Kevin Sawicki
03148d56f2 ⬆️ language-clojure@0.12 2015-02-10 15:45:04 -08:00
Kevin Sawicki
199401c532 Prepare 0.179 2015-02-10 15:41:38 -08:00
Nathan Sobo
7f0110f49e Update cursors as soon as all required measurements are assigned v0.178.0 2015-02-10 15:16:58 -07:00
Kevin Sawicki
7d8f26ba61 ⬆️ apm@0.136 2015-02-10 13:54:44 -08:00
Nathan Sobo
f5294454e6 Keep a minimum of 3 lines on screen when scrolling past end 2015-02-10 14:38:20 -07:00
Nathan Sobo
3e9b48ef71 Expand computed scrollHeight when editor.scrollPastEnd is enabled 2015-02-10 14:19:06 -07:00
Kevin Sawicki
f3347fd68c ⬆️ language-python@0.32 2015-02-10 12:45:34 -08:00
Kevin Sawicki
e3028b24d5 ⬆️ styleguide@0.44 2015-02-10 12:38:41 -08:00
Kevin Sawicki
6fdb11eaf0 ⬆️ archive-view@0.47 2015-02-10 12:22:03 -08:00
Nathan Sobo
c69b7ca492 ⬆️ status-bar 2015-02-10 12:48:20 -07:00
Nathan Sobo
746950a347 Default overdrawMargin to 15 even when passed as null from outside 2015-02-10 12:39:34 -07:00
Nathan Sobo
884556c200 Revert "Don’t override lineOverdrawMargin with null"
This reverts commit 04cb43d657.
2015-02-10 12:39:34 -07:00
Max Brunsfeld
0392ac51ba ⬆️ git-diff 2015-02-10 11:28:28 -08:00
Ben Ogle
5c947d0fce ⬆️ notifications@0.27.0 2015-02-10 11:10:48 -08:00
Kevin Sawicki
6d8e6591d9 ⬆️ language-sass@0.34 2015-02-10 11:05:23 -08:00
Daniel Hengeveld
d1a53874f7 ⬆️ language-python 👉 0.31.0 2015-02-10 09:36:59 -08:00
Kevin Sawicki
324a624754 ⬆️ settings-view@0.175 2015-02-10 09:34:41 -08:00
Kevin Sawicki
e606b5fc73 Merge pull request #5316 from atom/sm-badge
Badge component
2015-02-10 09:33:53 -08:00
Kevin Sawicki
cb1f40cd0b ⬆️ tabs@0.65 2015-02-10 09:32:48 -08:00
Nathan Sobo
04cb43d657 Don’t override lineOverdrawMargin with null 2015-02-10 10:15:44 -07:00
Nathan Sobo
a4fd589616 Don’t render line numbers if scrolled past end 2015-02-10 10:11:20 -07:00
Nathan Sobo
711f0a227c Honor the editor.scrollPastEnd option in TextEditorPresenter 2015-02-10 09:47:24 -07:00
Nathan Sobo
89d5dd339e Merge pull request #5293 from atom/ns-editor-presenters
Move all text editor view state into a presenter object
2015-02-09 15:43:14 -07:00
Nathan Sobo
48195851d4 Assign line and character measurements on model via presenter 2015-02-09 15:32:14 -07:00
Nathan Sobo
4f0e1997cf 💄 CharWidth -> CharacterWidth in presenter 2015-02-09 15:28:17 -07:00
Max Brunsfeld
3e28eff755 Remove logic for different promise types in waitsForPromise
I added that logic when using the selenium-webdriver library, but
then switched to using webdriverio, which has the same Promise
interface as Q.
2015-02-09 14:22:13 -08:00
Nathan Sobo
d5719bfbd5 Initialize scopedCharacterWidthsChangeCount to 0 2015-02-09 15:03:31 -07:00
Max Brunsfeld
79d0f296e0 Use path.delimiter 2015-02-09 13:40:07 -08:00
Nathan Sobo
bdfca8b902 Coalesce handling style sheet changes in editor with nextAnimationFrame
Previously, we were delaying handling, but still requesting redundant
handling by requesting multiple frames. Now we don’t request a new
update if there is already one outstanding.
2015-02-09 14:36:30 -07:00
Nathan Sobo
df01c8ab6f Batch scoped character measurement in presenter 2015-02-09 14:33:18 -07:00
Max Brunsfeld
ef9ae8e7d7 Merge pull request #5404 from atom/mb-integration-test
Add integration test to cover browser-side code
2015-02-09 13:11:53 -08:00
Nathan Sobo
0d1ba90561 Update presenter’s gutter background state when background color changes 2015-02-09 13:54:25 -07:00
Nathan Sobo
62c8244bf2 Merge branch 'master' into ns-editor-presenters 2015-02-09 13:37:27 -07:00
Kevin Sawicki
cf0af8c559 ⬆️ language-sass@0.33 2015-02-09 11:03:45 -08:00
Kevin Sawicki
5cc6f6cc8f ⬆️ language-css@0.28 2015-02-09 10:12:43 -08:00
Kevin Sawicki
c8b367e192 ⬆️ Upgrade UI themes for Linux fallback fonts 2015-02-09 09:59:57 -08:00
Kevin Sawicki
ac1cc87037 Use custom document to create test elements 2015-02-09 09:35:38 -08:00