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.
This task encapsulates a larger change of editor's view hierarchy code. Primary targets: 1) Make the hierarchy less asynchronous. Currently a ll the layout-related work is by default sent to background. It has to be better decided which work is really long-running and should be done in the background and which should be done synchronously in AWT. This should help to avoid certain undesired visual effects of the current hierarchy. 2) [perf] Eliminate "Rectangle lastAllocation" variable (8 + 4*4 = 24 bytes) from every instance of GapBoxView (intended for line or document views). 3) Make repaints hierarchical - part of ViewLayoutState. It's connected to item 2) because without knowing the allocation it's not possible to schedule repaints in absolute coordinates. 4) Make layout invalidation more transparent. Notify parent view about child's layout invalidation through a method in ViewLayoutState.Parent.
All the items should be addressed in the current version that is now present in trunk: Checking in libsrc/org/netbeans/editor/DrawEngineDocView.java; /cvs/editor/libsrc/org/netbeans/editor/DrawEngineDocView.java,v <-- DrawEngineDocView.java new revision: 1.6; previous revision: 1.5 done Checking in libsrc/org/netbeans/editor/DrawEngineFakeDocView.java; /cvs/editor/libsrc/org/netbeans/editor/DrawEngineFakeDocView.java,v <-- DrawEngineFakeDocView.java new revision: 1.2; previous revision: 1.1 done Checking in libsrc/org/netbeans/editor/DrawEngineLineView.java; /cvs/editor/libsrc/org/netbeans/editor/DrawEngineLineView.java,v <-- DrawEngineLineView.java new revision: 1.4; previous revision: 1.3 done Checking in libsrc/org/netbeans/editor/FoldMultiLineView.java; /cvs/editor/libsrc/org/netbeans/editor/FoldMultiLineView.java,v <-- FoldMultiLineView.java new revision: 1.4; previous revision: 1.3 done Checking in libsrc/org/netbeans/editor/GapBranchElement.java; /cvs/editor/libsrc/org/netbeans/editor/GapBranchElement.java,v <-- GapBranchElement.java new revision: 1.4; previous revision: 1.3 done Checking in libsrc/org/netbeans/editor/Utilities.java; /cvs/editor/libsrc/org/netbeans/editor/Utilities.java,v <-- Utilities.java new revision: 1.64; previous revision: 1.63 done Processing log script arguments... More commits to come... Checking in libsrc/org/netbeans/editor/view/spi/EstimatedSpanView.java; /cvs/editor/libsrc/org/netbeans/editor/view/spi/EstimatedSpanView.java,v <-- EstimatedSpanView.java new revision: 1.3; previous revision: 1.2 done Checking in libsrc/org/netbeans/editor/view/spi/FlyView.java; /cvs/editor/libsrc/org/netbeans/editor/view/spi/FlyView.java,v <-- FlyView.java new revision: 1.3; previous revision: 1.2 done Checking in libsrc/org/netbeans/editor/view/spi/ViewLayoutState.java; /cvs/editor/libsrc/org/netbeans/editor/view/spi/ViewLayoutState.java,v <-- ViewLayoutState.java new revision: 1.3; previous revision: 1.2 done Checking in libsrc/org/netbeans/editor/view/spi/ViewUtilities.java; /cvs/editor/libsrc/org/netbeans/editor/view/spi/ViewUtilities.java,v <-- ViewUtilities.java new revision: 1.3; previous revision: 1.2 done Processing log script arguments... More commits to come... Checking in libsrc/org/netbeans/lib/editor/fold/GapObjectArray.java; /cvs/editor/libsrc/org/netbeans/lib/editor/fold/GapObjectArray.java,v <-- GapObjectArray.java new revision: 1.3; previous revision: 1.2 done Processing log script arguments... More commits to come... Checking in libsrc/org/netbeans/lib/editor/view/GapBoxView.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/GapBoxView.java,v <-- GapBoxView.java new revision: 1.6; previous revision: 1.5 done Checking in libsrc/org/netbeans/lib/editor/view/GapBoxViewChildren.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/GapBoxViewChildren.java,v <-- GapBoxViewChildren.java new revision: 1.3; previous revision: 1.2 done Checking in libsrc/org/netbeans/lib/editor/view/GapDocumentView.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/GapDocumentView.java,v <-- GapDocumentView.java new revision: 1.3; previous revision: 1.2 done Checking in libsrc/org/netbeans/lib/editor/view/GapDocumentViewChildren.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/GapDocumentViewChildren.java,v <-- GapDocumentViewChildren.java new revision: 1.3; previous revision: 1.2 done Checking in libsrc/org/netbeans/lib/editor/view/GapLineViewChildren.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/GapLineViewChildren.java,v <-- GapLineViewChildren.java new revision: 1.3; previous revision: 1.2 done Checking in libsrc/org/netbeans/lib/editor/view/SimpleViewLayoutState.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/SimpleViewLayoutState.java,v <-- SimpleViewLayoutState.java new revision: 1.3; previous revision: 1.2 done Removing libsrc/org/netbeans/lib/editor/view/ViewSupportUtilities.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/ViewSupportUtilities.java,v <-- ViewSupportUtilities.java new revision: delete; previous revision: 1.2 done RCS file: /cvs/editor/libsrc/org/netbeans/lib/editor/view/ViewUtilitiesImpl.java,v done Checking in libsrc/org/netbeans/lib/editor/view/ViewUtilitiesImpl.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/ViewUtilitiesImpl.java,v <-- ViewUtilitiesImpl.java initial revision: 1.1 done Processing log script arguments... More commits to come... Checking in src/org/netbeans/modules/editor/EditorWarmUpTask.java; /cvs/editor/src/org/netbeans/modules/editor/EditorWarmUpTask.java,v <-- EditorWarmUpTask.java new revision: 1.9; previous revision: 1.8
Addition to the update: GapBoxView.getViewIndexAtPoint() should always attempt to return a valid child view's index. -1 is only returned in case there are no child views present. Integrated into trunk: Checking in libsrc/org/netbeans/lib/editor/view/GapBoxView.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/GapBoxView.java,v <-- GapBoxView.java new revision: 1.7; previous revision: 1.6 done Checking in libsrc/org/netbeans/lib/editor/view/GapBoxViewChildren.java; /cvs/editor/libsrc/org/netbeans/lib/editor/view/GapBoxViewChildren.java,v <-- GapBoxViewChildren.java new revision: 1.4; previous revision: 1.3
*** Issue 39879 has been marked as a duplicate of this issue. ***
*** Issue 40614 has been marked as a duplicate of this issue. ***