// Path: core/src/com/google/appraise/eclipse/core/AppraiseConnectorPlugin.java
// public class AppraiseConnectorPlugin extends Plugin {
//   /**
//    * The global plugin instance.
//    */
//   public static AppraiseConnectorPlugin plugin;
// 
//   /**
//    * The plugin id.
//    */
//   public static final String PLUGIN_ID = "com.google.appraise.eclipse.core";
// 
//   /**
//    * The type of the connector.
//    */
//   public static final String CONNECTOR_KIND = "com.google.appraise";
// 
//   /**
//    * Connector query attribute for the user as review requestor.
//    */
//   public static final String QUERY_REQUESTER = PLUGIN_ID + ".requestor";
// 
//   /**
//    * Connector query attribute for the user as reviewer.
//    */
//   public static final String QUERY_REVIEWER = PLUGIN_ID + ".reviewer";
// 
//   /**
//    * Connector query attribute for the review commit hash prefix.
//    */
//   public static final String QUERY_REVIEW_COMMIT_PREFIX = PLUGIN_ID + ".reviewcommitprefix";
// 
//   private static BundleContext context;
// 
//   static BundleContext getContext() {
//     return context;
//   }
// 
//   @Override
//   public void start(BundleContext bundleContext) throws Exception {
//     super.start(bundleContext);
//     plugin = this;
//   }
// 
//   @Override
//   public void stop(BundleContext bundleContext) throws Exception {
//     plugin = null;
//     super.stop(bundleContext);
//   }
// 
//   /**
//    * Returns the shared instance.
//    */
//   public static AppraiseConnectorPlugin getDefault() {
//     return plugin;
//   }
// 
//   public static void logError(final String message, final Throwable throwable) {
//     getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, throwable));
//   }
// 
//   public static void logWarning(final String message, final Throwable throwable) {
//     getDefault().getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, throwable));
//   }
// }
// 
// Path: ui/src/com/google/appraise/eclipse/ui/wizard/AppraiseRepositorySettingsPage.java
// public class AppraiseRepositorySettingsPage extends AbstractRepositorySettingsPage {
//   public AppraiseRepositorySettingsPage(TaskRepository repository) {
//     super("Appraise Repository", "Appraise Repository Connector", repository);
//     setNeedsAnonymousLogin(false);
//     setNeedsEncoding(false);
//     setNeedsTimeZone(false);
//     setNeedsAdvanced(false);
//     setNeedsProxy(false);
//     setNeedsValidation(false);
//     setNeedsValidateOnFinish(false);
//     setNeedsAdvanced(false);
//     setNeedsHttpAuth(false);
//   }
// 
//   @Override
//   public String getConnectorKind() {
//     return AppraiseConnectorPlugin.CONNECTOR_KIND;
//   }
// 
//   private List<IProject> getProjects() {
//     List<IProject> projects = new ArrayList<IProject>();
//     for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
//       projects.add(project);
//     }
//     return projects;
//   }
// 
//   @Override
//   protected void repositoryTemplateSelected(RepositoryTemplate template) {
//     repositoryLabelEditor.setStringValue(template.label);
//     setUrl(template.repositoryUrl);
//     setUserId(System.getProperty("user.name"));
//     setPassword("");
// 
//     getContainer().updateButtons();
//   }
// 
//   @Override
//   protected void addRepositoryTemplatesToServerUrlCombo() {
//     RepositoryTemplateManager templateManager = TasksUiPlugin.getRepositoryTemplateManager();
// 
//     for (IProject project : getProjects()) {
//       String label = "Appraise: " + project.getName();
//       String repositoryUrl = "http://appraise.google.com/" + project.getName();
// 
//       boolean found = false;
//       for (RepositoryTemplate existing :
//           templateManager.getTemplates(AppraiseConnectorPlugin.CONNECTOR_KIND)) {
//         if (repositoryUrl.equals(existing.repositoryUrl)) {
//           found = true;
//           break;
//         }
//       }
// 
//       if (!found) {
//         RepositoryTemplate template = new RepositoryTemplate(
//             label, repositoryUrl, null, null, null, null, null, null, true, false);
//         TasksUiPlugin.getRepositoryTemplateManager().addTemplate(
//             AppraiseConnectorPlugin.CONNECTOR_KIND, template);
//       }
//     }
//     super.addRepositoryTemplatesToServerUrlCombo();
//   }
// 
//   @Override
//   protected void createAdditionalControls(Composite parent) {}
// 
//   @Override
//   public void createControl(Composite parent) {
//     super.createControl(parent);
//     addRepositoryTemplatesToServerUrlCombo();
//   }
// 
//   @Override
//   protected boolean isValidUrl(String url) {
//     return url != null && url.trim().length() > 0;
//   }
// 
//   @Override
//   protected Validator getValidator(TaskRepository repository) {
//     return null;
//   }
// }


import com.google.appraise.eclipse.core.AppraiseConnectorPlugin;
import com.google.appraise.eclipse.ui.wizard.AppraiseRepositorySettingsPage;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard;
/*******************************************************************************
 * Copyright (c) 2015 Google and others.
 * 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:
 *     Scott McMaster - initial implementation
 *******************************************************************************/
package com.google.appraise.eclipse.ui;



/**
 * The UI extensions for the Appraise plugin.
 */
public class AppraiseConnectorUi extends AbstractRepositoryConnectorUi {

