<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.startup">
      <startup
            class="org.thoughtframe.bridge.ThoughtframeStartup"/>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <category
            id="thoughtframe-eclipse.commands.category"
            name="ThoughtFrame">
      </category>
      <command
            categoryId="thoughtframe-eclipse.commands.category"
            id="thoughtframe-eclipse.commands.openChat"
            name="Open ThoughtFrame">
      </command>
      <command
            categoryId="thoughtframe-eclipse.commands.category"
            id="thoughtframe-eclipse.commands.captureSelection"
            name="Capture Selection">
      </command>
      <command
            categoryId="thoughtframe-eclipse.commands.category"
            id="thoughtframe-eclipse.commands.engineCapture"
            name="Engine Capture">
      </command>
      <command
            categoryId="thoughtframe-eclipse.commands.category"
            id="thoughtframe-eclipse.commands.requestEdit"
            name="Request Edit">
      </command>
      <command
            categoryId="thoughtframe-eclipse.commands.category"
            id="thoughtframe-eclipse.commands.restartEngine"
            name="Restart Engine">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.handlers">
      <handler
            class="org.thoughtframe.bridge.handlers.SampleHandler"
            commandId="thoughtframe-eclipse.commands.openChat">
      </handler>
      <handler
            class="org.thoughtframe.bridge.handlers.CaptureSelectionHandler"
            commandId="thoughtframe-eclipse.commands.captureSelection">
      </handler>
      <handler
            class="org.thoughtframe.bridge.handlers.EngineCaptureHandler"
            commandId="thoughtframe-eclipse.commands.engineCapture">
      </handler>
      <handler
            class="org.thoughtframe.bridge.handlers.RequestEditHandler"
            commandId="thoughtframe-eclipse.commands.requestEdit">
      </handler>
      <handler
            class="org.thoughtframe.bridge.handlers.RestartEngineHandler"
            commandId="thoughtframe-eclipse.commands.restartEngine">
      </handler>
   </extension>
   <extension
         point="org.eclipse.ui.bindings">
      <key
            commandId="thoughtframe-eclipse.commands.openChat"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
            sequence="M1+6">
      </key>
      <key
            commandId="thoughtframe-eclipse.commands.captureSelection"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
            sequence="M1+7">
      </key>
      <key
            commandId="thoughtframe-eclipse.commands.engineCapture"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
            sequence="M1+8">
      </key>
      <key
            commandId="thoughtframe-eclipse.commands.requestEdit"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
            sequence="M1+9">
      </key>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu?after=additions">
         <menu
               id="thoughtframe-eclipse.menus.main"
               label="ThoughtFrame"
               mnemonic="T">
            <command
                  commandId="thoughtframe-eclipse.commands.openChat"
                  id="thoughtframe-eclipse.menus.openChat"
                  mnemonic="C">
            </command>
            <command
                  commandId="thoughtframe-eclipse.commands.captureSelection"
                  id="thoughtframe-eclipse.menus.captureSelection"
                  mnemonic="S">
            </command>
            <command
                  commandId="thoughtframe-eclipse.commands.engineCapture"
                  id="thoughtframe-eclipse.menus.engineCapture"
                  mnemonic="E">
            </command>
            <command
                  commandId="thoughtframe-eclipse.commands.requestEdit"
                  id="thoughtframe-eclipse.menus.requestEdit"
                  mnemonic="R">
            </command>
            <command
                  commandId="thoughtframe-eclipse.commands.restartEngine"
                  id="thoughtframe-eclipse.menus.restartEngine"
                  mnemonic="E">
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
         <command
               commandId="thoughtframe-eclipse.commands.captureSelection"
               id="thoughtframe-eclipse.popups.captureSelection"
               mnemonic="S">
            <visibleWhen
                  checkEnabled="false">
               <with
                     variable="selection">
                  <iterate
                        ifEmpty="false"
                        operator="or">
                     <instanceof
                           value="org.eclipse.jface.text.ITextSelection">
                     </instanceof>
                  </iterate>
               </with>
            </visibleWhen>
         </command>
      </menuContribution>
      <menuContribution
            locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
         <toolbar
               id="thoughtframe-eclipse.toolbars.main">
            <command
                  commandId="thoughtframe-eclipse.commands.openChat"
                  icon="icons/sample.png"
                  id="thoughtframe-eclipse.toolbars.openChat"
                  tooltip="Open ThoughtFrame">
            </command>
         </toolbar>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.views">
      <view
            id="org.thoughtframe.bridge.views.chat"
            name="ThoughtFrame"
            class="org.thoughtframe.bridge.views.FrameViewer"
            icon="icons/sample.png"
            restorable="true"/>
   </extension>
</plugin>
