diff options
author | Kevin Sawicki | 2011-04-19 23:02:32 +0000 |
---|---|---|
committer | Chris Aniszczyk | 2011-04-20 14:32:12 +0000 |
commit | 0237f3c283ab545241e958de3bdc4752d4dbe81f (patch) | |
tree | c7867d79ec54edfcc05b0d966d3340d3552ce9d3 /org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal | |
parent | d00ce7b58e4a2330a8027206a9e772f995376585 (diff) | |
download | egit-github-0237f3c283ab545241e958de3bdc4752d4dbe81f.tar.gz egit-github-0237f3c283ab545241e958de3bdc4752d4dbe81f.tar.xz egit-github-0237f3c283ab545241e958de3bdc4752d4dbe81f.zip |
Add validation of settings in Gist repository page
Change-Id: Iaa284c0c4c9bc391c881f56fed8bb5db7a647aac
Signed-off-by: Kevin Sawicki <kevin@github.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal')
-rw-r--r-- | org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistConnector.java | 32 |
1 files changed, 16 insertions, 16 deletions
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 ef116a3d..29498d25 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 @@ -44,6 +44,22 @@ public class GistConnector extends AbstractRepositoryConnector { */ public static final String KIND = "githubGists"; //$NON-NLS-1$ + /** + * Create client for repository + * + * @param repository + * @return client + */ + public static GitHubClient createClient(TaskRepository repository) { + GitHubClient client = new GitHubClient(); + AuthenticationCredentials credentials = repository + .getCredentials(AuthenticationType.REPOSITORY); + if (credentials != null) + client.setCredentials(credentials.getUserName(), + credentials.getPassword()); + return client; + } + private GistTaskDataHandler dataHandler = new GistTaskDataHandler(); private GistAttachmentHandler attachmentHandler = new GistAttachmentHandler(); @@ -63,22 +79,6 @@ public class GistConnector extends AbstractRepositoryConnector { } /** - * Create client for repository - * - * @param repository - * @return client - */ - protected GitHubClient createClient(TaskRepository repository) { - GitHubClient client = new GitHubClient(); - AuthenticationCredentials credentials = repository - .getCredentials(AuthenticationType.REPOSITORY); - if (credentials != null) - client.setCredentials(credentials.getUserName(), - credentials.getPassword()); - return client; - } - - /** * @see org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector#canCreateNewTask(org.eclipse.mylyn.tasks.core.TaskRepository) */ public boolean canCreateNewTask(TaskRepository repository) { |