Bug 12628 - Missing imports for static field refs after pull up method
Summary: Missing imports for static field refs after pull up method
Status: RESOLVED DUPLICATE of bug 12649
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adam Kiezun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-02 11:27 EST by John Arthorne CLA
Modified: 2002-04-04 12:04 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2002-04-02 11:27:52 EST
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;
}
Comment 1 Adam Kiezun CLA 2002-04-04 12:04:59 EST
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 ***