Closed
Bug 1011031
Opened 11 years ago
Closed 10 years ago
Project Editor: Reload file that has already been opened when changed on disk
Categories
(DevTools Graveyard :: WebIDE, defect)
DevTools Graveyard
WebIDE
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: bgrins, Assigned: bgrins)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
harth
:
review+
|
Details | Diff | Splinter Review |
STR:
Open a file in itchpad
Edit the same file using a separate editor
Select a different file, then reselect the first in itchpad
Expected:
The new data from the file is loaded into the editor
Actual:
The original data is still in the editor
We don't want to overwrite editor content if the user is still editing a file, but if they've left and come back I think it is safe to reload from disk.
Assignee | ||
Updated•10 years ago
|
Summary: Itchpad: Reload file that has already been opened when changed on disk → Project Editor: Reload file that has already been opened when changed on disk
Assignee | ||
Comment 2•10 years ago
|
||
Most of the changes here are for tests (I've added a new one for detecting external changes and for the image editor plugin). The code changes are to give editors support for their load() functions to be called more than once.
Basically now it will reload the editor whenever selectShell is called. A future optimization could be to only call load() if we have detected a file change in the meantime. So, both (1) and (2) cause reloads, but we could add code to make just (1) reload. This would be quite a bit easier when we have FS.watch.
1) open File A -> navigate to File B -> [some external app edits File A] -> navigate to File A -> Reload from disk
2) open File A -> navigate to File B -> navigate to File A -> Reload from disk
Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=843830f4e916
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #8443480 -
Flags: review?(fayearthur)
Assignee | ||
Comment 3•10 years ago
|
||
Looks like there is a leak on try in browser_projecteditor_editors_image.js - here is another patch with a couple of minor updates that maybe will take care of it.
Attachment #8443480 -
Attachment is obsolete: true
Attachment #8443480 -
Flags: review?(fayearthur)
Attachment #8443572 -
Flags: review?(fayearthur)
Assignee | ||
Comment 4•10 years ago
|
||
OK, got the leak figured out: https://tbpl.mozilla.org/?tree=Try&rev=a4fd3ba46ddd
Attachment #8443572 -
Attachment is obsolete: true
Attachment #8443572 -
Flags: review?(fayearthur)
Attachment #8443955 -
Flags: review?(fayearthur)
Comment 5•10 years ago
|
||
Comment on attachment 8443955 [details] [diff] [review]
file-change.patch
Review of attachment 8443955 [details] [diff] [review]:
-----------------------------------------------------------------
Sublime will automatically reload from disk if you've saved the content of the editor, but if there's anything unsaved it'll ask you before overwriting with the disk contents. We should consider that.
Attachment #8443955 -
Flags: review?(fayearthur) → review+
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Heather Arthur [:harth] from comment #5)
> Comment on attachment 8443955 [details] [diff] [review]
> file-change.patch
>
> Review of attachment 8443955 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Sublime will automatically reload from disk if you've saved the content of
> the editor, but if there's anything unsaved it'll ask you before overwriting
> with the disk contents. We should consider that.
Yeah, I like that idea. I'll file a follow up.
Keywords: checkin-needed
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•5 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•