<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
   <extension-point id="pydev_debug_console_input_listener" name="pydev_debug_console_input_listener" schema="schema/pydev_debug_console_input_listener.exsd"/>

<!--- run keybindings -->
<extension point="org.eclipse.ui.editorActions">
<editorContribution
     targetID="org.python.pydev.editor.PythonEditor"
     id="org.python.pydev.debug.editor.editorContribution">
     <action
           definitionId="org.python.pydev.debug.ui.actions.runEditorAsPython"
           label="Run As Python"
           class="org.python.pydev.debug.ui.actions.RunEditorAsPython"
           id="org.python.pydev.debug.ui.actions.runEditorAsPython">
     </action>
     <action
           definitionId="org.python.pydev.debug.ui.actions.runEditorAsJython"
           label="Run As Jython"
           class="org.python.pydev.debug.ui.actions.RunEditorAsJython"
           id="org.python.pydev.debug.ui.actions.runEditorAsJython">
     </action>
</editorContribution>
</extension>
<!--- run keybindings:commands -->
<extension point="org.eclipse.ui.commands">
      <category
            name="Pydev - Run"
            description="Python run category"
            id="org.python.pydev.ui.category.run"> 
      </category>
      <command
            description="Run the editor as Python."
            id="org.python.pydev.debug.ui.actions.runEditorAsPython"
            categoryId="org.python.pydev.ui.category.run"
            name="Run As Python">
      </command>
      <command
            description="Run the editor as Jython."
            id="org.python.pydev.debug.ui.actions.runEditorAsJython"
            categoryId="org.python.pydev.ui.category.run"
            name="Run As Jython">
      </command>
	  <command id="org.python.pydev.debug.command.Display" name="Display Command">
      </command>
</extension>


<!--- run keybindings:bindings -->
<extension point="org.eclipse.ui.bindings">
      <key
            sequence="F9"
            contextId="org.python.pydev.ui.editor.scope"
            commandId="org.python.pydev.debug.ui.actions.runEditorAsPython"	
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </key>
      <key
            sequence="Ctrl+F9"
            contextId="org.python.pydev.ui.editor.scope"
            commandId="org.python.pydev.debug.ui.actions.runEditorAsJython"	
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </key>
      <!-- Ctrl+Shift == M1+M2 -->
	  <key sequence="M1+M2+D"
	  		commandId="org.python.pydev.debug.command.Display" 
	  		contextId="org.python.pydev.ui.editor.scope" 
	  		schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" 
	  		/>
      
</extension>


<!--- launcher -->
<extension point="org.eclipse.debug.core.launchConfigurationTypes">
	<launchConfigurationType
        delegate="org.python.pydev.debug.ui.launching.RegularLaunchConfigurationDelegate"
        id="org.python.pydev.debug.regularLaunchConfigurationType"
        modes="run, debug, interactive"
        name="Python Run"
        public="true">
	</launchConfigurationType>
	<launchConfigurationType
        delegate="org.python.pydev.debug.ui.launching.CoverageLaunchConfigurationDelegate"
        id="org.python.pydev.debug.coverageLaunchConfigurationType"
        modes="run"
        name="Python Coverage"
        public="true">
	</launchConfigurationType>
	<launchConfigurationType
        delegate="org.python.pydev.debug.ui.launching.UnittestLaunchConfigurationDelegate"
        id="org.python.pydev.debug.unittestLaunchConfigurationType"
        modes="run, debug"
        name="Python unittest"
        public="true">
	</launchConfigurationType>
	<launchConfigurationType
        delegate="org.python.pydev.debug.ui.launching.JythonUnittestLaunchConfigurationDelegate"
        id="org.python.pydev.debug.jythonUnittestLaunchConfigurationType"
        modes="run, debug"
        name="Jython unittest"
        public="true">
	</launchConfigurationType>
    <launchConfigurationType
        delegate="org.python.pydev.debug.ui.launching.JythonLaunchConfigurationDelegate"
        id="org.python.pydev.debug.jythonLaunchConfigurationType"
        modes="run, debug, interactive"
        name="Jython run"
        public="true"
        sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
        sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer">
     </launchConfigurationType>

