Community
Participate
Working Groups
Build F3 In the External Tools Builders page of a project's properties, the names of the builders seem to be truncated after about 15 characters. See the attached screen shot for an example. It looks almost like it's a table, but I can't resize the columns, or see any table headers.
Created attachment 1428 [details] Screenshot
Consequence: makes external tool builds almost unusable Risk to fix: Low
Please investigate a fix for this and add details to this PR, including code snippets if possible.
*** Bug 17789 has been marked as a duplicate of this bug. ***
This problem is easy enough to fix. To do so we can comment out the code indicated below (found in BuilderPropertyPage.createContents(Composite)). Also, I have added a widthHint to the table's GridData. This ensures that the table scrolls instead of being resized for very long buider names. // table of builders and tools builderTable = new Table(tableAndButtons, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = 200; builderTable.setLayoutData(data); TableLayout tableLayout = new TableLayout(); builderTable.setLayout(tableLayout); // TableColumn tc = new TableColumn(builderTable, SWT.NONE); // tc.setResizable(false); // tableLayout.addColumnData(new ColumnWeightData(100)); builderTable.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleTableSelectionChanged(); } });
Should not have to use a TableLayout at all if there is only a single column. If you avoid creating the TableColumn, then SWT automatically resizes the column when the Table is made larger.
Agreed. A better fix, without using TableLayout, is shown below. Also, 200 will be stored as a constant instead of being used as a magic number in the real fix. // table of builders and tools builderTable = new Table(tableAndButtons, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = 200; builderTable.setLayoutData(data); // TableLayout tableLayout = new TableLayout(); // builderTable.setLayout(tableLayout); // TableColumn tc = new TableColumn(builderTable, SWT.NONE); // tc.setResizable(false); // tableLayout.addColumnData(new ColumnWeightData(100)); builderTable.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { handleTableSelectionChanged(); } });
Removing F4 tag since we are removing this feature. See bug 20542.
Reconsidering for F4 since 20542 was vetoed.
Code implemented by Ryan as per Nick comments above. Checked by Tod and Simon