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 144659 Details for
Bug 286795
Proposal to avoid NPE in IconAndMessageDialog.getSWTImage(..)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch_1.0
2009-08-06_v_2.0.txt (text/plain), 2.48 KB, created by
Natalia Bartol
on 2009-08-17 08:48:05 EDT
(
hide
)
Description:
Patch_1.0
Filename:
MIME Type:
Creator:
Natalia Bartol
Created:
2009-08-17 08:48:05 EDT
Size:
2.48 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.team.ui >Index: src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java,v >retrieving revision 1.5 >diff -u -r1.5 MultipleYesNoPrompter.java >--- src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java 16 Mar 2007 21:03:35 -0000 1.5 >+++ src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java 6 Aug 2009 10:08:14 -0000 >@@ -72,15 +72,30 @@ > * @return whether the resource should be included > * @throws InterruptedException if the user choose to cancel > */ >- public boolean shouldInclude(String message) throws InterruptedException { >+ public boolean shouldInclude(final String message) throws InterruptedException { > if (confirmation == YES_TO_ALL) { > return true; > } else { > switch (confirmation) { > case ALWAYS_ASK: { >+ final boolean[] confirmOverwrite = new boolean[1]; > // This call has the nasty side effect of changing the > // instance scoped "confirmation" >- if (confirmOverwrite(message)) { >+ Shell shell = shellProvider.getShell(); >+ if(shell == null){ >+ return false; >+ } >+ shell.getDisplay().syncExec( >+ new Runnable() { >+ public void run() { >+ try { >+ confirmOverwrite[0] = confirmOverwrite(message); >+ } catch (InterruptedException e) { >+ confirmOverwrite[0] = false; >+ } >+ } >+ }); >+ if (confirmOverwrite[0]) { > return true; > } > break; >@@ -102,19 +117,11 @@ > * Opens the confirmation dialog based on the prompt condition settings. > */ > private boolean confirmOverwrite(String msg) throws InterruptedException { >+ > Shell shell = shellProvider.getShell(); > if (shell == null) return false; >- final MessageDialog dialog = >- new MessageDialog(shell, title, null, msg, MessageDialog.QUESTION, buttons, 0); >- >- // run in syncExec because callback is from an operation, >- // which is probably not running in the UI thread. >- shell.getDisplay().syncExec( >- new Runnable() { >- public void run() { >- dialog.open(); >- } >- }); >+ MessageDialog dialog = new MessageDialog(shell, title, null, msg, MessageDialog.QUESTION, buttons, 0); >+ dialog.open(); > if (hasMultiple) { > switch (dialog.getReturnCode()) { > case 0://Yes
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 286795
: 144659