<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension point="com.teamcenter.rac.aifrcp.application">
   
  <!--AutoCodeManagerPerspective perspective-->
   <aif_app_item
      displayMode="Primary"
      groupName="Teamcenter"
      icon="icons/autocode_32.png"
      id="cn.com.origin.autocodemanager.aif_app_item"
      name="编码管理"
      ordinality="200"
      perspective_id="cn.com.origin.autocodemanager.AutoCodeManagerPerspective"
      session="com.teamcenter.rac.kernel.TCSession"
      tooltip="编码管理">
   </aif_app_item>
 </extension>
 <extension point="org.eclipse.ui.perspectiveExtensions">
   <perspectiveExtension
      targetID="cn.com.origin.autocodemanager.AutoCodeManagerPerspective">
   </perspectiveExtension>
 </extension>
 <extension point="org.eclipse.ui.perspectives">
   <perspective
      class="cn.com.origin.autocodemanager.AutoCodeManagerPerspective"
      icon="icons/pview.gif"
      id="cn.com.origin.autocodemanager.AutoCodeManagerPerspective"
     name="编码管理">
   </perspective>
 </extension>
 <extension
      point="org.eclipse.core.expressions.definitions">
   <definition
         id="cn.com.origin.autocodemanager.inMainView">
      <with
            variable="rac_property.ACTIVE_APPLICATION">
         <equals
               value="cn.com.origin.autocodemanager.aif_app_item">
         </equals>
      </with>
   </definition>
</extension>
<extension
      point="org.eclipse.ui.activities">
       <activity
            description="Turn off Code Manager perspective"
            id="cn.com.origin.autocodemanager.aif_app_item"
            name="autocodemanager">
      </activity>
</extension>  
 <!--AutoCodeManagerPerspective perspective-->
   
 <!--AutoCodeSegmentView views-->  
<extension point="org.eclipse.ui.views">
   <view
      allowMultiple="false"
      class="cn.com.origin.autocodemanager.views.AutoCodeSegmentView"
      icon="icons/code_16.png"
      id="cn.com.origin.autocodemanager.views.AutoCodeSegmentView"
      name="编码规则">
   </view>
</extension>
  <extension point="org.eclipse.core.expressions.definitions">
      <definition id="cn.com.origin.autocodemanager.inMainView">
         <or>
            <with variable="activePartId ">
               <equals   value="cn.com.origin.autocodemanager.views.AutoCodeSegmentView"></equals>
            </with>
            <with variable="rac_property.ACTIVE_APPLICATION">
               <equals  value="cn.com.origin.autocodemanager"> </equals>
            </with>
         </or>
      </definition>
     <definition id="oneSelectedCheck">
         <with variable="activeMenuSelection">
            <count 	value="1"> </count>
         </with>
      </definition>
 </extension>
<!--AutoCodeSegmentView views-->  

<!--AutoCodeListCodeView views-->   
   <extension point="org.eclipse.ui.views">
   <view
      allowMultiple="false"
      class="cn.com.origin.autocodemanager.views.AutoCodeListCodeView"
      icon="icons/list_16.png"
      id="cn.com.origin.autocodemanager.views.AutoCodeListCodeView"
      name="列表">
   </view>
</extension>
 <!--AutoCodeListCodeView views--> 
 
 <!--AutoCodeTestView views-->   
 <extension point="org.eclipse.ui.views">
   <view
      allowMultiple="false"
      class="cn.com.origin.autocodemanager.views.AutoCodeTestView"
      icon="icons/code_16.png"
      id="cn.com.origin.autocodemanager.views.AutoCodeTestView"
      name="编码验证">
   </view>
</extension>
<!--AutoCodeTestView views-->   

<!--AutoCodeTreeCodeView views-->   
   <extension point="org.eclipse.ui.views">
   <view
      allowMultiple="false"
      class="cn.com.origin.autocodemanager.views.AutoCodeTreeCodeView"
      icon="icons/tree_16.png"
      id="cn.com.origin.autocodemanager.views.AutoCodeTreeCodeView"
      name="编码树">
   </view>
</extension>
 <!--AutoCodeTreeCodeView views-->
 
 <!--AutoCodeStyleView views-->   
   <extension point="org.eclipse.ui.views">
   <view
      allowMultiple="false"
      class=" cn.com.origin.autocodemanager.views.AutoCodeStyleView"
      id=" cn.com.origin.autocodemanager.views.AutoCodeStyleView"
      name="样式设置">
   </view>
