Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 191495 Details for
Bug 340008
Consider Window#setExceptionHandler() to have session scope
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Session scoped exceptionHandler
Bug-340008.patch (text/plain), 2.15 KB, created by
Ivan Furnadjiev
on 2011-03-18 06:14:52 EDT
(
hide
)
Description:
Session scoped exceptionHandler
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2011-03-18 06:14:52 EDT
Size:
2.15 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.jface >Index: src/org/eclipse/jface/window/Window.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.jface/src/org/eclipse/jface/window/Window.java,v >retrieving revision 1.9 >diff -u -r1.9 Window.java >--- src/org/eclipse/jface/window/Window.java 17 Mar 2011 15:29:35 -0000 1.9 >+++ src/org/eclipse/jface/window/Window.java 18 Mar 2011 09:48:34 -0000 >@@ -89,6 +89,10 @@ > private static final String DEFAULT_MODAL_PARENT > = Window.class.getName() + "#defaultModalParent"; //$NON-NLS-1$ > >+// RAP [if] Session scoped exceptionHandler >+ private static final String EXCEPTION_HANDLER >+ = Window.class.getName() + "#exceptionHandler"; //$NON-NLS-1$ >+ > /** > * Standard return code constant (value 0) indicating that the window was > * opened. >@@ -837,7 +841,9 @@ > display.sleep(); > } > } catch (Throwable e) { >- exceptionHandler.handleException(e); >+// RAP [if] Session scoped exceptionHandler >+// exceptionHandler.handleException(e); >+ getExceptionHandler().handleException( e ); > } > } > if (!display.isDisposed()) display.update(); >@@ -1042,9 +1048,24 @@ > * the exception handler for the application. > */ > public static void setExceptionHandler(IExceptionHandler handler) { >- if (exceptionHandler instanceof DefaultExceptionHandler) { >- exceptionHandler = handler; >- } >+// RAP [if] Session scoped exceptionHandler >+// if (exceptionHandler instanceof DefaultExceptionHandler) { >+// exceptionHandler = handler; >+// } >+ if( getExceptionHandler() instanceof DefaultExceptionHandler ) { >+ ISessionStore session = ContextProvider.getSession(); >+ session.setAttribute( EXCEPTION_HANDLER, handler ); >+ } >+ } >+ >+// RAP [if] Session scoped exceptionHandler >+ private static IExceptionHandler getExceptionHandler() { >+ ISessionStore session = ContextProvider.getSession(); >+ IExceptionHandler result = ( IExceptionHandler )session.getAttribute( EXCEPTION_HANDLER ); >+ if( result == null ) { >+ result = exceptionHandler; >+ } >+ return result; > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 340008
: 191495