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.
Try to use FindUsages and you will see SaveAll blinking all the time. More over DataObject.getRegistry() is sending miriad of notification about modified/unmodified objects. Any client which uses doc.runAtomic*(Runnable r) (where doc is BaseDocument derived class) sends notifications about document modification/unmodification. This is due to current impl of atomicLockImpl/atomicUnlockImpl after http://hg.netbeans.org/cnd-main/rev/11f80032f91d In fact when Runnable does only read access may be it is prohibited to use runAtomic, so current impl is correct? => - update runAtomic documentation and ask to prevent read-only access - reassign to refactoring which implements UndoManager.watch using runAtomic (readLock()/readUnlock() should be enough?)
I'm blocked by the issue, so had to put workaround. http://hg.netbeans.org/cnd-main/rev/f58ba02311e1 I think right approach should be: - do not send modification events in atomicLockImpl/atomicUnlockImpl, but send notification with different name to prevent DataObject registry to react on it. - react on it in redo/undo system where previously it reacted on modification event. Btw, use readLock()/readUnlock() is anyway better when only read is don from runnable, but refactoring should be updated as well by removing very expensive FileOwnerQuery from document's lock
Integrated into 'main-golden', will be available in build *201112130600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/f58ba02311e1 User: Vladimir Voskresensky <vv159170@netbeans.org> Log: workaround for #206134 - [regression] Use of FindUsages modifies all documents with references
We need a fix (at least workaround) on UC... Reparse activity on each Find Usages action is unacceptable, especially for big projects.
I'm not familiar much with the refactoring.api code so reassigning to Honza B. Regarding current workaround: better than AbstractDocument.readLock()/readUnlock() would be Document.render().
Mila's workaround is pushed into release71 branch http://hg.netbeans.org/releases/rev/8c5d9956ee7d and release71_fixes http://hg.netbeans.org/releases/rev/d73a2d37b04a
spec versions update: http://hg.netbeans.org/releases/rev/08902b0a5126 http://hg.netbeans.org/releases/rev/6ad31716f83e
I don't understand what I'm required to do. Find Usages does not perform Save All.
Jan, you can leave all as is now in trunk - problem is fixed when instead of write access document is accessed with read only access. But you can still improve workaround and extract i.e. FileOwnerQuery from document's lock
btw issue #206907 is the one which is about introduced regression
Integrated into 'main-golden', will be available in build *201201170601* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5e983b70b0f7 User: Vladimir Voskresensky <vv159170@netbeans.org> Log: better workaround from Mila (#206134 - [regression] Use of FindUsages modifies all documents with references)
*** Bug 208279 has been marked as a duplicate of this bug. ***
verified