Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 257888 - Added methods to append elements to a GapList
Added methods to append elements to a GapList
Status: NEW
Product: editor
Classification: Unclassified
Component: -- Other --
8.2
All All
: P3 (vote)
: 8.2
Assigned To: Miloslav Metelka
issues@editor
: API, API_REVIEW_FAST
Depends on:
Blocks: 200027 257893
  Show dependency treegraph
 
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
:


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.


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