teamcenterRcp开发之创建rcp项目

您所在的位置:网站首页 teamcenter缓存文件夹 teamcenterRcp开发之创建rcp项目

teamcenterRcp开发之创建rcp项目

2023-12-12 11:17| 来源: 网络整理| 查看: 265

1:在eclipse中创建 Plug-in project 插件项目

勾选Create a plug-in using...,点击Finish

2:在rcp项目中引入常用的teamcenter插件包,在eclipse中点击window--Preferences,搜索Plug-in Development

引用常用的几个tc插件包

3:创建一个handler,包名com.rcp.demo.handler,类名DemoHandler继承AbstractHandler接口

代码如下:

package com.rcp.demo.handler; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import com.teamcenter.rac.util.MessageBox; public class DemoHandler extends AbstractHandler{ @Override public Object execute(ExecutionEvent arg0) throws ExecutionException { // TODO Auto-generated method stub MessageBox.post("my handler1", "提示", MessageBox.INFORMATION); return null; } }

plugin.xml文件内容如下:

将创建的包添加到Imported packages

点击Export Wizard导出插件项目,选则导出路径

将导出的jar包放到teamcenter的plugin文件夹下,重启teamcenter,效果如下

 

注意:如果效果没出来的话,可以清下缓存,注册一下代码

 

 

 

PS:欢迎关注我的技术个人公众号:PLMCODE,记录个人学习道路上会遇到的知识点(RCP开发,SOA开发,ITK开发,AWC开发,WEB开发),希望我们可以相互学习。

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3