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 170544 Details for
Bug 315060
'Widget is disposed'-Exception when using DefaultButtons
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 Fix
DisposedDefaultButton.diff (text/plain), 1.77 KB, created by
Ralf Sternberg
on 2010-05-31 11:51:11 EDT
(
hide
)
Description:
Proposed Fix
Filename:
MIME Type:
Creator:
Ralf Sternberg
Created:
2010-05-31 11:51:11 EDT
Size:
1.77 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >Index: src/org/eclipse/swt/widgets/Shell.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/widgets/Shell.java,v >retrieving revision 1.65 >diff -u -r1.65 Shell.java >--- src/org/eclipse/swt/widgets/Shell.java 16 Feb 2010 14:51:51 -0000 1.65 >+++ src/org/eclipse/swt/widgets/Shell.java 31 May 2010 15:47:21 -0000 >@@ -849,7 +849,11 @@ > // TODO [rst] move to class Decorations as soon as it exists > public Button getDefaultButton() { > checkWidget(); >- return defaultButton; >+ Button result = null; >+ if( defaultButton != null && !defaultButton.isDisposed() ) { >+ result = defaultButton; >+ } >+ return result; > } > > /** >#P org.eclipse.rap.rwt.test >Index: src/org/eclipse/swt/widgets/Shell_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.test/src/org/eclipse/swt/widgets/Shell_Test.java,v >retrieving revision 1.27 >diff -u -r1.27 Shell_Test.java >--- src/org/eclipse/swt/widgets/Shell_Test.java 5 Feb 2010 13:10:24 -0000 1.27 >+++ src/org/eclipse/swt/widgets/Shell_Test.java 31 May 2010 15:47:22 -0000 >@@ -336,6 +336,15 @@ > assertEquals( null, shell.getDefaultButton() ); > } > >+ public void testDefaultButtonDisposed() { >+ Display display = new Display(); >+ Shell shell = new Shell( display ); >+ Button defaultButton = new Button( shell, SWT.PUSH ); >+ shell.setDefaultButton( defaultButton ); >+ defaultButton.dispose(); >+ assertNull( shell.getDefaultButton() ); >+ } >+ > public void testForceActive() throws Exception { > Display display = new Display(); > Shell shell = new Shell( display );
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
Flags:
ruediger.herrmann
:
review+
Actions:
View
|
Diff
Attachments on
bug 315060
:
170512
|
170513
| 170544