﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-超越自我-文章分类-Eclipse plugin Extension points扩展点</title><link>http://www.blogjava.net/jame-liu/category/3921.html</link><description>一切皆有可能</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 15:27:49 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 15:27:49 GMT</pubDate><ttl>60</ttl><item><title>添加自己的扩展点</title><link>http://www.blogjava.net/jame-liu/articles/17994.html</link><dc:creator>jame</dc:creator><author>jame</author><pubDate>Thu, 03 Nov 2005 10:18:00 GMT</pubDate><guid>http://www.blogjava.net/jame-liu/articles/17994.html</guid><wfw:comment>http://www.blogjava.net/jame-liu/comments/17994.html</wfw:comment><comments>http://www.blogjava.net/jame-liu/articles/17994.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jame-liu/comments/commentRss/17994.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jame-liu/services/trackbacks/17994.html</trackback:ping><description><![CDATA[1.需求<BR><IMG height=314 alt=core1.JPG src="http://www.blogjava.net/images/blogjava_net/jame-liu/upload/core1.JPG" width=484 border=0><BR><BR>现在有plugin A,plugin B,plugin C,plugin Core 4个插件,要求设计plugin A,plugin B,plugin C 采用一个注册机制,<BR>当plugin Core 运行时候自动加载plugin A,plugin B,plugin C 的module接口 ,将其自动注册到plugin Core 的<BR>ProjectModuleViewer窗口中,并可以对其操作.<BR>由于workbench 采用的是LAZY模式,只有对plugin A,plugin B,plugin C各自运行才执行各自的插件,所以在同时<BR>runtime中无法获得他们的module.<BR>故采用插件的新建扩展点<BR>&lt;extension-point&nbsp; name="myextension"&nbsp; id="myextension"/&gt;<BR>plugin A,plugin B,plugin C分别实现这个扩展点.<BR>ProjectModuleViewer窗口自动装入扩展点.<img src ="http://www.blogjava.net/jame-liu/aggbug/17994.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jame-liu/" target="_blank">jame</a> 2005-11-03 18:18 <a href="http://www.blogjava.net/jame-liu/articles/17994.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Eclipse IDE及其接口关系</title><link>http://www.blogjava.net/jame-liu/articles/16111.html</link><dc:creator>jame</dc:creator><author>jame</author><pubDate>Thu, 20 Oct 2005 04:12:00 GMT</pubDate><guid>http://www.blogjava.net/jame-liu/articles/16111.html</guid><wfw:comment>http://www.blogjava.net/jame-liu/comments/16111.html</wfw:comment><comments>http://www.blogjava.net/jame-liu/articles/16111.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jame-liu/comments/commentRss/16111.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jame-liu/services/trackbacks/16111.html</trackback:ping><description><![CDATA[Eclipse由于它的灵活的plugin技术和扩展技术,使很多公司都纷纷定制和开发自己Eclipse插件的开发系统.<BR>这篇文章首先对Eclipse的IDE及其接口进行详细的介绍.. 待续<img src ="http://www.blogjava.net/jame-liu/aggbug/16111.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jame-liu/" target="_blank">jame</a> 2005-10-20 12:12 <a href="http://www.blogjava.net/jame-liu/articles/16111.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于MultiPageEditorActionBarContributor</title><link>http://www.blogjava.net/jame-liu/articles/16093.html</link><dc:creator>jame</dc:creator><author>jame</author><pubDate>Thu, 20 Oct 2005 03:08:00 GMT</pubDate><guid>http://www.blogjava.net/jame-liu/articles/16093.html</guid><wfw:comment>http://www.blogjava.net/jame-liu/comments/16093.html</wfw:comment><comments>http://www.blogjava.net/jame-liu/articles/16093.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/jame-liu/comments/commentRss/16093.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/jame-liu/services/trackbacks/16093.html</trackback:ping><description><![CDATA[MultiPageEditorActionBarContributor是MultiPageEditor的actions,当切换Editor 和Page的时候要自己更新toolbar,menu,statusbar等action或状态的.<BR>由于我在单独的Editor测试这些地方(toolbar,menu,statusbar等)都没有问题.当时将这些单独的Editor放到MultiPageEditor中这些地方就很不正常.<BR>一方面我不想改变单独editor的各自的Contributor;另一方面切换这些Editor 和Page的时候要到当前Editor的toolbar,menu.<BR>初始化和dispose.<BR>public MultiEditorContributor() {<BR>&nbsp;&nbsp;super();<BR>&nbsp;&nbsp;designContributor=new DesignEditorContributor();<BR>&nbsp;&nbsp;sourceContributor=new SourceEditorContributor();<BR>otherContributor=new OtherEditorContributor ();<BR>&nbsp;}<BR>&nbsp;protected DesignEditorContributor designContributor=null;<BR>&nbsp;protected SourceEditorContributor sourceContributor=null;<BR>protected <FONT color=#000000>OtherEditorContributor</FONT> otherContributor=null;<BR>&nbsp;protected MultiEditorPart multiPageEditor=null;<BR>&nbsp;public void init(IActionBars bars) {<BR>&nbsp;&nbsp;if(bars != null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;if(designContributor!=null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;designContributor.init(bars,getPage());<BR>&nbsp;&nbsp;&nbsp;if(sourceContributor!=null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;sourceContributor.init(bars,getPage());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp; if(otherContributor!=null)<BR>&nbsp;&nbsp;&nbsp;&nbsp;otherContributor.init(bars,getPage());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;}<BR>&nbsp;public void dispose(){<BR>&nbsp;&nbsp;super.dispose();<BR>&nbsp;&nbsp;if(designContributor!=null)<BR>&nbsp;&nbsp;&nbsp;designContributor.dispose();<BR>&nbsp;&nbsp;if(sourceContributor!=null)<BR>&nbsp;&nbsp;&nbsp;sourceContributor.dispose();<BR>&nbsp;}<BR>if(otherContributor!=null)<BR>&nbsp;&nbsp;&nbsp;otherContributor.dispose();<BR>&nbsp;}<BR><BR>记录当前editor,如果相同返回/否则刷新<BR>private IEditorPart currentEditorPart=null;<BR>&nbsp;public void setActivePage(IEditorPart activeEditor) {<BR>&nbsp; ......<BR>}<img src ="http://www.blogjava.net/jame-liu/aggbug/16093.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/jame-liu/" target="_blank">jame</a> 2005-10-20 11:08 <a href="http://www.blogjava.net/jame-liu/articles/16093.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>