</extension>
<!--- the launcher icon  -->
<extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
	<launchConfigurationTypeImage
		icon="icons/python.gif"
		configTypeID="org.python.pydev.debug.regularLaunchConfigurationType"
		id="org.python.pydev.debug.ui.launchConfigurationTypeImage">
	</launchConfigurationTypeImage>
	<launchConfigurationTypeImage
		icon="icons/python_coverage.gif"
		configTypeID="org.python.pydev.debug.coverageLaunchConfigurationType"
		id="org.python.pydev.debug.ui.launchConfigurationTypeImage">
	</launchConfigurationTypeImage>
	<launchConfigurationTypeImage
		icon="icons/python_unit.gif"
		configTypeID="org.python.pydev.debug.unittestLaunchConfigurationType"
		id="org.python.pydev.debug.ui.launchConfigurationTypeImage">
	</launchConfigurationTypeImage>
	<launchConfigurationTypeImage
		icon="icons/jython_unit.gif"
		configTypeID="org.python.pydev.debug.jythonUnittestLaunchConfigurationType"
		id="org.python.pydev.debug.ui.launchConfigurationTypeImage">
	</launchConfigurationTypeImage>
	<launchConfigurationTypeImage
		icon="icons/jython.gif"
		configTypeID="org.python.pydev.debug.jythonLaunchConfigurationType"
		id="org.python.pydev.debug.ui.launchConfigurationTypeImage">
	</launchConfigurationTypeImage>
</extension>
<!--- launcher tab group -->
<extension point="org.eclipse.debug.ui.launchConfigurationTabGroups">

	<!--Python-->
	<launchConfigurationTabGroup
		type="org.python.pydev.debug.regularLaunchConfigurationType"
		class="org.python.pydev.debug.ui.PythonTabGroup"
		id="org.python.pydev.debug.ui.PythonTabGroup">
	</launchConfigurationTabGroup>
	<launchConfigurationTabGroup
		type="org.python.pydev.debug.coverageLaunchConfigurationType"
		class="org.python.pydev.debug.ui.PythonTabGroup"
		id="org.python.pydev.debug.ui.PythonTabGroup">
	</launchConfigurationTabGroup>
	<launchConfigurationTabGroup
		type="org.python.pydev.debug.unittestLaunchConfigurationType"
		class="org.python.pydev.debug.ui.PythonTabGroup"
		id="org.python.pydev.debug.ui.PythonTabGroup">
	</launchConfigurationTabGroup>
	
	<!--Jython-->
	<launchConfigurationTabGroup
		type="org.python.pydev.debug.jythonUnittestLaunchConfigurationType"
		class="org.python.pydev.debug.ui.JythonTabGroup"
		id="org.python.pydev.debug.ui.JythonTabGroup">
	</launchConfigurationTabGroup>
	<launchConfigurationTabGroup
		type="org.python.pydev.debug.jythonLaunchConfigurationType"
		class="org.python.pydev.debug.ui.JythonTabGroup"
		id="org.python.pydev.debug.ui.JythonTabGroup">
	</launchConfigurationTabGroup>
	
</extension>

<!--- launcher pop up over a python file -->
<!--- launch shortcuts -->
<extension point="org.eclipse.debug.ui.launchShortcuts">
	<shortcut
		label="Python Run"
		icon="icons/python.gif"
		modes="run, debug"
		class="org.python.pydev.debug.ui.launching.LaunchShortcut"
		id="org.python.pydev.debug.ui.launchShortcut.python">
		<perspective id="org.eclipse.debug.ui.DebugPerspective"/>
		<!--this adds it to run-as (taken from \eclipse\plugins\org.eclipse.jdt.junit_3.0.1) -->
        <contextualLaunch>
           <enablement>
              <with variable="selection">
                 <count value="1"/>
           		 <iterate>
           		 	<or>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.py"/>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.pyw"/>
               		</or>
           		 </iterate>
              </with>
           </enablement>
        </contextualLaunch>
        <configurationType id="org.python.pydev.debug.regularLaunchConfigurationType"/>
	</shortcut>
	<shortcut
		label="Jython Run"
		icon="icons/jython.gif"
		modes="run, debug"
		class="org.python.pydev.debug.ui.launching.JythonLaunchShortcut"
		id="org.python.pydev.debug.ui.launchShortcut.jython">
		<!--this adds it to run-as (taken from \eclipse\plugins\org.eclipse.jdt.junit_3.0.1) -->
        <contextualLaunch>
           <enablement>
              <with variable="selection">
                 <count value="1"/>
           		 <iterate>
           		 	<or>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.py"/>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.pyw"/>
               		</or>
           		 </iterate>
              </with>
           </enablement>
        </contextualLaunch>
        <configurationType id="org.python.pydev.debug.jythonLaunchConfigurationType"/>
	</shortcut>
	<shortcut
		label="Python Coverage"
		icon="icons/python_coverage.gif"
		modes="run"
		class="org.python.pydev.debug.ui.launching.CoverageLaunchShortcut"
		id="org.python.pydev.debug.ui.launchShortcut.python.coverage">
		<!--this adds it to run-as (taken from \eclipse\plugins\org.eclipse.jdt.junit_3.0.1) -->
        <contextualLaunch>
           <enablement>
              <with variable="selection">
           		 <iterate>
           		 	<or>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.py"/>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.pyw"/>
               		    <adapt type="org.eclipse.core.resources.IFolder" />
               		</or>
           		 </iterate>
              </with>
           </enablement>
        </contextualLaunch>
        <configurationType id="org.python.pydev.debug.coverageLaunchConfigurationType"/>
	</shortcut>
	<shortcut
		label="Python unit-test"
		icon="icons/python_unit.gif"
		modes="run, debug"
		class="org.python.pydev.debug.ui.launching.UnitTestLaunchShortcut"
		id="org.python.pydev.debug.ui.launchShortcut.python.unittest">
        <contextualLaunch>
           <enablement>
              <with variable="selection">
           		 <iterate>
           		 	<or>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.py"/>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.pyw"/>
               		    <adapt type="org.eclipse.core.resources.IFolder" />
               		</or>
           		 </iterate>
              </with>
           </enablement>
        </contextualLaunch>
        <configurationType id="org.python.pydev.debug.unittestLaunchConfigurationType"/>
	</shortcut>
	<shortcut
		label="Jython unit-test"
		icon="icons/jython_unit.gif"
		modes="run, debug"
		class="org.python.pydev.debug.ui.launching.JythonUnitTestLaunchShortcut"
		id="org.python.pydev.debug.ui.launchShortcut.jython.unittest">
        <contextualLaunch>
           <enablement>
              <with variable="selection">
           		 <iterate>
           		 	<or>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.py"/>
               		    <test property="org.eclipse.debug.ui.matchesPattern" value="*.pyw"/>
               		    <adapt type="org.eclipse.core.resources.IFolder" />
               		</or>
           		 </iterate>
              </with>
           </enablement>
        </contextualLaunch>
        <configurationType id="org.python.pydev.debug.jythonUnittestLaunchConfigurationType"/>
	</shortcut>
</extension>



<!--- CONTRIBUTED VIEWS -->
<extension point="org.eclipse.ui.views">
   <category
        name="Pydev"
        id="org.python.pydev.debug"/>
   <view
        class="org.python.pydev.debug.codecoverage.PyCodeCoverageView"
        icon="icons/python_coverage.gif"
        category="org.python.pydev"
        name="Code Coverage Results View"
        id="org.python.pydev.views.PyCodeCoverageView"/>
   <!--- removed until the implementation is improved 
   <view
        icon="icons/python.gif"
        class="org.python.pydev.debug.unittest.TestReportView"
        category="org.python.pydev"
        name="Unit Test Report View"
        id="org.python.pydev.debug.views.TestReportView"/>
   -->
</extension>

