Bug 39264 Override method dialog: Selection get's lost when toggling tree/flat mode
20030624 1. Open the setter/getter dialog, enable the tree mode 2. select some getters and setters 3. toggle to the flat list: Elements still selected 4. toggle to the tree mode: Tree collapsed (Should remember the old state) 5. Open the tree: No nodes checked, description still stays '2 of 5 selected'
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OverrideMethodDialog.java
String message= JavaUIMessages.getFormattedString("OverrideMethodDialog.selectioninfo.more", args); 
			return new StatusInfo(IStatus.INFO, message);
		}
	}		
	
	public OverrideMethodDialog(Shell parent, CompilationUnitEditor editor, IType type, boolean isSubType) throws JavaModelException {
		super(parent, new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT), new OverrideMethodContentProvider(), editor, type);
		init(type, isSubType);
	}
	
	public boolean hasMethodsToOverride() {
		return getContentProvider().getElements(null).length > 0;
	}
	
	
	private void init(IType type, boolean isSubType) throws JavaModelException {
		ITypeHierarchy typeHierarchy= type.newSupertypeHierarchy(null);
		IMethod[] inheritedMethods= StubUtility.getOverridableMethods(type, typeHierarchy, isSubType);
	
		List toImplement= new ArrayList();
		for (int i= 0; i < inheritedMethods.length; i++) {
			IMethod curr= inheritedMethods[i];
			if (JdtFlags.isAbstract(curr)) {
				toImplement.add(curr);
			}
		}
		IMethod[] toImplementArray= (IMethod[]) toImplement.toArray(new IMethod[toImplement.size()]);		
		setInitialSelections(toImplementArray);
		HashSet expanded= new HashSet(toImplementArray.length); 
		for (int i= 0; i < toImplementArray.length; i++) {