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() |
String |
getComment() |
AbbreviatedObjectId |
getCommit() |
String |
getShortMessage() |
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) |
String |
toString() |
public RebaseTodoLine(String newComment)
newComment
- the new commentpublic RebaseTodoLine(RebaseTodoLine.Action action, AbbreviatedObjectId commit, String shortMessage)
action
- commit
- shortMessage
- public RebaseTodoLine.Action getAction()
public void setAction(RebaseTodoLine.Action newAction) throws IllegalTodoFileModification
newAction
- 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
- public String getComment()
Copyright © 2015 Eclipse JGit Project. All rights reserved.