Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355911

Summary: TableEditor.grabVertical is not modifiable through CellEditor.getLayoutData
Product: [Eclipse Project] Platform Reporter: Christian Kloner <christian.kloner>
Component: UIAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Patch for CellEditor, TableViewerEditor and TreeViewerEditor none

Description Christian Kloner CLA 2011-08-26 01:16:45 EDT
Build Identifier: 3.6.1

Aligning a CellEdtior's control to the top, center or bottom of a table cell is not possible because API is incomplete (LayoutData.grabVertical was forgotten to be implemented).

In the class org.eclipse.swt.custom.TableEditor, the method computeBounds() calculates the bounds of the CellEditor's control that is going to be shown.
This calculation depends on the ControlEditor's properties grabHorizontal, minimumWidth, grabVertical and minimumHeight and are filled through ColumnViewerEditor.setLayoutData(CellEditor.LayoutData). The LayoutData is got from the CellEditor to open. Unfortunately the LayoutData that is returned by CellEditor.getLayoutData() does only define the property grabHorizontal but NOT grabVertical. 
As result, the value of LayoutData.minimumHeight cannot be used to center or align a celleditor's control whose height must not be the height of the table's cell.


Reproducible: Always
Comment 1 Christian Kloner CLA 2011-08-26 01:55:08 EDT
Created attachment 202198 [details]
Patch for CellEditor, TableViewerEditor and TreeViewerEditor

grabVertical field was added to the CellEditor.LayoutData and was got through TableViewerEditor and TreeViewerEditor so that the existing grapVertical field of TableEditor and TreeEditor can be assigned with the correct value.
Comment 2 Lars Vogel CLA 2019-11-14 03:10:39 EST
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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.