public interface CommentThreadDiffAnchor
comment thread
is anchored to.Modifier and Type | Field and Description |
---|---|
static int |
NO_LINE |
Modifier and Type | Method and Description |
---|---|
CommentThreadDiffAnchorType |
getDiffType() |
Optional<DiffFileType> |
getFileType()
File type this anchor is anchored to in a diff.
|
Optional<String> |
getFromHash() |
int |
getLine() |
Optional<DiffSegmentType> |
getLineType() |
String |
getPath() |
Optional<String> |
getSrcPath()
The original path at which the
content pointed to by this anchor originated, or
Optional.empty() if the change was not one that produces a new path . |
String |
getToHash() |
boolean |
isFileAnchor() |
boolean |
isLineAnchor() |
boolean |
isOrphaned()
An orphaned anchor point is out-of-date in the current state of a diff.
|
static final int NO_LINE
@Nonnull CommentThreadDiffAnchorType getDiffType()
@Nonnull Optional<DiffFileType> getFileType()
The following relationship with getLineType()
occurs:
DiffSegmentType.REMOVED
this will always be DiffFileType.FROM
DiffSegmentType.ADDED
this will always be DiffFileType.TO
DiffSegmentType.CONTEXT
the anchor can be hooked to any of the diff filespresent
if this is a line anchor
DiffFileType
int getLine()
@Nonnull Optional<DiffSegmentType> getLineType()
present
if this is a line anchor
DiffSegmentType
@Nonnull Optional<String> getSrcPath()
content pointed to
by this anchor originated, or
Optional.empty()
if the change was not one that produces a new path
.boolean isFileAnchor()
true
, if this is a file comment anchor, i.e. an anchor associated with the whole file rather than
a particular line. true
implies that isLineAnchor()
returns false
.isLineAnchor()
boolean isLineAnchor()
true
, if this is a line comment anchor, i.e. an anchor associated with a particular line in the
file. true
implies that isFileAnchor()
returns false
.isFileAnchor()
boolean isOrphaned()
true
, if the anchor is orphaned, false
otherwiseCopyright © 2024 Atlassian. All rights reserved.