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 246095 - Signal long write-lock sections (such as reformat) by setting a document property and skip document readlock
Summary: Signal long write-lock sections (such as reformat) by setting a document prop...
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks: 241545
  Show dependency tree
 
Reported: 2014-07-29 08:56 UTC by Miloslav Metelka
Modified: 2016-07-07 07:27 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2014-07-29 08:56:07 UTC
Although previously we abandoned the idea due to BasicTextUI.paint() being final:

    public final void paint(Graphics g, JComponent c) {
        if ((rootView.getViewCount() > 0) && (rootView.getView(0) != null)) {
            Document doc = editor.getDocument();
            if (doc instanceof AbstractDocument) {
                ((AbstractDocument)doc).readLock();
            }
            try {
                paintSafely(g);
            } finally {
                if (doc instanceof AbstractDocument) {
                    ((AbstractDocument)doc).readUnlock();
                }
            }
        }
    }

I've found that we could possibly override BasicTextUI.update().
Comment 1 Ondrej Vrabec 2014-07-29 09:28:16 UTC
versioning diff sidebars requires read-lock when painting, it would help if it had a chance to ask whether to repaint or not: bug 241545
Comment 2 Martin Balin 2016-07-07 07:27:02 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss