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.

Bug 257888 - Added methods to append elements to a GapList
Summary: Added methods to append elements to a GapList
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 200027 257893
  Show dependency tree
 
Reported: 2016-02-08 10:13 UTC by Ralph Ruijs
Modified: 2016-03-08 14:17 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Ruijs 2016-02-08 10:13:31 UTC
GapList has several methods to add new elements. More specific methods are needed to; add a collection from an offset, add an array without specifying an offset.
Comment 1 Ralph Ruijs 2016-02-08 10:59:41 UTC
The following methods are added to GapList on branch editor_multi_caret. Please review the API change, thanks!

boolean addArray(Object[] elements)
boolean addAll(int index, Collection<? extends E> c, int off, int len)
boolean addAll(Collection<? extends E> c, int off, int len)

http://hg.netbeans.org/jet-main/file/2ae266d79b40/editor.util/src/org/netbeans/lib/editor/util/GapList.java
Comment 2 Vladimir Voskresensky 2016-02-18 16:20:19 UTC
(In reply to Ralph Ruijs from comment #1)
> The following methods are added to GapList on branch editor_multi_caret.
> Please review the API change, thanks!
> 
> boolean addAll(Collection<? extends E> c, int off, int len)
this method doesn't have "index" parameter, so javadoc line looks confusing:
 @throws    IndexOutOfBoundsException if index out of range <tt>(index
  &lt; 0 || index &gt; size())</tt>.
Comment 3 Miloslav Metelka 2016-02-22 10:13:09 UTC
Thanks Vladimir, I've fixed the javadoc.
Comment 4 Miloslav Metelka 2016-03-08 14:17:15 UTC
Thanks for the review.