Commit Graph

285 Commits

Author SHA1 Message Date
Max Brunsfeld
817467f0a8 Merge branch 'master' into fb-mdt-docks 2017-03-30 11:16:21 -07:00
Michelle Tilley
d9b73fa645 Restore state when opening folders to applicable windows
Note: "clean window" is defined as 1) having an empty project and 2)
having no pane items or only empty unnamed buffers

When project is empty and there is saved state associated with the
opened/added folders...
* Open a file or folder (from command line or Open menu)
  * If we have a clean window, restore project state in window
  * If window is dirty, restore saved state in new window
2017-03-22 20:25:57 -07:00
Matthew Dapena-Tretter
62926e6b5b Don't mutate list during iteration
I saw a situation where this was calling `destroy()` on `undefined`—
presumably because destroying one caused the list to be mutated
elsewhere and the indexes to shift.
2017-03-16 14:45:09 -07:00
Damien Guard
e04c31445d Merge pull request #13754 from hron/normalize-disk-drive-letter
Normalize disk drive letter in path on Windows
2017-02-20 09:54:19 -08:00
Aleksei Gusev
fd9dbb6e87 Normalize disk drive letter in path on Windows
Currently atom creates two buffers for the same file if passed
paths use difference case for disk drive letter,
e.g. d:\file.txt and D:\file.txt
2017-02-18 11:32:44 +03:00
Max Brunsfeld
e07dcec54b Avoid emitting path change events while destroying the Project 2017-02-09 13:45:27 -08:00
Damien Guard
83266c7486 Revert "Normalize disk drive letter in path on Windows" 2017-02-06 07:10:18 -08:00
Damien Guard
f3468d2955 Merge pull request #13725 from hron/normalize-disk-drive-letter
Normalize disk drive letter in path on Windows
2017-02-04 17:51:40 -08:00
Aleksei Gusev
ae76925926 Normalize disk drive letter in path on Windows
Currently atom creates two buffers for the same file if passed
paths use difference case for disk drive letter,
e.g. d:\file.txt and D:\file.txt
2017-02-01 18:32:08 +03:00
Ian Olsen
22a881323c Move shouldDestroyBufferOnFileDelete callback to TextBuffer constructor
Also add setting the callback to buffers created via deserialization.
2017-01-20 13:52:49 -08:00
Ian Olsen
dcbd839059 Tell text-buffer to ask about destroying buffers for deleted files 2017-01-19 14:11:41 -08:00
Nathan Sobo
dea7cc23e3 Disable periodic serialization for buffers > 2MB
Writing so much data to IndexedDB is blocking the main thread for
perceptible amounts of time. A patch-based representation of the
modified state could allows us to pay only for what has changed, but is
too complex to justify implementing right now to support full crash
recovery for large files.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2017-01-10 15:55:36 -07:00
Max Brunsfeld
ed5c1c1e15 Don't convert paths to real paths when building text buffers 2017-01-04 14:57:53 -08:00
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Max Brunsfeld
09b50f8740 Don't remove non-local directories on Project deserialization 2016-09-15 16:32:14 -07:00
Max Brunsfeld
fe480d8fa4 Do not add project directories that do not exist
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-09-14 13:48:17 -07:00
Andres Suarez
4ca6eaff34 Add atom.project.observeBuffers
This makes `onDidAddBuffer` symmetrical with other `onDidAddX` methods and their `observeXs`. It also documents `onDidAddBuffer` and adds tests for it.

Released under CC0.
2016-08-22 18:00:54 -07:00
Antonio Scandurra
95932081b2 Recreate repository if the same project is added after being removed
:pear:ed with @nathansobo.
2016-06-20 17:06:50 +02:00
Antonio Scandurra
049321a498 🐛 🔥 Remove double subscription to the same buffer 2016-05-23 18:37:47 +02:00
Antonio Scandurra
ef3ab03d28 Emit {will,did}SavePath on ipcMain before/after a buffer is saved 2016-05-23 18:37:26 +02:00
joshaber
9732874999 Don't log anymore. 2016-04-26 11:02:01 -04:00
joshaber
9fa669b293 Set the initial path after saving in Project. 2016-04-25 17:02:51 -04:00
Ryan Leckey
152e370a15 Default the options parameter to an empty object 2016-03-09 02:16:10 -08:00
Antonio Scandurra
12587073d2 🎨 isQuitting -> isUnloading 2016-03-07 10:52:16 +01:00
Antonio Scandurra
3d15b6e16b Merge branch 'master' into as-serialize-history-without-snapshots 2016-03-07 10:33:52 +01:00
Antonio Scandurra
011fe380e9 Pass markerLayer: false to buffer.serialize when not quitting 2016-03-04 16:57:02 +01:00
Nathan Sobo
47a348f557 Filter out non-directory project paths when deserializing Project
Closes #10628
2016-03-01 18:22:43 -07:00
Lee Dohm
f826d38d0b Merge pull request #10068 from atom/ld-linkify-promise-docs
📝 Linkify all docs mentions of Promises
2016-01-18 00:23:52 -08:00
Valerii Iatsko
3b8375d2b4 This change gives custom repositoryProviders more priority - this wil allow us to override base git repository implementation 2016-01-06 00:05:58 +01:00
Lee Dohm
13f220d285 📝 Linkify all docs mentions of Promises 2015-12-14 20:30:34 -08:00
Antonio Scandurra
a8a9581ef4 🎨 Use only id 2015-12-07 19:57:30 +01:00
Antonio Scandurra
08f48a8a9d 🔥 2015-12-07 15:20:20 +01:00
Antonio Scandurra
f7a4ef4a84 Deserialize also untitled buffers 2015-12-07 14:47:23 +01:00
abe33
2696f49385 🐛 Fix typo in project deserializer method
Addresses #9598
2015-11-16 10:06:35 +01:00
Nathan Sobo
f9a269ed99 Prompt about checking out head revision in TextEditor, not GitRepository
This allows us not to inject confirm or ApplicationDelegate into
Project, GitRepositoryProvider, and GitRepository.
2015-10-13 19:11:55 -06:00
Antonio Scandurra
3ee0be33d5 🐎 Speed up test suite by disposing Project::emitter 2015-10-12 19:46:12 +02:00
Max Brunsfeld
43d0241685 Reset project in AtomEnvironment::reset 2015-10-08 17:54:43 -07:00
Max Brunsfeld
a9c8640ab1 Stop using directory providers when their providing packages are deactivated 2015-10-08 15:20:13 -07:00
Max Brunsfeld
2af6f995b4 Clean up repository-providers when their providing packages are are deactivated 2015-10-08 13:49:37 -07:00
Antonio Scandurra
a3a6db7f68 Don't use atom.{config,confirm} global in GitRepository 2015-10-07 15:25:05 -05:00
Nathan Sobo
eb2ace37b4 Move TextEditor construction to Workspace
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:56 -05:00
Nathan Sobo
3491fa3650 Construct Project during Atom environment construction
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:55 -05:00
Nathan Sobo
26f0ef5424 Move Project.deserialize to instance method
So we can instantiate atom.project during Atom environment construction.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-07 15:24:55 -05:00
Nathan Sobo
e0d426b817 Register deserializers, view providers, and commands in Atom constructor
Previously, these registrations were scattered all over the codebase and
required that `global.atom` be defined, which creating weird ordering
issues. Registering them all from the global makes the relationships
clearer and means we don’t have to assign a global to set up a fully-
functional environment.
2015-10-07 15:24:52 -05:00
Nathan Sobo
d997c80d31 Don’t use Serializable mixin in Project 2015-09-22 10:50:11 -06:00
Nathan Sobo
75f6127b90 🔥 Remove deprecations from Project 2015-09-22 10:37:08 -06:00
Nathan Sobo
bbb92753ca Use promises instead of Q in Project
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2015-09-18 21:24:59 -06:00
Max Brunsfeld
6df058c7f3 Allow adding a root folder that's within another root folder 2015-08-26 15:26:02 -07:00
Ivan Žužak
d32f30780a Massage the message a bit more 2015-06-21 17:48:32 +02:00
Nathan Sobo
04c9567181 Massage message a bit 2015-06-10 01:30:12 +02:00