本文整理汇总了Java中hudson.scm.EditType.EDIT属性的典型用法代码示例。如果您正苦于以下问题:Java EditType.EDIT属性的具体用法?Java EditType.EDIT怎么用?Java EditType.EDIT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类hudson.scm.EditType
的用法示例。
在下文中一共展示了EditType.EDIT属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
/**
* Simple toString method.
* @return printable representation of SCLMFileState.
*/
@Override
public String toString()
{
String eType;
SimpleDateFormat df = new SimpleDateFormat(dateFormat);
if(this.editType == EditType.EDIT) {
eType = "EDIT";
} else {
if(this.editType == EditType.DELETE) {
eType = "DELETE";
} else {
if(this.editType == EditType.ADD) {
eType = "ADD";
} else {
eType = "ERROR";
}
}
}
return eType + ": [" + this.getPath() + "] " + this.changeGroup + " <" + df.format(this.changeDate) + "> | " + this.changeUserID + ", ver.:" + this.version;
}
示例2: setEditType
/**
* Set EditType.
* @param editType EditType.
*
* @see EditType
*/
public void setEditType(String editType) {
if(editType.equals("DELETE")) {
this.affectedFile.file.editType = EditType.DELETE;
} else {
if(editType.equals("EDIT")) {
this.affectedFile.file.editType = EditType.EDIT;
} else {
if(editType.equals("ADD")) {
this.affectedFile.file.editType = EditType.ADD;
} else {
this.affectedFile.file.editType = null;
}
}
}
}
示例3: getMsg
/**
* Get entry message.
* @return Message for entry.
*/
@Override
public String getMsg() {
String editType;
if(this.affectedFile.getEditType() == EditType.ADD) {
editType = "ADD";
} else {
if(this.affectedFile.getEditType() == EditType.EDIT) {
editType = "EDIT";
} else {
if(this.affectedFile.getEditType() == EditType.DELETE) {
editType = "DELETE";
} else {
editType = "ERROR?";
}
}
}
return editType + ": " + this.affectedFile.getPath();
}
示例4: parseFileAction
private EditType parseFileAction(FileAction fileAction) {
switch (fileAction) {
case ADD:
case MOVE_ADD:
return EditType.ADD;
case EDIT:
return EditType.EDIT;
case DELETE:
case MOVE_DELETE:
return EditType.DELETE;
default:
return EditType.EDIT;
}
}
示例5: getDiffLink
/**
* {@inheritDoc}
*/
@Override
public URL getDiffLink(Path path) throws IOException {
if (path.getEditType() != EditType.EDIT || path.getSrc() == null || path.getDst() == null
|| path.getChangeSet().getParentCommit() == null) {
return null;
}
return diffLink(path);
}
示例6: toEditType
private EditType toEditType(String action) {
if (action.equals("added")) return EditType.ADD;
if (action.equals("deleted")) return EditType.DELETE;
return EditType.EDIT;
}