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
* 
	 * @param parentShell
	 *            the parent shell, or <code>null</code> to create a top-level
	 *            shell. Try passing "(Shell)null" to this method instead of "null"
     *            if your compiler complains about an ambiguity error.
	 * @see #setBlockOnOpen
	 * @see #getDefaultOrientation()
	 */
	protected Window(Shell parentShell) {
        this(new SameShellProvider(parentShell));
        
        if(parentShell == null) {
			setShellStyle(getShellStyle() | getDefaultOrientation());
		}
	}
    
    /**
     * Creates a new window which will create its shell as a child of whatever
     * the given shellProvider returns.
     * 
     * @param shellProvider object that will return the current parent shell. Not null.
     * 
     * @since 3.1
     */
    protected Window(IShellProvider shellProvider) {
        Assert.isNotNull(shellProvider);
        this.parentShell = shellProvider;   
    }
	/**
	 * Determines if the window should handle the close event or do nothing.