Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 340008
Collapse All | Expand All

(-)src/org/eclipse/jface/window/Window.java (-4 / +25 lines)
Lines 89-94 Link Here
89
    private static final String DEFAULT_MODAL_PARENT
89
    private static final String DEFAULT_MODAL_PARENT
90
      = Window.class.getName() + "#defaultModalParent"; //$NON-NLS-1$
90
      = Window.class.getName() + "#defaultModalParent"; //$NON-NLS-1$
91
91
92
// RAP [if] Session scoped exceptionHandler
93
    private static final String EXCEPTION_HANDLER
94
      = Window.class.getName() + "#exceptionHandler"; //$NON-NLS-1$
95
92
	/**
96
	/**
93
	 * Standard return code constant (value 0) indicating that the window was
97
	 * Standard return code constant (value 0) indicating that the window was
94
	 * opened.
98
	 * opened.
Lines 837-843 Link Here
837
					display.sleep();
841
					display.sleep();
838
				}
842
				}
839
			} catch (Throwable e) {
843
			} catch (Throwable e) {
840
				exceptionHandler.handleException(e);
844
// RAP [if] Session scoped exceptionHandler
845
//				exceptionHandler.handleException(e);
846
			    getExceptionHandler().handleException( e );
841
			}
847
			}
842
		}
848
		}
843
		if (!display.isDisposed()) display.update();
849
		if (!display.isDisposed()) display.update();
Lines 1042-1050 Link Here
1042
	 *            the exception handler for the application.
1048
	 *            the exception handler for the application.
1043
	 */
1049
	 */
1044
	public static void setExceptionHandler(IExceptionHandler handler) {
1050
	public static void setExceptionHandler(IExceptionHandler handler) {
1045
		if (exceptionHandler instanceof DefaultExceptionHandler) {
1051
// RAP [if] Session scoped exceptionHandler
1046
			exceptionHandler = handler;
1052
//		if (exceptionHandler instanceof DefaultExceptionHandler) {
1047
		}
1053
//			exceptionHandler = handler;
1054
//		}
1055
	    if( getExceptionHandler() instanceof DefaultExceptionHandler ) {
1056
	      ISessionStore session = ContextProvider.getSession();
1057
	      session.setAttribute( EXCEPTION_HANDLER, handler );
1058
	    }
1059
	}
1060
1061
// RAP [if] Session scoped exceptionHandler
1062
	private static IExceptionHandler getExceptionHandler() {
1063
	  ISessionStore session = ContextProvider.getSession();
1064
	  IExceptionHandler result = ( IExceptionHandler )session.getAttribute( EXCEPTION_HANDLER );
1065
      if( result == null ) {
1066
        result = exceptionHandler;
1067
      }
1068
      return result;
1048
	}
1069
	}
1049
    
1070
    
1050
    /**
1071
    /**

Return to bug 340008