Bug 72024 UndoManager creates potential memory leak [refactoring]
3.0 The refactoring undo manager doesn't call dispose in all cases where a undo/redo object is no longer needed. This can result in a memory leak since the undo/redo object could register for listeners and therefore relies on the fact the dispose is called correctly. Cases where dispose isn't called: - if the undo stack reaches it maximum number of change objects and the last one is removed from the stack. - if the undo/redo stack gests flushed and one of the change objects causes an exception during sending dispose. - if the undo/redo object isn't valid anymore and can therefore not be executed.
org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringWizardDialog2.java
rect.x= Math.max(0, rect.x - dx);
		rect.y= Math.max(0, rect.y - dy);
		rect.width= Math.min(rect.width + dw, display.width);
		rect.height= Math.min(rect.height + dh, display.height);
		int xe= rect.x + rect.width;
		if (xe > display.width) {
			rect.x-= xe - display.width; 
		}
		int ye= rect.y + rect.height;
		if (ye > display.height) {
			rect.y-= ye - display.height; 
		}
		shell.setBounds(rect);
	}
	
	
	
	protected void configureShell(Shell newShell) {
		super.configureShell(newShell);
		newShell.setText(fWizard.getDefaultPageTitle());
		fWizard.getRefactoring().setValidationContext(newShell);
	}
	
	protected Control createContents(Composite parent) {
		Composite result= new Composite(parent, SWT.NONE);
		GridLayout layout= new GridLayout();
		layout.marginHeight= 0; layout.marginWidth= 0;
		layout.verticalSpacing= 0; layout.horizontalSpacing= 0;
		result.setLayout(layout);
		result.setLayoutData(new GridData(GridData.FILL_BOTH));