This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 255122 - Completely separate IO stuff from document's handling when reading/reloading document content from file stream
Summary: Completely separate IO stuff from document's handling when reading/reloading ...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Miloslav Metelka
Keywords: NO81
Depends on:
Blocks: 236761
  Show dependency tree
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
Exception Reporter:


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.