本文整理汇总了Java中org.eclipse.egit.github.core.Milestone.getNumber方法的典型用法代码示例。如果您正苦于以下问题:Java Milestone.getNumber方法的具体用法?Java Milestone.getNumber怎么用?Java Milestone.getNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.egit.github.core.Milestone
的用法示例。
在下文中一共展示了Milestone.getNumber方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: show
import org.eclipse.egit.github.core.Milestone; //导入方法依赖的package包/类
/**
* Show dialog with given milestone selected
*
* @param selectedMilestone
*/
public void show(Milestone selectedMilestone) {
if (repositoryMilestones == null) {
load(selectedMilestone);
return;
}
int checked = -1;
if (selectedMilestone != null)
for (int i = 0; i < repositoryMilestones.size(); i++)
if (selectedMilestone.getNumber() == repositoryMilestones
.get(i).getNumber()) {
checked = i;
break;
}
MilestoneDialogFragment.show(activity, requestCode,
activity.getString(string.select_milestone), null,
repositoryMilestones, checked);
}
示例2: TurboMilestone
import org.eclipse.egit.github.core.Milestone; //导入方法依赖的package包/类
public TurboMilestone(String repoId, Milestone milestone) {
this.id = milestone.getNumber();
this.title = milestone.getTitle();
this.dueDate = milestone.getDueOn() == null
? Optional.empty()
: Optional.of(Utility.dateToLocalDateTime(milestone.getDueOn()).toLocalDate());
this.description = milestone.getDescription() == null ? "" : milestone.getDescription();
this.isOpen = milestone.getState().equals(STATE_OPEN);
this.openIssues = milestone.getOpenIssues();
this.closedIssues = milestone.getClosedIssues();
this.repoId = repoId;
}
示例3: getMilestoneNumber
import org.eclipse.egit.github.core.Milestone; //导入方法依赖的package包/类
/**
* Get milestone number for title
*
* @param title
* @return number of -1 if not found
*/
public int getMilestoneNumber(String title) {
if (repositoryMilestones == null)
return -1;
for (Milestone milestone : repositoryMilestones)
if (title.equals(milestone.getTitle()))
return milestone.getNumber();
return -1;
}
示例4: edit
import org.eclipse.egit.github.core.Milestone; //导入方法依赖的package包/类
/**
* Edit issue to have given milestone
*
* @param milestone
* @return this task
*/
public EditMilestoneTask edit(Milestone milestone) {
if (milestone != null)
milestoneNumber = milestone.getNumber();
else
milestoneNumber = -1;
showIndeterminate(string.updating_milestone);
super.execute();
return this;
}
示例5: createIssueMap
import org.eclipse.egit.github.core.Milestone; //导入方法依赖的package包/类
/**
* Create issue map for issue
*
* @param issue
* @param newIssue
* @return map
*/
protected Map<Object, Object> createIssueMap(Issue issue, boolean newIssue) {
Map<Object, Object> params = new HashMap<Object, Object>();
if (issue != null) {
params.put(FIELD_BODY, issue.getBody());
params.put(FIELD_TITLE, issue.getTitle());
User assignee = issue.getAssignee();
if (assignee != null)
params.put(FILTER_ASSIGNEE, assignee.getLogin());
Milestone milestone = issue.getMilestone();
if (milestone != null) {
int number = milestone.getNumber();
if (number > 0)
params.put(FILTER_MILESTONE, Integer.toString(number));
else {
if (!newIssue)
params.put(FILTER_MILESTONE, ""); //$NON-NLS-1$
}
}
List<Label> labels = issue.getLabels();
if (labels != null) {
List<String> labelNames = new ArrayList<String>(labels.size());
for (Label label : labels)
labelNames.add(label.getName());
params.put(FILTER_LABELS, labelNames);
}
}
return params;
}
示例6: isEqual
import org.eclipse.egit.github.core.Milestone; //导入方法依赖的package包/类
private boolean isEqual(Milestone a, Milestone b) {
if (a == null && b == null)
return true;
return a != null && b != null && a.getNumber() == b.getNumber();
}