public class RebaseTodoLine extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RebaseTodoLine.Action
Describes rebase actions
|
Constructor and Description |
---|
RebaseTodoLine(RebaseTodoLine.Action action,
AbbreviatedObjectId commit,
String shortMessage)
Create a new non-comment line
|
RebaseTodoLine(String newComment)
Create a new comment line
|
Modifier and Type | Method and Description |
---|---|
RebaseTodoLine.Action |
getAction()
Get rebase action type
|
String |
getComment()
Get a comment
|
AbbreviatedObjectId |
getCommit()
Get abbreviated commit SHA-1 of commit that action will be performed on
|
String |
getShortMessage()
Get the first line of the commit message of the commit the action will be
performed on.
|
void |
setAction(RebaseTodoLine.Action newAction)
Set the action.
|
void |
setComment(String newComment)
Set a comment for this line that is used if this line's
action is a RebaseTodoLine.Action.COMMENT |
void |
setShortMessage(String shortMessage)
Set short message
|
String |
toString() |
public RebaseTodoLine(String newComment)
newComment
- the new commentpublic RebaseTodoLine(RebaseTodoLine.Action action, AbbreviatedObjectId commit, String shortMessage)
action
- a RebaseTodoLine.Action
object.commit
- a AbbreviatedObjectId
object.shortMessage
- a String
object.public RebaseTodoLine.Action getAction()
public void setAction(RebaseTodoLine.Action newAction) throws IllegalTodoFileModification
newAction
- a RebaseTodoLine.Action
object.IllegalTodoFileModification
- on attempt to set a non-comment action on a line which was a
comment line before.public void setComment(String newComment)
Set a comment for this line that is used if this line's
action
is a RebaseTodoLine.Action.COMMENT
setComment(null)
'#'
), is an
empty string, or consists of only spaces and tabs.newComment
doesn't match these requirements
an Exception is thrown.newComment
- the commentpublic AbbreviatedObjectId getCommit()
public String getShortMessage()
public void setShortMessage(String shortMessage)
shortMessage
- a short message.public String getComment()
Copyright © 2019 Eclipse JGit Project. All rights reserved.