final StringTokenizer columnWidthsHintTokenizer = new StringTokenizer( columnWidthsHint, "," );
for( final ModelPath childPropertyPath : part.getChildProperties() )
{
final PropertyDef childProperty = property.definition().getType().property( childPropertyPath );
final PropertyEditorDef childPropertyEditorDef = part.definition().getChildPropertyEditor( childPropertyPath );
final TableViewerColumn tableViewerColumn = new TableViewerColumn( this.tableViewer, SWT.NONE );
if( childPropertyEditorDef == null )
{
final String label = childProperty.getLabel( false, CapitalizationType.TITLE_STYLE, false );
tableViewerColumn.getColumn().setText( label );
}
else
{
final MutableReference<FunctionResult> labelFunctionResultRef = new MutableReference<FunctionResult>();
final Runnable updateLabelOp = new Runnable()
{
public void run()
{
String label = (String) labelFunctionResultRef.get().value();
label = LabelTransformer.transform( label, CapitalizationType.TITLE_STYLE, false );
tableViewerColumn.getColumn().setText( label );
}
};
final FunctionResult labelFunctionResult = part.initExpression
(
childPropertyEditorDef.getLabel().content(),
String.class,
Literal.create( childProperty.getLabel( false, CapitalizationType.NO_CAPS, true ) ),
updateLabelOp
);