Commit Graph

255 Commits

Author SHA1 Message Date
Ivan Zuzak
fd9f483486 Use thin arrow where possible 2015-09-21 12:55:12 +02:00
Nathan Sobo
37f8661ec6 Use promises instead of Q in Workspace
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-09-18 21:24:59 -06:00
Nathan Sobo
f77cb3786c Terminate all directory searches if any fail
@bolinfest: I was seeing exceptions after the test terminated due to
one of the searches still running. I think since the promise rejects
with “all” semantics that we should cancel any other searches when one
fails. I wouldn’t expect them to continue if the promise is no longer
unresolved.
2015-09-18 20:48:46 -06:00
Antonio Scandurra
9a431a5c97 💚 2015-09-10 18:06:18 +02:00
Andrey Fedorov
f2a1b69a34 Add backticks around URLs for style consistency 2015-09-05 14:24:07 -04:00
Andrey Fedorov
2c7be877c6 Update note explaining the usage of the protocol 2015-09-04 13:28:19 -04:00
Andrey Fedorov
136a30f180 Add a clarification about the usage of addOpener
Documentation augmented with a note about the need of using fake protocol in
order to invoke opener on a file already opened.

See discussion at

https://discuss.atom.io/t/difficulties-using-atom-workspace-addopener/20444
2015-09-04 10:23:40 -04:00
Lee Dohm
73dded1e42 📝 Fix a typo and make recommendation more clear 2015-08-21 13:14:28 -07:00
Nathan Sobo
f9a576b0ce Allow Infinity for initialLine/Column; move specs to workspace
The initialLine and initialColumn behavior belongs on workspace.
2015-08-10 11:32:38 -06:00
Nathan Sobo
69da157ecb Add specs for initialLine and initialColumn, simplify implementation 2015-08-10 11:27:15 -06:00
Jong Eun Lee
93586d2410 fix : workspace.open with initial cursor position bug
When opening already opened file via `atom.workspace.open(path,{ initialLine: 0,  initialColumn: 0, searchAllPanes: true} )`, cursor position doesn't move `[0,0]`.

Expected result:
Whether or not file is opened already, cursor position has to be [0,0].
2015-08-07 19:38:35 +09:00
George Ogata
45694dcda0 Fire event before a pane is destroyed. 2015-07-23 18:47:38 -04:00
Kevin Sawicki
2c37294f3b Handle EINVAL errors on open
Closes atom/tree-view#408
2015-07-20 17:04:17 -07:00
Kevin Sawicki
d2a7012512 Handle ECONNRESET error codes on open
Closes #7946
2015-07-20 15:24:33 -07:00
Max Brunsfeld
c60c00f626 Ignore NaN coordinates passed to workspace.open 2015-07-08 16:50:17 -07:00
Kevin Sawicki
22f7379f32 Handle UNKNOWN open errors 2015-07-08 15:40:43 -07:00
Kevin Sawicki
27a94b4d70 Handle ENOTCONN open errors 2015-07-08 15:40:42 -07:00
Kevin Sawicki
955749b320 Handle EIO open errors 2015-07-08 15:40:42 -07:00
Kevin Sawicki
de4cf38dcc Handle ENXIO open errors 2015-07-08 15:40:42 -07:00
Ivan Žužak
852456fafe Merge pull request #7173 from atom/ns-prompt-on-large-files
Show a warning prompt when opening files over 20MB
2015-06-21 18:17:59 +02:00
Michael Bolin
ad46b37cfe In workspace-spec.coffee, updated FakeSearch to match the spec, which
helped uncover a bug.
2015-06-10 23:30:42 +01:00
Michael Bolin
3c44bc06f4 Revert "Revert "Introduce atom.directory-searcher service v0.1.0.""
This reverts commit 262d41c306.
2015-06-10 23:30:25 +01:00
Max Brunsfeld
262d41c306 Revert "Introduce atom.directory-searcher service v0.1.0." 2015-06-09 11:51:30 -07:00
Michael Bolin
535c0e2f34 Fix documentation bug. 2015-06-09 15:34:10 +01:00
Michael Bolin
6b1b57c89c Rename a variable to reflect a change in the previous commit. 2015-06-09 15:34:10 +01:00
Michael Bolin
0630bce95c Two things:
* Removed the `Directory` argument to `didSearchPaths`.
Now each searcher gets its own instance of `didSearchPaths` that is parameterized by provider.
* Simplified `DefaultDirectorySearcher.search()` so it creates one `DirectorySearch`
rather than one per `Directory` passed to `search()`.
2015-06-09 15:34:10 +01:00
Michael Bolin
18ac7d0cbc Comment excised, as recommended by @maxbrunsfeld. 2015-06-09 15:34:09 +01:00
Michael Bolin
028ac79836 Changed the behavior so that if a searcher rejects,
then the thenable returned by `atom.workspace.scan()` rejects.
2015-06-09 15:34:09 +01:00
Michael Bolin
7dc3d07f8a Changed the contract of DefaultDirectorySearcher in two significant ways:
* `search()` takes an array of `Directory` objects rather than an individual object.
* `options.didSearchPaths` now takes the `Directory` in addition to the `count` as an argument.
2015-06-09 15:34:09 +01:00
Michael Bolin
36123faf5d Changed DefaultDirectorySearcher to take multiple directories.
Still need to update `workspace.coffee` to make better use of this.
2015-06-09 15:34:09 +01:00
Michael Bolin
318498464a Responded to all of @maxbrunsfeld's comments except for:
* The effect of a failed search.
* Letting `DirectorySearcher::search` take multiple directories.

