summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-12 12:01:10 (EDT)
committerChris Aniszczyk2011-04-12 14:16:45 (EDT)
commita7917108a61b9cedd4958614a8a4efe3de12e607 (patch)
treedbea4f05341d4202123be9344956abcf553fcd41
parentdd2d9f5f086ccdf96138f357e70e7cdac8303156 (diff)
downloadegit-github-a7917108a61b9cedd4958614a8a4efe3de12e607.zip
egit-github-a7917108a61b9cedd4958614a8a4efe3de12e607.tar.gz
egit-github-a7917108a61b9cedd4958614a8a4efe3de12e607.tar.bz2
Initialize milestone combo with current query valuerefs/changes/73/3073/2
Change-Id: Ibab2f9550988ca9577c7cee7791d1a6f514afb09 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryQueryPage.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryQueryPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryQueryPage.java
index 48ed47f..3a66451 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryQueryPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryQueryPage.java
@@ -206,6 +206,20 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
if (query == null)
return;
+ String milestoneNumber = query
+ .getAttribute(IssueService.FILTER_MILESTONE);
+ if (milestoneNumber != null && this.milestones != null) {
+ int index = 0;
+ for (Milestone milestone : this.milestones) {
+ index++;
+ if (milestoneNumber.equals(Integer.toString(milestone
+ .getNumber()))) {
+ this.milestoneCombo.select(index);
+ break;
+ }
+ }
+ }
+
titleText.setText(query.getSummary());
labelsViewer.setCheckedElements(QueryUtils.getAttributes(
IssueService.FILTER_LABELS, query).toArray());