Source:
private void renderControl(Composite parent, TableViewerSWTCustomization customization, Object inputObject, EMFDataBindingContext emfDataBindingContext, IObservableValue title, IObservableValue tooltip) { customization.createCompositeLayout(parent); final Optional<Label> titleLabel = customization.getTitleLabel(); if (titleLabel.isPresent()) { initTitleLabel(titleLabel.get(), title, tooltip, emfDatabindingContext); } validationControls = customization.getValidationControls(); final Composite viewerComposite = customization.getViewerComposite(); final AbstractTableViewer tableViewer = createTableViewer(customization, viewerComposite); final Optional<Composite> buttonComposite = customization.getButtonComposite(); if (buttonComposite.isPresent()) { initButtonComposite(buttonComposite.get(), customization, tableViewer); } enableTooltipSupport(tableViewer); final Optional<ViewerComparator> comparator = customization.getComparator(); if (comparator.isPresent()) { tableViewer.setComparator(comparator.get()); } tableViewer.setContentProvider(customization.createContentProvider()); addColumns(customization, tableViewer, emfDataBindingContext); setupDragAndDrop(customization, tableViewer); tableViewer.setInput(inputObject); final AbstractColumnLayout layout = createLayout(viewerComposite); final Widget[] columns = getColumns(); for (int i = 0; i < columns.length; i++) { final Widget tableColumn = columns[i]; final boolean storedIsResizable = (Boolean) tableColumn.getData(RESIZABLE); final Integer storedWeight = (Integer) tableColumn.getData(WEIGHT); final Integer storedMinWidth = (Integer) tableColumn.getData(MIN_WIDTH); if (storedWeight == ColumnDescription.NO_WEIGHT) { layout.setColumnData(tableColumn, new ColumnPixelData(storedMinWidth, storedIsResizable)); } else { if (storedMinWidth > 0) { layout.setColumnData(tableColumn, new ColumnWeightData(storedWeight, storedMinWidth, storedIsResizable)); } else { layout.setColumnData(tableColumn, new ColumnWeightData(storedWeight, storedIsResizable)); } } } }

Target:
private void renderControl(Composite parent, TableViewerSWTCustomization customization, Object inputObject, EMFDataBindingContext emfDataBindingContext, IObservableValue title, IObservableValue tooltip) { customization.createCompositeLayout(parent); final Optional<Label> titleLabel = customization.getTitleLabel(); if (titleLabel.isPresent()) { initTitleLabel(titleLabel.get(), title, tooltip, emfDatabindingContext); } validationControls = customization.getValidationControls(); final Composite viewerComposite = customization.getViewerComposite(); final AbstractTableViewer tableViewer = createTableViewer(customization, viewerComposite); final Optional<Composite> buttonComposite = customization.getButtonComposite(); if (buttonComposite.isPresent()) { initButtonComposite(buttonComposite.get(), customization, tableViewer); } enableTooltipSupport(tableViewer); final Optional<ViewerComparator> comparator = customization.getComparator(); if (comparator.isPresent()) { tableViewer.setComparator(comparator.get()); } tableViewer.setContentProvider(customization.createContentProvider()); addColumns(customization, tableViewer, emfDataBindingContext); setupDragAndDrop(customization, tableViewer); tableViewer.setInput(inputObject); final AbstractColumnLayout layout = createLayout(viewerComposite); final Widget[] columns = getColumns(); for (int i = 0; i < columns.length; i++) { final Widget tableColumn = columns[i]; final boolean storedIsResizable = (Boolean) tableColumn.getData(RESIZABLE); final Integer storedWeight = (Integer) tableColumn.getData(WEIGHT); final Integer storedMinWidth = (Integer) tableColumn.getData(MIN_WIDTH); if (storedWeight == ColumnDescription.NO_WEIGHT) { layout.setColumnData(tableColumn, new ColumnPixelData(storedMinWidth, storedIsResizable)); } else if (storedMinWidth > 0) { layout.setColumnData(tableColumn, new ColumnWeightData(storedWeight, storedMinWidth, storedIsResizable)); } else { layout.setColumnData(tableColumn, new ColumnWeightData(storedWeight, storedIsResizable)); } } }