Bug 171027 Emtpy space created when calling setEnabled on encoding field editor
I20070116-1510 FieldEditor.setEnabled(boolean) is implemented in a pretty strange way: it creates the label if not yet created. This has side effects for clients that do not need/create that label but later call setEnabled(...). An example for such a subclass is AbstractEncodingFieldEditor. Now, fixing this in FieldEditor.setEnabled(...) might be problematic because currently for some clients the label might only appear as a side-effect of calling setEnabled(...) during initialization. A safer fix might be to simply not call super.setEnabled(...) in AbstractEncodingFieldEditor.setEnabled(...).
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/AbstractEncodingFieldEditor.java
topControl = top;
		}
		GridData data = new GridData(GridData.FILL_HORIZONTAL);
		topControl.setLayoutData(data);		
		topControl.setLayout(layout);
		SelectionAdapter buttonListener = new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e) {
				updateEncodingState(defaultEncodingButton.getSelection());
				updateValidState();
			}
		};
		defaultEncodingButton = new Button(topControl, SWT.RADIO);
		defaultEnc = findDefaultEncoding();
		defaultEncodingButton.setText(defaultButtonText());
		data = new GridData();
		data.horizontalSpan = 2;
		defaultEncodingButton.setLayoutData(data);
		defaultEncodingButton.addSelectionListener(buttonListener);
		otherEncodingButton = new Button(topControl, SWT.RADIO);
		otherEncodingButton
				.setText(IDEWorkbenchMessages.WorkbenchPreference_otherEncoding);
		otherEncodingButton.addSelectionListener(buttonListener);
		encodingCombo = new Combo(topControl, SWT.NONE);
		data = new GridData();
		encodingCombo.setLayoutData(data);
		encodingCombo.addSelectionListener(new SelectionAdapter() {
			/*
			 * (non-Javadoc)
			 * 
			 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)