<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
   id="edu.ksu.cis.indus.kaveri"
   name="Kaveri Java Slicer Plug-in"
   version="0.8.3.7"
   provider-name="SAnToS laboratory, Kansas State University"
   class="edu.ksu.cis.indus.kaveri.KaveriPlugin">

   <runtime>
      <library name="Kaveri.jar">
         <export name="*"/>
      </library>
      <library name="lib/xstream.jar">
         <export name="*"/>
      </library>
      <library name="lib/peq.jar">
         <export name="*"/>
      </library>
      <library name="lib/peq-indus.jar">
         <export name="*"/>
      </library>
      <library name="lib/peq-specCompiler.jar">
         <export name="*"/>
      </library>
   </runtime>
   <requires>
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.jdt.core"/>
      <import plugin="org.eclipse.jdt.ui"/>
      <import plugin="org.eclipse.jface.text"/>
      <import plugin="org.eclipse.ui.editors"/>
      <import plugin="org.eclipse.ui.ide"/>
      <import plugin="org.eclipse.core.resources"/>
      <import plugin="org.eclipse.core.runtime"/>
      <import plugin="edu.ksu.cis.indus" version="0.7.2" match="greaterOrEqual"/>
      <import plugin="net.sf.groovyMonkey.dom"/>
      <import plugin="net.sf.groovyMonkey"/>
   </requires>

<!-- The document -->
<extension point="org.eclipse.help.toc">
      <toc file="eclipse_doc/toc.xml" primary="true"/>
   </extension>

<!--  This defines the popup menus for the slicer -->
   <extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            objectClass="org.eclipse.jdt.core.ICompilationUnit"
            nameFilter="*.java"
            id="edu.ksu.cis.indus.kaveri.popup.mainPopupObject">
         <menu
               label="Indus"
               path="additions"
               id="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu">
            <separator
                  name="group1">
            </separator>
         </menu>
         <action
               label="Slice Java File"
               class="edu.ksu.cis.indus.kaveri.sliceactions.RunIndus"
               menubarPath="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu/group1"
               enablesFor="1"
               id="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu.action.SliceNavigatorAction">
         </action>
      </objectContribution>
      <objectContribution            
            objectClass="org.eclipse.core.resources.IFile"
            nameFilter="*.java"
            id="edu.ksu.cis.indus.kaveri.popup.mainResourcePopupObject">
		 <filter
         name="projectNature"
         value="org.eclipse.jdt.core.javanature">
      	</filter>           
      	<menu
               label="Indus"
               path="additions"
               id="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu">
            <separator
                  name="group1">
            </separator>
         </menu>
         <action
               label="Slice Java File"
               class="edu.ksu.cis.indus.kaveri.sliceactions.RunIndus"
               menubarPath="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu/group1"
               enablesFor="1"
               id="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu.action.SliceNavigatorAction">
         </action>
      </objectContribution>
      <objectContribution
            adaptable="false"
            objectClass="org.eclipse.jdt.core.IJavaProject"
            id="edu.ksu.cis.indus.kaveri.popup.mainProjectPopupObject">
            
         <menu
               label="Indus"
               path="additions"
               id="edu.ksu.cis.indus.kaveri.popup.mainProjectPopupObject.menu">
            <separator
                  name="group1">
            </separator>
         </menu>
         <action
               label="Slice Project"
               class="edu.ksu.cis.indus.kaveri.sliceactions.RunIndus"
               menubarPath="edu.ksu.cis.indus.kaveri.popup.mainProjectPopupObject.menu/group1"
               enablesFor="1"
               id="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu.action.SliceProjectNavigatorAction">
         </action>
      </objectContribution>
            <objectContribution
                  adaptable="false"
                  objectClass="org.eclipse.core.resources.IProject"
                  id="edu.ksu.cis.indus.kaveri.popup.mainResourceProjectPopupObject">
                  <filter
         name="projectNature"
         value="org.eclipse.jdt.core.javanature">
      	</filter>        
         <menu
               label="Indus"
               path="additions"
               id="edu.ksu.cis.indus.kaveri.popup.mainProjectPopupObject.menu">
            <separator
                  name="group1">
            </separator>
         </menu>
         <action
               label="Slice Project"
               class="edu.ksu.cis.indus.kaveri.sliceactions.RunIndus"
               menubarPath="edu.ksu.cis.indus.kaveri.popup.mainProjectPopupObject.menu/group1"
               enablesFor="1"
               id="edu.ksu.cis.indus.kaveri.popup.mainPopupObject.menu.action.SliceProjectNavigatorAction">
         </action>
      </objectContribution>            
            <objectContribution
                  adaptable="true"
                  objectClass="org.eclipse.jdt.core.IMember"
                  id="edu.ksu.cis.indus.kaveri.popup.scopePopupObject">
               <menu
                     label="Indus"
                     path="additions"
                     id="edu.ksu.cis.indus.kaveri.popup.scopePopupObject.menu">
                  <separator name="group1"/>
               </menu>
                 <action
                     enablesFor="1"
                     label="Mark as root method"
                     class="edu.ksu.cis.indus.kaveri.rootmethodtrapper.AddRootMethodAction"
                     style="push"
                     menubarPath="edu.ksu.cis.indus.kaveri.popup.scopePopupObject.menu/group1"
                     id="edu.ksu.cis.indus.kaveri.popup.rootMethodPopupObjectAction"/>
               <action
                     enablesFor="1"
                     label="Add to Scope"
                     class="edu.ksu.cis.indus.kaveri.scoping.ScopePopupAction"
                     style="push"
                     menubarPath="edu.ksu.cis.indus.kaveri.popup.scopePopupObject.menu/group1"
                     id="edu.ksu.cis.indus.kaveri.popup.scopePopupObjectAction"/>
            </objectContribution>
            <!-- The slice context menu -->
            <viewerContribution
                  targetID="org.eclipse.jdt.callhierarchy.view"
                  id="edu.ksu.cis.indus.kaveri.callgraph">
               <menu
                     label="Indus"
                     path="additons"
                     id="edu.ksu.cis.indus.kaveri.callgraph.menu">
                  <separator name="group1"/>
               </menu>
               <action
                     label="Add to Context"
                     class="edu.ksu.cis.indus.kaveri.callgraph.AddToContext"
                     style="push"
                     menubarPath="edu.ksu.cis.indus.kaveri.callgraph.menu/group1"
                     id="edu.ksu.cis.indus.kaveri.callgraph.addContext"/>
            </viewerContribution>      
            
   </extension>
