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 177143 Details for
Bug 323290
FileDiffResult doesn't work with alternate Charsets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch that fixes the problem
patch323290.txt (text/plain), 3.20 KB, created by
Michael Valenta
on 2010-08-20 16:55:56 EDT
(
hide
)
Description:
Patch that fixes the problem
Filename:
MIME Type:
Creator:
Michael Valenta
Created:
2010-08-20 16:55:56 EDT
Size:
3.20 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare >Index: compare/org/eclipse/compare/internal/patch/Utilities.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Utilities.java,v >retrieving revision 1.3 >diff -u -r1.3 Utilities.java >--- compare/org/eclipse/compare/internal/patch/Utilities.java 4 Mar 2009 09:31:22 -0000 1.3 >+++ compare/org/eclipse/compare/internal/patch/Utilities.java 20 Aug 2010 20:53:28 -0000 >@@ -67,6 +67,13 @@ > } > return true; > } >+ public String getCharset() throws CoreException { >+ if (storage instanceof IEncodedStorage) { >+ IEncodedStorage es = (IEncodedStorage) storage; >+ return es.getCharset(); >+ } >+ return super.getCharset(); >+ } > }; > } > >#P org.eclipse.compare.core >Index: src/org/eclipse/compare/internal/core/patch/FileDiffResult.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java,v >retrieving revision 1.10 >diff -u -r1.10 FileDiffResult.java >--- src/org/eclipse/compare/internal/core/patch/FileDiffResult.java 26 May 2010 08:43:22 -0000 1.10 >+++ src/org/eclipse/compare/internal/core/patch/FileDiffResult.java 20 Aug 2010 20:53:28 -0000 >@@ -25,6 +25,7 @@ > import org.eclipse.compare.patch.IHunk; > import org.eclipse.compare.patch.PatchConfiguration; > import org.eclipse.compare.patch.ReaderCreator; >+import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.NullProgressMonitor; >@@ -70,7 +71,12 @@ > this.fMatches= false; > this.fDiffProblem= false; > boolean create= false; >- this.charset = Utilities.getCharset(content); >+ try { >+ this.charset = content.getCharset(); >+ } catch (CoreException e) { >+ // Log and continue >+ ComparePlugin.log(e); >+ } > //If this diff is an addition, make sure that it doesn't already exist > boolean exists = targetExists(content); > if (this.fDiff.getDiffType(getConfiguration().isReversed()) == FilePatch2.ADDITION) { >Index: src/org/eclipse/compare/patch/ReaderCreator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/ReaderCreator.java,v >retrieving revision 1.3 >diff -u -r1.3 ReaderCreator.java >--- src/org/eclipse/compare/patch/ReaderCreator.java 2 Mar 2009 13:47:14 -0000 1.3 >+++ src/org/eclipse/compare/patch/ReaderCreator.java 20 Aug 2010 20:53:28 -0000 >@@ -39,4 +39,15 @@ > public boolean canCreateReader() { > return true; > } >+ >+ /** >+ * Return the charset of the underlying data or <code>null</code> if the >+ * charset could not be determined. >+ * @return the charset of the underlying data or <code>null</code> >+ * @throws CoreException >+ */ >+ public String getCharset() throws CoreException { >+ return null; >+ } >+ > }
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 323290
:
177143
|
177262