Bug 255122 - Completely separate IO stuff from document's handling when reading/reloading document content from file stream
Completely separate IO stuff from document's handling when reading/reloading ...
Status: NEW
Product: platform
Classification: Unclassified
Component: Text
8.1
PC Linux
: P2 (vote)
: 8.2
Assigned To: Miloslav Metelka
issues@editor
: NO81
Depends on:
Blocks: 236761
  Show dependency treegraph
 
Reported: 2015-09-09 08:34 UTC by Miloslav Metelka
Modified: 2016-01-26 14:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2015-09-09 08:34:13 UTC
This is consequence of issue #236439.
On a very slow FS the FileObject.refresh() and reading from a stream can take a considerable time. When document is write-locked during this time the AWT may be waiting on document's readlock so the IDE looks like frozen.

The read and reload operations in o.o.text.DocumentOpenClose should be modified to
1. Perform FO.refresh()
2. Read file content into a String and remember time when the file content was read.
3. Perform Document.runAtomic() and insert the String into the document.

A similar approach should be made for reload but in addition there will be a possibility that the user may type several characters during the reload operations so such situation will have to be handled accordingly.
Comment 1 Miloslav Metelka 2015-09-18 10:43:22 UTC
Issue 236761 (showing dialog for incorrect charset during load) should be possibly be resolved together with this issue.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo