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 191411 Details for
Bug 340005
Windows#setDefaultModalParent() stores given value in application 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]
Proposed patch
Bug-340005.patch (text/plain), 2.44 KB, created by
Ivan Furnadjiev
on 2011-03-17 08:54:34 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2011-03-17 08:54:34 EDT
Size:
2.44 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.8 >diff -u -r1.8 Window.java >--- src/org/eclipse/jface/window/Window.java 23 Feb 2010 15:56:31 -0000 1.8 >+++ src/org/eclipse/jface/window/Window.java 17 Mar 2011 12:40:06 -0000 >@@ -17,6 +17,8 @@ > import org.eclipse.jface.util.Geometry; > import org.eclipse.jface.util.IPropertyChangeListener; > import org.eclipse.jface.util.PropertyChangeEvent; >+import org.eclipse.rwt.internal.service.ContextProvider; >+import org.eclipse.rwt.service.ISessionStore; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.ShellAdapter; > import org.eclipse.swt.events.ShellEvent; >@@ -83,6 +85,10 @@ > */ > public abstract class Window implements IShellProvider { > >+// RAP [if] Session scoped defaultModalParent >+ private static final String DEFAULT_MODAL_PARENT >+ = Window.class.getName() + "#defaultModalParent"; //$NON-NLS-1$ >+ > /** > * Standard return code constant (value 0) indicating that the window was > * opened. >@@ -641,7 +647,9 @@ > if ((getShellStyle() & modal) != 0) { > // If this is a modal shell with no parent, pick a shell using defaultModalParent. > if (parent == null) { >- parent = defaultModalParent.getShell(); >+// RAP [if] Session scoped defaultModalParent >+// parent = defaultModalParent.getShell(); >+ parent = getDefaultModalParent().getShell(); > } > } > >@@ -1048,7 +1056,20 @@ > * @since 1.0 > */ > public static void setDefaultModalParent(IShellProvider provider) { >- defaultModalParent = provider; >+// RAP [if] Session scoped defaultModalParent >+// defaultModalParent = provider; >+ ISessionStore session = ContextProvider.getSession(); >+ session.setAttribute( DEFAULT_MODAL_PARENT, provider ); >+ } >+ >+// RAP [if] Session scoped defaultModalParent >+ private static IShellProvider getDefaultModalParent() { >+ ISessionStore session = ContextProvider.getSession(); >+ IShellProvider result = ( IShellProvider )session.getAttribute( DEFAULT_MODAL_PARENT ); >+ if( result == null ) { >+ result = defaultModalParent; >+ } >+ return result; > } > > // RAP [bm]: SWT.RIGHT_TO_LEFT
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 340005
: 191411