public interface IHunk
IAdaptable
.IFilePatchResult
Modifier and Type | Method and Description |
---|---|
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.
|
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.
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.