EMF和GEF

EMF和GEF分别是eclipse下的两个子项目,主要是用于桌面程序的开发。

EMF(Eclipse Modeling Framework):
EMF is a modeling framework and code generation facility for building tools and other applications based on a structured data model. From a model specification described in XMI, EMF provides tools and runtime support to produce a set of Java classes for the model, a set of adapter classes that enable viewing and command-based editing of the model, and a basic editor. Models can be specified using annotated Java, XML documents, or modeling tools like Rational Rose, then imported into EMF. Most important of all, EMF provides the foundation for interoperability with other EMF-based tools and applications.

GEF(Graphical Editing Framework):
The Graphical Editing Framework (GEF) allows developers to create a rich graphical editor from an existing application model. GEF consists of 2 plug-ins. The org.eclipse.draw2d plug-in provides a layout and rendering toolkit for displaying graphics. The developer can then take advantage of the many common operations provided in GEF and/or extend them for the specific domain. GEF employs an MVC (model-view-controller) architecture which enables simple changes to be applied to the model from the view.

GEF is completely application neutral and provides the groundwork to build almost any application, including but not limited to: activity diagrams, GUI builders, class diagram editors, state machines, and even WYSIWYG text editors. The Logic Example, one of the provided examples, is pictured below.
好了,准备工作完成后我们就开始安装了,大家看我是怎么安装的,我的eclipse是安装在D:\Eclipse目录下的,我在Eclipse文件夹下面建了三个文件夹,分别命名问EMFGEF,VE_SDK,现在我们要做的就是把我们刚刚下载下来的三个文件分别解压缩到这三个文件里面,即把emf-sdo-runtime-2.2.0解压到EMF里面,依次类推。现在打开我们新建的三个文件夹看看,是不是每个文件夹里面都多了一个eclipse文件夹,如果有的话就证明你已经接近成功了,注:(没有的话也不要紧,自己手动在三个文件夹里分别新建三个eclipse文件夹,注意文件夹必须以eclipse命名!!再把自己解压出来的东西中的features和plugins两个文件夹依次一一对应的移动到我们新建的三个eclipse文件夹里面。) 接下来我们在我们的eclipse的安装目录下D:\Eclipse\eclipse下面新建一个文件夹,命名为links,注意文件名一定要为links,接下来我们在links文件夹下面新建三个后缀为.link文本文件,我建的是EMF.link,GEF.link,和VE_SDK.link,在三个文本文件里分别出入如下语句: path=D:\\Eclipse\\EMF path=D:\\Eclipse\\GMF path=D:\\Eclipse\\VE_SDK 保存即可! 接下来启动eclipse,新建一个java工程,完成后点击菜单栏上的新建按钮,看,下拉菜单中是不是多了Visual Editor选项!这个你也可以在工程文件上面单击右键,看,弹出的菜单里边是不是也有这个选项呢? 大功告成! 安装插件后在窗口— > 首选项 中看不到 ① 把 eclipse\configuration\org.eclipse.update 删除掉。出现这种情况的原因是在你安装新的插件以前你启动过 eclipse ,在 org.eclipse.update 文件夹下记录了插件的历史更新情况,它只记忆了以前的插件更新情况,而你新安装的插件它并不记录,所以删除掉这个文件夹就可以解决这个问题了,不过删除掉这个文件夹后, eclipse 会重新扫描所有的插件,此时再重新启动 eclipse 时可能会比刚才稍微慢点。 ② 创建一个 Eclipse 快捷启动方式,在目标栏中加入一个“ 空格— clean ”参数,注意不要把— clean 前面的空格漏掉。或者在菜单【开始】—【运行】中启动你的 eclipse 时加上— clean 参数,如我的可以在“运行”中输入: F:\hongjun\eclipse\eclipse.exe –clean 如果启动 eclipse 后找到你所安装的新插件后,在下次启动之前把参数 clean 去掉就可以了。 ③ 如果 Eclipse 启动找不到插件的话,解决办法是在 eclipse\configuration 目录下的 config.ini 文件中加入一行 : osgi.checkConfiguration=true 这样它就会寻找并安装插件 , 找到插件后可以把该行注释掉 ( 去掉 ), 这样以后每次启动就不会因为寻找插件而显得慢了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值