开发版本
Eclipse4.5+Teamcenter12
xml菜单配置文件,里面有菜单栏,工具栏,快捷键

常用的就三个
Menus
commands
handlers
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> <plugin> <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=additions"> <menu label="Sample Menu" mnemonic="M" id="com.teamcenter.project.menus.sampleMenu"> <command commandId="com.teamcenter.project.commands.sampleCommand" mnemonic="S" id="com.teamcenter.project.menus.sampleCommand"> </command> </menu> </menuContribution> </extension> <extension point="org.eclipse.ui.commands"> <command name="Sample Command" id="com.teamcenter.project.commands.sampleCommand"> </command> </extension> <extension point="org.eclipse.ui.handlers"> <handler commandId="com.teamcenter.project.commands.sampleCommand" class="com.teamcenter.project.handlers.SampleHandler"> </handler> </extension> </plugin>
修改菜单名字

修改下拉菜单命令的名字

两处ID要一致,
要唯一不能和别的重复,bom名+类名

菜单的ID不能重复,用项目名字就行了

主菜单要与下拉菜单产生关系

Class所对应的就是要处理的java类


修改一下

修改之后再做一个导出

只要修改菜单xml文件,就要在重新运行bat文件注册一下
打开tc

Caesar卢尚宇
2021年5月5日