Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331274 - Update on "RCP application with a view" template - ArrayContentProvider and TableViewerColumn
Summary: Update on "RCP application with a view" template - ArrayContentProvider and T...
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2010-11-27 15:14 EST by Lars Vogel CLA
Modified: 2012-05-06 17:21 EDT (History)
6 users (show)

See Also:


Attachments
Patch for ArrayContentProvider (2.03 KB, text/plain)
2010-11-27 15:14 EST, Lars Vogel CLA
no flags Details
TableViewerColumn (1.99 KB, text/plain)
2010-11-27 15:36 EST, Lars Vogel CLA
no flags Details
TableViewerColumn (3.32 KB, text/plain)
2010-11-27 16:09 EST, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2010-11-27 15:14:44 EST
Created attachment 183981 [details]
Patch for ArrayContentProvider

I have seen to many people which define their own ContentProvider even if the ArrayContentProvider would be sufficient. Perhaps we can can update ""RCP application with a view" to show the usageo of the ArrayContentProvider?

Patch attached.
Comment 1 Lars Vogel CLA 2010-11-27 15:36:17 EST
Created attachment 183983 [details]
TableViewerColumn

This includes also an update to the TableViewerColumn API of JFace.
Comment 2 Ankur Sharma CLA 2010-11-27 15:58:16 EST
By adding ArrayContentProvider we are losing the example usage of
IStructuredContentProvider. And also the explanation in comment. I feel this
information is essential for a user creating a view using the template. For the
same reason we are extending LabelProvider instead of just attaching its
instance.

I think we can instead suggest the usage of ArrayContentProvider in the javadoc
for ViewContentProvider. Similarly for ViewLabelProvider.
Comment 3 Ankur Sharma CLA 2010-11-27 15:59:24 EST
(In reply to comment #1)
> Created an attachment (id=183983) [details]
> TableViewerColumn
> 
> This includes also an update to the TableViewerColumn API of JFace.

The patch doesn't seem right to me.
Comment 4 Lars Vogel CLA 2010-11-27 16:09:31 EST
Created attachment 183984 [details]
TableViewerColumn

Correct patch attached.
Comment 5 Lars Vogel CLA 2010-11-27 16:12:12 EST
I personally think it is important to demonstrate code which does re-use commonly used parts. 

ArrayContentProvider does extend IStructuredContentProvider so I assume the user will see that this interface needs to be implemented.
Comment 6 Remy Suen CLA 2010-11-28 15:53:36 EST
Perhaps we can compromise and there can be a comment about ArrayContentProvider in the generated code?
Comment 7 Lars Vogel CLA 2010-11-28 16:34:32 EST
A good comment would also be ok. Do you have a good proposal? The only comments I can come up with sound silly, e.g. "ArrayContentProvider" provides the same functionality as the code below.
Comment 8 Dani Megert CLA 2010-11-29 03:52:07 EST
I agree with comment 2.
Comment 9 Lars Vogel CLA 2010-11-29 07:33:25 EST
Javadoc is definitely a good compromise. 

@Ankar: Can you change this directly or shall I create a patch? If you are looking for a patch please let me know the Javadoc additioan.
Comment 10 Curtis Windatt CLA 2010-11-29 10:51:13 EST
We have some major items to get done for M4, I suggest leaving this until M5.
Comment 11 Curtis Windatt CLA 2010-12-10 16:35:24 EST
(In reply to comment #9)
> Javadoc is definitely a good compromise. 
> 
> @Ankar: Can you change this directly or shall I create a patch? If you are
> looking for a patch please let me know the Javadoc additioan.

Committer time is getting stretched very thin, can you look at creating a patch for this?
Comment 12 Lars Vogel CLA 2012-05-06 17:21:44 EDT
I find its not worth investing in Eclipse 3.x templates anymore. Closing as WONTFIX.