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.
Replace present view hierarchy consisting of DrawEngineDocView and DrawEngineLineView with a new more efficient view hierarchy. Features: - Drop rendering through DrawEngine and DrawLayers completely. Only HighlightLayers will be supported. - Drop measurements (modelToView() and viewToModel()) through DrawEngine completely. Leaf views will measure naturally through FontMetrics or GlyphVector. - Partial view creation. It should be possible to (re)create views for the visible area only without any considerable visual glitches (repaint problems, imprecise vertical scrollbar sizes etc.). Horizontal scrollbar increases (once the visible area encounters a long line) are generally allowed. - Uniform line height. The code editors generally do not need variable line height and it's common that highlights (that might affect line height) get rebuilt completely (e.g. after a document reparse) relatively frequently. There are advantages of having the uniform line height - mainly precise vertical scrollbar for partial view creation. - Line wrapping - the new view hierarchy should support line wrapping. Vertical scrollbar may be somewhat imprecise due to this (in combination with partial view creation) but generally there are not many long lines in a typical code. - modelToViewY() - certain functionality (e.g. Error stripe or Code folding side bar) only need a offset-to-y translation and the performance would be improved. - Consider change events firing. The Swing's view hierarchy does not fire any events. However there are usecases that would certainly benefit from that. For example Error stripe (since it cannot recompute its visual marks after each keystroke) needs to mirror listening for causes that lead to view hierarchy changes i.e. it listens for document modifications that add/remove lines and it listens on fold hierarchy for fold collapse/expand. If the view hierarchy would fire events describing its changes this could be eliminated and it should also be more efficient. - Limited extensibility. It should be possible to create custom views although there might be certain constraints imposed on it.
See also issue #112464, which may imply some additional work.
I'm wondering where this fits into the Netbeans development plans? This has been TBD for almost 2 years, and basic stuff like adding word wrap depend on it. Any updates?
Well, currently we have no plans to implement this in foreseeable future. It's too complicated and risky. We are sorry.
:-( Word wrap is a killer feature which depends on this and has a large number of users voting for it (me included!). Please reconsider.
So then you are saying that word wrap will never happen either?
I work on a new view hierarchy prototype in my spare time but I'm unable to say when it will be ready to be included into a plan.
I'm progressing with the new view hierarchy prototype. Within the next two weeks I will create a branch for further development and testing. Unless there would be any serious problem the new view hierarchy should be present in NB 6.9. Features: - Word wrap - Invisible characters (tabs etc.) marking - Optimized for frequent rebuilds (due to refreshing of the highlighting information because of reparses). - No delegation to legacy DrawEngine should improve rendering performance and model<->view performance considerably.
Thank you Miloslav! I really appreciate you putting your time into this.
Yes, thank you so much for working on this!
This might be useful - http://wiki.netbeans.org/PrototypesRepo
I have integrated initial version of new view hierarchy supporting line wrap and showing of invisible characters. Since it's not stable enough yet the new view hierarchy is switched off by default and to turn it on it is necessary to add -J-Dorg.netbeans.editor.linewrap=true to netbeans.conf. I continue working on 1) proper handling of '\t' characters. 2) handling of collapsed folds. 3) word-level of wrapping (currently just character-level wrapping is present) 4) performance improvements. http://hg.netbeans.org/jet-main/rev/656a27790c32
Integrated into 'main-golden', will be available in build *201003050200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3ed1fede4c1b User: Vita Stejskal <vstejskal@netbeans.org> Log: #4619: adding 'Show Non-printable Characters' action to 'View' main menu (note: it's disabled until #121357 is resolved)
Integrated into 'main-golden', will be available in build *201003110200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/fc67751824c9 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #121357 - View Hierarchy - proper tab characters displaying and bug fixes.
Integrated into 'main-golden', will be available in build *201003160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0ec7d94de63b User: Miloslav Metelka <mmetelka@netbeans.org> Log: #121357 - New Editor View Hierarchy - width recomputation fixes.
After the latest fix http://hg.netbeans.org/jet-main/rev/78eec7471be7 the typing should be relatively stable and the hierarchy could be considered for testing by turning it on by default. I've found that rendering of red square box (e.g. during renaming) also needs to be fixed so I'll do that first.
Integrated into 'main-golden', will be available in build *201003200200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/78eec7471be7 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #121357 - New Editor View Hierarchy - stabilization of insert/remove updates.
Integrated into 'main-golden', will be available in build *201003250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/1f59a06a2795 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #121357 - Editor View Hierarchy - added rectangular highlights.
fixed by 121357
mistake
The new view hierarchy is integrated and active and important issues should be resolved in NB7.0 timeframe.
*** Bug 191986 has been marked as a duplicate of this bug. ***