Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-05-16 15:44:31 -0400
committerKevin Sawicki2011-05-16 15:44:31 -0400
commitf196bf7bc2f5e6f61f86a0f41a4ee9ce061b8b31 (patch)
tree461bf222097a2764f21ac7fc91cc1e69e89b57bb
parent48fe56ce3a3bb048d1103afb4c5ceb168f79a961 (diff)
downloadegit-github-f196bf7bc2f5e6f61f86a0f41a4ee9ce061b8b31.tar.gz
egit-github-f196bf7bc2f5e6f61f86a0f41a4ee9ce061b8b31.tar.xz
egit-github-f196bf7bc2f5e6f61f86a0f41a4ee9ce061b8b31.zip
Refactor package and class names for issue connector.
Change-Id: Icfaf402936f0ebd2527ac9ba2fbbeb135a58e5c4 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.mylyn.github.core/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Messages.java98
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/messages.properties23
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHub.java)2
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHubException.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubException.java)2
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/Messages.java41
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/QueryUtils.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/QueryUtils.java)2
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistAttachmentHandler.java2
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistConnector.java2
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java6
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueAttribute.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskAttributes.java)36
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueAttributeMapper.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskAttributeMapper.java)6
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubRepositoryConnector.java)21
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueOperation.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskOperation.java)10
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java (renamed from org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java)90
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/Messages.java86
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/messages.properties19
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/messages.properties4
-rw-r--r--org.eclipse.mylyn.github.tests/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUIHeadlessTest.java9
-rw-r--r--org.eclipse.mylyn.github.ui/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.mylyn.github.ui/plugin.xml8
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/ImportRepositoriesWizard.java2
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java87
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/RepositorySelectionWizardPage.java2
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties29
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CreateGistHandler.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/CreateGistHandler.java)3
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CreateGistJob.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/CreateGistJob.java)3
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistNotificationPopup.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GistNotificationPopup.java)3
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java2
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueAttributePart.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueAttributePart.java)12
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUI.java)18
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueLabelAttributeEditor.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueLabelAttributeEditor.java)3
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueRepositoryQueryPage.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryQueryPage.java)51
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueRepositorySettingsPage.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java)22
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueSummaryPart.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueSummaryPart.java)12
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueTaskEditorPage.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java)14
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueTaskEditorPageFactory.java (renamed from org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java)11
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/Messages.java113
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/messages.properties28
39 files changed, 480 insertions, 411 deletions
diff --git a/org.eclipse.mylyn.github.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.github.core/META-INF/MANIFEST.MF
index 1721cbc7..f03adb37 100644
--- a/org.eclipse.mylyn.github.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.github.core/META-INF/MANIFEST.MF
@@ -6,8 +6,9 @@ Bundle-SymbolicName: org.eclipse.mylyn.github.core;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.mylyn.github.internal;x-friends:="org.eclipse.mylyn.github.ui",
- org.eclipse.mylyn.internal.github.core.gist;x-friends:="org.eclipse.mylyn.github.ui"
+Export-Package: org.eclipse.mylyn.internal.github.core;x-friends:="org.eclipse.mylyn.github.ui",
+ org.eclipse.mylyn.internal.github.core.gist;x-friends:="org.eclipse.mylyn.github.ui",
+ org.eclipse.mylyn.internal.github.core.issue;x-friends:="org.eclipse.mylyn.github.ui"
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
org.eclipse.mylyn.tasks.core;bundle-version="3.2.0",
org.eclipse.mylyn.commons.net;bundle-version="3.2.0",
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Messages.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Messages.java
deleted file mode 100644
index 59617861..00000000
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Messages.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 GitHub Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kevin Sawicki (GitHub Inc.) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.mylyn.github.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * NLS for Mylyn GitHub Core
- */
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.mylyn.github.internal.messages"; //$NON-NLS-1$
-
- /** */
- public static String FieldError_InvalidField;
-
- /** */
- public static String FieldError_InvalidFieldWithValue;
-
- /** */
- public static String FieldError_MissingField;
-
- /** */
- public static String FieldError_ResourceError;
-
- /** */
- public static String GitHubRepositoryConnector_LabelConnector;
-
- /** */
- public static String GitHubRepositoryConnector_TaskQuerying;
-
- /** */
- public static String GitHubRepositoryConnector_TaskUpdatingLabels;
-
- /** */
- public static String GitHubRepositoryConnector_TaskUpdatingMilestones;
-
- /** */
- public static String GitHubTaskAttributes_LabekSummary;
-
- /** */
- public static String GitHubTaskAttributes_LabelAssignee;
-
- /** */
- public static String GitHubTaskAttributes_LabelAssigneeGravatar;
-
- /** */
- public static String GitHubTaskAttributes_LabelClosed;
-
- /** */
- public static String GitHubTaskAttributes_LabelComment;
-
- /** */
- public static String GitHubTaskAttributes_LabelCreated;
-
- /** */
- public static String GitHubTaskAttributes_LabelDescription;
-
- /** */
- public static String GitHubTaskAttributes_LabelKey;
-
- /** */
- public static String GitHubTaskAttributes_LabelLabels;
-
- /** */
- public static String GitHubTaskAttributes_LabelMilestone;
-
- /** */
- public static String GitHubTaskAttributes_LabelModified;
-
- /** */
- public static String GitHubTaskAttributes_LabelReporter;
-
- /** */
- public static String GitHubTaskAttributes_LabelReporterGravatar;
-
- /** */
- public static String GitHubTaskAttributes_LabelStatus;
-
- /** */
- public static String GitHubTaskDataHandler_MilestoneNone;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/messages.properties b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/messages.properties
deleted file mode 100644
index 77706e84..00000000
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/messages.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-FieldError_InvalidField=Invalid value for field {1}
-FieldError_InvalidFieldWithValue=Invalid value of {0} for field {1}
-FieldError_MissingField=Missing required field {0}
-FieldError_ResourceError=Error with field {0} in {1} resource
-GitHubRepositoryConnector_LabelConnector=GitHub Issues
-GitHubRepositoryConnector_TaskQuerying=Querying repository...
-GitHubRepositoryConnector_TaskUpdatingLabels=Updating labels
-GitHubRepositoryConnector_TaskUpdatingMilestones=Updating milestones
-GitHubTaskAttributes_LabekSummary=Summary
-GitHubTaskAttributes_LabelAssignee=Assignee:
-GitHubTaskAttributes_LabelAssigneeGravatar=Assignee
-GitHubTaskAttributes_LabelClosed=Closed:
-GitHubTaskAttributes_LabelComment=Comment:
-GitHubTaskAttributes_LabelCreated=Created:
-GitHubTaskAttributes_LabelDescription=Description
-GitHubTaskAttributes_LabelKey=Key
-GitHubTaskAttributes_LabelLabels=Labels:
-GitHubTaskAttributes_LabelMilestone=Milestone:
-GitHubTaskAttributes_LabelModified=Modified:
-GitHubTaskAttributes_LabelReporter=Reporter:
-GitHubTaskAttributes_LabelReporterGravatar=Reporter
-GitHubTaskAttributes_LabelStatus=Status:
-GitHubTaskDataHandler_MilestoneNone=None
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHub.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java
index cf2e1330..6206ad0f 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHub.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHub.java
@@ -10,7 +10,7 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core;
import java.util.regex.Pattern;
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubException.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHubException.java
index 6ff1a908..a0a58cf7 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubException.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/GitHubException.java
@@ -8,7 +8,7 @@
* Contributors:
* Kevin Sawicki (GitHub Inc.) - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core;
import java.io.IOException;
import java.text.MessageFormat;
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/Messages.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/Messages.java
new file mode 100644
index 00000000..0c8858bf
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/Messages.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.mylyn.internal.github.core;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * NLS for Mylyn GitHub Core
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.github.core.messages"; //$NON-NLS-1$
+
+ /** */
+ public static String FieldError_InvalidField;
+
+ /** */
+ public static String FieldError_InvalidFieldWithValue;
+
+ /** */
+ public static String FieldError_MissingField;
+
+ /** */
+ public static String FieldError_ResourceError;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/QueryUtils.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/QueryUtils.java
index c2496f3d..85728004 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/QueryUtils.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/QueryUtils.java
@@ -8,7 +8,7 @@
* Contributors:
* Kevin Sawicki (GitHub Inc.) - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core;
import java.util.Collection;
import java.util.Collections;
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistAttachmentHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistAttachmentHandler.java
index 172c9332..09609f7e 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistAttachmentHandler.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistAttachmentHandler.java
@@ -24,7 +24,7 @@ import org.eclipse.egit.github.core.client.GitHubRequest;
import org.eclipse.egit.github.core.service.GistService;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.github.internal.GitHub;
+import org.eclipse.mylyn.internal.github.core.GitHub;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistConnector.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistConnector.java
index fe3760bc..f92c6d1a 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistConnector.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistConnector.java
@@ -22,7 +22,7 @@ import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.GistService;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.github.internal.GitHub;
+import org.eclipse.mylyn.internal.github.core.GitHub;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java
index a09539e9..e68a2900 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java
@@ -27,8 +27,8 @@ import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.service.GistService;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.github.internal.GitHub;
-import org.eclipse.mylyn.github.internal.GitHubTaskAttributeMapper;
+import org.eclipse.mylyn.internal.github.core.GitHub;
+import org.eclipse.mylyn.internal.github.core.issue.IssueAttributeMapper;
import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.RepositoryResponse;
@@ -274,7 +274,7 @@ public class GistTaskDataHandler extends AbstractTaskDataHandler {
* @see org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler#getAttributeMapper(org.eclipse.mylyn.tasks.core.TaskRepository)
*/
public TaskAttributeMapper getAttributeMapper(TaskRepository taskRepository) {
- return new GitHubTaskAttributeMapper(taskRepository);
+ return new IssueAttributeMapper(taskRepository);
}
}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskAttributes.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueAttribute.java
index 1b6cd3b9..8c97c965 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskAttributes.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueAttribute.java
@@ -10,104 +10,104 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core.issue;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
/**
* GitHub issue task attributes
*/
-public enum GitHubTaskAttributes {
+public enum IssueAttribute {
/**
* Issue key
*/
- KEY(Messages.GitHubTaskAttributes_LabelKey, TaskAttribute.TASK_KEY,
+ KEY(Messages.IssueAttribute_LabelKey, TaskAttribute.TASK_KEY,
TaskAttribute.TYPE_SHORT_TEXT, true, true),
/**
* Issue title
*/
- TITLE(Messages.GitHubTaskAttributes_LabekSummary, TaskAttribute.SUMMARY,
+ TITLE(Messages.IssueAttribute_LabekSummary, TaskAttribute.SUMMARY,
TaskAttribute.TYPE_SHORT_RICH_TEXT, false, true),
/**
* Issue description
*/
- BODY(Messages.GitHubTaskAttributes_LabelDescription,
+ BODY(Messages.IssueAttribute_LabelDescription,
TaskAttribute.DESCRIPTION, TaskAttribute.TYPE_LONG_RICH_TEXT,
false, true),
/**
* Issue creation date
*/
- CREATION_DATE(Messages.GitHubTaskAttributes_LabelCreated,
+ CREATION_DATE(Messages.IssueAttribute_LabelCreated,
TaskAttribute.DATE_CREATION, TaskAttribute.TYPE_DATETIME, true,
false),
/**
* Issue modification date
*/
- MODIFICATION_DATE(Messages.GitHubTaskAttributes_LabelModified,
+ MODIFICATION_DATE(Messages.IssueAttribute_LabelModified,
TaskAttribute.DATE_MODIFICATION, TaskAttribute.TYPE_DATETIME, true,
false),
/**
* Issue closed date
*/
- CLOSED_DATE(Messages.GitHubTaskAttributes_LabelClosed,
+ CLOSED_DATE(Messages.IssueAttribute_LabelClosed,
TaskAttribute.DATE_COMPLETION, TaskAttribute.TYPE_DATETIME, true,
false),
/**
* Issue status
*/
- STATUS(Messages.GitHubTaskAttributes_LabelStatus, TaskAttribute.STATUS,
+ STATUS(Messages.IssueAttribute_LabelStatus, TaskAttribute.STATUS,
TaskAttribute.TYPE_SHORT_TEXT, false, true),
/**
* Issue reporter
*/
- REPORTER(Messages.GitHubTaskAttributes_LabelReporter,
+ REPORTER(Messages.IssueAttribute_LabelReporter,
TaskAttribute.USER_REPORTER, TaskAttribute.TYPE_PERSON, true, false),
/**
* Comment being added to issue
*/
- COMMENT_NEW(Messages.GitHubTaskAttributes_LabelComment,
+ COMMENT_NEW(Messages.IssueAttribute_LabelComment,
TaskAttribute.COMMENT_NEW, TaskAttribute.TYPE_LONG_RICH_TEXT,
false, false),
/**
* Labels applied to issue
*/
- LABELS(Messages.GitHubTaskAttributes_LabelLabels, "github.issue.labels", //$NON-NLS-1$
+ LABELS(Messages.IssueAttribute_LabelLabels, "github.issue.labels", //$NON-NLS-1$
TaskAttribute.TYPE_MULTI_SELECT, true, false),
/**
* Issue assignee
*/
- ASSIGNEE(Messages.GitHubTaskAttributes_LabelAssignee,
+ ASSIGNEE(Messages.IssueAttribute_LabelAssignee,
TaskAttribute.USER_ASSIGNED, TaskAttribute.TYPE_PERSON, false, true),
/**
* Issue milestone
*/
- MILESTONE(Messages.GitHubTaskAttributes_LabelMilestone,
+ MILESTONE(Messages.IssueAttribute_LabelMilestone,
"github.issue.milestone", TaskAttribute.TYPE_SINGLE_SELECT, //$NON-NLS-1$
false, true),
/**
* Issue assignee gravatar
*/
- ASSIGNEE_GRAVATAR(Messages.GitHubTaskAttributes_LabelAssigneeGravatar,
+ ASSIGNEE_GRAVATAR(Messages.IssueAttribute_LabelAssigneeGravatar,
"github.issue.assignee.gravatar", TaskAttribute.TYPE_URL, null, //$NON-NLS-1$
true, false),
/**
* Issue reporter gravatar
*/
- REPORTER_GRAVATAR(Messages.GitHubTaskAttributes_LabelReporterGravatar,
+ REPORTER_GRAVATAR(Messages.IssueAttribute_LabelReporterGravatar,
"github.issue.reporter.gravatar", TaskAttribute.TYPE_URL, null, //$NON-NLS-1$
true, false);
@@ -118,12 +118,12 @@ public enum GitHubTaskAttributes {
private final boolean initTask;
private final String type;
- private GitHubTaskAttributes(String label, String id, String type,
+ private IssueAttribute(String label, String id, String type,
boolean readOnly, boolean initTask) {
this(label, id, type, TaskAttribute.KIND_DEFAULT, readOnly, initTask);
}
- private GitHubTaskAttributes(String label, String id, String type,
+ private IssueAttribute(String label, String id, String type,
String kind, boolean readOnly, boolean initTask) {
this.label = label;
this.id = id;
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskAttributeMapper.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueAttributeMapper.java
index 776ffc05..e4038af7 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskAttributeMapper.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueAttributeMapper.java
@@ -10,7 +10,7 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core.issue;
import java.text.DateFormat;
import java.util.Collections;
@@ -24,7 +24,7 @@ import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
/**
* GitHub task attribute mapper class.
*/
-public class GitHubTaskAttributeMapper extends TaskAttributeMapper {
+public class IssueAttributeMapper extends TaskAttributeMapper {
private DateFormat format = DateFormat.getDateTimeInstance(
DateFormat.MEDIUM, DateFormat.SHORT);
@@ -32,7 +32,7 @@ public class GitHubTaskAttributeMapper extends TaskAttributeMapper {
/**
* @param taskRepository
*/
- public GitHubTaskAttributeMapper(TaskRepository taskRepository) {
+ public IssueAttributeMapper(TaskRepository taskRepository) {
super(taskRepository);
}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubRepositoryConnector.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
index 24f688b5..274c4bcc 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubRepositoryConnector.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
@@ -10,7 +10,7 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core.issue;
import java.io.IOException;
import java.util.Collections;
@@ -41,6 +41,9 @@ import org.eclipse.egit.github.core.util.LabelComparator;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.commons.net.Policy;
+import org.eclipse.mylyn.internal.github.core.GitHub;
+import org.eclipse.mylyn.internal.github.core.GitHubException;
+import org.eclipse.mylyn.internal.github.core.QueryUtils;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
@@ -55,7 +58,7 @@ import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
/**
* GitHub connector.
*/
-public class GitHubRepositoryConnector extends AbstractRepositoryConnector {
+public class IssueConnector extends AbstractRepositoryConnector {
/**
* GitHub kind.
@@ -81,7 +84,7 @@ public class GitHubRepositoryConnector extends AbstractRepositoryConnector {
/**
* GitHub specific {@link AbstractTaskDataHandler}.
*/
- private final GitHubTaskDataHandler taskDataHandler;
+ private final IssueTaskDataHandler taskDataHandler;
private final Map<TaskRepository, List<Label>> repositoryLabels = Collections
.synchronizedMap(new HashMap<TaskRepository, List<Label>>());
@@ -92,8 +95,8 @@ public class GitHubRepositoryConnector extends AbstractRepositoryConnector {
/**
* Create GitHub issue repository connector
*/
- public GitHubRepositoryConnector() {
- taskDataHandler = new GitHubTaskDataHandler(this);
+ public IssueConnector() {
+ taskDataHandler = new IssueTaskDataHandler(this);
}
/**
@@ -233,7 +236,7 @@ public class GitHubRepositoryConnector extends AbstractRepositoryConnector {
*/
@Override
public String getLabel() {
- return Messages.GitHubRepositoryConnector_LabelConnector;
+ return Messages.IssueConnector_LabelConnector;
}
/**
@@ -252,7 +255,7 @@ public class GitHubRepositoryConnector extends AbstractRepositoryConnector {
List<String> statuses = QueryUtils.getAttributes(
IssueService.FILTER_STATE, query);
- monitor.beginTask(Messages.GitHubRepositoryConnector_TaskQuerying,
+ monitor.beginTask(Messages.IssueConector_TaskQuerying,
statuses.size());
try {
Repository repo = GitHub.getRepository(repository
@@ -370,10 +373,10 @@ public class GitHubRepositoryConnector extends AbstractRepositoryConnector {
IProgressMonitor monitor) throws CoreException {
monitor = Policy.monitorFor(monitor);
monitor.beginTask("", 2); //$NON-NLS-1$
- monitor.setTaskName(Messages.GitHubRepositoryConnector_TaskUpdatingLabels);
+ monitor.setTaskName(Messages.IssueConnector_TaskUpdatingLabels);
refreshLabels(taskRepository);
monitor.worked(1);
- monitor.setTaskName(Messages.GitHubRepositoryConnector_TaskUpdatingMilestones);
+ monitor.setTaskName(Messages.IssueConnector_TaskUpdatingMilestones);
refreshMilestones(taskRepository);
monitor.done();
}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskOperation.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueOperation.java
index 58c5b6ea..d851919d 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskOperation.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueOperation.java
@@ -10,12 +10,12 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core.issue;
/**
* Enumeration of task operations
*/
-public enum GitHubTaskOperation {
+public enum IssueOperation {
/**
* LEAD
@@ -34,7 +34,7 @@ public enum GitHubTaskOperation {
private final String label;
- private GitHubTaskOperation(String label) {
+ private IssueOperation(String label) {
this.label = label;
}
@@ -64,8 +64,8 @@ public enum GitHubTaskOperation {
* @return the operation, or null if the id was null or did not match any
* operation
*/
- public static GitHubTaskOperation fromId(String opId) {
- for (GitHubTaskOperation op : values()) {
+ public static IssueOperation fromId(String opId) {
+ for (IssueOperation op : values()) {
if (op.getId().equals(opId)) {
return op;
}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java
index f65b9239..3cb43c81 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueTaskDataHandler.java
@@ -10,7 +10,7 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.internal;
+package org.eclipse.mylyn.internal.github.core.issue;
import java.io.IOException;
import java.util.Date;
@@ -30,6 +30,8 @@ import org.eclipse.egit.github.core.client.GitHubClient;
import org.eclipse.egit.github.core.client.RequestException;
import org.eclipse.egit.github.core.service.IssueService;
import org.eclipse.egit.github.core.service.LabelService;
+import org.eclipse.mylyn.internal.github.core.GitHub;
+import org.eclipse.mylyn.internal.github.core.GitHubException;
import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.RepositoryResponse;
@@ -46,26 +48,26 @@ import org.eclipse.mylyn.tasks.core.data.TaskOperation;
/**
* GitHub issue task data handler
*/
-public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
+public class IssueTaskDataHandler extends AbstractTaskDataHandler {
private static final String DATA_VERSION = "1"; //$NON-NLS-1$
private static final String MILESTONE_NONE_KEY = "0"; //$NON-NLS-1$
- private GitHubTaskAttributeMapper taskAttributeMapper = null;
- private final GitHubRepositoryConnector connector;
+ private IssueAttributeMapper taskAttributeMapper = null;
+ private final IssueConnector connector;
/**
* Create GitHub issue task data handler for connector
*
* @param connector
*/
- public GitHubTaskDataHandler(GitHubRepositoryConnector connector) {
+ public IssueTaskDataHandler(IssueConnector connector) {
this.connector = connector;
}
@Override
public TaskAttributeMapper getAttributeMapper(TaskRepository taskRepository) {
if (this.taskAttributeMapper == null)
- this.taskAttributeMapper = new GitHubTaskAttributeMapper(
+ this.taskAttributeMapper = new IssueAttributeMapper(
taskRepository);
return this.taskAttributeMapper;
}
@@ -75,40 +77,40 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
String key = Integer.toString(issue.getNumber());
TaskData data = new TaskData(getAttributeMapper(repository),
- GitHubRepositoryConnector.KIND, repository.getRepositoryUrl(),
+ IssueConnector.KIND, repository.getRepositoryUrl(),
key);
data.setVersion(DATA_VERSION);
createOperations(data, issue);
- createAttribute(data, GitHubTaskAttributes.KEY, key);
- createAttribute(data, GitHubTaskAttributes.TITLE, issue.getTitle());
- createAttribute(data, GitHubTaskAttributes.BODY, issue.getBody());
- createAttribute(data, GitHubTaskAttributes.STATUS, issue.getState());
- createAttribute(data, GitHubTaskAttributes.CREATION_DATE,
+ createAttribute(data, IssueAttribute.KEY, key);
+ createAttribute(data, IssueAttribute.TITLE, issue.getTitle());
+ createAttribute(data, IssueAttribute.BODY, issue.getBody());
+ createAttribute(data, IssueAttribute.STATUS, issue.getState());
+ createAttribute(data, IssueAttribute.CREATION_DATE,
issue.getCreatedAt());
- createAttribute(data, GitHubTaskAttributes.MODIFICATION_DATE,
+ createAttribute(data, IssueAttribute.MODIFICATION_DATE,
issue.getUpdatedAt());
- createAttribute(data, GitHubTaskAttributes.CLOSED_DATE,
+ createAttribute(data, IssueAttribute.CLOSED_DATE,
issue.getClosedAt());
User reporter = issue.getUser();
- createAttribute(data, GitHubTaskAttributes.REPORTER, reporter,
+ createAttribute(data, IssueAttribute.REPORTER, reporter,
repository);
String reporterGravatar = reporter != null ? reporter.getGravatarUrl()
: null;
- createAttribute(data, GitHubTaskAttributes.REPORTER_GRAVATAR,
+ createAttribute(data, IssueAttribute.REPORTER_GRAVATAR,
reporterGravatar);
User assignee = issue.getAssignee();
- createAttribute(data, GitHubTaskAttributes.ASSIGNEE, assignee,
+ createAttribute(data, IssueAttribute.ASSIGNEE, assignee,
repository);
String assigneeGravatar = assignee != null ? assignee.getGravatarUrl()
: null;
- createAttribute(data, GitHubTaskAttributes.ASSIGNEE_GRAVATAR,
+ createAttribute(data, IssueAttribute.ASSIGNEE_GRAVATAR,
assigneeGravatar);
- createAttribute(data, GitHubTaskAttributes.COMMENT_NEW);
+ createAttribute(data, IssueAttribute.COMMENT_NEW);
createLabels(repository, data, issue);
@@ -123,7 +125,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
String number = current != null ? Integer.toString(current.getNumber())
: MILESTONE_NONE_KEY;
TaskAttribute milestoneAttribute = createAttribute(data,
- GitHubTaskAttributes.MILESTONE, number);
+ IssueAttribute.MILESTONE, number);
if (!this.connector.hasCachedMilestones(repository))
try {
@@ -135,7 +137,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
List<Milestone> cachedMilestones = this.connector
.getMilestones(repository);
milestoneAttribute.putOption(MILESTONE_NONE_KEY,
- Messages.GitHubTaskDataHandler_MilestoneNone);
+ Messages.IssueAttribute_MilestoneNone);
for (Milestone milestone : cachedMilestones)
milestoneAttribute.putOption(
Integer.toString(milestone.getNumber()),
@@ -145,7 +147,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
private void createLabels(TaskRepository repository, TaskData data,
Issue issue) {
TaskAttribute labels = createAttribute(data,
- GitHubTaskAttributes.LABELS, issue.getLabels());
+ IssueAttribute.LABELS, issue.getLabels());
if (!this.connector.hasCachedLabels(repository))
try {
@@ -167,17 +169,17 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
if (!data.isNew()) {
String state = issue.getState();
if (state != null) {
- addOperation(data, issue, GitHubTaskOperation.LEAVE, true);
+ addOperation(data, issue, IssueOperation.LEAVE, true);
if (state.equals(IssueService.STATE_OPEN))
- addOperation(data, issue, GitHubTaskOperation.CLOSE, false);
+ addOperation(data, issue, IssueOperation.CLOSE, false);
else if (state.equals(IssueService.STATE_CLOSED))
- addOperation(data, issue, GitHubTaskOperation.REOPEN, false);
+ addOperation(data, issue, IssueOperation.REOPEN, false);
}
}
}
private void addOperation(TaskData data, Issue issue,
- GitHubTaskOperation operation, boolean asDefault) {
+ IssueOperation operation, boolean asDefault) {
TaskAttribute attribute = data.getRoot().createAttribute(
TaskAttribute.PREFIX_OPERATION + operation.getId());
String label = createOperationLabel(issue, operation);
@@ -191,8 +193,8 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
}
private String createOperationLabel(Issue issue,
- GitHubTaskOperation operation) {
- return operation == GitHubTaskOperation.LEAVE ? operation.getLabel()
+ IssueOperation operation) {
+ return operation == IssueOperation.LEAVE ? operation.getLabel()
+ issue.getState() : operation.getLabel();
}
@@ -233,11 +235,11 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
if (!taskData.isNew()) {
issue.setNumber(Integer.parseInt(taskData.getTaskId()));
}
- issue.setBody(getAttributeValue(taskData, GitHubTaskAttributes.BODY));
- issue.setTitle(getAttributeValue(taskData, GitHubTaskAttributes.TITLE));
+ issue.setBody(getAttributeValue(taskData, IssueAttribute.BODY));
+ issue.setTitle(getAttributeValue(taskData, IssueAttribute.TITLE));
String assigneeValue = getAttributeValue(taskData,
- GitHubTaskAttributes.ASSIGNEE);
+ IssueAttribute.ASSIGNEE);
if (assigneeValue != null) {
if (assigneeValue.trim().length() == 0)
assigneeValue = null;
@@ -246,7 +248,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
}
String milestoneValue = getAttributeValue(taskData,
- GitHubTaskAttributes.MILESTONE);
+ IssueAttribute.MILESTONE);
if (milestoneValue != null) {
Milestone milestone = new Milestone();
if (milestoneValue.length() > 0)
@@ -257,13 +259,13 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
}
private String getAttributeValue(TaskData taskData,
- GitHubTaskAttributes attr) {
+ IssueAttribute attr) {
TaskAttribute attribute = taskData.getRoot().getAttribute(attr.getId());
return attribute == null ? null : attribute.getValue();
}
private TaskAttribute createAttribute(TaskData data,
- GitHubTaskAttributes attribute) {
+ IssueAttribute attribute) {
TaskAttribute attr = data.getRoot().createAttribute(attribute.getId());
TaskAttributeMetaData metaData = attr.getMetaData();
metaData.defaults().setType(attribute.getType())
@@ -273,7 +275,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
}
private TaskAttribute createAttribute(TaskData data,
- GitHubTaskAttributes attribute, String value) {
+ IssueAttribute attribute, String value) {
TaskAttribute attr = createAttribute(data, attribute);
if (value != null) {
data.getAttributeMapper().setValue(attr, value);
@@ -282,7 +284,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
}
private TaskAttribute createAttribute(TaskData data,
- GitHubTaskAttributes attribute, Date value) {
+ IssueAttribute attribute, Date value) {
TaskAttribute attr = createAttribute(data, attribute);
if (value != null) {
data.getAttributeMapper().setDateValue(attr, value);
@@ -290,7 +292,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
return attr;
}
- private void createAttribute(TaskData data, GitHubTaskAttributes attribute,
+ private void createAttribute(TaskData data, IssueAttribute attribute,
User value, TaskRepository repository) {
TaskAttribute attr = createAttribute(data, attribute);
if (value != null) {
@@ -302,7 +304,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
}
private TaskAttribute createAttribute(TaskData data,
- GitHubTaskAttributes attribute, List<Label> values) {
+ IssueAttribute attribute, List<Label> values) {
TaskAttribute attr = createAttribute(data, attribute);
if (values != null) {
List<String> labels = new LinkedList<String>();
@@ -321,7 +323,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
data.setVersion(DATA_VERSION);
- for (GitHubTaskAttributes attr : GitHubTaskAttributes.values()) {
+ for (IssueAttribute attr : IssueAttribute.values()) {
if (attr.isInitTask()) {
createAttribute(data, attr, (String) null);
}
@@ -346,7 +348,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
Set<TaskAttribute> oldAttributes) throws IOException {
// Update labels if changed
TaskAttribute labelsAttribute = data.getRoot().getAttribute(
- GitHubTaskAttributes.LABELS.getId());
+ IssueAttribute.LABELS.getId());
if (oldAttributes.contains(labelsAttribute)) {
LabelService labelService = new LabelService(client);
@@ -392,7 +394,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
Issue issue = createIssue(taskData);
Repository repo = GitHub.getRepository(repository.getRepositoryUrl());
try {
- GitHubClient client = GitHubRepositoryConnector
+ GitHubClient client = IssueConnector
.createClient(repository);
IssueService service = new IssueService(client);
if (taskData.isNew()) {
@@ -404,7 +406,7 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
// Handle new comment
String comment = getAttributeValue(taskData,
- GitHubTaskAttributes.COMMENT_NEW);
+ IssueAttribute.COMMENT_NEW);
if (comment != null && comment.length() > 0)
service.createComment(repo.getOwner(), repo.getName(),
taskId, comment);
@@ -416,9 +418,9 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
TaskAttribute operationAttribute = taskData.getRoot()
.getAttribute(TaskAttribute.OPERATION);
if (operationAttribute != null) {
- GitHubTaskOperation operation = GitHubTaskOperation
+ IssueOperation operation = IssueOperation
.fromId(operationAttribute.getValue());
- if (operation != GitHubTaskOperation.LEAVE)
+ if (operation != IssueOperation.LEAVE)
switch (operation) {
case REOPEN:
issue.setState(IssueService.STATE_OPEN);
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/Messages.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/Messages.java
new file mode 100644
index 00000000..6b97a831
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/Messages.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.mylyn.internal.github.core.issue;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * NLS for Mylyn GitHub Core
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.github.core.issue.messages"; //$NON-NLS-1$
+
+ /** */
+ public static String IssueConnector_LabelConnector;
+
+ /** */
+ public static String IssueConector_TaskQuerying;
+
+ /** */
+ public static String IssueConnector_TaskUpdatingLabels;
+
+ /** */
+ public static String IssueConnector_TaskUpdatingMilestones;
+
+ /** */
+ public static String IssueAttribute_LabekSummary;
+
+ /** */
+ public static String IssueAttribute_LabelAssignee;
+
+ /** */
+ public static String IssueAttribute_LabelAssigneeGravatar;
+
+ /** */
+ public static String IssueAttribute_LabelClosed;
+
+ /** */
+ public static String IssueAttribute_LabelComment;
+
+ /** */
+ public static String IssueAttribute_LabelCreated;
+
+ /** */
+ public static String IssueAttribute_LabelDescription;
+
+ /** */
+ public static String IssueAttribute_LabelKey;
+
+ /** */
+ public static String IssueAttribute_LabelLabels;
+
+ /** */
+ public static String IssueAttribute_LabelMilestone;
+
+ /** */
+ public static String IssueAttribute_LabelModified;
+
+ /** */
+ public static String IssueAttribute_LabelReporter;
+
+ /** */
+ public static String IssueAttribute_LabelReporterGravatar;
+
+ /** */
+ public static String IssueAttribute_LabelStatus;
+
+ /** */
+ public static String IssueAttribute_MilestoneNone;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/messages.properties b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/messages.properties
new file mode 100644
index 00000000..b64e1b8a
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/messages.properties
@@ -0,0 +1,19 @@
+IssueConnector_LabelConnector=GitHub Issues
+IssueConector_TaskQuerying=Querying repository...
+IssueConnector_TaskUpdatingLabels=Updating labels
+IssueConnector_TaskUpdatingMilestones=Updating milestones
+IssueAttribute_LabekSummary=Summary
+IssueAttribute_LabelAssignee=Assignee:
+IssueAttribute_LabelAssigneeGravatar=Assignee
+IssueAttribute_LabelClosed=Closed:
+IssueAttribute_LabelComment=Comment:
+IssueAttribute_LabelCreated=Created:
+IssueAttribute_LabelDescription=Description
+IssueAttribute_LabelKey=Key
+IssueAttribute_LabelLabels=Labels:
+IssueAttribute_LabelMilestone=Milestone:
+IssueAttribute_LabelModified=Modified:
+IssueAttribute_LabelReporter=Reporter:
+IssueAttribute_LabelReporterGravatar=Reporter
+IssueAttribute_LabelStatus=Status:
+IssueAttribute_MilestoneNone=None
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/messages.properties b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/messages.properties
new file mode 100644
index 00000000..52d8a86a
--- /dev/null
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/messages.properties
@@ -0,0 +1,4 @@
+FieldError_InvalidField=Invalid value for field {1}
+FieldError_InvalidFieldWithValue=Invalid value of {0} for field {1}
+FieldError_MissingField=Missing required field {0}
+FieldError_ResourceError=Error with field {0} in {1} resource
diff --git a/org.eclipse.mylyn.github.tests/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUIHeadlessTest.java b/org.eclipse.mylyn.github.tests/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUIHeadlessTest.java
index a42a5ce3..3c25a8d3 100644
--- a/org.eclipse.mylyn.github.tests/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUIHeadlessTest.java
+++ b/org.eclipse.mylyn.github.tests/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUIHeadlessTest.java
@@ -16,26 +16,27 @@ import static junit.framework.Assert.assertNotNull;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.mylyn.github.internal.GitHub;
+import org.eclipse.mylyn.internal.github.core.GitHub;
+import org.eclipse.mylyn.internal.github.ui.issue.IssueConnectorUi;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.junit.Before;
import org.junit.Test;
/**
- * Headless test for {@link GitHubRepositoryConnectorUI}
+ * Headless test for {@link IssueConnectorUi}
*
* @author Christian Trutz <christian.trutz@gmail.com>
*/
@SuppressWarnings("restriction")
public class GitHubRepositoryConnectorUIHeadlessTest {
- private GitHubRepositoryConnectorUI connectorUI;
+ private IssueConnectorUi connectorUI;
private TaskRepository repository;
@Before
public void before() {
- connectorUI = new GitHubRepositoryConnectorUI();
+ connectorUI = new IssueConnectorUi();
repository = new TaskRepository(GitHub.CONNECTOR_KIND,
GitHub.createGitHubUrl("foo", "bar"));
}
diff --git a/org.eclipse.mylyn.github.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.github.ui/META-INF/MANIFEST.MF
index 0b56028f..276e3fb5 100644
--- a/org.eclipse.mylyn.github.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.github.ui/META-INF/MANIFEST.MF
@@ -23,7 +23,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
org.eclipse.egit.ui;bundle-version="0.12.0",
org.eclipse.core.expressions;bundle-version="3.4.0",
org.eclipse.egit.github.core;bundle-version="0.1.0"
-Export-Package: org.eclipse.mylyn.github.ui.internal;x-internal:=true
+Export-Package: org.eclipse.mylyn.github.ui.internal;x-internal:=true,
+ org.eclipse.mylyn.internal.github.ui.gist;x-internal:=true,
+ org.eclipse.mylyn.internal.github.ui.issue;x-internal:=true
Bundle-ActivationPolicy: lazy
Import-Package: org.apache.http;version="4.1.0",
org.eclipse.egit.ui.internal;version="0.12.0"
diff --git a/org.eclipse.mylyn.github.ui/plugin.xml b/org.eclipse.mylyn.github.ui/plugin.xml
index 5c02cacc..076b3a20 100644
--- a/org.eclipse.mylyn.github.ui/plugin.xml
+++ b/org.eclipse.mylyn.github.ui/plugin.xml
@@ -4,13 +4,13 @@
<extension
point="org.eclipse.mylyn.tasks.ui.repositories">
<connectorCore
- class="org.eclipse.mylyn.github.internal.GitHubRepositoryConnector"
+ class="org.eclipse.mylyn.internal.github.core.issue.IssueConnector"
id="org.eclipse.mylyn.github.ui.internal.GitHubRepositoryConnector"
name="%org.eclipse.mylyn.github.ui.internal.GitHubRepositoryConnector">
</connectorCore>
<connectorUi
brandingIcon="icons/obj16/github.png"
- class="org.eclipse.mylyn.github.ui.internal.GitHubRepositoryConnectorUI"
+ class="org.eclipse.mylyn.internal.github.ui.issue.IssueConnectorUi"
id="org.eclipse.mylyn.github.ui.internal.GitHubRepositoryConnectorUI"
name="%org.eclipse.mylyn.github.ui.internal.GitHubRepositoryConnectorUI"
overlayIcon="icons/obj16/github_8x8.png">
@@ -19,7 +19,7 @@
<extension
point="org.eclipse.mylyn.tasks.ui.editors">
<pageFactory
- class="org.eclipse.mylyn.github.ui.internal.GitHubTaskEditorPageFactory"
+ class="org.eclipse.mylyn.internal.github.ui.issue.IssueTaskEditorPageFactory"
id="org.eclipse.mylyn.github.ui.internal.GitHubTaskEditorPageFactory">
</pageFactory>
<pageFactory
@@ -78,7 +78,7 @@
<extension
point="org.eclipse.ui.handlers">
<handler
- class="org.eclipse.mylyn.github.ui.internal.CreateGistHandler"
+ class="org.eclipse.mylyn.internal.github.ui.gist.CreateGistHandler"
commandId="org.eclipse.mylyn.github.ui.command.createGist">
</handler>
<handler
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/ImportRepositoriesWizard.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/ImportRepositoriesWizard.java
index 660f43fd..4a81a496 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/ImportRepositoriesWizard.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/ImportRepositoriesWizard.java
@@ -16,7 +16,7 @@ import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.github.internal.GitHub;
+import org.eclipse.mylyn.internal.github.core.GitHub;
import org.eclipse.mylyn.internal.github.core.gist.GistConnector;
import org.eclipse.mylyn.internal.github.ui.gist.GistRepositorySettingsPage;
import org.eclipse.mylyn.internal.github.ui.gist.Messages;
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java
index 9c1cc2dd..d3ce3d47 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/Messages.java
@@ -38,93 +38,6 @@ public class Messages extends NLS {
public static String CredentialsWizardPage_Title;
/** */
- public static String GitHubRepositoryQueryPage_ErrorLoading;
-
- /** */
- public static String GitHubRepositoryQueryPage_AssigneeLabel;
-
- /** */
- public static String GitHubRepositoryQueryPage_Description;
-
- /** */
- public static String GitHubRepositoryQueryPage_ErrorStatus;
-
- /** */
- public static String GitHubRepositoryQueryPage_LabelsLabel;
-
- /** */
- public static String GitHubRepositoryQueryPage_MentionsLabel;
-
- /** */
- public static String GitHubRepositoryQueryPage_MilestoneLabel;
-
- /** */
- public static String GitHubRepositoryQueryPage_MilestoneNone;
-
- /** */
- public static String GitHubRepositoryQueryPage_StatusClosed;
-
- /** */
- public static String GitHubRepositoryQueryPage_StatusLabel;
-
- /** */
- public static String GitHubRepositoryQueryPage_StatusOpen;
-
- /** */
- public static String GitHubRepositoryQueryPage_TaskLoadingLabels;
-
- /** */
- public static String GitHubRepositoryQueryPage_TaskLoadingMilestones;
-
- /** */
- public static String GitHubRepositoryQueryPage_TitleLabel;
-
- /** */
- public static String GitHubRepositoryQueryPage_TooltipUpdateRepository;
-
- /** */
- public static String GitHubRepositorySettingsPage_Description;
-
- /** */
- public static String GitHubRepositorySettingsPage_ErrorMalformedUrl;
-
- /** */
- public static String GitHubRepositorySettingsPage_StatusError;
-
- /** */
- public static String GitHubRepositorySettingsPage_StatusSuccess;
-
- /** */
- public static String GitHubRepositorySettingsPage_TaskContactingServer;
-
- /** */
- public static String GitHubRepositorySettingsPage_TaskValidating;
-
- /** */
- public static String GitHubRepositorySettingsPage_Title;
-
- /** */
- public static String GitHubTaskEditorPageFactory_PageText;
-
- /** */
- public static String IssueLabelAttributeEditor_ActionNewLabel;
-
- /** */
- public static String IssueLabelAttributeEditor_ActionRemoveLabel;
-
- /** */
- public static String IssueLabelAttributeEditor_DescriptionNewLabel;
-
- /** */
- public static String IssueLabelAttributeEditor_MessageEnterName;
-
- /** */
- public static String IssueLabelAttributeEditor_TitleNewLabel;
-
- /** */
- public static String IssueLabelAttributeEditor_TooltipAddLabel;
-
- /** */
public static String RepositorySelectionWizardPage_Description;
/** */
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/RepositorySelectionWizardPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/RepositorySelectionWizardPage.java
index c26e13cf..94b80d73 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/RepositorySelectionWizardPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/RepositorySelectionWizardPage.java
@@ -33,7 +33,7 @@ import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylyn.github.internal.GitHub;
+import org.eclipse.mylyn.internal.github.core.GitHub;
import org.eclipse.mylyn.internal.github.core.gist.GistConnector;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties
index 0cb0e3aa..f2f485b4 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/messages.properties
@@ -4,35 +4,6 @@ CredentialsWizardPage_ErrorUser=Enter GitHub login name
CredentialsWizardPage_LabelPassword=Password:
CredentialsWizardPage_LabelUser=User ID:
CredentialsWizardPage_Title=GitHub Credentials
-GitHubRepositoryQueryPage_ErrorLoading=Error loading labels and milestones
-GitHubRepositoryQueryPage_AssigneeLabel=Assigned to:
-GitHubRepositoryQueryPage_Description=Issue query settings
-GitHubRepositoryQueryPage_ErrorStatus=Select a status
-GitHubRepositoryQueryPage_LabelsLabel=Labels
-GitHubRepositoryQueryPage_MentionsLabel=Mentioning:
-GitHubRepositoryQueryPage_MilestoneLabel=Milestone:
-GitHubRepositoryQueryPage_MilestoneNone=None
-GitHubRepositoryQueryPage_StatusClosed=Closed
-GitHubRepositoryQueryPage_StatusLabel=Status:
-GitHubRepositoryQueryPage_StatusOpen=Open
-GitHubRepositoryQueryPage_TaskLoadingLabels=Loading labels
-GitHubRepositoryQueryPage_TaskLoadingMilestones=Loading milestones
-GitHubRepositoryQueryPage_TitleLabel=Title:
-GitHubRepositoryQueryPage_TooltipUpdateRepository=Update milestones and labels
-GitHubRepositorySettingsPage_Description=Enter repository location and credentials
-GitHubRepositorySettingsPage_StatusError=Error validating settings: {0}
-GitHubRepositorySettingsPage_ErrorMalformedUrl=Server URL must be in the form http://github.com/user/project
-GitHubRepositorySettingsPage_StatusSuccess=Success\!
-GitHubRepositorySettingsPage_TaskContactingServer=Contacting server...
-GitHubRepositorySettingsPage_TaskValidating=Validating settings
-GitHubRepositorySettingsPage_Title=GitHub Issue Repository Settings
-GitHubTaskEditorPageFactory_PageText=GitHub
-IssueLabelAttributeEditor_ActionNewLabel=New Label...
-IssueLabelAttributeEditor_ActionRemoveLabel=Remove Label
-IssueLabelAttributeEditor_DescriptionNewLabel=Label Name:
-IssueLabelAttributeEditor_MessageEnterName=Enter label name
-IssueLabelAttributeEditor_TitleNewLabel=New Label
-IssueLabelAttributeEditor_TooltipAddLabel=Add Label...
RepositorySelectionWizardPage_Description=Select repositories to import
RepositorySelectionWizardPage_ErrorLoading=Error loading repositories: {0}
RepositorySelectionWizardPage_LabelAddGist=Add Gist task repository
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/CreateGistHandler.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CreateGistHandler.java
index e6b1df26..95d50f85 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/CreateGistHandler.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CreateGistHandler.java
@@ -8,7 +8,7 @@
* Contributors:
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.gist;
import java.io.BufferedReader;
import java.io.IOException;
@@ -27,6 +27,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
+import org.eclipse.mylyn.github.ui.internal.GitHubUi;
import org.eclipse.mylyn.internal.github.core.gist.GistConnector;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/CreateGistJob.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CreateGistJob.java
index 4797d0bc..dbcd1d83 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/CreateGistJob.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/CreateGistJob.java
@@ -8,7 +8,7 @@
* Contributors:
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.gist;
import java.io.IOException;
import java.util.Collections;
@@ -21,6 +21,7 @@ import org.eclipse.egit.github.core.Gist;
import org.eclipse.egit.github.core.GistFile;
import org.eclipse.egit.github.core.User;
import org.eclipse.egit.github.core.service.GistService;
+import org.eclipse.mylyn.github.ui.internal.GitHubUi;
import org.eclipse.ui.PlatformUI;
public class CreateGistJob extends Job {
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GistNotificationPopup.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistNotificationPopup.java
index deefcf7a..d5365e6e 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GistNotificationPopup.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistNotificationPopup.java
@@ -8,11 +8,12 @@
* Contributors:
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.gist;
import java.util.Set;
import org.eclipse.egit.github.core.Gist;
+import org.eclipse.mylyn.github.ui.internal.GitHubImages;
import org.eclipse.mylyn.internal.github.core.gist.GistConnector;
import org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotificationPopup;
import org.eclipse.mylyn.tasks.core.TaskRepository;
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java
index 80ab3ede..867b9286 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/gist/GistTaskEditorPage.java
@@ -25,8 +25,8 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.github.ui.internal.IssueSummaryPart;
import org.eclipse.mylyn.internal.github.core.gist.GistAttribute;
+import org.eclipse.mylyn.internal.github.ui.issue.IssueSummaryPart;
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionPart;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueAttributePart.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueAttributePart.java
index 0dc27669..e467b493 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueAttributePart.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueAttributePart.java
@@ -8,7 +8,7 @@
* Contributors:
* Kevin Sawicki (GitHub Inc.) - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
import java.util.ArrayList;
import java.util.LinkedList;
@@ -21,7 +21,7 @@ import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylyn.github.internal.GitHubTaskAttributes;
+import org.eclipse.mylyn.internal.github.core.issue.IssueAttribute;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFormUtil;
import org.eclipse.mylyn.internal.provisional.commons.ui.WorkbenchUtil;
import org.eclipse.mylyn.internal.tasks.ui.editors.AbstractTaskEditorSection;
@@ -64,9 +64,9 @@ public class IssueAttributePart extends AbstractTaskEditorSection {
@Override
protected AbstractAttributeEditor createAttributeEditor(
TaskAttribute attribute) {
- if (GitHubTaskAttributes.LABELS.getId().equals(attribute.getId())) {
+ if (IssueAttribute.LABELS.getId().equals(attribute.getId())) {
return new IssueLabelAttributeEditor(getModel(), attribute);
- } else if (GitHubTaskAttributes.MILESTONE.getId().equals(
+ } else if (IssueAttribute.MILESTONE.getId().equals(
attribute.getId())) {
return super.createAttributeEditor(attribute);
}
@@ -195,11 +195,11 @@ public class IssueAttributePart extends AbstractTaskEditorSection {
TaskAttribute root = getTaskData().getRoot();
List<TaskAttribute> attributes = new LinkedList<TaskAttribute>();
TaskAttribute milestones = root
- .getAttribute(GitHubTaskAttributes.MILESTONE.getId());
+ .getAttribute(IssueAttribute.MILESTONE.getId());
if (milestones != null)
attributes.add(milestones);
- TaskAttribute labels = root.getAttribute(GitHubTaskAttributes.LABELS
+ TaskAttribute labels = root.getAttribute(IssueAttribute.LABELS
.getId());
if (labels != null)
attributes.add(labels);
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUI.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java
index c82ffdee..d3fc3275 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositoryConnectorUI.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java
@@ -10,7 +10,7 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
import java.util.ArrayList;
import java.util.List;
@@ -23,8 +23,8 @@ import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.hyperlink.URLHyperlink;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.mylyn.github.internal.GitHub;
-import org.eclipse.mylyn.github.internal.GitHubRepositoryConnector;
+import org.eclipse.mylyn.internal.github.core.GitHub;
+import org.eclipse.mylyn.internal.github.core.issue.IssueConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -40,7 +40,7 @@ import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard;
/**
* GitHub connector specific UI extensions.
*/
-public class GitHubRepositoryConnectorUI extends AbstractRepositoryConnectorUi {
+public class IssueConnectorUi extends AbstractRepositoryConnectorUi {
private final Pattern issuePattern = Pattern.compile("(?:([a-zA-Z0-9_\\.-]+)(?:/([a-zA-Z0-9_\\.-]+))?)?\\#(\\d+)");
@@ -49,8 +49,8 @@ public class GitHubRepositoryConnectorUI extends AbstractRepositoryConnectorUi {
*
* @return connector
*/
- public static GitHubRepositoryConnector getCoreConnector() {
- return (GitHubRepositoryConnector) TasksUi
+ public static IssueConnector getCoreConnector() {
+ return (IssueConnector) TasksUi
.getRepositoryConnector(GitHub.CONNECTOR_KIND);
}
@@ -73,7 +73,7 @@ public class GitHubRepositoryConnectorUI extends AbstractRepositoryConnectorUi {
@Override
public ITaskRepositoryPage getSettingsPage(
final TaskRepository taskRepository) {
- return new GitHubRepositorySettingsPage(taskRepository);
+ return new IssueRepositorySettingsPage(taskRepository);
}
/**
@@ -108,7 +108,7 @@ public class GitHubRepositoryConnectorUI extends AbstractRepositoryConnectorUi {
public IWizard getQueryWizard(final TaskRepository taskRepository,
final IRepositoryQuery queryToEdit) {
RepositoryQueryWizard wizard = new RepositoryQueryWizard(taskRepository);
- GitHubRepositoryQueryPage queryPage = new GitHubRepositoryQueryPage(
+ IssueRepositoryQueryPage queryPage = new IssueRepositoryQueryPage(
taskRepository, queryToEdit);
wizard.addPage(queryPage);
return wizard;
@@ -167,7 +167,7 @@ public class GitHubRepositoryConnectorUI extends AbstractRepositoryConnectorUi {
*/
public ITaskSearchPage getSearchPage(TaskRepository repository,
IStructuredSelection selection) {
- return new GitHubRepositoryQueryPage(repository, null);
+ return new IssueRepositoryQueryPage(repository, null);
}
}
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueLabelAttributeEditor.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueLabelAttributeEditor.java
index 559f6ae5..da14cf1a 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueLabelAttributeEditor.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueLabelAttributeEditor.java
@@ -8,7 +8,7 @@
* Contributors:
* Kevin Sawicki (GitHub Inc.) - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
import java.util.Collections;
import java.util.Comparator;
@@ -26,6 +26,7 @@ import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.window.Window;
+import org.eclipse.mylyn.github.ui.internal.GitHubImages;
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskDiffUtil;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
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/internal/github/ui/issue/IssueRepositoryQueryPage.java
index ba421dfa..19cae0b0 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/internal/github/ui/issue/IssueRepositoryQueryPage.java
@@ -10,7 +10,7 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
import java.util.ArrayList;
import java.util.Collections;
@@ -34,8 +34,9 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.github.internal.GitHubRepositoryConnector;
-import org.eclipse.mylyn.github.internal.QueryUtils;
+import org.eclipse.mylyn.github.ui.internal.GitHubImages;
+import org.eclipse.mylyn.internal.github.core.QueryUtils;
+import org.eclipse.mylyn.internal.github.core.issue.IssueConnector;
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonUiUtil;
import org.eclipse.mylyn.internal.provisional.commons.ui.ICoreRunnable;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
@@ -64,7 +65,7 @@ import org.eclipse.ui.PlatformUI;
/**
* GitHub issue repository query page class.
*/
-public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
+public class IssueRepositoryQueryPage extends AbstractRepositoryQueryPage {
private Button openButton;
private Button closedButton;
@@ -88,10 +89,10 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
* @param taskRepository
* @param query
*/
- public GitHubRepositoryQueryPage(String pageName,
+ public IssueRepositoryQueryPage(String pageName,
TaskRepository taskRepository, IRepositoryQuery query) {
super(pageName, taskRepository, query);
- setDescription(Messages.GitHubRepositoryQueryPage_Description);
+ setDescription(Messages.IssueRepositoryQueryPage_Description);
setPageComplete(false);
}
@@ -99,14 +100,14 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
* @param taskRepository
* @param query
*/
- public GitHubRepositoryQueryPage(TaskRepository taskRepository,
+ public IssueRepositoryQueryPage(TaskRepository taskRepository,
IRepositoryQuery query) {
this("issueQueryPage", taskRepository, query); //$NON-NLS-1$
}
private void createLabelsArea(Composite parent) {
Group labelsArea = new Group(parent, SWT.NONE);
- labelsArea.setText(Messages.GitHubRepositoryQueryPage_LabelsLabel);
+ labelsArea.setText(Messages.IssueRepositoryQueryPage_LabelsLabel);
GridDataFactory.fillDefaults().grab(true, true).applyTo(labelsArea);
GridLayoutFactory.swtDefaults().applyTo(labelsArea);
@@ -143,16 +144,16 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
.applyTo(statusArea);
new Label(statusArea, SWT.NONE)
- .setText(Messages.GitHubRepositoryQueryPage_StatusLabel);
+ .setText(Messages.IssueRepositoryQueryPage_StatusLabel);
openButton = new Button(statusArea, SWT.CHECK);
openButton.setSelection(true);
- openButton.setText(Messages.GitHubRepositoryQueryPage_StatusOpen);
+ openButton.setText(Messages.IssueRepositoryQueryPage_StatusOpen);
openButton.addSelectionListener(this.completeListener);
closedButton = new Button(statusArea, SWT.CHECK);
closedButton.setSelection(true);
- closedButton.setText(Messages.GitHubRepositoryQueryPage_StatusClosed);
+ closedButton.setText(Messages.IssueRepositoryQueryPage_StatusClosed);
closedButton.addSelectionListener(this.completeListener);
ToolBar toolbar = new ToolBar(statusArea, SWT.FLAT);
@@ -167,7 +168,7 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
});
updateItem.setImage(updateImage);
updateItem
- .setToolTipText(Messages.GitHubRepositoryQueryPage_TooltipUpdateRepository);
+ .setToolTipText(Messages.IssueRepositoryQueryPage_TooltipUpdateRepository);
GridDataFactory.fillDefaults().align(SWT.END, SWT.FILL)
.grab(true, false).applyTo(toolbar);
updateItem.addSelectionListener(new SelectionAdapter() {
@@ -180,20 +181,20 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
Label milestonesLabel = new Label(optionsArea, SWT.NONE);
milestonesLabel
- .setText(Messages.GitHubRepositoryQueryPage_MilestoneLabel);
+ .setText(Messages.IssueRepositoryQueryPage_MilestoneLabel);
milestoneCombo = new Combo(optionsArea, SWT.DROP_DOWN | SWT.READ_ONLY);
GridDataFactory.fillDefaults().grab(true, false)
.applyTo(milestoneCombo);
Label assigneeLabel = new Label(optionsArea, SWT.NONE);
- assigneeLabel.setText(Messages.GitHubRepositoryQueryPage_AssigneeLabel);
+ assigneeLabel.setText(Messages.IssueRepositoryQueryPage_AssigneeLabel);
assigneeText = new Text(optionsArea, SWT.BORDER | SWT.SINGLE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(assigneeText);
Label mentionLabel = new Label(optionsArea, SWT.NONE);
- mentionLabel.setText(Messages.GitHubRepositoryQueryPage_MentionsLabel);
+ mentionLabel.setText(Messages.IssueRepositoryQueryPage_MentionsLabel);
mentionText = new Text(optionsArea, SWT.BORDER | SWT.SINGLE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(mentionText);
@@ -216,7 +217,7 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
.applyTo(titleArea);
new Label(titleArea, SWT.NONE)
- .setText(Messages.GitHubRepositoryQueryPage_TitleLabel);
+ .setText(Messages.IssueRepositoryQueryPage_TitleLabel);
titleText = new Text(titleArea, SWT.SINGLE | SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, false).applyTo(titleText);
titleText.addModifyListener(new ModifyListener() {
@@ -277,8 +278,7 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
if (this.labelsViewer.getControl().isDisposed())
return false;
- GitHubRepositoryConnector connector = GitHubRepositoryConnectorUI
- .getCoreConnector();
+ IssueConnector connector = IssueConnectorUi.getCoreConnector();
TaskRepository repository = getTaskRepository();
boolean hasLabels = connector.hasCachedLabels(repository);
if (hasLabels) {
@@ -297,15 +297,14 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
if (this.milestoneCombo.isDisposed())
return false;
- GitHubRepositoryConnector connector = GitHubRepositoryConnectorUI
- .getCoreConnector();
+ IssueConnector connector = IssueConnectorUi.getCoreConnector();
TaskRepository repository = getTaskRepository();
boolean hasMilestones = connector.hasCachedMilestones(repository);
if (hasMilestones) {
this.milestones = connector.getMilestones(repository);
this.milestoneCombo.removeAll();
this.milestoneCombo
- .add(Messages.GitHubRepositoryQueryPage_MilestoneNone);
+ .add(Messages.IssueRepositoryQueryPage_MilestoneNone);
Collections.sort(this.milestones, new Comparator<Milestone>() {
public int compare(Milestone m1, Milestone m2) {
@@ -327,15 +326,15 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
public void run(IProgressMonitor monitor) throws CoreException {
Policy.monitorFor(monitor);
monitor.beginTask("", 2); //$NON-NLS-1$
- GitHubRepositoryConnector connector = GitHubRepositoryConnectorUI
+ IssueConnector connector = IssueConnectorUi
.getCoreConnector();
TaskRepository repository = getTaskRepository();
- monitor.setTaskName(Messages.GitHubRepositoryQueryPage_TaskLoadingLabels);
+ monitor.setTaskName(Messages.IssueRepositoryQueryPage_TaskLoadingLabels);
connector.refreshLabels(repository);
monitor.worked(1);
- monitor.setTaskName(Messages.GitHubRepositoryQueryPage_TaskLoadingMilestones);
+ monitor.setTaskName(Messages.IssueRepositoryQueryPage_TaskLoadingMilestones);
connector.refreshMilestones(repository);
monitor.done();
@@ -360,7 +359,7 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
} catch (CoreException e) {
IStatus status = e.getStatus();
ErrorDialog.openError(getShell(),
- Messages.GitHubRepositoryQueryPage_ErrorLoading,
+ Messages.IssueRepositoryQueryPage_ErrorLoading,
e.getLocalizedMessage(), status);
}
}
@@ -380,7 +379,7 @@ public class GitHubRepositoryQueryPage extends AbstractRepositoryQueryPage {
if (complete) {
String message = null;
if (!openButton.getSelection() && !closedButton.getSelection())
- message = Messages.GitHubRepositoryQueryPage_ErrorStatus;
+ message = Messages.IssueRepositoryQueryPage_ErrorStatus;
setErrorMessage(message);
complete = message == null;
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueRepositorySettingsPage.java
index 84550f68..3f3a27bd 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueRepositorySettingsPage.java
@@ -10,7 +10,7 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
import java.io.IOException;
import java.net.URL;
@@ -26,7 +26,8 @@ import org.eclipse.egit.github.core.service.IssueService;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.github.internal.GitHub;
+import org.eclipse.mylyn.github.ui.internal.GitHubUi;
+import org.eclipse.mylyn.internal.github.core.GitHub;
import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage;
@@ -38,8 +39,7 @@ import org.eclipse.swt.widgets.Composite;
/**
* GitHub connector specific extensions.
*/
-public class GitHubRepositorySettingsPage extends
- AbstractRepositorySettingsPage {
+public class IssueRepositorySettingsPage extends AbstractRepositorySettingsPage {
/**
* URL
@@ -60,9 +60,9 @@ public class GitHubRepositorySettingsPage extends
* @param taskRepository
* - Object to populate
*/
- public GitHubRepositorySettingsPage(final TaskRepository taskRepository) {
- super(Messages.GitHubRepositorySettingsPage_Title,
- Messages.GitHubRepositorySettingsPage_Description,
+ public IssueRepositorySettingsPage(final TaskRepository taskRepository) {
+ super(Messages.IssueRepositorySettingsPage_Title,
+ Messages.IssueRepositorySettingsPage_Description,
taskRepository);
this.setHttpAuth(false);
this.setNeedsAdvanced(false);
@@ -136,10 +136,10 @@ public class GitHubRepositorySettingsPage extends
@Override
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(
- Messages.GitHubRepositorySettingsPage_TaskValidating,
+ Messages.IssueRepositorySettingsPage_TaskValidating,
100);
try {
- monitor.subTask(Messages.GitHubRepositorySettingsPage_TaskContactingServer);
+ monitor.subTask(Messages.IssueRepositorySettingsPage_TaskContactingServer);
try {
AuthenticationCredentials auth = repository
.getCredentials(AuthenticationType.REPOSITORY);
@@ -154,7 +154,7 @@ public class GitHubRepositorySettingsPage extends
service.getIssues(repo.getOwner(), repo.getName(), null);
} catch (IOException e) {
String message = MessageFormat
- .format(Messages.GitHubRepositorySettingsPage_StatusError,
+ .format(Messages.IssueRepositorySettingsPage_StatusError,
e.getLocalizedMessage());
setStatus(GitHubUi.createErrorStatus(message));
return;
@@ -163,7 +163,7 @@ public class GitHubRepositorySettingsPage extends
}
setStatus(new Status(IStatus.OK, GitHubUi.BUNDLE_ID,
- Messages.GitHubRepositorySettingsPage_StatusSuccess));
+ Messages.IssueRepositorySettingsPage_StatusSuccess));
} finally {
monitor.done();
}
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueSummaryPart.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueSummaryPart.java
index b4462152..7a9e0b8b 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueSummaryPart.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueSummaryPart.java
@@ -8,11 +8,13 @@
* Contributors:
* Kevin Sawicki (GitHub Inc.) - initial API and implementation
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.mylyn.github.internal.GitHubTaskAttributes;
+import org.eclipse.mylyn.github.ui.internal.AvatarLabel;
+import org.eclipse.mylyn.github.ui.internal.GitHubUi;
+import org.eclipse.mylyn.internal.github.core.issue.IssueAttribute;
import org.eclipse.mylyn.internal.tasks.ui.editors.DateAttributeEditor;
import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil;
import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor;
@@ -125,7 +127,7 @@ public class IssueSummaryPart extends AbstractTaskEditorPart {
getTaskEditorPage().getAttributeEditorToolkit().adapt(summaryEditor);
}
- private TaskAttribute getAttribute(GitHubTaskAttributes attribute) {
+ private TaskAttribute getAttribute(IssueAttribute attribute) {
return getAttribute(attribute.getId());
}
@@ -160,7 +162,7 @@ public class IssueSummaryPart extends AbstractTaskEditorPart {
layout.verticalSpacing = 3;
composite.setLayout(layout);
- TaskAttribute reporter = getAttribute(GitHubTaskAttributes.REPORTER);
+ TaskAttribute reporter = getAttribute(IssueAttribute.REPORTER);
if (reporter != null) {
IRepositoryPerson person = getTaskData().getAttributeMapper()
.getRepositoryPerson(reporter);
@@ -171,7 +173,7 @@ public class IssueSummaryPart extends AbstractTaskEditorPart {
}
addSummaryText(composite, toolkit);
- TaskAttribute assignee = getAttribute(GitHubTaskAttributes.ASSIGNEE);
+ TaskAttribute assignee = getAttribute(IssueAttribute.ASSIGNEE);
if (assignee != null) {
IRepositoryPerson person = getTaskData().getAttributeMapper()
.getRepositoryPerson(assignee);
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueTaskEditorPage.java
index d9a686f2..0641a25b 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueTaskEditorPage.java
@@ -10,13 +10,13 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
import java.util.Iterator;
import java.util.Set;
-import org.eclipse.mylyn.github.internal.GitHub;
-import org.eclipse.mylyn.github.internal.GitHubTaskAttributes;
+import org.eclipse.mylyn.internal.github.core.GitHub;
+import org.eclipse.mylyn.internal.github.core.issue.IssueAttribute;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
@@ -25,7 +25,7 @@ import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;
/**
* Editor page for GitHub.
*/
-public class GitHubTaskEditorPage extends AbstractTaskEditorPage {
+public class IssueTaskEditorPage extends AbstractTaskEditorPage {
/**
* Constructor for the GitHubTaskEditorPage
@@ -33,7 +33,7 @@ public class GitHubTaskEditorPage extends AbstractTaskEditorPage {
* @param editor
* The task editor to create for GitHub
*/
- public GitHubTaskEditorPage(final TaskEditor editor) {
+ public IssueTaskEditorPage(final TaskEditor editor) {
super(editor, GitHub.CONNECTOR_KIND);
setNeedsPrivateSection(true);
setNeedsSubmitButton(true);
@@ -55,8 +55,8 @@ public class GitHubTaskEditorPage extends AbstractTaskEditorPage {
public AbstractTaskEditorPart createPart() {
return new IssueSummaryPart(
- GitHubTaskAttributes.REPORTER_GRAVATAR.getId(),
- GitHubTaskAttributes.ASSIGNEE_GRAVATAR.getId());
+ IssueAttribute.REPORTER_GRAVATAR.getId(),
+ IssueAttribute.ASSIGNEE_GRAVATAR.getId());
}
}.setPath(PATH_HEADER));
partDescriptors.add(new TaskEditorPartDescriptor(ID_PART_ATTRIBUTES) {
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueTaskEditorPageFactory.java
index fd1ced9b..cb822a23 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/GitHubTaskEditorPageFactory.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueTaskEditorPageFactory.java
@@ -10,9 +10,10 @@
* Christian Trutz <christian.trutz@gmail.com> - initial contribution
* Chris Aniszczyk <caniszczyk@gmail.com> - initial contribution
*******************************************************************************/
-package org.eclipse.mylyn.github.ui.internal;
+package org.eclipse.mylyn.internal.github.ui.issue;
-import org.eclipse.mylyn.github.internal.GitHub;
+import org.eclipse.mylyn.github.ui.internal.GitHubImages;
+import org.eclipse.mylyn.internal.github.core.GitHub;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
@@ -25,7 +26,7 @@ import org.eclipse.ui.forms.editor.IFormPage;
/**
* Editor page factory for GitHub.
*/
-public class GitHubTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
+public class IssueTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
@Override
public boolean canCreatePageFor(TaskEditorInput input) {
@@ -41,7 +42,7 @@ public class GitHubTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
@Override
public String getPageText() {
- return Messages.GitHubTaskEditorPageFactory_PageText;
+ return Messages.IssueTaskEditorPageFactory_PageText;
}
@Override
@@ -51,7 +52,7 @@ public class GitHubTaskEditorPageFactory extends AbstractTaskEditorPageFactory {
@Override
public IFormPage createPage(TaskEditor parentEditor) {
- return new GitHubTaskEditorPage(parentEditor);
+ return new IssueTaskEditorPage(parentEditor);
}
@Override
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/Messages.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/Messages.java
new file mode 100644
index 00000000..f1ef114d
--- /dev/null
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/Messages.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2011 GitHub Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Kevin Sawicki (GitHub Inc.) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.mylyn.internal.github.ui.issue;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * NLS
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.github.ui.issue.messages"; //$NON-NLS-1$
+
+ /** */
+ public static String IssueRepositoryQueryPage_ErrorLoading;
+
+ /** */
+ public static String IssueRepositoryQueryPage_AssigneeLabel;
+
+ /** */
+ public static String IssueRepositoryQueryPage_Description;
+
+ /** */
+ public static String IssueRepositoryQueryPage_ErrorStatus;
+
+ /** */
+ public static String IssueRepositoryQueryPage_LabelsLabel;
+
+ /** */
+ public static String IssueRepositoryQueryPage_MentionsLabel;
+
+ /** */
+ public static String IssueRepositoryQueryPage_MilestoneLabel;
+
+ /** */
+ public static String IssueRepositoryQueryPage_MilestoneNone;
+
+ /** */
+ public static String IssueRepositoryQueryPage_StatusClosed;
+
+ /** */
+ public static String IssueRepositoryQueryPage_StatusLabel;
+
+ /** */
+ public static String IssueRepositoryQueryPage_StatusOpen;
+
+ /** */
+ public static String IssueRepositoryQueryPage_TaskLoadingLabels;
+
+ /** */
+ public static String IssueRepositoryQueryPage_TaskLoadingMilestones;
+
+ /** */
+ public static String IssueRepositoryQueryPage_TitleLabel;
+
+ /** */
+ public static String IssueRepositoryQueryPage_TooltipUpdateRepository;
+
+ /** */
+ public static String IssueRepositorySettingsPage_Description;
+
+ /** */
+ public static String IssueRepositorySettingsPage_StatusError;
+
+ /** */
+ public static String IssueRepositorySettingsPage_StatusSuccess;
+
+ /** */
+ public static String IssueRepositorySettingsPage_TaskContactingServer;
+
+ /** */
+ public static String IssueRepositorySettingsPage_TaskValidating;
+
+ /** */
+ public static String IssueRepositorySettingsPage_Title;
+
+ /** */
+ public static String IssueTaskEditorPageFactory_PageText;
+
+ /** */
+ public static String IssueLabelAttributeEditor_ActionNewLabel;
+
+ /** */
+ public static String IssueLabelAttributeEditor_ActionRemoveLabel;
+
+ /** */
+ public static String IssueLabelAttributeEditor_DescriptionNewLabel;
+
+ /** */
+ public static String IssueLabelAttributeEditor_MessageEnterName;
+
+ /** */
+ public static String IssueLabelAttributeEditor_TitleNewLabel;
+
+ /** */
+ public static String IssueLabelAttributeEditor_TooltipAddLabel;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/messages.properties b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/messages.properties
new file mode 100644
index 00000000..7bb9f9ae
--- /dev/null
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/messages.properties
@@ -0,0 +1,28 @@
+IssueRepositoryQueryPage_ErrorLoading=Error loading labels and milestones
+IssueRepositoryQueryPage_AssigneeLabel=Assigned to:
+IssueRepositoryQueryPage_Description=Issue query settings
+IssueRepositoryQueryPage_ErrorStatus=Select a status
+IssueRepositoryQueryPage_LabelsLabel=Labels
+IssueRepositoryQueryPage_MentionsLabel=Mentioning:
+IssueRepositoryQueryPage_MilestoneLabel=Milestone:
+IssueRepositoryQueryPage_MilestoneNone=None
+IssueRepositoryQueryPage_StatusClosed=Closed
+IssueRepositoryQueryPage_StatusLabel=Status:
+IssueRepositoryQueryPage_StatusOpen=Open
+IssueRepositoryQueryPage_TaskLoadingLabels=Loading labels
+IssueRepositoryQueryPage_TaskLoadingMilestones=Loading milestones
+IssueRepositoryQueryPage_TitleLabel=Title:
+IssueRepositoryQueryPage_TooltipUpdateRepository=Update milestones and labels
+IssueRepositorySettingsPage_Description=Enter repository location and credentials
+IssueRepositorySettingsPage_StatusError=Error validating settings: {0}
+IssueRepositorySettingsPage_StatusSuccess=Success\!
+IssueRepositorySettingsPage_TaskContactingServer=Contacting server...
+IssueRepositorySettingsPage_TaskValidating=Validating settings
+IssueRepositorySettingsPage_Title=GitHub Issue Repository Settings
+IssueTaskEditorPageFactory_PageText=GitHub
+IssueLabelAttributeEditor_ActionNewLabel=New Label...
+IssueLabelAttributeEditor_ActionRemoveLabel=Remove Label
+IssueLabelAttributeEditor_DescriptionNewLabel=Label Name:
+IssueLabelAttributeEditor_MessageEnterName=Enter label name
+IssueLabelAttributeEditor_TitleNewLabel=New Label
+IssueLabelAttributeEditor_TooltipAddLabel=Add Label...

Back to the top