Bug 20403 - External Tool Builders - names truncated
Summary: External Tool Builders - names truncated
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 2.0 F4   Edit
Assignee: Ryan Cooper CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 17789 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-14 18:11 EDT by Peter Burka CLA
Modified: 2002-06-19 11:48 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot (4.62 KB, image/png)
2002-06-14 18:11 EDT, Peter Burka CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-06-14 18:11:06 EDT
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.
Comment 1 Peter Burka CLA 2002-06-14 18:11:28 EDT
Created attachment 1428 [details]
Screenshot
Comment 2 Nick Edgar CLA 2002-06-16 16:12:43 EDT
Consequence: makes external tool builds almost unusable
Risk to fix: Low
Comment 3 Nick Edgar CLA 2002-06-16 21:34:19 EDT
Please investigate a fix for this and add details to this PR, including code 
snippets if possible.
Comment 4 Ryan Cooper CLA 2002-06-17 07:45:52 EDT
*** Bug 17789 has been marked as a duplicate of this bug. ***
Comment 5 Ryan Cooper CLA 2002-06-17 10:03:08 EDT
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();
		}
	});
Comment 6 Nick Edgar CLA 2002-06-17 10:58:53 EDT
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.

Comment 7 Ryan Cooper CLA 2002-06-17 15:25:53 EDT
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();
		}
	});
Comment 8 Nick Edgar CLA 2002-06-18 11:45:35 EDT
Removing F4 tag since we are removing this feature.  See bug 20542.
Comment 9 Nick Edgar CLA 2002-06-18 14:49:26 EDT
Reconsidering for F4 since 20542 was vetoed.
Comment 10 Simon Arsenault CLA 2002-06-19 11:48:23 EDT
Code implemented by Ryan as per Nick comments above.

Checked by Tod and Simon