开发工具Eclipse已经出3.4.1版本了,今天终于可以尝试一下新鲜,虽然在3.3.2的版本上面增加了P2和dropins,但是依然还有很多Bug,花费了半天时间,多少弄明白了些,在网上Google了一下,遇到相同问题的开发朋友有一箩筐,现在写在自己博客,提示自己别忘了哦,呵呵!
Eclipse 3.4.1 下载地址:
前版本通过links和updatesite方式安装和更新插件,现版本已经废掉了links安装,转由dropins安装,link文件地址不变;updatesite安装没有前版本灵活了,只能默认安装到到eclipse目录,不便于管理;另外,dropins安装增强了功能,为unzipfiles安装插件提供了不少便利,英文原文如下:
DropinsProvisioning operations should generally occur using the p2 UI, or by invoking
The Eclipse platform ships with a default watched directory called
Supported dropins formatsThe dropins folder supports a variety of layouts, depending on the scale of your application and the desired degree of separation of its parts. The simplest layout is to just drop plug-ins in either jar or directory format directly into the dropins folder:
eclipse/
dropins/
org.eclipse.core.tools_1.4.0.200710121455.jar
org.eclipse.releng.tools_3.3.0.v20070412/
plugin.xml
tools.jar
... etc ...
...
You can also drop in the traditional Eclipse application or extension layout directly in the dropins folder:
eclipse/
dropins/
eclipse/
features/
plugins/
If you have various different components being dropped in, and you want to keep them separate, you can add an additional layer of folders immediately below the dropins folder that contain traditional Eclipse extensions:
eclipse/
dropins/
emf/
eclipse/
features/
plugins/
gef/
eclipse/
features/
plugins/
... etc ...
Finally, you can add link files as in the traditional Eclipse links folder:
eclipse/
dropins/
emf.link
另外,当你用本地方法updatesite安装时,会发现eclipse会自动添加更新缺少的和旧版本的插件包,当然是在联网的条件下哦,很方便;还有就是P2提高了插件下载安装速度,网上介绍,有点像“BT”,如果发现的插件已经不存在了,还能够更新,BT建立在用户机子上,但是P2用的共享服务器,不影响自己的网速。
安装插件的时候,发现用updatesite方式安装,只能默认安装到Eclipse目录,虽然有插件管理器,但是还是很不便的,给插件安装分类是最好的方式;虽然有dropins为插件安装带来方便,但是很不灵敏,启动eclipse后插件依然没有加载进来,用删除configuration目录下org.eclipse.update文件夹也没有用,花了我2个小时,终于正明白了,在这上面和3.3.2版本还有些不一样,我除config.ini文件删除configuration目录下所有文件,居然启动Eclipse出错,捣鼓了一番,原来org.eclipse.equinox.simpleconfigurator这个文件夹还不能删除,经过网上查找,发现和P2有关,哦,原来如此,呵呵,觉得有些蹊跷。
安装插件后,我卸掉插件,比如Pydev插件,嘿,我发现,居然启动还在,网上也没有查到,最后,我觉得前面那个org.eclipse.equinox.simpleconfigurator文件夹有些问题,打开发现bundles.info这个文件里面记录了所有已经安装使用的插件,这里居然还有个缓存,呵呵,找到pydev插件,删除记录,结果搞定。终于不会按照网友的说法,删除link文件后还要删除插件文件了,要是这样,3.4.1版本带来的方便岂不是被忽略了...
补充:
在eclipse 3.4.1中,不管是通过updatesite和dropins方式安装插件,都会出现卸载插件后还能加载的情况,除非删除插件源程序,原因就是configuration/org.eclipse.equinox.simpleconfigurator下面的记录要删除才能解决,用删除configuration/org.eclipse.update这个目录也没有用,但是别忘了,如果加载新插件或者重新再加载卸载的插件的时候,还必须得删除configuration/org.eclipse.update这个目录,觉得3.4.1这个版本还是有些怪怪的。