Skip to content

Commit

Permalink
Make column config dialog in CSV import bigger and resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
verglor authored and buchen committed Nov 9, 2024
1 parent 5558b94 commit ef02b13
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ private static class ColumnConfigDialog extends Dialog implements ISelectionChan
protected ColumnConfigDialog(Client client, Shell parentShell, CSVImporter importer, Column column)
{
super(parentShell);
setShellStyle(getShellStyle() | SWT.SHEET);
setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.SHEET);

this.client = client;
this.importer = importer;
Expand Down Expand Up @@ -786,6 +786,7 @@ protected Control createDialogArea(Composite parent)
final Composite details = new Composite(composite, SWT.NONE);
final StackLayout layout = new StackLayout();
details.setLayout(layout);
GridDataFactory.fillDefaults().grab(true, true).applyTo(details);

final Composite emptyArea = new Composite(details, SWT.NONE);

Expand Down Expand Up @@ -818,11 +819,11 @@ protected Control createDialogArea(Composite parent)
tableViewer.setContentProvider(new KeyMappingContentProvider());
tableViewer.getTable().setLinesVisible(true);
tableViewer.getTable().setHeaderVisible(true);
GridDataFactory.fillDefaults().grab(false, true).minSize(SWT.DEFAULT, 100).applyTo(tableViewer.getTable());
GridDataFactory.fillDefaults().grab(true, true).minSize(SWT.DEFAULT, 100).applyTo(tableViewer.getTable());

TableViewerColumn col = new TableViewerColumn(tableViewer, SWT.NONE);
col.getColumn().setText(Messages.CSVImportLabelExpectedValue);
col.getColumn().setWidth(100);
col.getColumn().setWidth(200);
col.setLabelProvider(new ColumnLabelProvider()
{
@Override
Expand All @@ -834,7 +835,7 @@ public String getText(Object element)

col = new TableViewerColumn(tableViewer, SWT.NONE);
col.getColumn().setText(Messages.CSVImportLabelProvidedValue);
col.getColumn().setWidth(100);
col.getColumn().setWidth(200);
col.setLabelProvider(new ColumnLabelProvider()
{
@Override
Expand Down

0 comments on commit ef02b13

Please sign in to comment.