Community
Participate
Working Groups
Currently we added the layout information to the TableColumnAdapter but this is not 100% correct. It would be wiser to add this information to the TableColumn because if you set Table/TreeColumns moveable the data should move with the column. Now that we are independent from SWT we could simply add this to TableViewerColumn?
My issues with this would be: 1) The API to set the column data is available on the layout and it could be confusing to the user and potentially error prone. Documentation could probably clear this up enough to make it usable. 2) Not everyone is using the new viewer APIs. So if this was added I'd prefer getColumnDatas() be added to TableLayout and AbstractColumnAdapter API[1] as well. [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=177213
I'd remove the methods from the TableColumnLayout to avoid the confusion and propagate something like this: TableColumn#setData(AbstractColumnLayout.LAYOUT_DATA,ColumnLayoutData); Sad enough we don't have the chance to get something like TableColumn#setLayoutData(Object)
Created attachment 60740 [details] Patch to make Layout behave like normal layout I think this is the better solution than to add the layout data directly to the layout using addLayout we have in bug #171824 before sending #171824 out for PMC we should think whether we would like to go this way because it has the advantage that columns could be moved easily.
Tom, how about something like... layout.setColumnData(column, new ColumnWeightData(5)); Behind the scenes you could use the data attribute but it would hide that from the consumer. Using setData(...) is not very discoverable and is difficult to document.
I agree with Brad. However I am happy with our original solution proposed in Bug 171824
Created attachment 60793 [details] patch for Brad's idea
Fixed by resolving bug >= 20070319
once more Fixed by resolving bug >= 20070319
The bug resolving this one was bug #171824
Verified by verification for Bug 171824