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 90037 Details for
Bug 205238
drag and drop multiple attachments only attaches the first in the selection
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 that displays more than one file error in NewAttachmentWizard window
clipboard.txt (text/plain), 2.28 KB, created by
maarten meijer
on 2008-02-19 03:37:25 EST
(
hide
)
Description:
patch that displays more than one file error in NewAttachmentWizard window
Filename:
MIME Type:
Creator:
maarten meijer
Created:
2008-02-19 03:37:25 EST
Size:
2.28 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java,v >retrieving revision 1.11 >diff -u -r1.11 RepositoryTaskEditorDropListener.java >--- src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java 9 Oct 2007 04:27:13 -0000 1.11 >+++ src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java 19 Feb 2008 08:35:35 -0000 >@@ -110,7 +110,7 @@ > > AbstractTaskEditor.setGlobalBusy(true); > NewAttachmentWizard naw = new NewAttachmentWizard(this.AbstractTaskEditor.repository, task, text); >- openDialog(naw); >+ openDialog(naw, null); > } > if (fileTransfer.isSupportedType(event.currentDataType)) { > String[] files = (String[]) event.data; >@@ -124,17 +124,36 @@ > > NewAttachmentWizard naw = new NewAttachmentWizard(this.AbstractTaskEditor.repository, task, new File( > files[0])); >- openDialog(naw); >- >+ // TODO bug 205238 show error if attempted more than one file to drop >+ String error = null; >+ if (files.length > 1) { >+ StringBuilder sb = new StringBuilder(); >+ int remaining = files.length - 1; >+ sb.append("Only the first file can be attached, please attach the remaining"); >+ if(remaining > 1) { >+ sb.append(" "); >+ sb.append(remaining); >+ } >+ sb.append(" file"); >+ if(remaining > 1) sb.append("s"); >+ sb.append(" one by one."); >+ error = sb.toString(); >+ } >+ openDialog(naw, error); > } > } > } > >- private void openDialog(NewAttachmentWizard naw) { >+ /** >+ * @param naw wizard to attach dialog to. >+ * @param message error to display or none if <code>null</code> >+ */ >+ private void openDialog(NewAttachmentWizard naw, String message) { > AbstractTaskEditor.setGlobalBusy(true); > NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(control.getShell(), naw, true); > naw.setDialog(dialog); > dialog.create(); >+ if(null != message) dialog.setErrorMessage(message); > int result = dialog.open(); > if (result != MessageDialog.OK) { > AbstractTaskEditor.setGlobalBusy(false);
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 205238
:
79841
|
88671
|
88672
| 90037 |
90038