Bug 567115 - Create Factory for TableViewerColumn
Summary: Create Factory for TableViewerColumn
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-18 07:08 EDT by Lars Vogel CLA
Modified: 2020-09-18 08:54 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-09-18 07:08:03 EDT
TableViewerColumn looks like it good use a factory to create it:

	// create column for description property
		TableViewerColumn colDescription = new TableViewerColumn(viewer, SWT.NONE);
		colDescription.setLabelProvider(new ColumnLabelProvider() {
			@Override
			public String getText(Object element) {
				Task todo = (Task) element;
				return todo.getDescription();
			}
		});
		colDescription.getColumn().setWidth(200);
		colDescription.getColumn().setText("Description");
Comment 1 Lars Vogel CLA 2020-09-18 07:08:33 EDT
Marcus, WDYT?
Comment 2 Marcus Höpfner CLA 2020-09-18 08:44:38 EDT
Interesting.
There is a factory for TableColumn already. But not for TableViewerColumn.
In comparison TableViewerColumn is not a widget.

So this is actually a different game. 
Maybe it would even be a new plugin?

If we start with TableViewerColumn we should also consider all types of viewers (table, tree, combo) for a factory.
Comment 3 Lars Vogel CLA 2020-09-18 08:54:53 EDT
(In reply to Marcus Höpfner from comment #2)
> Interesting.
> There is a factory for TableColumn already. But not for TableViewerColumn.
> In comparison TableViewerColumn is not a widget.
> 
> So this is actually a different game. 
> Maybe it would even be a new plugin?

I think it is fine to re-use the same plug-in

> If we start with TableViewerColumn we should also consider all types of
> viewers (table, tree, combo) for a factory.

Agree, can you start with the base implementation? I can afterwards start adding factories.