Bug 39003 [JFace] Window exception handler
Hi all, The org.eclipse.jface.window.Window class contains the following sequence of code: public static void setExceptionHandler(IExceptionHandler handler) { if(exceptionHandler instanceof DefaultExceptionHandler) exceptionHandler = handler; } The instanceof check actually prevents setting a custom exception handler. The DefaultExceptionHandler class is made private and cannot be extended to hack around of this code. The DefaultExceptionHandler handles exceptions by printing stacktrace to the standard output. This problem effectively prevents the use of jface Window and it's subclass ApplicationWindow classes in any non trivial application. Regards, Peter.
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.