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 127474 Details for
Bug 267020
[Apply Patch] Rename FileDiffWrapper to FilePatch and FileDiff to FilePatch2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch_v01
267020_v01.txt (text/plain), 66.26 KB, created by
Pawel Pogorzelski
on 2009-03-04 09:27:08 EST
(
hide
)
Description:
Patch_v01
Filename:
MIME Type:
Creator:
Pawel Pogorzelski
Created:
2009-03-04 09:27:08 EST
Size:
66.26 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.6 >diff -u -r1.6 FileDiffResult.java >--- src/org/eclipse/compare/internal/core/patch/FileDiffResult.java 2 Mar 2009 13:47:14 -0000 1.6 >+++ src/org/eclipse/compare/internal/core/patch/FileDiffResult.java 4 Mar 2009 14:26:25 -0000 >@@ -32,7 +32,7 @@ > > public class FileDiffResult implements IFilePatchResult { > >- private FileDiff fDiff; >+ private FilePatch2 fDiff; > private boolean fMatches= false; > private boolean fDiffProblem; > private String fErrorMessage; >@@ -41,7 +41,7 @@ > private final PatchConfiguration configuration; > private String charset; > >- public FileDiffResult(FileDiff diff, PatchConfiguration configuration) { >+ public FileDiffResult(FilePatch2 diff, PatchConfiguration configuration) { > super(); > fDiff = diff; > this.configuration = configuration; >@@ -73,7 +73,7 @@ > charset = Utilities.getCharset(content); > //If this diff is an addition, make sure that it doesn't already exist > boolean exists = targetExists(content); >- if (fDiff.getDiffType(getConfiguration().isReversed()) == FileDiff.ADDITION) { >+ if (fDiff.getDiffType(getConfiguration().isReversed()) == FilePatch2.ADDITION) { > if ((!exists || isEmpty(content)) && canCreateTarget(content)) { > fMatches= true; > } else { >@@ -220,7 +220,7 @@ > monitor = new NullProgressMonitor(); > fBeforeLines = new ArrayList(lines); > // TODO: What about deletions? >- if (fDiff.getDiffType(getConfiguration().isReversed()) == FileDiff.ADDITION) { >+ if (fDiff.getDiffType(getConfiguration().isReversed()) == FilePatch2.ADDITION) { > // Additions don't need to adjust the fuzz factor > // TODO: What about the after lines? > return -1; >@@ -268,7 +268,7 @@ > return failedHunks; > } > >- public FileDiff getDiff() { >+ public FilePatch2 getDiff() { > return fDiff; > } > >Index: src/org/eclipse/compare/internal/core/patch/FileDiff.java >=================================================================== >RCS file: src/org/eclipse/compare/internal/core/patch/FileDiff.java >diff -N src/org/eclipse/compare/internal/core/patch/FileDiff.java >--- src/org/eclipse/compare/internal/core/patch/FileDiff.java 4 Mar 2009 14:10:15 -0000 1.4 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,266 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2006, 2009 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 >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * IBM Corporation - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.compare.internal.core.patch; >- >-import java.util.ArrayList; >-import java.util.Iterator; >-import java.util.List; >- >-import org.eclipse.compare.patch.IFilePatch2; >-import org.eclipse.compare.patch.IFilePatchResult; >-import org.eclipse.compare.patch.IHunk; >-import org.eclipse.compare.patch.PatchConfiguration; >-import org.eclipse.compare.patch.ReaderCreator; >-import org.eclipse.core.runtime.IPath; >-import org.eclipse.core.runtime.IProgressMonitor; >-import org.eclipse.core.runtime.Path; >- >-/** >- * A file diff represents a set of hunks that were associated with the >- * same path in a patch file. >- */ >-public class FileDiff implements IFilePatch2 { >- >- /** >- * Difference constant (value 1) indicating one side was added. >- */ >- public static final int ADDITION= 1; >- /** >- * Difference constant (value 2) indicating one side was removed. >- */ >- public static final int DELETION= 2; >- /** >- * Difference constant (value 3) indicating side changed. >- */ >- public static final int CHANGE= 3; >- >- private IPath fOldPath, fNewPath; >- private long oldDate, newDate; >- private List fHunks= new ArrayList(); >- private DiffProject fProject; //the project that contains this diff >- private String header; >- private int addedLines, removedLines; >- >- /** >- * Create a file diff for the given path and date information. >- * @param oldPath the path of the before state of the file >- * @param oldDate the timestamp of the before state >- * @param newPath the path of the after state >- * @param newDate the timestamp of the after state >- */ >- public FileDiff(IPath oldPath, long oldDate, IPath newPath, long newDate) { >- fOldPath= oldPath; >- this.oldDate = oldDate; >- fNewPath= newPath; >- this.newDate = newDate; >- } >- >- /** >- * Return the parent project or <code>null</code> if there isn't one. >- * @return the parent project or <code>null</code> >- */ >- public DiffProject getProject() { >- return fProject; >- } >- >- /** >- * Set the project of this diff to the given project. >- * This method should only be called from >- * {@link DiffProject#add(FileDiff)} >- * @param diffProject the parent project >- */ >- void setProject(DiffProject diffProject) { >- if (fProject == diffProject) >- return; >- if (fProject != null) >- fProject.remove(this); >- this.fProject= diffProject; >- } >- >- /** >- * Get the path of the file diff. >- * @param reverse whether the path of the before state or after state >- * should be used >- * @return the path of the file diff >- */ >- public IPath getPath(boolean reverse) { >- if (getDiffType(reverse) == ADDITION) { >- if (reverse) >- return fOldPath; >- return fNewPath; >- } >- if (reverse && fNewPath != null) >- return fNewPath; >- if (fOldPath != null) >- return fOldPath; >- return fNewPath; >- } >- >- /** >- * Add the hunk to this file diff. >- * @param hunk the hunk >- */ >- public void add(Hunk hunk) { >- fHunks.add(hunk); >- hunk.setParent(this); >- } >- >- /** >- * Remove the hunk from this file diff >- * @param hunk the hunk >- */ >- protected void remove(Hunk hunk) { >- fHunks.remove(hunk); >- } >- >- /** >- * Return the hunks associated with this file diff. >- * @return the hunks associated with this file diff >- */ >- public IHunk[] getHunks() { >- return (IHunk[]) fHunks.toArray(new IHunk[fHunks.size()]); >- } >- >- /** >- * Return the number of hunks associated with this file diff. >- * @return the number of hunks associated with this file diff >- */ >- public int getHunkCount() { >- return fHunks.size(); >- } >- >- /** >- * Return the difference type of this file diff. >- * @param reverse whether the patch is being reversed >- * @return the type of this file diff >- */ >- public int getDiffType(boolean reverse) { >- if (fHunks.size() == 1) { >- boolean add = false; >- boolean delete = false; >- Iterator iter = fHunks.iterator(); >- while (iter.hasNext()){ >- Hunk hunk = (Hunk) iter.next(); >- int type =hunk.getHunkType(reverse); >- if (type == ADDITION){ >- add = true; >- } else if (type == DELETION ){ >- delete = true; >- } >- } >- if (add && !delete){ >- return ADDITION; >- } else if (!add && delete){ >- return DELETION; >- } >- } >- return CHANGE; >- } >- >- /** >- * Return the path of this file diff with the specified number >- * of leading segments striped. >- * @param strip the number of leading segments to strip from the path >- * @param reverse whether the patch is being reversed >- * @return the path of this file diff with the specified number >- * of leading segments striped >- */ >- public IPath getStrippedPath(int strip, boolean reverse) { >- IPath path= getPath(reverse); >- if (strip > 0 && strip < path.segmentCount()) >- path= path.removeFirstSegments(strip); >- return path; >- } >- >- /** >- * Return the segment count of the path of this file diff. >- * @return the segment count of the path of this file diff >- */ >- public int segmentCount() { >- //Update prefix count - go through all of the diffs and find the smallest >- //path segment contained in all diffs. >- int length= 99; >- if (fOldPath != null) >- length= Math.min(length, fOldPath.segmentCount()); >- if (fNewPath != null) >- length= Math.min(length, fNewPath.segmentCount()); >- return length; >- } >- >- public IFilePatchResult apply(ReaderCreator content, >- PatchConfiguration configuration, IProgressMonitor monitor) { >- FileDiffResult result = new FileDiffResult(this, configuration); >- result.refresh(content, monitor); >- return result; >- } >- >- public IPath getTargetPath(PatchConfiguration configuration) { >- return getStrippedPath(configuration.getPrefixSegmentStripCount(), configuration.isReversed()); >- } >- >- public FileDiff asRelativeDiff() { >- if (fProject == null) >- return this; >- IPath adjustedOldPath = null; >- if (fOldPath != null) { >- adjustedOldPath = new Path(null, fProject.getName()).append(fOldPath); >- } >- IPath adjustedNewPath = null; >- if (fNewPath != null) { >- adjustedNewPath = new Path(null, fProject.getName()).append(fNewPath); >- } >- FileDiff diff = create(adjustedOldPath, 0, adjustedNewPath, 0); >- for (Iterator iterator = fHunks.iterator(); iterator.hasNext();) { >- Hunk hunk = (Hunk) iterator.next(); >- // Creating the hunk adds it to the parent diff >- new Hunk(diff, hunk); >- } >- return diff; >- } >- >- protected FileDiff create(IPath oldPath, long oldDate, IPath newPath, >- long newDate) { >- return new FileDiff(oldPath, oldDate, newPath, newDate); >- } >- >- public void setHeader(String header) { >- this.header = header; >- } >- >- public String getHeader() { >- return header; >- } >- >- public long getBeforeDate() { >- return oldDate; >- } >- >- public long getAfterDate() { >- return newDate; >- } >- >- public void setAddedLines(int addedLines) { >- this.addedLines = addedLines; >- } >- >- public void setRemovedLines(int removedLines) { >- this.removedLines = removedLines; >- } >- >- public int getAddedLines() { >- return addedLines; >- } >- >- public int getRemovedLines() { >- return removedLines; >- } >- >-} >Index: src/org/eclipse/compare/internal/core/patch/DiffProject.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/DiffProject.java,v >retrieving revision 1.2 >diff -u -r1.2 DiffProject.java >--- src/org/eclipse/compare/internal/core/patch/DiffProject.java 16 Feb 2009 11:46:19 -0000 1.2 >+++ src/org/eclipse/compare/internal/core/patch/DiffProject.java 4 Mar 2009 14:26:25 -0000 >@@ -35,7 +35,7 @@ > * Add the file diff to this project. > * @param diff the file diff. > */ >- public void add(FileDiff diff) { >+ public void add(FilePatch2 diff) { > fDiffs.add(diff); > if (diff.getProject() != this) > diff.setProject(this); >@@ -53,7 +53,7 @@ > * Remove the file diff from this project. > * @param diff the diff to be removed > */ >- public void remove(FileDiff diff) { >+ public void remove(FilePatch2 diff) { > fDiffs.remove(diff); > } > >@@ -62,7 +62,7 @@ > * @param diff a file diff > * @return whether this project contains the given diff > */ >- public boolean contains(FileDiff diff) { >+ public boolean contains(FilePatch2 diff) { > return fDiffs.contains(diff); > } > >@@ -70,7 +70,7 @@ > * Return the file diffs associated with this project. > * @return the file diffs associated with this project > */ >- public FileDiff[] getFileDiffs() { >- return (FileDiff[]) fDiffs.toArray(new FileDiff[fDiffs.size()]); >+ public FilePatch2[] getFileDiffs() { >+ return (FilePatch2[]) fDiffs.toArray(new FilePatch2[fDiffs.size()]); > } > } >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.6 >diff -u -r1.6 Hunk.java >--- src/org/eclipse/compare/internal/core/patch/Hunk.java 25 Feb 2009 11:52:28 -0000 1.6 >+++ src/org/eclipse/compare/internal/core/patch/Hunk.java 4 Mar 2009 14:26:25 -0000 >@@ -24,14 +24,14 @@ > */ > public class Hunk implements IHunk { > >- private FileDiff fParent; >+ private FilePatch2 fParent; > private int fOldStart, fOldLength; > private int fNewStart, fNewLength; > private String[] fLines; > private int hunkType; > private String charset = null; > >- public static Hunk createHunk(FileDiff parent, int[] oldRange, int[] newRange, List lines, boolean hasLineAdditions, boolean hasLineDeletions, boolean hasContextLines) { >+ public static Hunk createHunk(FilePatch2 parent, int[] oldRange, int[] newRange, List lines, boolean hasLineAdditions, boolean hasLineDeletions, boolean hasContextLines) { > int oldStart = 0; > int oldLength = 0; > int newStart = 0; >@@ -46,18 +46,18 @@ > else > newStart= 0; > newLength= newRange[1]; >- int hunkType = FileDiff.CHANGE; >+ int hunkType = FilePatch2.CHANGE; > if (!hasContextLines) { > if (hasLineAdditions && !hasLineDeletions) { >- hunkType = FileDiff.ADDITION; >+ hunkType = FilePatch2.ADDITION; > } else if (!hasLineAdditions && hasLineDeletions) { >- hunkType = FileDiff.DELETION; >+ hunkType = FilePatch2.DELETION; > } > } > return new Hunk(parent, hunkType, oldStart, oldLength, newStart, newLength, (String[]) lines.toArray(new String[lines.size()])); > } > >- public Hunk(FileDiff parent, int hunkType, int oldStart, int oldLength, >+ public Hunk(FilePatch2 parent, int hunkType, int oldStart, int oldLength, > int newStart, int newLength, String[] lines) { > fParent = parent; > if (fParent != null) { >@@ -71,7 +71,7 @@ > fLines = lines; > } > >- public Hunk(FileDiff parent, Hunk toCopy) { >+ public Hunk(FilePatch2 parent, Hunk toCopy) { > this(parent, toCopy.hunkType, toCopy.fOldStart, toCopy.fOldLength, toCopy.fNewStart, toCopy.fNewLength, toCopy.fLines); > } > >@@ -129,10 +129,10 @@ > > public int getHunkType(boolean reverse) { > if (reverse) { >- if (hunkType == FileDiff.ADDITION) >- return FileDiff.DELETION; >- if (hunkType == FileDiff.DELETION) >- return FileDiff.ADDITION; >+ if (hunkType == FilePatch2.ADDITION) >+ return FilePatch2.DELETION; >+ if (hunkType == FilePatch2.DELETION) >+ return FilePatch2.ADDITION; > } > return hunkType; > } >@@ -153,10 +153,10 @@ > > /** > * Set the parent of this hunk. This method >- * should only be invoked from {@link FileDiff#add(Hunk)} >+ * should only be invoked from {@link FilePatch2#add(Hunk)} > * @param diff the parent of this hunk > */ >- void setParent(FileDiff diff) { >+ void setParent(FilePatch2 diff) { > if (fParent == diff) > return; > if (fParent != null) >@@ -164,7 +164,7 @@ > fParent = diff; > } > >- public FileDiff getParent() { >+ public FilePatch2 getParent() { > return fParent; > } > >Index: src/org/eclipse/compare/internal/core/patch/PatchReader.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java,v >retrieving revision 1.5 >diff -u -r1.5 PatchReader.java >--- src/org/eclipse/compare/internal/core/patch/PatchReader.java 4 Mar 2009 14:10:15 -0000 1.5 >+++ src/org/eclipse/compare/internal/core/patch/PatchReader.java 4 Mar 2009 14:26:25 -0000 >@@ -53,7 +53,7 @@ > > private boolean fIsWorkspacePatch; > private DiffProject[] fDiffProjects; >- private FileDiff[] fDiffs; >+ private FilePatch2[] fDiffs; > > // API for writing new multi-project patch format > public static final String MULTIPROJECTPATCH_HEADER= "### Eclipse Workspace Patch"; //$NON-NLS-1$ >@@ -152,19 +152,19 @@ > lr.close(); > > fDiffProjects= (DiffProject[]) diffProjects.values().toArray(new DiffProject[diffProjects.size()]); >- fDiffs = (FileDiff[]) diffs.toArray(new FileDiff[diffs.size()]); >+ fDiffs = (FilePatch2[]) diffs.toArray(new FilePatch2[diffs.size()]); > } > >- protected FileDiff createFileDiff(IPath oldPath, long oldDate, >+ protected FilePatch2 createFileDiff(IPath oldPath, long oldDate, > IPath newPath, long newDate) { >- return new FileDiff(oldPath, oldDate, newPath, newDate); >+ return new FilePatch2(oldPath, oldDate, newPath, newDate); > } > > private String readUnifiedDiff(List diffs, LineReader lr, String line, String diffArgs, String fileName, DiffProject diffProject) throws IOException { > List newDiffs= new ArrayList(); > String nextLine= readUnifiedDiff(newDiffs, lr, line, diffArgs, fileName); > for (Iterator iter= newDiffs.iterator(); iter.hasNext();) { >- FileDiff diff= (FileDiff) iter.next(); >+ FilePatch2 diff= (FilePatch2) iter.next(); > diffProject.add(diff); > diffs.add(diff); > } >@@ -195,13 +195,13 @@ > } else if (line.startsWith("--- ")) { //$NON-NLS-1$ > line= readUnifiedDiff(diffs, lr, line, diffArgs, fileName); > if (!headerLines.isEmpty()) >- setHeader((FileDiff)diffs.get(diffs.size() - 1), headerLines); >+ setHeader((FilePatch2)diffs.get(diffs.size() - 1), headerLines); > diffArgs= fileName= null; > reread= true; > } else if (line.startsWith("*** ")) { //$NON-NLS-1$ > line= readContextDiff(diffs, lr, line, diffArgs, fileName); > if (!headerLines.isEmpty()) >- setHeader((FileDiff)diffs.get(diffs.size() - 1), headerLines); >+ setHeader((FilePatch2)diffs.get(diffs.size() - 1), headerLines); > diffArgs= fileName= null; > reread= true; > } >@@ -215,10 +215,10 @@ > > lr.close(); > >- fDiffs = (FileDiff[]) diffs.toArray(new FileDiff[diffs.size()]); >+ fDiffs = (FilePatch2[]) diffs.toArray(new FilePatch2[diffs.size()]); > } > >- private void setHeader(FileDiff diff, List headerLines) { >+ private void setHeader(FilePatch2 diff, List headerLines) { > String header = LineReader.createString(false, headerLines); > diff.setHeader(header); > headerLines.clear(); >@@ -238,7 +238,7 @@ > > String[] newArgs= split(line.substring(4)); > >- FileDiff diff = createFileDiff(extractPath(oldArgs, 0, fileName), >+ FilePatch2 diff = createFileDiff(extractPath(oldArgs, 0, fileName), > extractDate(oldArgs, 1), extractPath(newArgs, 0, fileName), > extractDate(newArgs, 1)); > diffs.add(diff); >@@ -344,7 +344,7 @@ > > String[] newArgs= split(line.substring(4)); > >- FileDiff diff = createFileDiff(extractPath(oldArgs, 0, fileName), >+ FilePatch2 diff = createFileDiff(extractPath(oldArgs, 0, fileName), > extractDate(oldArgs, 1), extractPath(newArgs, 0, fileName), > extractDate(newArgs, 1)); > diffs.add(diff); >@@ -657,19 +657,19 @@ > return fDiffProjects; > } > >- public FileDiff[] getDiffs() { >+ public FilePatch2[] getDiffs() { > return fDiffs; > } > >- public FileDiff[] getAdjustedDiffs() { >+ public FilePatch2[] getAdjustedDiffs() { > if (!isWorkspacePatch() || fDiffs.length == 0) > return fDiffs; > List result = new ArrayList(); > for (int i = 0; i < fDiffs.length; i++) { >- FileDiff diff = fDiffs[i]; >+ FilePatch2 diff = fDiffs[i]; > result.add(diff.asRelativeDiff()); > } >- return (FileDiff[]) result.toArray(new FileDiff[result.size()]); >+ return (FilePatch2[]) result.toArray(new FilePatch2[result.size()]); > } > > } >Index: src/org/eclipse/compare/patch/PatchBuilder.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchBuilder.java,v >retrieving revision 1.2 >diff -u -r1.2 PatchBuilder.java >--- src/org/eclipse/compare/patch/PatchBuilder.java 23 Feb 2009 16:49:27 -0000 1.2 >+++ src/org/eclipse/compare/patch/PatchBuilder.java 4 Mar 2009 14:26:25 -0000 >@@ -13,7 +13,7 @@ > import java.util.Arrays; > import java.util.Comparator; > >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.Hunk; > import org.eclipse.core.runtime.IPath; > >@@ -90,7 +90,7 @@ > public static IFilePatch2 createFilePatch(IPath oldPath, long oldDate, > IPath newPath, long newDate, IHunk[] hunks) { > reorder(hunks); >- FileDiff fileDiff = new FileDiff(oldPath, oldDate, newPath, newDate); >+ FilePatch2 fileDiff = new FilePatch2(oldPath, oldDate, newPath, newDate); > for (int i = 0; i < hunks.length; i++) { > fileDiff.add((Hunk) hunks[i]); > } >@@ -152,12 +152,12 @@ > boolean hasLineAdditions = checkForPrefix(ADDITION_PREFIX, lines); > boolean hasLineDeletions = checkForPrefix(REMOVAL_PREFIX, lines); > if (hasLineAdditions && !hasLineDeletions) { >- return FileDiff.ADDITION; >+ return FilePatch2.ADDITION; > } else if (!hasLineAdditions && hasLineDeletions) { >- return FileDiff.DELETION; >+ return FilePatch2.DELETION; > } > } >- return FileDiff.CHANGE; >+ return FilePatch2.CHANGE; > } > > private static int getHunkLength(String[] lines, boolean old) { >Index: src/org/eclipse/compare/internal/core/patch/FilePatch2.java >=================================================================== >RCS file: src/org/eclipse/compare/internal/core/patch/FilePatch2.java >diff -N src/org/eclipse/compare/internal/core/patch/FilePatch2.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/compare/internal/core/patch/FilePatch2.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,266 @@ >+/******************************************************************************* >+ * Copyright (c) 2006, 2009 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.compare.internal.core.patch; >+ >+import java.util.ArrayList; >+import java.util.Iterator; >+import java.util.List; >+ >+import org.eclipse.compare.patch.IFilePatch2; >+import org.eclipse.compare.patch.IFilePatchResult; >+import org.eclipse.compare.patch.IHunk; >+import org.eclipse.compare.patch.PatchConfiguration; >+import org.eclipse.compare.patch.ReaderCreator; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.Path; >+ >+/** >+ * A file diff represents a set of hunks that were associated with the >+ * same path in a patch file. >+ */ >+public class FilePatch2 implements IFilePatch2 { >+ >+ /** >+ * Difference constant (value 1) indicating one side was added. >+ */ >+ public static final int ADDITION= 1; >+ /** >+ * Difference constant (value 2) indicating one side was removed. >+ */ >+ public static final int DELETION= 2; >+ /** >+ * Difference constant (value 3) indicating side changed. >+ */ >+ public static final int CHANGE= 3; >+ >+ private IPath fOldPath, fNewPath; >+ private long oldDate, newDate; >+ private List fHunks= new ArrayList(); >+ private DiffProject fProject; //the project that contains this diff >+ private String header; >+ private int addedLines, removedLines; >+ >+ /** >+ * Create a file diff for the given path and date information. >+ * @param oldPath the path of the before state of the file >+ * @param oldDate the timestamp of the before state >+ * @param newPath the path of the after state >+ * @param newDate the timestamp of the after state >+ */ >+ public FilePatch2(IPath oldPath, long oldDate, IPath newPath, long newDate) { >+ fOldPath= oldPath; >+ this.oldDate = oldDate; >+ fNewPath= newPath; >+ this.newDate = newDate; >+ } >+ >+ /** >+ * Return the parent project or <code>null</code> if there isn't one. >+ * @return the parent project or <code>null</code> >+ */ >+ public DiffProject getProject() { >+ return fProject; >+ } >+ >+ /** >+ * Set the project of this diff to the given project. >+ * This method should only be called from >+ * {@link DiffProject#add(FilePatch2)} >+ * @param diffProject the parent project >+ */ >+ void setProject(DiffProject diffProject) { >+ if (fProject == diffProject) >+ return; >+ if (fProject != null) >+ fProject.remove(this); >+ this.fProject= diffProject; >+ } >+ >+ /** >+ * Get the path of the file diff. >+ * @param reverse whether the path of the before state or after state >+ * should be used >+ * @return the path of the file diff >+ */ >+ public IPath getPath(boolean reverse) { >+ if (getDiffType(reverse) == ADDITION) { >+ if (reverse) >+ return fOldPath; >+ return fNewPath; >+ } >+ if (reverse && fNewPath != null) >+ return fNewPath; >+ if (fOldPath != null) >+ return fOldPath; >+ return fNewPath; >+ } >+ >+ /** >+ * Add the hunk to this file diff. >+ * @param hunk the hunk >+ */ >+ public void add(Hunk hunk) { >+ fHunks.add(hunk); >+ hunk.setParent(this); >+ } >+ >+ /** >+ * Remove the hunk from this file diff >+ * @param hunk the hunk >+ */ >+ protected void remove(Hunk hunk) { >+ fHunks.remove(hunk); >+ } >+ >+ /** >+ * Return the hunks associated with this file diff. >+ * @return the hunks associated with this file diff >+ */ >+ public IHunk[] getHunks() { >+ return (IHunk[]) fHunks.toArray(new IHunk[fHunks.size()]); >+ } >+ >+ /** >+ * Return the number of hunks associated with this file diff. >+ * @return the number of hunks associated with this file diff >+ */ >+ public int getHunkCount() { >+ return fHunks.size(); >+ } >+ >+ /** >+ * Return the difference type of this file diff. >+ * @param reverse whether the patch is being reversed >+ * @return the type of this file diff >+ */ >+ public int getDiffType(boolean reverse) { >+ if (fHunks.size() == 1) { >+ boolean add = false; >+ boolean delete = false; >+ Iterator iter = fHunks.iterator(); >+ while (iter.hasNext()){ >+ Hunk hunk = (Hunk) iter.next(); >+ int type =hunk.getHunkType(reverse); >+ if (type == ADDITION){ >+ add = true; >+ } else if (type == DELETION ){ >+ delete = true; >+ } >+ } >+ if (add && !delete){ >+ return ADDITION; >+ } else if (!add && delete){ >+ return DELETION; >+ } >+ } >+ return CHANGE; >+ } >+ >+ /** >+ * Return the path of this file diff with the specified number >+ * of leading segments striped. >+ * @param strip the number of leading segments to strip from the path >+ * @param reverse whether the patch is being reversed >+ * @return the path of this file diff with the specified number >+ * of leading segments striped >+ */ >+ public IPath getStrippedPath(int strip, boolean reverse) { >+ IPath path= getPath(reverse); >+ if (strip > 0 && strip < path.segmentCount()) >+ path= path.removeFirstSegments(strip); >+ return path; >+ } >+ >+ /** >+ * Return the segment count of the path of this file diff. >+ * @return the segment count of the path of this file diff >+ */ >+ public int segmentCount() { >+ //Update prefix count - go through all of the diffs and find the smallest >+ //path segment contained in all diffs. >+ int length= 99; >+ if (fOldPath != null) >+ length= Math.min(length, fOldPath.segmentCount()); >+ if (fNewPath != null) >+ length= Math.min(length, fNewPath.segmentCount()); >+ return length; >+ } >+ >+ public IFilePatchResult apply(ReaderCreator content, >+ PatchConfiguration configuration, IProgressMonitor monitor) { >+ FileDiffResult result = new FileDiffResult(this, configuration); >+ result.refresh(content, monitor); >+ return result; >+ } >+ >+ public IPath getTargetPath(PatchConfiguration configuration) { >+ return getStrippedPath(configuration.getPrefixSegmentStripCount(), configuration.isReversed()); >+ } >+ >+ public FilePatch2 asRelativeDiff() { >+ if (fProject == null) >+ return this; >+ IPath adjustedOldPath = null; >+ if (fOldPath != null) { >+ adjustedOldPath = new Path(null, fProject.getName()).append(fOldPath); >+ } >+ IPath adjustedNewPath = null; >+ if (fNewPath != null) { >+ adjustedNewPath = new Path(null, fProject.getName()).append(fNewPath); >+ } >+ FilePatch2 diff = create(adjustedOldPath, 0, adjustedNewPath, 0); >+ for (Iterator iterator = fHunks.iterator(); iterator.hasNext();) { >+ Hunk hunk = (Hunk) iterator.next(); >+ // Creating the hunk adds it to the parent diff >+ new Hunk(diff, hunk); >+ } >+ return diff; >+ } >+ >+ protected FilePatch2 create(IPath oldPath, long oldDate, IPath newPath, >+ long newDate) { >+ return new FilePatch2(oldPath, oldDate, newPath, newDate); >+ } >+ >+ public void setHeader(String header) { >+ this.header = header; >+ } >+ >+ public String getHeader() { >+ return header; >+ } >+ >+ public long getBeforeDate() { >+ return oldDate; >+ } >+ >+ public long getAfterDate() { >+ return newDate; >+ } >+ >+ public void setAddedLines(int addedLines) { >+ this.addedLines = addedLines; >+ } >+ >+ public void setRemovedLines(int removedLines) { >+ this.removedLines = removedLines; >+ } >+ >+ public int getAddedLines() { >+ return addedLines; >+ } >+ >+ public int getRemovedLines() { >+ return removedLines; >+ } >+ >+} >#P org.eclipse.compare.tests >Index: src/org/eclipse/compare/tests/FileDiffResultTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare.tests/src/org/eclipse/compare/tests/FileDiffResultTest.java,v >retrieving revision 1.7 >diff -u -r1.7 FileDiffResultTest.java >--- src/org/eclipse/compare/tests/FileDiffResultTest.java 16 Feb 2009 11:46:23 -0000 1.7 >+++ src/org/eclipse/compare/tests/FileDiffResultTest.java 4 Mar 2009 14:26:27 -0000 >@@ -18,7 +18,7 @@ > import java.util.ArrayList; > > import org.eclipse.compare.internal.Utilities; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.FileDiffResult; > import org.eclipse.compare.internal.core.patch.Hunk; > import org.eclipse.compare.internal.patch.Patcher; >@@ -216,7 +216,7 @@ > /** > * A mock FileDiff class. > */ >- private class MyFileDiff extends FileDiff { >+ private class MyFileDiff extends FilePatch2 { > protected MyFileDiff() { > super(null, 0, null, 0); > add(Hunk.createHunk(this, new int[] { 0, 0 }, new int[] { 0, 0 }, >Index: src/org/eclipse/compare/tests/PatchTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare.tests/src/org/eclipse/compare/tests/PatchTest.java,v >retrieving revision 1.24 >diff -u -r1.24 PatchTest.java >--- src/org/eclipse/compare/tests/PatchTest.java 23 Feb 2009 16:18:59 -0000 1.24 >+++ src/org/eclipse/compare/tests/PatchTest.java 4 Mar 2009 14:26:28 -0000 >@@ -36,7 +36,7 @@ > import junit.framework.AssertionFailedError; > import junit.framework.TestCase; > >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.FileDiffResult; > import org.eclipse.compare.internal.core.patch.LineReader; > import org.eclipse.compare.internal.patch.WorkspacePatcher; >@@ -456,7 +456,7 @@ > e.printStackTrace(); > } > >- FileDiff[] diffs= patcher.getDiffs(); >+ FilePatch2[] diffs= patcher.getDiffs(); > Assert.assertEquals(diffs.length, 1); > > FileDiffResult diffResult = patcher.getDiffResult(diffs[0]); >@@ -513,7 +513,7 @@ > } > > //Sort the diffs by project >- FileDiff[] diffs= patcher.getDiffs(); >+ FilePatch2[] diffs= patcher.getDiffs(); > > //Iterate through all of the original files, apply the diffs that belong to the file and compare > //with the corresponding outcome file >#P org.eclipse.compare >Index: compare/org/eclipse/compare/patch/ApplyPatchOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/ApplyPatchOperation.java,v >retrieving revision 1.14 >diff -u -r1.14 ApplyPatchOperation.java >--- compare/org/eclipse/compare/patch/ApplyPatchOperation.java 4 Mar 2009 14:10:19 -0000 1.14 >+++ compare/org/eclipse/compare/patch/ApplyPatchOperation.java 4 Mar 2009 14:26:31 -0000 >@@ -16,9 +16,9 @@ > import org.eclipse.compare.CompareConfiguration; > import org.eclipse.compare.internal.ComparePreferencePage; > import org.eclipse.compare.internal.CompareUIPlugin; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.PatchReader; >-import org.eclipse.compare.internal.patch.FileDiffWrapper; >+import org.eclipse.compare.internal.patch.FilePatch; > import org.eclipse.compare.internal.patch.PatchWizard; > import org.eclipse.compare.internal.patch.PatchWizardDialog; > import org.eclipse.compare.internal.patch.Utilities; >@@ -206,18 +206,18 @@ > BufferedReader reader = Utilities.createReader(storage); > try { > PatchReader patchReader = new PatchReader() { >- protected FileDiff createFileDiff(IPath oldPath, long oldDate, >+ protected FilePatch2 createFileDiff(IPath oldPath, long oldDate, > IPath newPath, long newDate) { >- return new FileDiffWrapper(oldPath, oldDate, newPath, >+ return new FilePatch(oldPath, oldDate, newPath, > newDate); > } > }; > patchReader.parse(reader); >- FileDiff[] fileDiffs = patchReader.getAdjustedDiffs(); >+ FilePatch2[] fileDiffs = patchReader.getAdjustedDiffs(); > > IFilePatch[] filePatch = new IFilePatch[fileDiffs.length]; > for (int i = 0; i < fileDiffs.length; i++) { >- filePatch[i] = (FileDiffWrapper) fileDiffs[i]; >+ filePatch[i] = (FilePatch) fileDiffs[i]; > } > > return filePatch; >Index: compare/org/eclipse/compare/internal/patch/Patcher.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java,v >retrieving revision 1.68 >diff -u -r1.68 Patcher.java >--- compare/org/eclipse/compare/internal/patch/Patcher.java 4 Mar 2009 14:10:19 -0000 1.68 >+++ compare/org/eclipse/compare/internal/patch/Patcher.java 4 Mar 2009 14:26:30 -0000 >@@ -28,7 +28,7 @@ > > import org.eclipse.compare.internal.core.Messages; > import org.eclipse.compare.internal.core.patch.DiffProject; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.FileDiffResult; > import org.eclipse.compare.internal.core.patch.Hunk; > import org.eclipse.compare.internal.core.patch.PatchReader; >@@ -77,7 +77,7 @@ > // private static final int NORMAL= 2; > // private static final int UNIFIED= 3; > >- private FileDiff[] fDiffs; >+ private FilePatch2[] fDiffs; > private IResource fTarget; > // patch options > private Set disabledElements = new HashSet(); >@@ -98,13 +98,13 @@ > * Returns an array of Diffs after a sucessfull call to <code>parse</code>. > * If <code>parse</code> hasn't been called returns <code>null</code>. > */ >- public FileDiff[] getDiffs() { >+ public FilePatch2[] getDiffs() { > if (fDiffs == null) >- return new FileDiff[0]; >+ return new FilePatch2[0]; > return fDiffs; > } > >- public IPath getPath(FileDiff diff) { >+ public IPath getPath(FilePatch2 diff) { > return diff.getStrippedPath(getStripPrefixSegments(), isReversed()); > } > >@@ -177,9 +177,9 @@ > > public void parse(BufferedReader reader) throws IOException { > PatchReader patchReader = new PatchReader() { >- protected FileDiff createFileDiff(IPath oldPath, long oldDate, >+ protected FilePatch2 createFileDiff(IPath oldPath, long oldDate, > IPath newPath, long newDate) { >- return new FileDiffWrapper(oldPath, oldDate, newPath, newDate); >+ return new FilePatch(oldPath, oldDate, newPath, newDate); > } > }; > patchReader.parse(reader); >@@ -191,11 +191,11 @@ > } > > public void countLines() { >- FileDiff[] fileDiffs = getDiffs(); >+ FilePatch2[] fileDiffs = getDiffs(); > for (int i = 0; i < fileDiffs.length; i++) { > int addedLines = 0; > int removedLines = 0; >- FileDiff fileDiff = fileDiffs[i]; >+ FilePatch2 fileDiff = fileDiffs[i]; > for (int j = 0; j < fileDiff.getHunkCount(); j++) { > IHunk hunk = fileDiff.getHunks()[j]; > String[] lines = ((Hunk) hunk).getLines(); >@@ -239,10 +239,10 @@ > list.add(singleFile); > else { > for (i= 0; i < fDiffs.length; i++) { >- FileDiff diff= fDiffs[i]; >+ FilePatch2 diff= fDiffs[i]; > if (isEnabled(diff)) { > switch (diff.getDiffType(isReversed())) { >- case FileDiff.CHANGE: >+ case FilePatch2.CHANGE: > list.add(createPath(container, getPath(diff))); > break; > } >@@ -263,7 +263,7 @@ > > int workTicks= WORK_UNIT; > >- FileDiff diff= fDiffs[i]; >+ FilePatch2 diff= fDiffs[i]; > if (isEnabled(diff)) { > > IPath path= getPath(diff); >@@ -278,18 +278,18 @@ > > int type= diff.getDiffType(isReversed()); > switch (type) { >- case FileDiff.ADDITION: >+ case FilePatch2.ADDITION: > // patch it and collect rejected hunks > List result= apply(diff, file, true, failed); > if (result != null) > store(LineReader.createString(isPreserveLineDelimeters(), result), file, new SubProgressMonitor(pm, workTicks)); > workTicks-= WORK_UNIT; > break; >- case FileDiff.DELETION: >+ case FilePatch2.DELETION: > file.delete(true, true, new SubProgressMonitor(pm, workTicks)); > workTicks-= WORK_UNIT; > break; >- case FileDiff.CHANGE: >+ case FilePatch2.CHANGE: > // patch it and collect rejected hunks > result= apply(diff, file, false, failed); > if (result != null) >@@ -333,7 +333,7 @@ > return pp; > } > >- List apply(FileDiff diff, IFile file, boolean create, List failedHunks) { >+ List apply(FilePatch2 diff, IFile file, boolean create, List failedHunks) { > FileDiffResult result = getDiffResult(diff); > List lines = LineReader.load(file, create); > result.patch(lines, null); >@@ -437,7 +437,7 @@ > } > > >- public IFile getTargetFile(FileDiff diff) { >+ public IFile getTargetFile(FilePatch2 diff) { > IPath path = diff.getStrippedPath(getStripPrefixSegments(), isReversed()); > return existsInTarget(path); > } >@@ -481,21 +481,21 @@ > int length= 99; > if (fDiffs!=null) > for (int i= 0; i<fDiffs.length; i++) { >- FileDiff diff= fDiffs[i]; >+ FilePatch2 diff= fDiffs[i]; > length= Math.min(length, diff.segmentCount()); > } > return length; > } > >- public void addDiff(FileDiff newDiff){ >- FileDiff[] temp = new FileDiff[fDiffs.length + 1]; >+ public void addDiff(FilePatch2 newDiff){ >+ FilePatch2[] temp = new FilePatch2[fDiffs.length + 1]; > System.arraycopy(fDiffs,0, temp, 0, fDiffs.length); > temp[fDiffs.length] = newDiff; > fDiffs = temp; > } > >- public void removeDiff(FileDiff diffToRemove){ >- FileDiff[] temp = new FileDiff[fDiffs.length - 1]; >+ public void removeDiff(FilePatch2 diffToRemove){ >+ FilePatch2[] temp = new FilePatch2[fDiffs.length - 1]; > int counter = 0; > for (int i = 0; i < fDiffs.length; i++) { > if (fDiffs[i] != diffToRemove){ >@@ -508,20 +508,20 @@ > public void setEnabled(Object element, boolean enabled) { > if (element instanceof DiffProject) > setEnabledProject((DiffProject) element, enabled); >- if (element instanceof FileDiff) >- setEnabledFile((FileDiff)element, enabled); >+ if (element instanceof FilePatch2) >+ setEnabledFile((FilePatch2)element, enabled); > if (element instanceof Hunk) > setEnabledHunk((Hunk) element, enabled); > } > > private void setEnabledProject(DiffProject projectDiff, boolean enabled) { >- FileDiff[] diffFiles = projectDiff.getFileDiffs(); >+ FilePatch2[] diffFiles = projectDiff.getFileDiffs(); > for (int i = 0; i < diffFiles.length; i++) { > setEnabledFile(diffFiles[i], enabled); > } > } > >- private void setEnabledFile(FileDiff fileDiff, boolean enabled) { >+ private void setEnabledFile(FilePatch2 fileDiff, boolean enabled) { > IHunk[] hunks = fileDiff.getHunks(); > for (int i = 0; i < hunks.length; i++) { > setEnabledHunk((Hunk) hunks[i], enabled); >@@ -531,14 +531,14 @@ > private void setEnabledHunk(Hunk hunk, boolean enabled) { > if (enabled) { > disabledElements.remove(hunk); >- FileDiff file = hunk.getParent(); >+ FilePatch2 file = hunk.getParent(); > disabledElements.remove(file); > DiffProject project = file.getProject(); > if (project != null) > disabledElements.remove(project); > } else { > disabledElements.add(hunk); >- FileDiff file = hunk.getParent(); >+ FilePatch2 file = hunk.getParent(); > if (disabledElements.containsAll(Arrays.asList(file.getHunks()))) { > disabledElements.add(file); > DiffProject project = file.getProject(); >@@ -575,12 +575,12 @@ > public int guessFuzzFactor(IProgressMonitor monitor) { > try { > monitor.beginTask(Messages.Patcher_2, IProgressMonitor.UNKNOWN); >- FileDiff[] diffs= getDiffs(); >+ FilePatch2[] diffs= getDiffs(); > if (diffs==null||diffs.length<=0) > return -1; > int fuzz= -1; > for (int i= 0; i<diffs.length; i++) { >- FileDiff d= diffs[i]; >+ FilePatch2 d= diffs[i]; > IFile file= getTargetFile(d); > if (file != null && file.exists()) { > List lines= LineReader.load(file, false); >@@ -601,15 +601,15 @@ > refresh(getDiffs()); > } > >- protected void refresh(FileDiff[] diffs) { >+ protected void refresh(FilePatch2[] diffs) { > for (int i = 0; i < diffs.length; i++) { >- FileDiff diff = diffs[i]; >+ FilePatch2 diff = diffs[i]; > FileDiffResult result = getDiffResult(diff); > ((WorkspaceFileDiffResult)result).refresh(); > } > } > >- public FileDiffResult getDiffResult(FileDiff diff) { >+ public FileDiffResult getDiffResult(FilePatch2 diff) { > FileDiffResult result = (FileDiffResult)diffResults.get(diff); > if (result == null) { > result = new WorkspaceFileDiffResult(diff, getConfiguration()); >@@ -628,7 +628,7 @@ > * @param diff the diff > * @return the project that contains the diff > */ >- public DiffProject getProject(FileDiff diff) { >+ public DiffProject getProject(FilePatch2 diff) { > return diff.getProject(); > } > >@@ -656,7 +656,7 @@ > * @param diff the file diff > * @param contents the contents for the file diff > */ >- public void cacheContents(FileDiff diff, byte[] contents) { >+ public void cacheContents(FilePatch2 diff, byte[] contents) { > contentCache.put(diff, contents); > } > >@@ -665,9 +665,9 @@ > * given file diff. > * @param diff the file diff > * @return whether contents have been cached for the file diff >- * @see #cacheContents(FileDiff, byte[]) >+ * @see #cacheContents(FilePatch2, byte[]) > */ >- public boolean hasCachedContents(FileDiff diff) { >+ public boolean hasCachedContents(FilePatch2 diff) { > return contentCache.containsKey(diff); > } > >@@ -677,7 +677,7 @@ > * @param diff the file diff > * @return the content lines that are cached for the file diff > */ >- public List getCachedLines(FileDiff diff) { >+ public List getCachedLines(FilePatch2 diff) { > byte[] contents = (byte[])contentCache.get(diff); > if (contents != null) { > BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(contents))); >@@ -693,7 +693,7 @@ > * @return the contents that are cached for the given diff or > * <code>null</code> > */ >- public byte[] getCachedContents(FileDiff diff) { >+ public byte[] getCachedContents(FilePatch2 diff) { > return (byte[])contentCache.get(diff); > } > >@@ -732,7 +732,7 @@ > mergedHunks.remove(hunk); > } > >- public IProject getTargetProject(FileDiff diff) { >+ public IProject getTargetProject(FilePatch2 diff) { > DiffProject dp = getProject(diff); > if (dp != null) > return Utilities.getProject(dp); >Index: compare/org/eclipse/compare/internal/patch/UnmatchedHunkTypedElement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/UnmatchedHunkTypedElement.java,v >retrieving revision 1.7 >diff -u -r1.7 UnmatchedHunkTypedElement.java >--- compare/org/eclipse/compare/internal/patch/UnmatchedHunkTypedElement.java 16 Feb 2009 11:46:21 -0000 1.7 >+++ compare/org/eclipse/compare/internal/patch/UnmatchedHunkTypedElement.java 4 Mar 2009 14:26:30 -0000 >@@ -21,7 +21,7 @@ > import org.eclipse.compare.ITypedElement; > import org.eclipse.compare.internal.CompareUIPlugin; > import org.eclipse.compare.internal.ContentChangeNotifier; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.HunkResult; > import org.eclipse.compare.patch.PatchConfiguration; > import org.eclipse.core.resources.IFile; >@@ -79,7 +79,7 @@ > changeNotifier.fireContentChanged(); > } > >- private FileDiff getDiff() { >+ private FilePatch2 getDiff() { > return getHunkResult().getDiffResult().getDiff(); > } > >Index: compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java,v >retrieving revision 1.3 >diff -u -r1.3 WorkspaceFileDiffResult.java >--- compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java 16 Feb 2009 11:46:21 -0000 1.3 >+++ compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java 4 Mar 2009 14:26:30 -0000 >@@ -12,7 +12,7 @@ > > import java.util.List; > >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.FileDiffResult; > import org.eclipse.compare.patch.PatchConfiguration; > import org.eclipse.core.resources.IFile; >@@ -21,7 +21,7 @@ > > public class WorkspaceFileDiffResult extends FileDiffResult { > >- public WorkspaceFileDiffResult(FileDiff diff, >+ public WorkspaceFileDiffResult(FilePatch2 diff, > PatchConfiguration configuration) { > super(diff, configuration); > } >Index: compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java,v >retrieving revision 1.17 >diff -u -r1.17 WorkspacePatcher.java >--- compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java 16 Feb 2009 14:08:14 -0000 1.17 >+++ compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java 4 Mar 2009 14:26:30 -0000 >@@ -18,7 +18,7 @@ > > import org.eclipse.compare.internal.core.Messages; > import org.eclipse.compare.internal.core.patch.DiffProject; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.Hunk; > import org.eclipse.compare.internal.core.patch.PatchReader; > import org.eclipse.compare.patch.IHunk; >@@ -91,7 +91,7 @@ > return; > } > >- FileDiff[] diffs = getDiffs(); >+ FilePatch2[] diffs = getDiffs(); > if (pm != null) { > String message= Messages.WorkspacePatcher_0; > pm.beginTask(message, diffs.length * WORK_UNIT); >@@ -101,7 +101,7 @@ > > int workTicks= WORK_UNIT; > >- FileDiff diff= diffs[i]; >+ FilePatch2 diff= diffs[i]; > if (isAccessible(diff)) { > IFile file= getTargetFile(diff); > IPath path= file.getProjectRelativePath(); >@@ -113,18 +113,18 @@ > > int type= diff.getDiffType(isReversed()); > switch (type) { >- case FileDiff.ADDITION : >+ case FilePatch2.ADDITION : > // patch it and collect rejected hunks > List result= apply(diff, file, true, failed); > if (result != null) > store(LineReader.createString(isPreserveLineDelimeters(), result), file, new SubProgressMonitor(pm, workTicks)); > workTicks -= WORK_UNIT; > break; >- case FileDiff.DELETION : >+ case FilePatch2.DELETION : > file.delete(true, true, new SubProgressMonitor(pm, workTicks)); > workTicks -= WORK_UNIT; > break; >- case FileDiff.CHANGE : >+ case FilePatch2.CHANGE : > // patch it and collect rejected hunks > result= apply(diff, file, false, failed); > if (result != null) >@@ -164,7 +164,7 @@ > } > } > >- private boolean isAccessible(FileDiff diff) { >+ private boolean isAccessible(FilePatch2 diff) { > return isEnabled(diff) && Utilities.getProject(diff.getProject()).isAccessible(); > } > >@@ -176,9 +176,9 @@ > */ > public IFile[] getTargetFiles(DiffProject project) { > List files= new ArrayList(); >- FileDiff[] diffs = project.getFileDiffs(); >+ FilePatch2[] diffs = project.getFileDiffs(); > for (int i = 0; i < diffs.length; i++) { >- FileDiff diff = diffs[i]; >+ FilePatch2 diff = diffs[i]; > if (isEnabled(diff)) { > files.add(getTargetFile(diff)); > } >@@ -186,7 +186,7 @@ > return (IFile[]) files.toArray(new IFile[files.size()]); > } > >- public IFile getTargetFile(FileDiff diff) { >+ public IFile getTargetFile(FilePatch2 diff) { > IPath path = diff.getStrippedPath(getStripPrefixSegments(), isReversed()); > DiffProject project = getProject(diff); > if (project != null) >@@ -194,7 +194,7 @@ > return super.getTargetFile(diff); > } > >- private IPath getFullPath(FileDiff diff) { >+ private IPath getFullPath(FilePatch2 diff) { > IPath path = diff.getStrippedPath(getStripPrefixSegments(), isReversed()); > DiffProject project = getProject(diff); > if (project != null) >@@ -238,8 +238,8 @@ > } > > protected Object getElementParent(Object element) { >- if (element instanceof FileDiff && fDiffProjects != null) { >- FileDiff diff = (FileDiff) element; >+ if (element instanceof FilePatch2 && fDiffProjects != null) { >+ FilePatch2 diff = (FilePatch2) element; > for (int i = 0; i < fDiffProjects.length; i++) { > DiffProject project = fDiffProjects[i]; > if (project.contains(diff)) >@@ -257,7 +257,7 @@ > return (IPath)retargetedDiffs.get(object); > } > >- public void retargetDiff(FileDiff diff, IFile file) { >+ public void retargetDiff(FilePatch2 diff, IFile file) { > retargetedDiffs.put(diff, diff.getPath(false)); > IHunk[] hunks = diff.getHunks(); > >@@ -266,16 +266,16 @@ > diff.getProject().remove(diff); > } > removeDiff(diff); >- FileDiff newDiff = getDiffForFile(file); >+ FilePatch2 newDiff = getDiffForFile(file); > for (int i = 0; i < hunks.length; i++) { > Hunk hunk = (Hunk) hunks[i]; > newDiff.add(hunk); > } > } > >- private FileDiff getDiffForFile(IFile file) { >+ private FilePatch2 getDiffForFile(IFile file) { > DiffProject diffProject = null; >- FileDiff[] diffsToCheck; >+ FilePatch2[] diffsToCheck; > if (isWorkspacePatch()){ > // Check if the diff project already exists for the file > IProject project = file.getProject(); >@@ -296,7 +296,7 @@ > } > // Check to see if a diff already exists for the file > for (int i = 0; i < diffsToCheck.length; i++) { >- FileDiff fileDiff = diffsToCheck[i]; >+ FilePatch2 fileDiff = diffsToCheck[i]; > if (isDiffForFile(fileDiff, file)) { > return fileDiff; > } >@@ -304,7 +304,7 @@ > > // Create a new diff for the file > IPath path = getDiffPath(file); >- FileDiff newDiff = new FileDiff(path, 0, path, 0); >+ FilePatch2 newDiff = new FilePatch2(path, 0, path, 0); > if (diffProject != null){ > diffProject.add(newDiff); > } >@@ -320,7 +320,7 @@ > return file.getFullPath().removeFirstSegments(getTarget().getFullPath().segmentCount()); > } > >- private boolean isDiffForFile(FileDiff fileDiff, IFile file) { >+ private boolean isDiffForFile(FilePatch2 fileDiff, IFile file) { > return getFullPath(fileDiff).equals(file.getFullPath()); > } > >@@ -335,13 +335,13 @@ > } > > public void retargetHunk(Hunk hunk, IFile file) { >- FileDiff newDiff = getDiffForFile(file); >+ FilePatch2 newDiff = getDiffForFile(file); > newDiff.add(hunk); > } > > public void retargetProject(DiffProject project, IProject targetProject) { > retargetedDiffs.put(project, Utilities.getProject(project).getFullPath()); >- FileDiff[] diffs = project.getFileDiffs(); >+ FilePatch2[] diffs = project.getFileDiffs(); > DiffProject selectedProject = getDiffProject(targetProject); > if (selectedProject == null) > selectedProject = addDiffProjectForProject(targetProject); >Index: compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java,v >retrieving revision 1.3 >diff -u -r1.3 RetargetPatchElementDialog.java >--- compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java 16 Feb 2009 11:46:21 -0000 1.3 >+++ compare/org/eclipse/compare/internal/patch/RetargetPatchElementDialog.java 4 Mar 2009 14:26:30 -0000 >@@ -13,7 +13,7 @@ > import java.util.ArrayList; > > import org.eclipse.compare.internal.core.patch.DiffProject; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.Hunk; > import org.eclipse.core.resources.*; > import org.eclipse.core.runtime.Assert; >@@ -148,7 +148,7 @@ > } else if (fSelectedNode instanceof PatchFileDiffNode) { > PatchFileDiffNode node = (PatchFileDiffNode) fSelectedNode; > //copy over all hunks to new target resource >- FileDiff diff = node.getDiffResult().getDiff(); >+ FilePatch2 diff = node.getDiffResult().getDiff(); > return NLS.bind(PatchMessages.RetargetPatchElementDialog_0, fPatcher.getPath(diff)); > } else if (fSelectedNode instanceof HunkDiffNode) { > HunkDiffNode node = (HunkDiffNode) fSelectedNode; >@@ -167,7 +167,7 @@ > } else if (fSelectedNode instanceof PatchFileDiffNode && fSelectedResource instanceof IFile) { > PatchFileDiffNode node = (PatchFileDiffNode) fSelectedNode; > //copy over all hunks to new target resource >- FileDiff diff = node.getDiffResult().getDiff(); >+ FilePatch2 diff = node.getDiffResult().getDiff(); > fPatcher.retargetDiff(diff, (IFile)fSelectedResource); > } else if (fSelectedNode instanceof HunkDiffNode && fSelectedResource instanceof IFile) { > HunkDiffNode node = (HunkDiffNode) fSelectedNode; >Index: compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java,v >retrieving revision 1.10 >diff -u -r1.10 PatchCompareEditorInput.java >--- compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java 16 Feb 2009 11:46:21 -0000 1.10 >+++ compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java 4 Mar 2009 14:26:30 -0000 >@@ -15,7 +15,7 @@ > import org.eclipse.compare.*; > import org.eclipse.compare.internal.*; > import org.eclipse.compare.internal.core.patch.DiffProject; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.FileDiffResult; > import org.eclipse.compare.internal.core.patch.HunkResult; > import org.eclipse.compare.patch.PatchConfiguration; >@@ -206,7 +206,7 @@ > getViewer().refresh(); > } > >- private void processDiffs(FileDiff[] diffs) { >+ private void processDiffs(FilePatch2[] diffs) { > for (int i = 0; i < diffs.length; i++) { > processDiff(diffs[i], getRoot()); > } >@@ -216,15 +216,15 @@ > //create diffProject nodes > for (int i = 0; i < diffProjects.length; i++) { > PatchProjectDiffNode projectNode = new PatchProjectDiffNode(getRoot(), diffProjects[i], getPatcher().getConfiguration()); >- FileDiff[] diffs = diffProjects[i].getFileDiffs(); >+ FilePatch2[] diffs = diffProjects[i].getFileDiffs(); > for (int j = 0; j < diffs.length; j++) { >- FileDiff fileDiff = diffs[j]; >+ FilePatch2 fileDiff = diffs[j]; > processDiff(fileDiff, projectNode); > } > } > } > >- private void processDiff(FileDiff diff, DiffNode parent) { >+ private void processDiff(FilePatch2 diff, DiffNode parent) { > FileDiffResult diffResult = getPatcher().getDiffResult(diff); > PatchFileDiffNode node = PatchFileDiffNode.createDiffNode(parent, diffResult); > HunkResult[] hunkResults = diffResult.getHunkResults(); >Index: compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java,v >retrieving revision 1.40 >diff -u -r1.40 PreviewPatchPage2.java >--- compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java 16 Feb 2009 14:08:14 -0000 1.40 >+++ compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java 4 Mar 2009 14:26:30 -0000 >@@ -19,7 +19,7 @@ > import org.eclipse.compare.internal.ComparePreferencePage; > import org.eclipse.compare.internal.CompareUIPlugin; > import org.eclipse.compare.internal.ICompareUIConstants; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.Hunk; > import org.eclipse.compare.patch.IHunk; > import org.eclipse.core.runtime.Assert; >@@ -705,7 +705,7 @@ > && (removedLinesRegex == null || "".equals(removedLinesRegex))) { //$NON-NLS-1$ > > fPatcher.countLines(); >- FileDiff[] fileDiffs = fPatcher.getDiffs(); >+ FilePatch2[] fileDiffs = fPatcher.getDiffs(); > for (int i = 0; i < fileDiffs.length; i++) { > added += fileDiffs[i].getAddedLines(); > removed += fileDiffs[i].getRemovedLines(); >@@ -716,7 +716,7 @@ > Pattern addedPattern = Pattern.compile(addedLinesRegex); > Pattern removedPattern = Pattern.compile(removedLinesRegex); > >- FileDiff[] fileDiffs = fPatcher.getDiffs(); >+ FilePatch2[] fileDiffs = fPatcher.getDiffs(); > for (int i = 0; i < fileDiffs.length; i++) { > IHunk[] hunks = fileDiffs[i].getHunks(); > for (int j = 0; j < hunks.length; j++) { >Index: compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java,v >retrieving revision 1.5 >diff -u -r1.5 PatchFileDiffNode.java >--- compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java 15 Jul 2008 14:45:29 -0000 1.5 >+++ compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java 4 Mar 2009 14:26:30 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2006, 2007 IBM Corporation and others. >+ * Copyright (c) 2006, 2009 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 >@@ -11,7 +11,7 @@ > package org.eclipse.compare.internal.patch; > > import org.eclipse.compare.*; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.compare.internal.core.patch.FileDiffResult; > import org.eclipse.compare.patch.PatchConfiguration; > import org.eclipse.compare.structuremergeviewer.*; >@@ -36,13 +36,13 @@ > private static int convertFileDiffTypeToDifferencerType(int fileDiffKind) { > int kind; > switch (fileDiffKind) { >- case FileDiff.ADDITION: >+ case FilePatch2.ADDITION: > kind = Differencer.ADDITION; > break; >- case FileDiff.DELETION: >+ case FilePatch2.DELETION: > kind = Differencer.DELETION; > break; >- case FileDiff.CHANGE: >+ case FilePatch2.CHANGE: > kind = Differencer.CHANGE; > break; > default: >Index: compare/org/eclipse/compare/internal/patch/InputPatchPage.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java,v >retrieving revision 1.44 >diff -u -r1.44 InputPatchPage.java >--- compare/org/eclipse/compare/internal/patch/InputPatchPage.java 15 Jul 2008 14:45:29 -0000 1.44 >+++ compare/org/eclipse/compare/internal/patch/InputPatchPage.java 4 Mar 2009 14:26:29 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 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 >@@ -22,7 +22,7 @@ > > import org.eclipse.compare.internal.ICompareContextIds; > import org.eclipse.compare.internal.Utilities; >-import org.eclipse.compare.internal.core.patch.FileDiff; >+import org.eclipse.compare.internal.core.patch.FilePatch2; > import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IFolder; > import org.eclipse.core.resources.IProject; >@@ -189,7 +189,7 @@ > // Read in the patch > readInPatch(); > >- FileDiff[] diffs= patcher.getDiffs(); >+ FilePatch2[] diffs= patcher.getDiffs(); > if (diffs == null || diffs.length == 0) { > String format= PatchMessages.InputPatchPage_NoDiffsFound_format; > String message= MessageFormat.format(format, new String[] { fPatchSource }); >@@ -792,7 +792,7 @@ > return false; > } > >- FileDiff[] diffs= patcher.getDiffs(); >+ FilePatch2[] diffs= patcher.getDiffs(); > if (diffs == null || diffs.length == 0) > return false; > return true; >Index: compare/org/eclipse/compare/internal/patch/FileDiffWrapper.java >=================================================================== >RCS file: compare/org/eclipse/compare/internal/patch/FileDiffWrapper.java >diff -N compare/org/eclipse/compare/internal/patch/FileDiffWrapper.java >--- compare/org/eclipse/compare/internal/patch/FileDiffWrapper.java 4 Mar 2009 14:10:19 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,47 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2009 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 >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * IBM Corporation - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.compare.internal.patch; >- >-import org.eclipse.compare.internal.core.patch.FileDiff; >-import org.eclipse.compare.patch.IFilePatch; >-import org.eclipse.compare.patch.IFilePatchResult; >-import org.eclipse.compare.patch.PatchConfiguration; >-import org.eclipse.core.resources.IStorage; >-import org.eclipse.core.runtime.IPath; >-import org.eclipse.core.runtime.IProgressMonitor; >- >-public class FileDiffWrapper extends FileDiff implements IFilePatch { >- >- public FileDiffWrapper(IPath oldPath, long oldDate, IPath newPath, >- long newDate) { >- super(oldPath, oldDate, newPath, newDate); >- } >- >- /* >- * (non-Javadoc) >- * >- * @see >- * org.eclipse.compare.patch.IFilePatch#apply(org.eclipse.core.resources >- * .IStorage, org.eclipse.compare.patch.PatchConfiguration, >- * org.eclipse.core.runtime.IProgressMonitor) >- */ >- public IFilePatchResult apply(IStorage content, >- PatchConfiguration configuration, IProgressMonitor monitor) { >- return apply(content != null ? Utilities.getReaderCreator(content) >- : null, configuration, monitor); >- } >- >- protected FileDiff create(IPath oldPath, long oldDate, IPath newPath, >- long newDate) { >- return new FileDiffWrapper(oldPath, oldDate, newPath, newDate); >- } >- >-} >Index: compare/org/eclipse/compare/internal/patch/FilePatch.java >=================================================================== >RCS file: compare/org/eclipse/compare/internal/patch/FilePatch.java >diff -N compare/org/eclipse/compare/internal/patch/FilePatch.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ compare/org/eclipse/compare/internal/patch/FilePatch.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,47 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.compare.internal.patch; >+ >+import org.eclipse.compare.internal.core.patch.FilePatch2; >+import org.eclipse.compare.patch.IFilePatch; >+import org.eclipse.compare.patch.IFilePatchResult; >+import org.eclipse.compare.patch.PatchConfiguration; >+import org.eclipse.core.resources.IStorage; >+import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.IProgressMonitor; >+ >+public class FilePatch extends FilePatch2 implements IFilePatch { >+ >+ public FilePatch(IPath oldPath, long oldDate, IPath newPath, >+ long newDate) { >+ super(oldPath, oldDate, newPath, newDate); >+ } >+ >+ /* >+ * (non-Javadoc) >+ * >+ * @see >+ * org.eclipse.compare.patch.IFilePatch#apply(org.eclipse.core.resources >+ * .IStorage, org.eclipse.compare.patch.PatchConfiguration, >+ * org.eclipse.core.runtime.IProgressMonitor) >+ */ >+ public IFilePatchResult apply(IStorage content, >+ PatchConfiguration configuration, IProgressMonitor monitor) { >+ return apply(content != null ? Utilities.getReaderCreator(content) >+ : null, configuration, monitor); >+ } >+ >+ protected FilePatch2 create(IPath oldPath, long oldDate, IPath newPath, >+ long newDate) { >+ return new FilePatch(oldPath, oldDate, newPath, newDate); >+ } >+ >+}
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
Flags:
pawel.pogorzelski1
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 267020
: 127474