  @Override
  public String getConnectorKind() {
// Path: core/src/com/google/appraise/eclipse/core/AppraiseConnectorPlugin.java
// public class AppraiseConnectorPlugin extends Plugin {
//   /**
//    * The global plugin instance.
//    */
//   public static AppraiseConnectorPlugin plugin;
// 
//   /**
//    * The plugin id.
//    */
//   public static final String PLUGIN_ID = "com.google.appraise.eclipse.core";
// 
//   /**
//    * The type of the connector.
//    */
//   public static final String CONNECTOR_KIND = "com.google.appraise";
// 
//   /**
//    * Connector query attribute for the user as review requestor.
//    */
//   public static final String QUERY_REQUESTER = PLUGIN_ID + ".requestor";
// 
//   /**
//    * Connector query attribute for the user as reviewer.
//    */
//   public static final String QUERY_REVIEWER = PLUGIN_ID + ".reviewer";
// 
//   /**
//    * Connector query attribute for the review commit hash prefix.
//    */
//   public static final String QUERY_REVIEW_COMMIT_PREFIX = PLUGIN_ID + ".reviewcommitprefix";
// 
//   private static BundleContext context;
// 
//   static BundleContext getContext() {
//     return context;
//   }
// 
//   @Override
//   public void start(BundleContext bundleContext) throws Exception {
//     super.start(bundleContext);
//     plugin = this;
//   }
// 
//   @Override
//   public void stop(BundleContext bundleContext) throws Exception {
//     plugin = null;
//     super.stop(bundleContext);
//   }
// 
//   /**
//    * Returns the shared instance.
//    */
//   public static AppraiseConnectorPlugin getDefault() {
//     return plugin;
//   }
// 
//   public static void logError(final String message, final Throwable throwable) {
//     getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, throwable));
//   }
// 
//   public static void logWarning(final String message, final Throwable throwable) {
//     getDefault().getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, throwable));
//   }
// }
// 
// Path: ui/src/com/google/appraise/eclipse/ui/wizard/AppraiseRepositorySettingsPage.java
// public class AppraiseRepositorySettingsPage extends AbstractRepositorySettingsPage {
//   public AppraiseRepositorySettingsPage(TaskRepository repository) {
//     super("Appraise Repository", "Appraise Repository Connector", repository);
//     setNeedsAnonymousLogin(false);
//     setNeedsEncoding(false);
//     setNeedsTimeZone(false);
//     setNeedsAdvanced(false);
//     setNeedsProxy(false);
//     setNeedsValidation(false);
//     setNeedsValidateOnFinish(false);
//     setNeedsAdvanced(false);
//     setNeedsHttpAuth(false);
//   }
// 
//   @Override
//   public String getConnectorKind() {
//     return AppraiseConnectorPlugin.CONNECTOR_KIND;
//   }
// 
//   private List<IProject> getProjects() {
//     List<IProject> projects = new ArrayList<IProject>();
//     for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
//       projects.add(project);
//     }
//     return projects;
//   }
// 
//   @Override
//   protected void repositoryTemplateSelected(RepositoryTemplate template) {
//     repositoryLabelEditor.setStringValue(template.label);
//     setUrl(template.repositoryUrl);
//     setUserId(System.getProperty("user.name"));
//     setPassword("");
// 
//     getContainer().updateButtons();
//   }
// 
//   @Override
//   protected void addRepositoryTemplatesToServerUrlCombo() {
//     RepositoryTemplateManager templateManager = TasksUiPlugin.getRepositoryTemplateManager();
// 
//     for (IProject project : getProjects()) {
//       String label = "Appraise: " + project.getName();
//       String repositoryUrl = "http://appraise.google.com/" + project.getName();
// 
//       boolean found = false;
//       for (RepositoryTemplate existing :
//           templateManager.getTemplates(AppraiseConnectorPlugin.CONNECTOR_KIND)) {
//         if (repositoryUrl.equals(existing.repositoryUrl)) {
//           found = true;
//           break;
//         }
//       }
// 
//       if (!found) {
//         RepositoryTemplate template = new RepositoryTemplate(
//             label, repositoryUrl, null, null, null, null, null, null, true, false);
//         TasksUiPlugin.getRepositoryTemplateManager().addTemplate(
//             AppraiseConnectorPlugin.CONNECTOR_KIND, template);
//       }
//     }
//     super.addRepositoryTemplatesToServerUrlCombo();
//   }
// 
//   @Override
//   protected void createAdditionalControls(Composite parent) {}
// 
//   @Override
//   public void createControl(Composite parent) {
//     super.createControl(parent);
//     addRepositoryTemplatesToServerUrlCombo();
//   }
// 
//   @Override
//   protected boolean isValidUrl(String url) {
//     return url != null && url.trim().length() > 0;
//   }
// 
//   @Override
//   protected Validator getValidator(TaskRepository repository) {
//     return null;
//   }
// }


// Path: ui/src/com/google/appraise/eclipse/ui/AppraiseConnectorUi.java
import com.google.appraise.eclipse.core.AppraiseConnectorPlugin;
import com.google.appraise.eclipse.ui.wizard.AppraiseRepositorySettingsPage;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
import org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard;
import org.eclipse.mylyn.tasks.ui.wizards.RepositoryQueryWizard;

/*******************************************************************************
 * Copyright (c) 2015 Google and others.
 * 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:
 *     Scott McMaster - initial implementation
 *******************************************************************************/
package com.google.appraise.eclipse.ui;



/**
 * The UI extensions for the Appraise plugin.
 */
public class AppraiseConnectorUi extends AbstractRepositoryConnectorUi {

  @Override
  public String getConnectorKind() {
    return AppraiseConnectorPlugin.CONNECTOR_KIND;