<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<!-- point 属性定义扩展点-->
<extension point="org.eclipse.ui.commands">
<command
name="二级菜单(1)"
id="com.teamcenter.project.commands.menuOne">
</command>
<command
name="二级菜单(2)"
id="com.teamcenter.project.commands.menuTwo">
</command>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
commandId="com.teamcenter.project.commands.menuOne"
class="com.teamcenter.project.handlers.menuOneHandler"><!--点击 二级菜单(1) 后执行此处 class 中的代码-->
</handler>
<handler
commandId="com.teamcenter.project.commands.menuTwo"
class="com.teamcenter.project.handlers.menuTwoHandler"><!--点击 二级菜单(2) 后执行此处 class 中的代码-->
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<!-- locationURI 属性指定菜单扩展的位置 -->
<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=additions">
<menu label="Tc菜单" id="com.teamcenter.project.menus.topLevel">
<menu label="一级菜单" id="com.teamcenter.project.menus.oneLevel">
<command
commandId="com.teamcenter.project.commands.menuOne"
id="com.teamcenter.project.menus.menuOne">
</command>
<command
commandId="com.teamcenter.project.commands.menuTwo"
id="com.teamcenter.project.menus.menuTwo">
</command>
</menu>
</menu>
</menuContribution>
</extension>
</plugin>
Teamcenter 插件开发 plugin.xml 入门
最新推荐文章于 2025-05-19 15:59:18 发布