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
manager.add(this);
		}
	}
	/**
	 * Sets the exception handler for this application.
	 * <p>
	 * Note that only one handler may be set. Other calls to this method will be
	 * ignored.
	 * <p>
	 * 
	 * @param handler
	 *            the exception handler for the application.
	 */
	public static void setExceptionHandler(IExceptionHandler handler) {
		if (exceptionHandler instanceof DefaultExceptionHandler) {
			exceptionHandler = handler;
		}
	}
    
    /**
     * Sets the default parent for modal Windows. This will be used to locate
     * the parent for any modal Window constructed with a null parent.
     * 
     * @param provider shell provider that will be used to locate the parent shell
     * whenever a Window is created with a null parent
     * @since 3.1
     */
    public static void setDefaultModalParent(IShellProvider provider) {
        defaultModalParent = provider;
    }