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 109645 Details for
Bug 150591
[Patch] Team -> Apply Patch and line endings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch v01
patch_150591_v02.txt (text/plain), 2.23 KB, created by
Tomasz Zarna
on 2008-08-11 06:54:22 EDT
(
hide
)
Description:
Patch v01
Filename:
MIME Type:
Creator:
Tomasz Zarna
Created:
2008-08-11 06:54:22 EDT
Size:
2.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.compare.core >Index: src/org/eclipse/compare/internal/core/patch/Hunk.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java,v >retrieving revision 1.1 >diff -u -r1.1 Hunk.java >--- src/org/eclipse/compare/internal/core/patch/Hunk.java 15 Jul 2008 14:43:27 -0000 1.1 >+++ src/org/eclipse/compare/internal/core/patch/Hunk.java 11 Aug 2008 10:53:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -314,6 +314,9 @@ > List contextLines = new ArrayList(); > boolean contextLinesMatched = true; > boolean precedingLinesChecked = false; >+ >+ String lineDelimiter = getLineDelimiter(lines); >+ > for (int i= 0; i < fLines.length; i++) { > String s= fLines[i]; > Assert.isTrue(s.length() > 0); >@@ -372,6 +375,10 @@ > contextLines.clear(); > contextLinesMatched = true; > >+ // if the line contains a delimiter, use a proper one >+ if (line.length() > LineReader.length(line)) >+ line = line.substring(0, LineReader.length(line)) + lineDelimiter; >+ > if (getLength(reverse) == 0 && pos+1 < lines.size()) > lines.add(pos+1, line); > else >@@ -412,6 +419,18 @@ > return true; > } > >+ private String getLineDelimiter(List lines) { >+ String separator = System.getProperty("line.separator"); >+ if (lines.size() > 0) { >+ String line0 = (String) lines.get(0); >+ separator = line0.substring(LineReader.length(line0)); >+ } else if (fLines.length > 0) { >+ String line0 = fLines[0]; >+ separator = line0.substring(LineReader.length(line0)); >+ } >+ return separator; >+ } >+ > /* > * Returns the given string with all whitespace characters removed. > * Whitespace is defined by <code>Character.isWhitespace(...)</code>.
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 150591
:
78544
|
89918
|
109644
| 109645 |
109646
|
113741
|
120188