</extension>
 <!--AutoCodeStyleView views-->

 <extension point="org.eclipse.ui.commands">
 	<command
		id="com.origin.autocode.admin.handlers.codeCopyMyTeamcenterHandler"
		name="编码复制MyTeamcenter">	
	</command>
	<command  id="cn.com.origin.autocodemanager.handlers.DeleteNodeHandler"	
	    name="cn.com.origin.autocodemanager.handlers.DeleteNodeHandler">
	</command>	
		<command  id="cn.com.origin.autocodemanager.handlers.DownListNodeHandler"	
	    name="cn.com.origin.autocodemanager.handlers.DownListNodeHandler">
	</command>
		<command  id="cn.com.origin.autocodemanager.handlers.UpListNodeHandler"	
	    name="cn.com.origin.autocodemanager.handlers.UpListNodeHandler">
	</command>
	<command  id="cn.com.origin.autocodemanager.handlers.ImportNodeHandler"	
	    name="cn.com.origin.autocodemanager.handlers.ImportNodeHandler">
	</command>
		<command  id="cn.com.origin.autocodemanager.handlers.ImportCodeNextIdHandler"	
	    name="cn.com.origin.autocodemanager.handlers.ImportCodeNextIdHandler">
	</command>
	<command  id="cn.com.origin.autocodemanager.handlers.ExportNodeHandler"	
	    name="cn.com.origin.autocodemanager.handlers.ExportNodeHandler">
	</command>	
 </extension> 
 
 <extension point="org.eclipse.ui.handlers">
   <handler
		commandId="com.origin.autocode.admin.handlers.codeCopyMyTeamcenterHandler"
		class="cn.com.origin.autocodemanager.handlers.CodeCopyHandler">	
		<visibleWhen>
			<reference definitionId="com.teamcenter.rac.ui.inMainPerspective"/>
		</visibleWhen>	
	</handler>
	<handler
		commandId="cn.com.origin.autocodemanager.handlers.DeleteNodeHandler"
		class="cn.com.origin.autocodemanager.handlers.DeleteNodeHandler">
		  <visibleWhen>
        <reference
              definitionId="cn.com.origin.autocodemanager.inMainView">
        </reference>
     </visibleWhen>
	</handler>	

	<handler
		commandId="cn.com.origin.autocodemanager.handlers.DownListNodeHandler"
		class="cn.com.origin.autocodemanager.handlers.DownListNodeHandler">
       	<activeWhen>
    		<with variable="activePartId">
       			  <equals value="cn.com.origin.autocodemanager.views.AutoCodeListCodeView"/>
    		</with>
		 </activeWhen>
	</handler>	
			<handler
		commandId="cn.com.origin.autocodemanager.handlers.UpListNodeHandler"
		class="cn.com.origin.autocodemanager.handlers.UpListNodeHandler">
       	<activeWhen>
    		<with variable="activePartId">
       			  <equals value="cn.com.origin.autocodemanager.views.AutoCodeListCodeView"/>
    		</with>
		 </activeWhen>
	</handler>	
		
	<handler
		commandId="cn.com.origin.autocodemanager.handlers.ExportNodeHandler"
		class="cn.com.origin.autocodemanager.handlers.ExportNodeHandler">
		  <visibleWhen>
        <reference
              definitionId="cn.com.origin.autocodemanager.inMainView">
        </reference>
     </visibleWhen>
	</handler>	
	
	<handler
		commandId="cn.com.origin.autocodemanager.handlers.ImportNodeHandler"
		class="cn.com.origin.autocodemanager.handlers.ImportNodeHandler">
		  <visibleWhen>
        <reference
              definitionId="cn.com.origin.autocodemanager.inMainView">
        </reference>
     </visibleWhen>
	</handler>	
		<handler
		commandId="cn.com.origin.autocodemanager.handlers.ImportCodeNextIdHandler"
		class="cn.com.origin.autocodemanager.handlers.ImportCodeNextIdHandler">
		  <visibleWhen>
        <reference
              definitionId="cn.com.origin.autocodemanager.inMainView">
        </reference>
     </visibleWhen>
	</handler>			
 </extension> 

 <extension point="org.eclipse.ui.menus">
     <menuContribution
            locationURI="popup:org.eclipse.ui.popup.any">
         <command
               commandId="com.origin.autocode.admin.handlers.codeCopyMyTeamcenterHandler"
               icon="icons/copy_16.png"
               id="com.origin.autocode.admin.handlers.codeCopyMyTeamcenterHandler"
               label="编码复制">
               <visibleWhen>
               <reference
                     definitionId="com.teamcenter.rac.ui.inMainPerspective">
               </reference>
            </visibleWhen>
         </command>
   </menuContribution>
    
   <menuContribution locationURI="toolbar:navigator_Toolbar?after=additions">
      <command commandId="cn.com.origin.autocodemanager.handlers.DeleteNodeHandler"	
		 tooltip="删除" 
		 icon="icons/delete_16.png">
      <visibleWhen>
         <reference  definitionId="cn.com.origin.autocodemanager.inMainView"> </reference>
      </visibleWhen>	
     </command>
     <command commandId="cn.com.origin.autocodemanager.handlers.DownListNodeHandler"	
		 tooltip="下移" 
		 icon="icons/down_16.png">
      <visibleWhen>
         <reference  definitionId="cn.com.origin.autocodemanager.inMainView"> </reference>
      </visibleWhen>	
     </command>
         <command commandId="cn.com.origin.autocodemanager.handlers.UpListNodeHandler"	
		 tooltip="上移" 
		 icon="icons/up_16.png">
      <visibleWhen>
         <reference  definitionId="cn.com.origin.autocodemanager.inMainView"> </reference>
      </visibleWhen>	
     </command>
     <command commandId="cn.com.origin.autocodemanager.handlers.ImportNodeHandler"	
		 tooltip="导入" 
		 icon="icons/import_16.png">
      <visibleWhen>
      <reference  definitionId="cn.com.origin.autocodemanager.inMainView"> </reference>
      </visibleWhen>	
     </command>

<!--
     <command commandId="cn.com.origin.autocodemanager.handlers.ImportCodeNextIdHandler"	
		 tooltip="导入历史" 
		 icon="icons/importhistory_16.png">
      <visibleWhen>
      <reference  definitionId="cn.com.origin.autocodemanager.inMainView"> </reference>
      </visibleWhen>	
     </command>
-->
           <command commandId="cn.com.origin.autocodemanager.handlers.ExportNodeHandler"	
		 tooltip="导出" 
		 icon="icons/export_16.png">
      <visibleWhen>
         <reference  definitionId="cn.com.origin.autocodemanager.inMainView"> </reference>
      </visibleWhen>	
     </command>
  </menuContribution>
 </extension>  
</plugin>
