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

Summary: Added methods to append elements to a GapList
Product: editor Reporter: Ralph Ruijs <ralphbenjamin>
Component: -- Other --Assignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal CC: apireviews, mkristofic, mmetelka, vv159170
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 200027, 257893    

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.