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 172310 Details for
Bug 317403
[Upload] RCP version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Patch for RWT to introduce functionalety needed for SWT
UploadPatchRWT.txt (text/plain), 5.11 KB, created by
Martijn Cremer
on 2010-06-21 04:41:27 EDT
(
hide
)
Description:
Patch for RWT to introduce functionalety needed for SWT
Filename:
MIME Type:
Creator:
Martijn Cremer
Created:
2010-06-21 04:41:27 EDT
Size:
5.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rwt.widgets.upload >Index: src/org/eclipse/rwt/widgets/Upload.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/sandbox/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/Upload.java,v >retrieving revision 1.16 >diff -u -r1.16 Upload.java >--- src/org/eclipse/rwt/widgets/Upload.java 5 May 2010 11:40:28 -0000 1.16 >+++ src/org/eclipse/rwt/widgets/Upload.java 21 Jun 2010 08:39:11 -0000 >@@ -152,7 +152,7 @@ > /** > * @deprecated use Upload(Composite, int, int) instead > */ >- public Upload( final Composite parent, >+ private Upload( final Composite parent, > final int style, > final String servlet, > final int flags ) >@@ -527,7 +527,8 @@ > final UploadItem uploadItem = new UploadItem( uploadedFile.getFileInputStream(), > uploadedFile.getContentType(), > getLastFileUploaded(), >- getPath() ); >+ getPath(), >+ uploadedFile.getContentLength()); > return uploadItem; > } > >Index: src/org/eclipse/rwt/widgets/UploadEvent.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/sandbox/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/UploadEvent.java,v >retrieving revision 1.5 >diff -u -r1.5 UploadEvent.java >--- src/org/eclipse/rwt/widgets/UploadEvent.java 5 May 2010 11:40:28 -0000 1.5 >+++ src/org/eclipse/rwt/widgets/UploadEvent.java 21 Jun 2010 08:39:11 -0000 >@@ -39,7 +39,7 @@ > > > /** >- * Returns an exception that ocurred during upload during >+ * Returns an exception that occurred during upload during > * processing the file on the server side. > */ > public Exception getUploadException() { >@@ -57,9 +57,9 @@ > } > > /** >- * Gets the parcial amount of data uploaded. >+ * Gets the partial amount of data uploaded. > * >- * @return The parcial amount of data uploaded. >+ * @return The partial amount of data uploaded. > */ > public final int getUploadedParcial() { > return this.uploadedParcial; >@@ -78,7 +78,7 @@ > * Creates a new instance of the Upload Event. > * > * @param finished Indicates if the upload is finished. >- * @param uploadedParcial The parcial amount of data uploaded. >+ * @param uploadedParcial The partial amount of data uploaded. > * @param uploadedTotal The total file size. > * @param widget The sender of the event, must not be null > */ >Index: src/org/eclipse/rwt/widgets/UploadItem.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/sandbox/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/UploadItem.java,v >retrieving revision 1.1 >diff -u -r1.1 UploadItem.java >--- src/org/eclipse/rwt/widgets/UploadItem.java 5 Jun 2008 10:47:03 -0000 1.1 >+++ src/org/eclipse/rwt/widgets/UploadItem.java 21 Jun 2010 08:39:11 -0000 >@@ -25,6 +25,7 @@ > private String contentType; > private String fileName; > private String filePath; >+ private long fileSize; > > /** > * Creates an UploadItem isntance with the given parameters which all can be >@@ -33,13 +34,15 @@ > public UploadItem( InputStream fileInputStream, > final String contentType, > final String fileName, >- final String filePath ) >+ final String filePath, >+ final long fileSize) > { > super(); > this.fileInputStream = fileInputStream; > this.fileName = fileName; > this.filePath = filePath; > this.contentType = contentType; >+ this.fileSize = fileSize; > } > > /** >@@ -74,4 +77,12 @@ > public String getFilePath() { > return filePath; > } >+ >+ /** >+ * Returns the size of the File in the {@link UploadItem#getFileInputStream()} thats stored in this UploadItem >+ * . (Tested with RC3) >+ */ >+ public long getFileSize() { >+ return fileSize; >+ } > } >Index: src/org/eclipse/rwt/widgets/internal/uploadkit/UploadLCA.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/sandbox/org.eclipse.rwt.widgets.upload/src/org/eclipse/rwt/widgets/internal/uploadkit/UploadLCA.java,v >retrieving revision 1.11 >diff -u -r1.11 UploadLCA.java >--- src/org/eclipse/rwt/widgets/internal/uploadkit/UploadLCA.java 5 May 2010 11:40:29 -0000 1.11 >+++ src/org/eclipse/rwt/widgets/internal/uploadkit/UploadLCA.java 21 Jun 2010 08:39:11 -0000 >@@ -75,7 +75,7 @@ > public void run() { > final UploadEvent evt; > if (uploadException != null) { >- evt = new UploadEvent( widget, uploadException); >+ evt = new UploadEvent(widget, uploadException); > } else { > evt = new UploadEvent( upload, Boolean.valueOf( finished ) > .booleanValue(), uploadPartial, uploadTotal );
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 Raw
Actions:
View
Attachments on
bug 317403
: 172310 |
174282