Bug 228022 - Output Window should be able to hide lines (exceeded limit, folding)
Output Window should be able to hide lines (exceeded limit, folding)
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Output Window
7.4
All All
: P3 (vote)
: 7.4
Assigned To: Jaroslav Havlin
issues@platform
: API_REVIEW_FAST, PLAN
Depends on:
Blocks: 230096 102043
  Show dependency treegraph
 
Reported: 2013-03-28 08:40 UTC by Jaroslav Havlin
Modified: 2013-05-22 10:17 UTC (History)
4 users (show)

See Also:
Issue Type: TASK
:


Attachments
Proposed Patch - API (22.65 KB, patch)
2013-04-24 14:58 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Havlin 2013-03-28 08:40:11 UTC
Currently, characters in output window has the same offset in the visible document as in the internal storage. To hide the oldest lines, or lines that are in collapsed folds, we need to use separate offsets for storage and for document.

Each character will have two offsets - the full history (absolute) offset (type long), and offset in the visible document (type int).

The existing data structures need to be updated to use long values, and to use circular arrays (so the clients can write much higher number of characters to the output, up to Long.MAX_VALUE, despite the fact that the document can display only Integer.MAX_VALUE characters).

A new structure for indicating hidden lines (in collapsed folds) will be needed, as well as a new API for defining the folds.
Comment 1 Jaroslav Havlin 2013-04-04 13:45:34 UTC
(In reply to comment #0)
> The existing data structures need to be updated to use long values, and to use
> circular arrays (so the clients can write much higher number of characters to
> the output, up to Long.MAX_VALUE, despite the fact that the document can
> display only Integer.MAX_VALUE characters).
It turned out that it's better and simpler to remove larger blocks of lines.
If the limit is reached, half of the lines is removed and values in all data structures are recomputed. (Fixed bug 185462.)
Comment 2 Jaroslav Havlin 2013-04-24 14:58:12 UTC
Created attachment 133759 [details]
Proposed Patch - API

Patch containing the API change.

Implementation of the API (in module core.output2) can be found in repository
core-main, branch output_folding_228022.
Comment 3 Jaroslav Havlin 2013-04-24 15:04:05 UTC
Please review API change in module openide.io (I/O APIs) that adds support for folding of lines in output window.

See classes:
org.openide.windows.IOFolding
org.openide.windows.FoldHandle

Thank you in advance.
Comment 4 Jaroslav Havlin 2013-04-30 14:00:16 UTC
Unless there are any objections, I'll integrate on Thursday. Thank you.
Comment 5 Jaroslav Havlin 2013-05-02 12:43:49 UTC
Fixed in http://hg.netbeans.org/core-main/rev/e0ddc2583d5a
Comment 6 Quality Engineering 2013-05-04 01:47:11 UTC
Integrated into 'main-golden', will be available in build *201305032300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a85d9cb424aa
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #228022: API for folding in Output Window


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo