Bug 134401 Bug in JFace Window JavaDoc
Eclipse: 3.2 M5 Class: org.eclipse.jface.window.Window In text below "getContents()" should be used instead of "getControl()". /** * Creates and returns this window's contents. Subclasses may attach any * number of children to the parent. As a convenience, the return value of * this method will be remembered and returned by subsequent calls to * getControl(). Subclasses may modify the parent's layout if they overload * getLayout() to return null. * * <p> * It is common practise to create and return a single composite that * contains the entire window contents. * </p> * * <p> * The default implementation of this framework method creates an instance * of <code>Composite</code>. Subclasses may override. * </p> * * @param parent * the parent composite for the controls in this window. The type * of layout used is determined by getLayout() * * @return the control that will be returned by subsequent calls to * getControl() */ protected Control createContents(Composite parent) { // by default, just create a composite return new Composite(parent, SWT.NONE); }
bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
if (defaultImages != null && defaultImages.length > 0) {
			ArrayList nonDisposedImages = new ArrayList(defaultImages.length);
			for (int i = 0; i < defaultImages.length; ++i) {
				if (defaultImages[i] != null && !defaultImages[i].isDisposed()) {
					nonDisposedImages.add(defaultImages[i]);
				}
			}
			if (nonDisposedImages.size() <= 0) {
				System.err.println("Window.configureShell: images disposed"); 
			} else {
				Image[] array = new Image[nonDisposedImages.size()];
				nonDisposedImages.toArray(array);
				newShell.setImages(array);
			}
		}
		Layout layout = getLayout();
		if (layout != null) {
			newShell.setLayout(layout);
		}
	}
	/**
	 * Creates the layout for the shell. The layout created here will be
	 * attached to the composite passed into createContents. The default
	 * implementation returns a GridLayout with no margins. Subclasses that
	 * change the layout type by overriding this method should also override
	 * createContents.