<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>

   <extension
         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
      <launchConfigurationTabGroup
            class="de.ikv.medini.qvt.debug.ui.launcher.QVTTabGroup"
            description="Specify and launch a QVT program"
            id="qvt.tabGroup"
            type="qvt.launchType"/>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
      <launchConfigurationTypeImage
            icon="icons/icon16.gif"
            configTypeID="qvt.launchType"
            id="qvt.typeImage"/>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchShortcuts">
      <shortcut
            label="QVT Application"
            icon="icons/icon16.gif"
            class="de.ikv.medini.qvt.debug.ui.launcher.QVTLaunchShortcut"
            modes="run, debug"
            id="qvt.launchShortcut">
         <contextualLaunch>
            <enablement>
               <with variable="selection">
                  <count value="1"/>
                  <iterate>
                     <instanceof value="org.eclipse.core.resources.IFile"/>
                     <test
                           value="*.qvt"
                           property="org.eclipse.debug.ui.matchesPattern"/>
                  </iterate>
               </with>
            </enablement>
         </contextualLaunch>
      </shortcut>
   </extension>
   <extension
         point="org.eclipse.debug.ui.debugModelPresentations">
      <debugModelPresentation
            class="de.ikv.medini.qvt.debug.ui.presentation.QVTModelPresentation"
            id="qvt.debugModel"/>
   </extension>
   <extension
         point="org.eclipse.ui.editorActions">
      <editorContribution
            targetID="qvt.editor"
            id="qvt.rulerActions">
         <action
               label="Not Used"
               class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
               style="push"
               actionID="RulerDoubleClick"
               id="qvt.doubleClickBreakpointAction"/>
      </editorContribution>
   </extension>
   <!--
   <extension
         point="org.eclipse.ui.views">
      <view
            icon="icons/icon16.gif"
            class="de.ikv.medini.qvt.debug.ui.views.DataStackView"
            name="QVT Data Stack"
            id="qvt.dataStackView"/>
   </extension>
   -->
  
    <extension
          point="org.eclipse.ui.perspectiveExtensions">
       <perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective">
          <view
                visible="false"
                relative="org.eclipse.debug.ui.VariableView"
                relationship="stack"
                id="qvt.dataStackView"/>
       </perspectiveExtension>
    </extension>
     <extension
           point="org.eclipse.ui.contexts">
        <context
              parentId="org.eclipse.debug.ui.debugging"
              description="Debugging QVT Programs"
              name="Debugging QVT Programs"
              id="qvt.debugging"/>
     </extension>
	  <extension
	        point="org.eclipse.debug.ui.debugModelContextBindings">
	     <modelContextBinding
	           contextId="qvt.debugging"
	           debugModelId="qvt.debugModel"/>
	  </extension>
	   <extension
	         point="org.eclipse.debug.ui.contextViewBindings">
	      <contextViewBinding
	            contextId="qvt.debugging"
	            viewId="qvt.dataStackView"/>
	   </extension>

	<extension
         point="org.eclipse.ui.popupMenus">           
      <viewerContribution
            targetID="qvt.editor.rulerMenu"
            id="qvt.editor.rulerActions">
         <action
               label="%JavaBreakpointProperties.label"
               helpContextId="breakpoint_properties_action_context"
               class="de.ikv.medini.qvt.debug.ui.actions.JavaBreakpointPropertiesRulerActionDelegate"
               menubarPath="group.properties"
               id="de.ikv.medini.qvt.debug.ui.actions.JavaBreakpointPropertiesRulerActionDelegate">
         </action>
         <action
               label="Toggle Breakpoint"
               class="org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate"
               menubarPath="debug"
               id="qvt.editor.ruler.toggleBreakpointAction"/>         
      </viewerContribution>
      <viewerContribution
            targetID="qvt.editor.editorMenu"
            id="qvt.editor.menuActions">
         <action
               label="Run to Line"
               definitionId="org.eclipse.debug.ui.commands.RunToLine"
               class="org.eclipse.debug.ui.actions.RunToLineActionDelegate"
               menubarPath="additions"
               id="qvt.editor.context.runToLineAction"/>
      </viewerContribution>
      <objectContribution
            adaptable="false"
            id="qvt.dropToFrame"
            objectClass="de.ikv.medini.qvt.debug.core.model.QVTStackFrame">
         <action
               class="de.ikv.medini.qvt.debug.ui.actions.PopFrameActionDelegate"
               id="qvt.dropToFrame"
               label="Pop Frame"/>
      </objectContribution> 
      <objectContribution
            objectClass="de.ikv.medini.qvt.debug.core.breakpoints.QVTLineBreakpoint"
            id="de.ikv.medini.qvt.debug.JavaBreakpointActions">
         <action
               class="de.ikv.medini.qvt.debug.ui.actions.JavaBreakpointPropertiesAction"
               definitionId="de.ikv.medini.qvt.debug.ui.breakpoint.properties"
               enablesFor="1"
               helpContextId="breakpoint_properties_action_context"
               id="de.ikv.medini.qvt.debug.ui.actions.JavaBreakpointProperties"
               label="%JavaBreakpointProperties.label"
               menubarPath="additions">
         </action>
      </objectContribution>
      
      <viewerContribution
            targetID="org.eclipse.debug.ui.ExpressionView"
            id="org.eclipse.debug.ui.ExpressionViewPopupActionsForQVT">
         <action
               label="Add QVT Watch Expression"
               helpContextId="add_watch_expression_context"
               class="de.ikv.medini.qvt.debug.ui.actions.AddQVTWatchExpressionAction"
               tooltip="%addWatchExpressionAction.tooltip"
               menubarPath="additions"
               id="org.eclipse.debug.ui.expressionViewActions.AddWatchExpressionForQVT">
         </action>
      </viewerContribution>
      
      <objectContribution
            objectClass="org.eclipse.debug.core.model.IWatchExpression"
            id="org.eclipse.debug.ui.WatchExpressionActionsForQVT">
         <action
               label="Edit QVT Watch Expression"
               helpContextId="edit_watch_expression_context"
               class="de.ikv.medini.qvt.debug.ui.actions.EditQVTWatchExpressionAction"
               menubarPath="additions"
               enablesFor="1"
               id="org.eclipse.debug.ui.watchExpressionActions.EditWatchExpressionForQVT">
         </action>
      </objectContribution>
   </extension>
   
   <extension
         point="org.eclipse.core.runtime.adapters">
      <factory
            class="de.ikv.medini.qvt.debug.ui.breakpoints.QVTEditorAdapterFactory"
           adaptableType="de.ikv.medini.qvt.ui.editors.QVTEditor">
			<adapter type="org.eclipse.debug.ui.actions.IToggleBreakpointsTarget"/>
			<adapter type="org.eclipse.debug.ui.actions.IRunToLineTarget"/>
      </factory>
   </extension>
   
   
   <!-- JDT -->
   
   <extension
         point="org.eclipse.ui.propertyPages">
      <page
            name="Line Breakpoints Page"
            class="de.ikv.medini.qvt.debug.ui.propertypages.JavaLineBreakpointPage"
            id="de.ikv.medini.qvt.debug.ui.propertypages.LineBreakpoints">
         <enabledWhen>
            <or>
               <instanceof
                     value="de.ikv.medini.qvt.debug.core.breakpoints.QVTLineBreakpoint">
               </instanceof>
               <adapt
                     type="de.ikv.medini.qvt.debug.core.breakpoints.QVTLineBreakpoint">
               </adapt>
            </or>
         </enabledWhen>
      </page>      
   </extension>
   
   
</plugin>