I'm working on those now.
2015-06-09 15:34:09 +01:00
Michael Bolin
5fc9d9e01a Document and test the cancel() method on the object returned by atom.workspace.scan(). 2015-06-09 15:34:09 +01:00
Michael Bolin
f7e822d41f Make delegate method names more delegate-like. 2015-06-09 15:34:09 +01:00
Michael Bolin
4eb30f3925 Switch to the delegate pattern,
eliminating a nasty race condition and deleting a lot of code.
2015-06-09 15:34:09 +01:00
Michael Bolin
4330c3a181 Fix some nits I found during my self-review. 2015-06-09 15:34:08 +01:00
Michael Bolin
7294e0cda4 Change DirectorySearcher to return a DirectorySearch. 2015-06-09 15:34:08 +01:00
Michael Bolin
986640f670 Respond to comments from @maxbrunsfeld and @kevinsawicki. 2015-06-09 15:34:08 +01:00
Michael Bolin
7781e34ba2 Introduce atom.directory-searcher service v0.1.0.
The contract for a provider for the `atom.directory-searcher` service
is defined by the spec of the `DefaultDirectorySearcher`.

This modifies `Workspace::scan()` to use the appropriate `DirectorySearcher`
for each member of `atom.project.getDirectories()` when scanning the workspace
for files that match the specified regex.
2015-06-09 15:34:08 +01:00
Nathan Sobo
5c57cb0cfe Show a warning prompt when opening files over 20MB
We still have some trouble on files this large. I want to show a
progress bar, but for now this is better than freezing without any
warning at all.
2015-06-09 00:02:36 +02:00
Thomas Johansen
fbf58d0725 📝 Remove mention of WorkspaceView which no longer exists
Fixes #7146
2015-06-07 09:30:10 +02:00
Machiste Quintana
c5a8c8ad34 🐛 Fix application:open-license command 2015-05-22 22:05:04 -04:00
Machiste Quintana
a76205256d Only need oldValue 2015-04-28 23:09:31 -04:00
Machiste Quintana
2bd7cc9a99 Reset font size if editor.fontSize is changed from anywhere 2015-04-28 22:58:35 -04:00
Machiste Quintana
12b59cf610 Only reset font size if font size has been changed 2015-04-28 06:27:03 -04:00
Machiste Quintana
f4b228c908 Reset font size to window's starting font size 2015-04-28 06:27:03 -04:00
Ivan Zuzak
02070165e4 Move Grim deprecation calls to correctly attribute them with packages 2015-04-22 15:40:56 +02:00
Ivan Zuzak
74a627d41b Merge pull request #6005 from vegar/patch-1
Documentation: workspace.open( ) with no URI
2015-04-09 15:40:01 +02:00
Ivan Zuzak
b8fb2f4d11 Clarify that URIs don't need to be files 2015-04-09 15:38:48 +02:00
Kevin Sawicki
4160a8c239 Merge pull request #6230 from mnquintana/coffeelint-plus
Lint for more styleguide errors
2015-04-08 12:07:23 -07:00
Kevin Sawicki
2aaf1fffe6 Move stack trace helpers into deprecation block 2015-04-07 09:51:16 -07:00