<!--- console line tracking -->
<extension 
	point="org.eclipse.debug.ui.consoleLineTrackers">
	<consoleLineTracker
		class="org.python.pydev.debug.ui.PythonConsoleLineTracker"
		processType="PYDEV.PYTHON"
		id="org.python.pydev.debug.ui.PythonConsoleLineTracker">
	</consoleLineTracker>
</extension>
<extension 
	point="org.eclipse.debug.ui.consoleLineTrackers">
	<consoleLineTracker
		class="org.python.pydev.debug.ui.PythonConsoleLineTracker"
		processType="java"
		id="org.python.pydev.debug.ui.PythonConsoleLineTracker">
	</consoleLineTracker>
</extension>








   
<!-- DEBUGGING -->
<!-- breakpoint ruler action -->
<extension point="org.eclipse.ui.editorActions">
	<editorContribution
		id="org.python.pydev.debug.BreakpointRulerActions"
		targetID="org.python.pydev.editor.PythonEditor">
		<action
			id="org.python.pydev.debug.BreakpointRulerAction"
			actionID="RulerDoubleClick"
			label="Add breakpoint"
			class="org.python.pydev.debug.ui.actions.ManageBreakpointRulerActionDelegate">
		</action>
	</editorContribution>
</extension>

<!-- popup menu -->
<extension point="org.eclipse.ui.popupMenus">
	<viewerContribution 
    	id="org.python.pydev.debug.PyEditPopupActions" 
    	targetID="#TextRulerContext">
		<action
		    id="org.eclipse.jdt.debug.ui.actions.JavaBreakpointPropertiesRulerActionDelegate"
			label="Breakpoint properties"
            helpContextId="breakpoint_properties_action_context"
			menubarPath="debug"
			class="org.python.pydev.debug.ui.actions.PythonBreakpointPropertiesRulerActionDelegate">
		</action>
    	<action
			id="org.eclipse.jdt.ui.actions.EnableDisableBreakpointRulerActionDelegate"
			label="Enable breakpoint"
			menubarPath="debug"
			helpContextId="enable_disable_breakpoint_action_context"
			class="org.python.pydev.debug.ui.actions.EnableDisableBreakpointRulerActionDelegate">
		</action>
		<action
			id="org.eclipse.jdt.ui.actions.ManageBreakpointRulerActionDelegate"
			label="Add Breakpoint"
			menubarPath="debug"
			class="org.python.pydev.debug.ui.actions.ManageBreakpointRulerActionDelegate">
		</action>
	</viewerContribution>
	
	<viewerContribution id="org.python.pydev.debug.WatchExpression" targetID="#PyEditContext">
		<action
	        class="org.python.pydev.debug.ui.actions.WatchExpressionAction"
	        icon="icons/watch_exp.gif"
	        id="org.python.pydev.debug.ui.actions.WatchExpression"
	        label="Watch"
	        menubarPath="org.python.pydev.editor.watchexpression">
         </action>
		 <action class="org.python.pydev.debug.ui.actions.EvalExpressionAction" 
			id="org.python.pydev.debug.command.Display" 
			label="Display" 
			menubarPath="org.python.pydev.editor.watchexpression" 
			definitionId="org.python.pydev.debug.command.Display">
		 </action>
	</viewerContribution>
 <objectContribution
       adaptable="false"
       id="org.python.pydev.debug.PythonBreakPointActions"
       objectClass="org.python.pydev.debug.core.IPythonBreakpoint">
    <action
          class="org.python.pydev.debug.ui.actions.PythonBreakpointPropertiesRulerAction"
          enablesFor="1"
          helpContextId="breakpoint_suspend_policy_toggle_action_context"
          icon="icons/full/elcl16/suspend_co.gif"
          id="org.python.pydev.debug.PythonBreakpointProperties"
          label="%breakpointPropertiesAction.label"
          menubarPath="emptyBreakpointGroup"/>
 </objectContribution>
</extension>

<!-- breakpoints
	need a marker to mark the breakpoint
	breakpoint associated with marker for BreakpointManager
	marker image provider to provide name for the marker
