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 160790 Details for
Bug 304507
Fake missing request for the ModalContextThread
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]
Patch
clipboard.txt (text/plain), 4.01 KB, created by
RĂ¼diger Herrmann
on 2010-03-03 10:55:12 EST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
RĂ¼diger Herrmann
Created:
2010-03-03 10:55:12 EST
Size:
4.01 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.jface >Index: src/org/eclipse/jface/operation/ModalContext.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.jface/src/org/eclipse/jface/operation/ModalContext.java,v >retrieving revision 1.4 >diff -u -r1.4 ModalContext.java >--- src/org/eclipse/jface/operation/ModalContext.java 23 Feb 2010 15:56:31 -0000 1.4 >+++ src/org/eclipse/jface/operation/ModalContext.java 3 Mar 2010 15:53:59 -0000 >@@ -116,58 +116,61 @@ > * (non-Javadoc) Method declared on Thread. > */ > public void run() { >- try { >- if (runnable != null) { >- runnable.run(progressMonitor); >- } >- } catch (InvocationTargetException e) { >- throwable = e; >- } catch (InterruptedException e) { >- throwable = e; >- } catch (RuntimeException e) { >- throwable = e; >- } catch (ThreadDeath e) { >- // Make sure to propagate ThreadDeath, or threads will never >- // fully terminate >- throw e; >- } catch (Error e) { >- throwable = e; >- } finally { >- // notify the operation of change of thread of control >- if (runnable instanceof IThreadListener) { >- Throwable exception = >- invokeThreadListener(((IThreadListener) runnable), callingThread); >- >- //Forward it if we don't already have one >- if(exception != null && throwable == null) >- throwable = exception; >- } >+// RAP [rh] supply a fake-context for the entire execution of runnable and exception handling >+ UICallBack.runNonUIThreadWithFakeContext(display, new Runnable() { > >- // Make sure that all events in the asynchronous event queue >- // are dispatched. >- display.syncExec(new Runnable() { >- public void run() { >- // do nothing >+ public void run() { >+ try { >+ if (runnable != null) { >+ runnable.run(progressMonitor); >+ } >+ } catch (InvocationTargetException e) { >+ throwable = e; >+ } catch (InterruptedException e) { >+ throwable = e; >+ } catch (RuntimeException e) { >+ throwable = e; >+ } catch (ThreadDeath e) { >+ // Make sure to propagate ThreadDeath, or threads will never >+ // fully terminate >+ throw e; >+ } catch (Error e) { >+ throwable = e; >+ } finally { >+ // notify the operation of change of thread of control >+ if (runnable instanceof IThreadListener) { >+ Throwable exception = >+ invokeThreadListener(((IThreadListener) runnable), callingThread); >+ >+ //Forward it if we don't already have one >+ if(exception != null && throwable == null) >+ throwable = exception; >+ } >+ >+ // Make sure that all events in the asynchronous event queue >+ // are dispatched. >+ display.syncExec(new Runnable() { >+ public void run() { >+ // do nothing >+ } >+ }); >+ >+ // Stop event dispatching >+ continueEventDispatching = false; >+ >+ // Force the event loop to return from sleep () so that >+ // it stops event dispatching. >+ display.asyncExec(null); >+ >+ // RAP [fappel]: deactivate UI-Callback for this thread >+ String key >+ = String.valueOf( ModalContextThread.this.hashCode() ); >+ UICallBack.deactivate( key ); >+ > } >- }); >- >- // Stop event dispatching >- continueEventDispatching = false; >- >- // Force the event loop to return from sleep () so that >- // it stops event dispatching. >- display.asyncExec(null); >+ } > >- // RAP [fappel]: deactivate UI-Callback for this thread >- UICallBack.runNonUIThreadWithFakeContext( display, new Runnable() { >- public void run() { >- String key >- = String.valueOf( ModalContextThread.this.hashCode() ); >- UICallBack.deactivate( key ); >- } >- } ); >- >- } >+ } ); // RAP [rh] end of fake-context runnable > } > > /**
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 304507
: 160790