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.
There is a (minor) racing condition in EditableDiffView and related classes. If the RefreshDiffTask finishes *before* the UI has finished revalidating, it will change the selected difference. See this video http://youtu.be/eRj9IJj1fKM and note how difference 4/5 is automatically selected. Normally 1/5 should be the selected difference. The relevant stacktraces are: org.netbeans.spi.diff.DiffControllerImpl.setDifferenceIndex(DiffControllerImpl.java) org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView.setDifferenceImpl(EditableDiffView.java:500) org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView.access$1600(EditableDiffView.java:114) org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView$2.run(EditableDiffView.java:395) org.netbeans.modules.diff.builtin.visualizer.editable.DiffViewManager.runWithSmartScrollingDisabled(DiffViewManager.java:117) org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView.setLocation(EditableDiffView.java:392) org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView.setCurrentDifference(EditableDiffView.java:763) org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView$RefreshDiffTask$1.run(EditableDiffView.java:1390) and org.netbeans.spi.diff.DiffControllerImpl.setDifferenceIndex(DiffControllerImpl.java) org.netbeans.modules.diff.builtin.visualizer.editable.EditableDiffView.updateCurrentDifference(EditableDiffView.java:801) org.netbeans.modules.diff.builtin.visualizer.editable.DiffViewManager.stateChanged(DiffViewManager.java:152) javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348) javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285) javax.swing.JScrollBar.setValues(JScrollBar.java:592) javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:272) javax.swing.plaf.basic.BasicScrollPaneUI$Handler.viewportStateChanged(BasicScrollPaneUI.java:1067) javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1009) javax.swing.JViewport.fireStateChanged(JViewport.java:1432) javax.swing.JViewport.setViewSize(JViewport.java:1088) javax.swing.ViewportLayout.layoutContainer(ViewportLayout.java:183) java.awt.Container.layout(Container.java:1419) java.awt.Container.doLayout(Container.java:1408) java.awt.Container.validateTree(Container.java:1505) java.awt.Container.validateTree(Container.java:1511) java.awt.Container.validate(Container.java:1478) javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:670)
fix: http://hg.netbeans.org/core-main/rev/fd23b684d70e
Integrated into 'main-golden', will be available in build *201306050626* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/fd23b684d70e User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #227145 - Racing condition in diff module selects another difference after display trying a simple fix: update the difference only when the scrollbar is really moved