<!-- This extension shows additional information about the slice part chosen -->
<!-- This extension enables highlighting of the slice elements -->
   <extension
         point="org.eclipse.ui.editors.markerAnnotationSpecification">    
      <specification            
            verticalRulerPreferenceKey="occurrencePartialIndicationInVerticalRuler"
            annotationType="indus.slice.partialhighlightAnnotation"
            textPreferenceKey="occurrencePartialIndication"
            colorPreferenceKey="occurrencePartialIndicationColor"
            highlightPreferenceKey="occurrencePartialHighlighting"
            isGoToPreviousNavigationTarget="false"
            includeOnPreferencePage="true"
            textPreferenceValue="false"
            isGoToNextNavigationTarget="false"
            textStylePreferenceValue="IBEAM"
            overviewRulerPreferenceKey="occurrencePartialIndicationInOverviewRuler"
            showInNextPrevDropdownToolbarAction="true"
            presentationLayer="4"
            highlightPreferenceValue="true"
            label="IndusPartialSliceAnnotation"
            colorPreferenceValue="255,255,0"
            verticalRulerPreferenceValue="false"
            isGoToPreviousNavigationTargetKey="isOccurrencePartialGoToPreviousNavigationTarget"
            showInNextPrevDropdownToolbarActionKey="showOccurrencePartialInNextPrevDropdownToolbarAction"
            overviewRulerPreferenceValue="true"
            textStylePreferenceKey="indus.slice.partialhighlight.style"
            isGoToNextNavigationTargetKey="isOccurrencePartialGoToNextNavigationTarget" />
      <specification
            verticalRulerPreferenceKey="myoccurrenceIndicationInVerticalRuler"
            annotationType="indus.slice.highlightAnnotation"
            textPreferenceKey="myoccurrenceIndication"
            colorPreferenceKey="myoccurrenceIndicationColor"
            highlightPreferenceKey="myoccurrenceHighlighting"
            isGoToPreviousNavigationTarget="false"
            includeOnPreferencePage="true"
            textPreferenceValue="false"
            isGoToNextNavigationTarget="false"
            textStylePreferenceValue="IBEAM"
            overviewRulerPreferenceKey="myoccurrenceIndicationInOverviewRuler"
            showInNextPrevDropdownToolbarAction="true"
            presentationLayer="4"
            highlightPreferenceValue="true"
            label="IndusSliceAnnotation"
            colorPreferenceValue="0,255,0"
            verticalRulerPreferenceValue="false"
            isGoToPreviousNavigationTargetKey="ismyOccurrenceGoToPreviousNavigationTarget"
            showInNextPrevDropdownToolbarActionKey="showmyOccurrenceInNextPrevDropdownToolbarAction"
            overviewRulerPreferenceValue="true"
            textStylePreferenceKey="indus.slice.highlight.style"
            isGoToNextNavigationTargetKey="ismyOccurrenceGoToNextNavigationTarget">
      </specification>
   </extension>            
   
   
   <extension
         point="org.eclipse.ui.editorActions">
      <editorContribution
            targetID="org.eclipse.jdt.ui.CompilationUnitEditor"
            id="edu.ksu.cis.indus.kaveri.editorContribution">
         <action
               toolbarPath="Normal/additions"
               label="Forget Slice"
               tooltip="Forget Slice"
               icon="data/icons/eraser.gif"
               class="edu.ksu.cis.indus.kaveri.sliceactions.ForgetSlice"
               style="push"
               id="edu.ksu.cis.indus.kaveri.ForgetSlice"/>            
         <action
               toolbarPath="Normal/additions"
               label="Reset"
               tooltip="Reset Kaveri"
               icon="data/icons/reset.gif"
               class="edu.ksu.cis.indus.kaveri.sliceactions.ResetKaveri"
               style="push"
               id="edu.ksu.cis.indus.kaveri.Reset"/>            
         <action
               enablesFor="+"
               toolbarPath="Normal/additions"
               label="Forward Slice"
               class="edu.ksu.cis.indus.kaveri.sliceactions.ForwardSlice"
               tooltip="Runs a forward slice on the chosen element"
               icon="data/icons/sf.gif"
               id="edu.ksu.cis.indus.kaveri.ForwardSlice">
         </action>
         <action
               enablesFor="+"
               toolbarPath="Normal/additions"
               label="Backward Slice"
               class="edu.ksu.cis.indus.kaveri.sliceactions.BackwardSlice"
               tooltip="Runs a backward slice on the chosen element"
               icon="data/icons/sb.gif"
               id="edu.ksu.cis.indus.kaveri.BackwardSlice">
         </action>
         <action
               toolbarPath="Normal/additions"
               label="Slice Annotation"
               class="edu.ksu.cis.indus.kaveri.presentation.SliceAnnotate"
               tooltip="Enables or disables the slice annotations"
               icon="data/icons/sa.gif"
               id="edu.ksu.cis.indus.kaveri.SliceAnnotate">
         </action>
      </editorContribution>
   </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            name="Indus Preferences"
            class="edu.ksu.cis.indus.kaveri.preferences.PluginPreference"
            id="edu.ksu.cis.indus.kaveri.pluginpreference">
      </page>
   </extension>
   <extension
         point="org.eclipse.ui.decorators">
      <decorator
            lightweight="true"
            adaptable="true"
            label="Kaveri.Decorator"
            class="edu.ksu.cis.indus.kaveri.decorator.IndusDecorator"
            icon="data/icons/indus-decorator.gif"
            location="TOP_LEFT"
            id="edu.ksu.cis.indus.kaveri.decorator">
         <description/>
         <enablement>
            <objectClass name="org.eclipse.core.resources.IResource"/>
         </enablement>
      </decorator>           
   </extension>
   <extension
         point="org.eclipse.ui.views">
      <category
            name="Kaveri"
            id="edu.ksu.cis.indus.kaveri"/>
      <view
            allowMultiple="false"
            icon="data/icons/sample.gif"
            class="edu.ksu.cis.indus.kaveri.views.PartialSliceView"
            category="edu.ksu.cis.indus.kaveri"
            name="Jimple View"
            id="edu.ksu.cis.indus.kaveri.views.PartialSliceView"/>
	  <view
         allowMultiple="false"
         icon="data/icons/sample.gif"
         class="edu.ksu.cis.indus.kaveri.views.DependenceHistoryView"
         category="edu.ksu.cis.indus.kaveri"
         name="Dependence History View"
         id="edu.ksu.cis.indus.kaveri.views.DependenceHistoryView"/>
   <view
         allowMultiple="false"
         icon="data/icons/sample.gif"
         class="edu.ksu.cis.indus.kaveri.dependence.DependenceTrackingView"
         category="edu.ksu.cis.indus.kaveri"
         name="Dependence Tracking View"
         id="edu.ksu.cis.indus.kaveri.dependence.DependenceTrackingView"/>
   <view
         allowMultiple="false"
         class="edu.ksu.cis.indus.kaveri.peq.PEQView"
         icon="data/icons/sample.gif"
         category="edu.ksu.cis.indus.kaveri"
         name="Peq View"
         id="edu.ksu.cis.indus.kaveri.peq.peqview"/>
   <view
         allowMultiple="false"
         icon="data/icons/sample.gif"
         class="edu.ksu.cis.indus.kaveri.infoView.InfoView"
         category="edu.ksu.cis.indus.kaveri"
         name="Slice Information View"
         id="edu.ksu.cis.indus.kaveri.infoView"/>

   </extension>
   
   <extension
         point="org.eclipse.ui.perspectiveExtensions">
      <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
         <view
               ratio="0.5"
               relationship="right"
               relative="org.eclipse.ui.views.TaskList"
               id="edu.ksu.cis.indus.kaveri.views.PartialSliceView"/>
      </perspectiveExtension>
   </extension>
   <extension
         point="org.eclipse.ui.ide.markerImageProviders">
      <imageprovider
            markertype="edu.ksu.cis.indus.kaveri.rootMethodMarker"
            icon="data/icons/rmmarker.gif"
            id="rmImageProvider"/>
   </extension>
   <extension
         id="rootMethodMarker"
         name="RootMethodMarker"
         point="org.eclipse.core.resources.markers">      
      <super type="org.eclipse.core.resources.bookmark"/>
      <persistent value="true"/>
      <attribute name="className"/>
      <attribute name="methodSignature"/>
   </extension>
   <extension
         point="org.eclipse.core.filebuffers.annotationModelCreation">
   </extension>
   <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
            label="Indus"
            visible="true"
            id="edu.ksu.cis.indus.kaveri.indusconfig">
         <menu
               label="Indus"
               path="additions"
               id="edu.ksu.cis.indus.kaveri.workbenchmenu">
            <separator name="additions"/>
            <separator name="contents"/>
         </menu>
         <action
               label="Slice Statistics"
               class="edu.ksu.cis.indus.kaveri.driver.SliceStatistics"
               tooltip="View slice statistics"
               icon="data/icons/sample.gif"
               style="push"
               menubarPath="edu.ksu.cis.indus.kaveri.workbenchmenu/contents"
               id="edu.ksu.cis.indus.kaveri.statsaction"/>
         <action
               label="Slicer Configuration"
               icon="data/icons/sample.gif"
               class="edu.ksu.cis.indus.kaveri.preferences.SlicerConfigurationAction"
               tooltip="Configure the slicer"
               style="push"
               menubarPath="edu.ksu.cis.indus.kaveri.workbenchmenu/contents"
               id="edu.ksu.cis.indus.kaveri.configaction"/>
      </actionSet>
   </extension>
   <!--
   <extension
         point="org.eclipse.ui.propertyPages">
      <page
            objectClass="org.eclipse.jdt.core.IJavaProject"
            name="Indus"
            class="edu.ksu.cis.indus.kaveri.preferences.ProjectPreference"
            id="edu.ksu.cis.indus.kaveri.projectpreference">
      </page>
      <page
            objectClass="org.eclipse.core.resources.IProject"
            name="Indus"
            class="edu.ksu.cis.indus.kaveri.preferences.ProjectPreference"
            id="edu.ksu.cis.indus.kaveri.projectpreference">
      </page>
   </extension>
   -->
   
   <extension 
   		point="net.sf.groovyMonkey.dom">
		<updateSite url="http://indus.projects.cis.ksu.edu/update/plugins/edu.ksu.cis.indus.kaveri"/>
		<dom 
			class="edu.ksu.cis.indus.dom.SlicerDOMFactory" 
			id="Java Slicer" 
			resource="edu.ksu.cis.indus.dom.SlicerDOM" 
			variableName="slicer"/>
	</extension>   
</plugin>
