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.
Summary: | Caret lags with 1.4.2 JVM | ||
---|---|---|---|
Product: | editor | Reporter: | cahrens <cahrens> |
Component: | -- Other -- | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | apireviews |
Priority: | P3 | Keywords: | API_REVIEW_FAST |
Version: | 3.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Diff of the fix |
Description
cahrens
2003-07-21 22:12:13 UTC
Although I understand the reason for the original fix I think that we should be able to improve the behavior into 3.6. I have an idea how this could finally be fixed. The problem clearly is the document listeners ordering - the caret needs modelToView() to position itself but views (that are also listening on document like the caret does) may be fired later which causes that the caret finds the original views state. The solution could be to state an ordering for document listeners i.e. make several "layers" of document listeners with defined ordering of firing the listeners of the particular layers. I'll try to make a sketch of how this solution. Can we fix this issue in 4.1? If not, please remove the status whiteboard I've added. Thanks. I'll attempt to fix it now into 4.1. I have a fix for the issue. As the fix adds a backward compatible change in friend API of editor/util module I'm asking DevRev for fasttrack review. The tests were created and apichanges.xml is updated accordingly. Created attachment 21112 [details]
Diff of the fix
Fixed in main trunk: Checking in fold/src/org/netbeans/modules/editor/fold/FoldHierarchyExecution.java; /cvs/editor/fold/src/org/netbeans/modules/editor/fold/FoldHierarchyExecution.java,v <-- FoldHierarchyExecution.java new revision: 1.6; previous revision: 1.5 done Checking in libsrc/org/netbeans/editor/BaseCaret.java; /cvs/editor/libsrc/org/netbeans/editor/BaseCaret.java,v <-- BaseCaret.java new revision: 1.109; previous revision: 1.108 done Checking in libsrc/org/netbeans/editor/BaseDocument.java; /cvs/editor/libsrc/org/netbeans/editor/BaseDocument.java,v <-- BaseDocument.java new revision: 1.119; previous revision: 1.118 done Checking in util/manifest.mf; /cvs/editor/util/manifest.mf,v <-- manifest.mf new revision: 1.6; previous revision: 1.5 done Checking in util/api/apichanges.xml; /cvs/editor/util/api/apichanges.xml,v <-- apichanges.xml new revision: 1.2; previous revision: 1.1 done RCS file: /cvs/editor/util/src/org/netbeans/lib/editor/util/PriorityListenerList.java,v done Checking in util/src/org/netbeans/lib/editor/util/PriorityListenerList.java; /cvs/editor/util/src/org/netbeans/lib/editor/util/PriorityListenerList.java,v <-- PriorityListenerList.java initial revision: 1.1 done RCS file: /cvs/editor/util/src/org/netbeans/lib/editor/util/swing/DocumentListenerPriority.java,v done Checking in util/src/org/netbeans/lib/editor/util/swing/DocumentListenerPriority.java; /cvs/editor/util/src/org/netbeans/lib/editor/util/swing/DocumentListenerPriority.java,v <-- DocumentListenerPriority.java initial revision: 1.1 done RCS file: /cvs/editor/util/src/org/netbeans/lib/editor/util/swing/DocumentUtilities.java,v done Checking in util/src/org/netbeans/lib/editor/util/swing/DocumentUtilities.java; /cvs/editor/util/src/org/netbeans/lib/editor/util/swing/DocumentUtilities.java,v <-- DocumentUtilities.java initial revision: 1.1 done RCS file: /cvs/editor/util/src/org/netbeans/lib/editor/util/swing/PriorityDocumentListenerList.java,v done Checking in util/src/org/netbeans/lib/editor/util/swing/PriorityDocumentListenerList.java; /cvs/editor/util/src/org/netbeans/lib/editor/util/swing/PriorityDocumentListenerList.java,v <-- PriorityDocumentListenerList.java initial revision: 1.1 done Checking in util/test/cfg-unit.xml; /cvs/editor/util/test/cfg-unit.xml,v <-- cfg-unit.xml new revision: 1.3; previous revision: 1.2 done RCS file: /cvs/editor/util/test/unit/src/org/netbeans/lib/editor/util/PriorityListenerListTest.java,v done Checking in util/test/unit/src/org/netbeans/lib/editor/util/PriorityListenerListTest.java; /cvs/editor/util/test/unit/src/org/netbeans/lib/editor/util/PriorityListenerListTest.java,v <-- PriorityListenerListTest.java initial revision: 1.1 |