Community
Participate
Working Groups
Build 20020328 I did a Refactor->Pull Up on the method defined below into an otherwise empty superclass. The refactoring wizard did NOT add import statements for the static field references (SWT and IDialogConstants), and hence there were compile errors after the refactor was complete. It correctly added the other necessary type imports. protected Button createButton(Composite parent, String label) { Button button = new Button(parent, SWT.PUSH); button.setText(Policy.bind(label)); GridData data = new GridData(GridData.FILL_HORIZONTAL); int widthHint = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_WIDTH); data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); data.heightHint = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_HEIGHT); button.setLayoutData(data); return button; }
looks like the reson is the same as bug 12649 so i will mark it as a duplicate *** This bug has been marked as a duplicate of 12649 ***