|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.compare.patch.PatchBuilder
public class PatchBuilder
Builder for creating IFilePatch2 and IHunk objects as well as building relationship between them.
| Field Summary | |
|---|---|
static char |
ADDITION_PREFIX
Line prefix used to mark an added lines. |
static char |
CONTEXT_PREFIX
Line prefix used to mark context lines. |
static char |
REMOVAL_PREFIX
Line prefix used to mark an removed lines. |
| Constructor Summary | |
|---|---|
PatchBuilder()
|
|
| Method Summary | |
|---|---|
static IFilePatch2 |
addHunks(IFilePatch2 filePatch,
IHunk[] toAdd)
Adds IHunks to a given IFilePatch2 and performs recalculation of all hunks' after positions. |
static IFilePatch2 |
createFilePatch(IPath oldPath,
long oldDate,
IPath newPath,
long newDate,
IHunk[] hunks)
Creates an IFilePatch2 instance and performs recalculation of all hunks' after positions. |
static IHunk |
createHunk(int start,
java.lang.String[] lines)
Creates an IHunk instance. |
static IFilePatch2 |
removeHunks(IFilePatch2 filePatch,
IHunk[] toRemove)
Removes IHunks from a given IFilePatch2 and performs recalculation of all hunks' after positions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char CONTEXT_PREFIX
public static final char ADDITION_PREFIX
public static final char REMOVAL_PREFIX
| Constructor Detail |
|---|
public PatchBuilder()
| Method Detail |
|---|
public static IHunk createHunk(int start,
java.lang.String[] lines)
start - the start position in the before filelines - content of the hunk. Each line starts with a control
character. Their meaning is as follows:
public static IFilePatch2 createFilePatch(IPath oldPath,
long oldDate,
IPath newPath,
long newDate,
IHunk[] hunks)
oldPath - the path of the before state of the fileoldDate - the timestamp of the before state of the file, see also
IFilePatch2.DATE_UNKNOWNnewPath - the path of the after state of the filenewDate - the timestamp of the after state of the file, see also
IFilePatch2.DATE_UNKNOWNhunks - a set of hunks to insert into IFilePatch2
public static IFilePatch2 addHunks(IFilePatch2 filePatch,
IHunk[] toAdd)
filePatch - a file patch to add hunks totoAdd - a set of IHunks to add
public static IFilePatch2 removeHunks(IFilePatch2 filePatch,
IHunk[] toRemove)
filePatch - a file patch to add hunks totoRemove - a set of IHunks to add
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.