Bug 278392 - [Viewers] Improve JavaDoc for TreeViewer.add
Summary: [Viewers] Improve JavaDoc for TreeViewer.add
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-29 10:25 EDT by Marko Tomljenovic CLA
Modified: 2019-09-06 16:11 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Tomljenovic CLA 2009-05-29 10:25:05 EDT
I am using a tree viewer whose model can have many thousand elements whith multiple levels.

When a new top level element is added to the content provider model I want to tell the viewer to only refresh this top level element.

The add() method on the viewer needs a parent. But since I am adding a top level element I have no parent and if I use null as parent I get an exception.

And refreshing the complete tree just because of one new element is really not preferrable.
Comment 1 Boris Bokowski CLA 2009-05-29 16:27:38 EDT
Does add(viewer.getInput(), newToplevelElement) work?
Comment 2 Marko Tomljenovic CLA 2009-06-02 02:18:57 EDT
Yes it does, but it should be written down in the javadoc that the parent element of top level elements in the tree is the viewer input!

Thanks anyway.
Comment 3 Boris Bokowski CLA 2009-11-26 09:50:39 EST
Hitesh is now responsible for watching bugs in the [Viewers] component area.
Comment 4 Eclipse Webmaster CLA 2019-09-06 16:11:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.