<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.mylyn.tasks.ui.repositories">
      <connectorCore
            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.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">
      </connectorUi>
   </extension>
   <extension
         point="org.eclipse.mylyn.tasks.ui.repositories">
      <connectorCore
            class="org.eclipse.mylyn.internal.github.core.pr.PullRequestConnector"
            id="org.eclipse.mylyn.internal.github.core.pr.PullRequestConnector"
            name="%pullRequestConnectorCore">
      </connectorCore>
      <connectorUi
            brandingIcon="icons/obj16/github.png"
            class="org.eclipse.mylyn.internal.github.ui.pr.PullRequestConnectorUi"
            id="org.eclipse.mylyn.internal.github.ui.pr.PullRequestConnectorUi"
            name="%pullRequestConnectorUi"
            overlayIcon="icons/obj16/github_8x8.png">
      </connectorUi>
   </extension>
   <extension
         point="org.eclipse.mylyn.tasks.ui.editors">
      <pageFactory
            class="org.eclipse.mylyn.internal.github.ui.issue.IssueTaskEditorPageFactory"
            id="org.eclipse.mylyn.github.ui.internal.GitHubTaskEditorPageFactory">
      </pageFactory>
      <pageFactory
            class="org.eclipse.mylyn.internal.github.ui.gist.GistTaskEditorPageFactory"
            id="org.eclipse.mylyn.internal.github.ui.gist.GistTaskEditorPageFactory">
      </pageFactory>
      <pageFactory
            class="org.eclipse.mylyn.internal.github.ui.pr.PullRequestTaskEditorPageFactory"
            id="org.eclipse.mylyn.internal.github.ui.pr.PullRequestTaskEditorPageFactory">
      </pageFactory>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            description="Create Gist based on selection"
            id="org.eclipse.mylyn.github.ui.command.createGist"
            name="Create Gist">
         <commandParameter
               id="publicGist"
               name="%createGistPublicParamName"
               optional="true">
         </commandParameter>
      </command>
      <command
            description="Clone Gist into Git repository"
            id="org.eclipse.mylyn.github.ui.command.cloneGist"
            name="Clone Gist">
      </command>
      <command
            description="%checkoutPullRequest.description"
            id="org.eclipse.mylyn.github.ui.command.checkoutPullRequest"
            name="%checkoutPullRequest.name">
      </command>
      <command
            description="%fetchPullRequest.description"
            id="org.eclipse.mylyn.github.ui.command.fetchPullRequest"
            name="%fetchPullRequest.name">
      </command>
      <command
            description="%mergePullRequest.description"
            id="org.eclipse.mylyn.github.ui.command.mergePullRequest"
            name="%mergePullRequest.name">
      </command>
      <command
            description="%rebasePullRequest.description"
            id="org.eclipse.mylyn.github.ui.command.rebasePullRequest"
            name="%rebasePullRequest.name">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="popup:#AbstractTextEditorContext?after=additions">
         <menu
               icon="icons/obj16/github.png"
               label="%githubMenuLabel">
            <command
                  commandId="org.eclipse.mylyn.github.ui.command.createGist"
                  icon="icons/obj16/gist_private.png"
                  label="%createPrivateGistLabel"
                  style="push">
               <parameter
                     name="publicGist"
                     value="false">
               </parameter>
            </command>
            <command
                  commandId="org.eclipse.mylyn.github.ui.command.createGist"
                  icon="icons/obj16/gist_public.png"
                  label="%createPublicGistLabel"
                  style="push">
               <parameter
                     name="publicGist"
                     value="true">
               </parameter>
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
         <menu
               icon="icons/obj16/github.png"
               label="%githubMenuLabel">
            <command
                  commandId="org.eclipse.mylyn.github.ui.command.createGist"
                  icon="icons/obj16/gist_private.png"
                  label="%createPrivateGistLabel"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                     <count
                           value="1">
                     </count>
                     <iterate>
                        <and>
                           <adapt
                                 type="org.eclipse.core.resources.IResource">
                           </adapt>
                           <not>
                              <adapt
                                 type="org.eclipse.core.resources.IContainer">
                              </adapt>
                           </not>
                        </and>
                     </iterate>
                  </and>
               </visibleWhen>
               <parameter
                     name="publicGist"
                     value="false">
               </parameter>
            </command>
            <command
                  commandId="org.eclipse.mylyn.github.ui.command.createGist"
                  icon="icons/obj16/gist_public.png"
                  label="%createPublicGistLabel"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                     <count
                           value="1">
                     </count>
                     <iterate>
                        <and>
                           <adapt
                                 type="org.eclipse.core.resources.IResource">
                           </adapt>
                           <not>
                              <adapt
                                 type="org.eclipse.core.resources.IContainer">
                              </adapt>
                           </not>
                        </and>
                     </iterate>
                  </and>
               </visibleWhen>
               <parameter
                     name="publicGist"
                     value="true">
               </parameter>
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            allPopups="false"
            locationURI="popup:org.eclipse.debug.ui.ProcessConsoleType.#ContextMenu?after=additions">
         <menu
               icon="icons/obj16/github.png"
               label="%githubMenuLabel">
            <command
                  commandId="org.eclipse.mylyn.github.ui.command.createGist"
                  icon="icons/obj16/gist_private.png"
                  label="%createPrivateGistLabel"
                  style="push">
               <parameter
                     name="publicGist"
                     value="false">
               </parameter>
            </command>
            <command
                  commandId="org.eclipse.mylyn.github.ui.command.createGist"
                  icon="icons/obj16/gist_public.png"
                  label="%createPublicGistLabel"
                  style="push">
               <parameter
                     name="publicGist"
                     value="true">
               </parameter>
            </command>
         </menu>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.handlers">
      <handler
            class="org.eclipse.mylyn.internal.github.ui.gist.CreateGistHandler"
            commandId="org.eclipse.mylyn.github.ui.command.createGist">
      </handler>
      <handler
            class="org.eclipse.mylyn.internal.github.ui.gist.CloneGistHandler"
            commandId="org.eclipse.mylyn.github.ui.command.cloneGist">
      </handler>
      <handler
            class="org.eclipse.mylyn.internal.github.ui.pr.CheckoutPullRequestHandler"
            commandId="org.eclipse.mylyn.github.ui.command.checkoutPullRequest">
      </handler>
      <handler
            class="org.eclipse.mylyn.internal.github.ui.pr.FetchPullRequestHandler"
            commandId="org.eclipse.mylyn.github.ui.command.fetchPullRequest">
      </handler>
      <handler
            class="org.eclipse.mylyn.internal.github.ui.pr.MergePullRequestHandler"
            commandId="org.eclipse.mylyn.github.ui.command.mergePullRequest">
      </handler>
      <handler
            class="org.eclipse.mylyn.internal.github.ui.pr.RebasePullRequestHandler"
            commandId="org.eclipse.mylyn.github.ui.command.rebasePullRequest">
      </handler>
   </extension>
   <extension
         point="org.eclipse.mylyn.tasks.ui.repositories">
      <connectorCore
            class="org.eclipse.mylyn.internal.github.core.gist.GistConnector"
            id="org.eclipse.mylyn.internal.github.core.gist.GistConnector"
            name="%gistCoreConnectorName">
      </connectorCore>
      <connectorUi
            brandingIcon="icons/obj16/github.png"
            class="org.eclipse.mylyn.internal.github.ui.gist.GistConnectorUi"
            id="org.eclipse.mylyn.internal.github.ui.gist.GistConnectorUi"
            name="%gistUiConnectorName"
            overlayIcon="icons/obj16/github_8x8.png">
      </connectorUi>
   </extension>
   <extension
         point="org.eclipse.ui.importWizards">
      <wizard
            category="org.eclipse.mylyn.tasks.ui.wizards.import.category"
            class="org.eclipse.mylyn.internal.github.ui.TaskRepositoryImportWizard"
            icon="icons/obj16/github.png"
            id="org.eclipse.mylyn.github.ui.importRepositoriesWizard"
            name="%importRepositoriesWizardName">
      </wizard>
   </extension>
   <extension
         point="org.eclipse.ui.importWizards">
      <wizard
            category="org.eclipse.egit.ui.internal.clone.gitclonecategory"
            class="org.eclipse.mylyn.internal.github.ui.RepositoryImportWizard"
            icon="icons/obj16/github.png"
            id="org.eclipse.mylyn.github.ui.cloneRepositoriesWizard"
            name="%cloneRepositoriesWizardName">
      </wizard>
   </extension>
   <extension
         point="org.eclipse.ui.commandImages">
      <image
            commandId="org.eclipse.mylyn.github.ui.command.cloneGist"
            icon="platform:/plugin/org.eclipse.egit.ui/icons/obj16/cloneGit.gif">
      </image>
      <image
            commandId="org.eclipse.mylyn.github.ui.command.checkoutPullRequest"
            icon="platform:/plugin/org.eclipse.egit.ui/icons/obj16/checkout.gif">
      </image>
      <image
            commandId="org.eclipse.mylyn.github.ui.command.fetchPullRequest"
            icon="platform:/plugin/org.eclipse.egit.ui/icons/obj16/fetch.gif">
      </image>
      <image
            commandId="org.eclipse.mylyn.github.ui.command.mergePullRequest"
            icon="platform:/plugin/org.eclipse.egit.ui/icons/obj16/merge.gif">
      </image>
      <image
            commandId="org.eclipse.mylyn.github.ui.command.rebasePullRequest"
            icon="platform:/plugin/org.eclipse.egit.ui/icons/obj16/rebase.gif">
      </image>
   </extension>
   <extension
         point="org.eclipse.egit.ui.cloneSourceProvider">
      <source
            hasFixLocation="true"
            icon="icons/obj16/github.png"
            label="%githubMenuLabel">
      </source>
      <repositorySearchPage
            class="org.eclipse.mylyn.internal.github.ui.RepositorySearchWizardPage">
      </repositorySearchPage>
   </extension>
</plugin>
