|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IHunk
Interface that represents a hunk. A hunk is a portion of a patch. It
identifies where the hunk is to be located in the target file. One use of
this interface is a means to communicate to content merge viewers that one of
the sides of a compare input is a patch hunk. Clients can determine which
side it is by adapting the side to this interface (see IAdaptable
.
IFilePatchResult
Method Summary | |
---|---|
String |
getCharset()
Deprecated. This method can be called before the first attempt to apply the hunk when it is impossible to determine the encoding and in this case it always returns null. Please see IFilePatchResult.getCharset() as a proper way to
obtain charset. |
String |
getLabel()
Return a label that can be used to describe the hunk. |
InputStream |
getOriginalContents()
Return the original contents from which the hunk was generated. |
InputStream |
getPatchedContents()
Return the contents that contain the modifications for this hunk. |
int |
getStartPosition()
Return the start position of the hunk in the target file. |
String[] |
getUnifiedLines()
Returns hunk's content in the unified format. |
Method Detail |
---|
String getLabel()
int getStartPosition()
String[] getUnifiedLines()
' '
for context
'+'
for addition
'-'
for removal
InputStream getOriginalContents()
InputStream getPatchedContents()
String getCharset() throws CoreException
IFilePatchResult.getCharset()
as a proper way to
obtain charset.
null
if a proper
encoding cannot be determined.
Note that this method does not check whether the result is a supported
charset name. Callers should be prepared to handle
UnsupportedEncodingException
where this charset is used.
null
CoreException
- if an error happens while determining
the charset. See any refinements for more information.
|
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.