Bug 17885 Preference Pages don't resize well
Build: 20020521 The Java preference pages don't look very good when the user makes the preference page dialog narrower or shorter by manually resizing it. Here is a breakdown of problems by page: Builder: "Filtered resources" text field should shrink to fit the dialog width more. Classpath Variables: List box should shrink to fit and should scroll if necessary. Code Formatter: Text box should shrink to fit and should scroll if necessary (the scroll bars are there, why aren't they used?). Step Filtering: List box should shrink horizontally to fit and should scroll if necessary (compare vertical and horizontal behaviour when shrinking the preference page dialog). Editor: In the Syntax tab page, the "Preview" text box should shrink to fit and scroll if necessary. Installed JREs: The table viewer should shrink to fit and scroll if necessary. Javadoc: The "Javadoc command" text field should shrink to fit more. Organize Imports: The list box should shrink to fit and scroll if necessary. Templates: The table viewer should shrink to fit and scroll if necessary.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java
addCheckBox(newlineComposite, label, PREF_NEWLINE_OPENING_BRACES, insertNotInsert);	
		
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_control_statement.label"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_CONTROL_STATEMENT, insertNotInsert);	
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_clear_lines"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_CLEAR_ALL, new String[] { CLEAR_ALL, PRESERVE_ONE } );	
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_else_if.label"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_ELSE_IF, insertNotInsert);	
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.newline_empty_block.label"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_EMPTY_BLOCK, insertNotInsert);	
		
		layout= new GridLayout();
		layout.numColumns= 2;	
		
		Composite lineSplittingComposite= new Composite(folder, SWT.NULL);
		lineSplittingComposite.setLayout(layout);
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.split_line.label"); 
		addTextField(lineSplittingComposite, label, PREF_LINE_SPLIT);
		layout= new GridLayout();
		layout.numColumns= 2;	
		
		Composite styleComposite= new Composite(folder, SWT.NULL);
		styleComposite.setLayout(layout);
		
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.style_compact_assignement.label"); 
		addCheckBox(styleComposite, label, PREF_STYLE_COMPACT_ASSIGNEMENT, new String[] { COMPACT, NORMAL } );		
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.tab_char.label"); 
		addCheckBox(styleComposite, label, PREF_TAB_CHAR, new String[] { TAB, SPACE } );		
		label= JavaUIMessages.getString("CodeFormatterPreferencePage.tab_size.label"); 
		fTabSizeTextBox= addTextField(styleComposite, label, PREF_TAB_SIZE);