Bug 157309 - [Viewers] ListViewer should provide insert-method
Summary: [Viewers] ListViewer should provide insert-method
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-09-14 09:45 EDT by Thomas Schindl CLA
Modified: 2006-11-01 11:11 EST (History)
1 user (show)

See Also:


Attachments
Support for Insert in AbstractListViewers (4.58 KB, patch)
2006-09-14 14:10 EDT, Thomas Schindl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2006-09-14 09:45:58 EDT
TableViewer and TreeViewers provide methods to insert a model element and so should ListViewer
Comment 1 Thomas Schindl CLA 2006-09-14 14:10:46 EDT
Created attachment 50178 [details]
Support for Insert in AbstractListViewers

- add insert(Object element, int position)
- added insertItem(ILabelProvider labelProvider, Object element, int index)
  common part from add(Object[] elements)
- refactored add(Object[] elements) to use insertItem
Comment 2 Boris Bokowski CLA 2006-09-14 16:56:22 EDT
Patch applied to HEAD >20060914 with the following changes:

- added contribution comment
- did not apply unrelated visibility change to getLabelProviderText
- changed formatting to match our conventions

Thanks for the patch and the corresponding test case!
Comment 3 Thomas Schindl CLA 2006-09-14 17:39:21 EDT
(In reply to comment #2)
> Patch applied to HEAD >20060914 with the following changes:
> 
> - added contribution comment
> - did not apply unrelated visibility change to getLabelProviderText

Uups. I don't know why I have done this but I think it was because I started in ListViewer

> - changed formatting to match our conventions
> 

That's always a problem to me because I don't have your formats defined in my eclipse installation and I can't press CTRL+SHIFT+F. Where do I get your format definition?

> Thanks for the patch and the corresponding test case!
> 

Boris would you mind adding my E-Mail-Address when adding me to contributions?
Comment 4 Boris Bokowski CLA 2006-09-14 17:44:06 EDT
(In reply to comment #3)
> > - changed formatting to match our conventions
> 
> That's always a problem to me because I don't have your formats defined in my
> eclipse installation and I can't press CTRL+SHIFT+F. Where do I get your format
> definition?

We just use Eclipse (built-in).

> Boris would you mind adding my E-Mail-Address when adding me to contributions?

Not at all.  I thought Bugzilla was a better place to look up the e-mail address, but I can add your e-mail address to the contribution comment as well.
Comment 5 Boris Bokowski CLA 2006-11-01 11:11:45 EST
Verified using I20061031-0656.