当前位置: 首页>>代码示例>>Java>>正文


Java Milestone.getNumber方法代码示例

本文整理汇总了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);
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:24,代码来源:MilestoneDialog.java

示例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;
}
 
开发者ID:HubTurbo,项目名称:HubTurbo,代码行数:13,代码来源:TurboMilestone.java

示例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;
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:15,代码来源:MilestoneDialog.java

示例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;
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:19,代码来源:EditMilestoneTask.java

示例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;
}
 
开发者ID:tsangiotis,项目名称:JekyllForAndroid,代码行数:37,代码来源:IssueService.java

示例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();
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:6,代码来源:IssueFilter.java


注:本文中的org.eclipse.egit.github.core.Milestone.getNumber方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。