-->
<!-- org.eclipse.debug.core.breakpointMarker -->		
<extension 
	point="org.eclipse.core.resources.markers"
	id="pyStopBreakpointMarker">
	<super type="org.eclipse.debug.core.lineBreakpointMarker"/>
	<persistent value="true"/>
</extension>
<extension 
	point="org.eclipse.debug.core.breakpoints">
	<breakpoint id="pythonStopBreakpoint"
		markerType="org.python.pydev.debug.pyStopBreakpointMarker"
		class="org.python.pydev.debug.model.PyBreakpoint"/>
</extension>

<extension
	point="org.eclipse.ui.ide.markerImageProviders">
	<imageprovider
       class="org.python.pydev.debug.model.PyBreakpoint"
       icon="icons/breakmarker.gif"
       id="pythonBreakPointImage"
       markertype="org.python.pydev.debug.pyStopBreakpointMarker"/>
 <imageprovider
       class="org.python.pydev.debug.model.PyBreakpoint"
       icon="icons/breakmarker_conditional.gif"
       id="pythonConditionalBreakPointImage"
       markertype="org.python.pydev.debug.pyConditionalStopBreakpointMarker"/>
</extension>

<extension point = "org.eclipse.debug.ui.debugModelPresentations"> 
	<debugModelPresentation
		class = "org.python.pydev.debug.model.PyDebugModelPresentation"
		id = "org.python.pydev.debug">
	</debugModelPresentation>
</extension>

<extension point="org.eclipse.debug.core.watchExpressionDelegates">
	<watchExpressionDelegate 
		debugModel="org.python.pydev.debug"
		delegateClass="org.python.pydev.debug.model.PyWatchExpressionDelegate"/>
</extension>
<extension
      point="org.eclipse.ui.propertyPages">
   <page
         adaptable="true"
         class="org.python.pydev.debug.ui.propertypages.PythonBreakpointPage"
         id="org.pydev.debug.ui.propertypages.common"
         name="common"
         objectClass="org.python.pydev.debug.model.PyBreakpoint"/>
</extension>


<extension point="org.eclipse.ui.handlers">
	<handler class="org.python.pydev.debug.ui.actions.EvalExpressionAction" commandId="org.python.pydev.debug.command.Display">
	</handler>
</extension>



<extension point="org.eclipse.ui.preferencePages">
      <page
            name="Debug"
            category="org.python.pydev.prefs"
            class="org.python.pydev.debug.ui.DebugPrefsPage"
            id="org.python.pydev.prefs.debugPage">
      </page>
</extension>

<extension point="org.eclipse.ui.preferencePages">
      <page
            name="Source Locator"
            category="org.python.pydev.prefs.debugPage"
            class="org.python.pydev.debug.ui.SourceLocatorPrefsPage"
            id="org.python.pydev.prefs.debugPage.SourceLocatorPrefsPage">
      </page>
</extension>

<extension point="org.python.pydev.pydev_pyedit_listener">
	<pyedit_listener_participant class="org.python.pydev.debug.ui.PyEditBreakpointSync"/>
</extension>



<!-- console stuff -->
  <extension point="org.eclipse.ui.console.consoleFactories">
    <consoleFactory
      class="org.python.pydev.debug.newconsole.PydevConsoleFactory"
      icon="icons/python_16x16.png"
      label="Pydev Console" />
  </extension>
  <extension point="org.eclipse.core.runtime.preferences">
     <initializer class="org.python.pydev.debug.newconsole.PydevConsolePreferencesInitializer"/>
  </extension>
  
  <extension point="org.eclipse.ui.preferencePages">
     <page
        name="Interactive Console"
        category="org.python.pydev.prefs"
        class="org.python.pydev.debug.newconsole.prefs.InteractiveConsolePrefs"
        id="org.python.pydev.debug.newconsole.prefs.InteractiveConsolePrefs">
     </page>
  </extension>
  <extension
        point="org.python.pydev.pydev_hover">
     <hover_participant
           class="org.python.pydev.debug.ui.hover.PyDebugHover">
     </hover_participant>
  </extension>
<!-- end console stuff -->

</plugin>

