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
return new ShellAdapter() {
			public void shellClosed(ShellEvent event) {
				event.doit = false; 
				if (canHandleShellCloseEvent()) {
					handleShellCloseEvent();
				}
			}
		};
	}
	/**
	 * Returns the shell style bits.
	 * <p>
	 * The default value is <code>SWT.CLOSE|SWT.MIN|SWT.MAX|SWT.RESIZE</code>.
	 * Subclassers should call <code>setShellStyle</code> to change this
	 * value, rather than overriding this method.
	 * </p>
	 * 
	 * @return the shell style bits
	 */
	protected int getShellStyle() {
		return shellStyle;
	}
	/**
	 * Returns the window manager of this window.
	 * 
	 * @return the WindowManager, or <code>null</code> if none
	 */
	public WindowManager getWindowManager() {
		return windowManager;
	}