Tuesday April 11, 2006 Project Extensions (natures) Wizard for NetBeans 5.0
Project Extensions plugin is implementation of project natures for NetBeans 5.0. Project natures extends functionality of NetBeans projects. Currently it consists of these features:
To create new project extension is very simple with Project Extension Wizard. It will be demonstrated on creating RMI project extension for J2SE project. The Java RMI (Remote Method Invocation) system allows an object running in one Java Virtual Machine (VM) to invoke methods on an object running in another Java VM. It is necessary to generate stub and skeleton classes using rmic compiler to establish connection between client and server parts. The rmic compiler must to be run on compiled class of implementation of RMI object.
At first we create simple J2SE project with modified build script. We add two new ant's tasks to main build script (build.xml in root folder of project) :
<target name = "-post-compile" depends = "rmi-post-compile"/>
<target name = "rmi-post-compile" depends = "-do-compile">
<property name = "remote.impl.filter" value = "**/*RemoteImpl.class"/>
<rmic base = "${build.classes.dir}" includes = "${remote.impl.filter}"/>
</target>
The -post-compile ant task is empty because the project extension wizard doesn't copy the standard project ant tasks to the project extension template. We can to create implementation of a RMI service and test it now. We expect that everything is alright.
Now it's time start to create a project extension using project extension wizard:
In the second Panel select the project with modified build script and clicked to Next button. After clicking to Next button Customize Project Extension Panel is shown.
The wizard automatically parses the modified build script and shows all new targets. The -post-compile is not added to table with available ant tasks because more project extensions cannot override the same target. Only dependencies between targets are stored to dependencies table.
If we assign to ant target display name the target will be represented by action in popup of project extension node in Project Extensions window. There is not necessary to change dependencies between targets. It will be usefull for example when dependencies between different Project extensions are defined. Click to next button you can specify classpath for the project extension. The libraries are got from Library manager.
RMI doesn't need extra library on the classpath. Click to Next button to show the last panel of wizard. There can be specified the name, display name, icon, post create action and customizer. The post create action is invoked after adding project extension to project. It is useful for example when it is necessary to initialize some properties. The customizer panel is shown in JDialog when is performed Properties action from project extension node.
After clicking to "Finish" button the Project extension template will be generated.
rmiext.xml - descriptor
<featuredefs>
<featuredef name = "RMICompiler"customizerClassRef = "rmiext-RmiextCustomizer.instance">
<title>RMICompiler</title>
<icon>rmiext/rmi.png</icon>
<project>
<type>org.netbeans.modules.java.j2seproject</type>
</project>
<actions>
<anttask>
<name>rmi-post-compile</name>
<title>RMI Compiler</title>
</anttask>
</actions>
<dependsOn>
<anttask>rmi-post-compile</anttask>
<featureName>org.netbeans.modules.java.j2seproject</featureName>
<anttaskInFeature>-do-compile</anttaskInFeature>
</dependsOn>
<dependsFrom>
<anttask>rmi-post-compile</anttask>
<featureName>org.netbeans.modules.java.j2seproject</featureName>
<anttaskInFeature>-post-compile</anttaskInFeature>
</dependsFrom>
<usedtargets>
<usedtarget>rmi-post-compile</usedtarget>
</usedtargets>
<velocityTemplate vmFile = "Rmiext.vm"/>
</featuredef>
</featuredefs>
rmiext.vm - velocity template
<target name="rmi-post-compile">
<property name="remote.impl.filter" value="**/*RemoteImpl.class"/>
<rmic base="${build.classes.dir}" includes="${remote.impl.filter}"/>
</target>
And references are added to layer.xml
<filesystem>
<folder name = "velocity">
<folder name = "build">
<file name = "Rmiext.xml"url = "Rmiext.xml"/>
</folder >
<folder name = "customizers">
<file name = "rmiext-RmiextCustomizer.instance"/>
</folder >
<folder name = "templates">
<file name = "Rmiext.vm" url = "Rmiext.vm"/>
</folder>
</folder>
</filesystem>
The project extension was created. No line of of code was written. So we can try to run the module. And Test the nature. The Nature can be added to project from popup in Project Extensions window.
The project extension node is shown bellow.
The RMIC compile is not run either on project building or from RMI Project extension popup.
This wizard is available in NBXdoclet Modules Development plugin. The plugin available on my update center. The NBXdoclet Modules Development plugin depends on NetBeans Module Development Environment U1.
Posted by xzajo ( Apr 11 2006, 11:09:16 AM CEST ) Permalink Comments [19]
Posted by bernd on April 18, 2006 at 07:24 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:26 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:26 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:27 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:28 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:28 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:29 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:29 AM CEST #
Posted by 传奇私服 on April 11, 2007 at 08:29 AM CEST #
Posted by 水无痕 on July 21, 2007 at 05:17 AM CEST #
http://yiligs.co.sonhoo.com/company_web/index-161923.html">杭州防水补漏|杭州房屋补漏|杭州屋顶补漏
Posted by 杭州钟点工 on August 22, 2007 at 08:34 AM CEST #
Project Extensions plugin is implementation of project natures
Posted by runescape money on November 10, 2007 at 09:23 AM CET #
The best of luck! Best wishes! Best regards!
http://www.bjseek.com.cn
http://www.bjxlzx.cn
http://www.sense.com.cn
http://jglsx.blog.sohu.com/
http://blog.china.alibaba.com/blog/jglsx.html
http://jglsx.blog.hexun.com/
http://tw.netsh.com/eden/blog/ctl_eden_blog.php?iBlogID=2610970
http://tw.netsh.com/eden/blog/ctl_eden_blog.php?iBlogID=2632783
http://blog.soufun.com/blog_12178456.html
http://blog.china-pub.com/blog.asp?name=jlb148140960
http://www.phpchina.com/38743
http://hexun.com/jglsx/default.html
http://www.xiongcaocao.com/?sid=116
http://jlb999.blog.163.com/
http://jjllbb.eomoo.com/user18/jlb148140960/index.shtml
http://hexun.com/xicao1/default.html
http://hexun.com/xicao3/default.html
http://hexun.com/xicao6/default.html
http://hexun.com/xicao9/default.html
http://hexun.com/xicao2/default.html
http://hexun.com/xicao7/default.html
http://hexun.com/xicao4/default.html
http://hexun.com/xicao5/default.html
http://hexun.com/xicao8/default.html
http://hexun.com/zwwsl/default.html
http://xicao6.blog.hexun.com/
http://xicao7.blog.hexun.com/
http://xicao8.blog.hexun.com/
http://xicao9.blog.hexun.com/
http://zwwsl.blog.hexun.com/
http://xicao1.blog.hexun.com/
http://xicao2.blog.hexun.com/
http://xicao3.blog.hexun.com/
http://xicao4.blog.hexun.com
http://xicao5.blog.hexun.com
http://tzgoogle.blog.hexun.com
http://hexun.com/tzgoogle/default.html
http://blog.ccidnet.com/blog-htm-uid-71265.html
http://hexun.com/baom/default.html
http://baom.blog.hexun.com
http://www.0576w.cn/
http://www.0576w.cn/catalog.asp?cate=1
http://www.0576w.cn/catalog.asp?cate=2
http://www.0576w.cn/catalog.asp?cate=3
http://www.0576w.cn/catalog.asp?cate=5
http://www.0576w.cn/catalog.asp?cate=6
http://www.0576w.cn/post/google.html
Posted by 数据恢复 on February 14, 2008 at 01:48 AM CET #
http://www.wowgolds.co.uk wow gold http://www.wowgolds.co.uk cheap wow gold http://www.wowgolds.co.uk buy wow gold http://www.wowgolds.co.uk world of warcraft gold http://www.wowgolds.co.uk wow http://www.wowgolds.co.uk world of warcraft http://www.wowgolds.co.uk/wow-gold.html wow gold http://www.wowgolds.co.uk/warrior.html WoW Warrior http://www.wowgolds.co.uk/hunter.html WoW Hunter http://www.wowgolds.co.uk/rogue.html WoW Rogue http://www.wowgolds.co.uk/paladin.html WoW Paladin http://www.wowgolds.co.uk/shaman.html WoW Shaman http://www.wowgolds.co.uk/priest.html WoW Priest http://www.wowgolds.co.uk/mage.html WoW Mage http://www.wowgolds.co.uk/druid.html WoW Druid http://www.wowgolds.co.uk/warlock.html WoW Warlock http://www.powerleveling2.cn power leveling http://www.powerleveling2.cn powerleveling http://www.wowpowerleveling2.cn wow power leveling http://www.wowpowerleveling2.cn wow powerleveling http://www.wowpro.cn wow guides http://www.wowmmo.cn wow tips http://ggtop.nbatop.com google排名 http://ggtop.nbatop.com google左侧排名 http://ggtop.nbatop.com google排名服务 http://www.baidupaiming.net 百度推广 http://www.baidupaiming.net 百度排名 http://www.fzqsnet.cn 网站推广 http://www.thebiz8.com 商业吧 http://www.thebiz8.com/jichuang.html 机床 http://www.thebiz8.com/leddeng.html LED灯 http://www.thebiz8.com/dianchi.html 电池 http://www.thebiz8.com/suliao.html 塑料 http://www.thebiz8.com/shexiangji.html 摄像机 http://www.thebiz8.com/yimin.html 移民 http://www.thebiz8.com/jiachun.html 甲醇 http://www.thebiz8.com/ranliao.html 染料 http://www.0591qs.cn 福州热线 http://www.sportblog.org.cn 体育博客 http://www.stockblog.org.cn 股票博客 http://www.gameblog.org.cn 游戏博客 http://www.cheap-wow-gold.org.cn 魔兽博客 http://www.excamtest.cn 考试博客 http://www.carblog.org.cn 汽车博客 http://www.houseblog.org.cn 房产博客 http://www.pcblog.org.cn 电脑博客 http://powerlin518.iblog.com powerlin518 http://www.xcelwebdesign.com logo design http://www.xcelwebdesign.com website design http://www.xcelwebdesign.com web design http://www.shangbiaodesign.cn 商标设计
Posted by power leveling on March 20, 2008 at 04:16 PM CET #
We will always support the good things:
<A href="http://www.storeingame.com">wow gold</A>
<A href="http://www.storeingame.com/aoc-gold.htm">aoc gold</A>
<A href="http://www.storeingame3.cn/Machine.htm">Printing Machine</A>
<A href="http://www.storeingame3.cn/">Printing Machine</A>
Posted by lvbugai on July 09, 2008 at 09:01 AM CEST #
We will always support the good things
[URL=http://www.storeingame.com]wow gold[/URL]
[URL=http://www.storeingame.com/aoc-gold.htm]aoc gold[/URL]
[URL=http://www.storeingame3.cn]Printing Machine[/URL]
[URL=http://www.storeingame3.cn/Machine.htm]Printing Machine[/URL]
Posted by lvbugai on July 09, 2008 at 09:02 AM CEST #
[url=http://www.molybdenum-tungsten.com]tungsten carbide[/url]
[url=http://www.66773388.com]nike shoes[/url]
[url=http://www.66773388.com]jordan shoes[/url]
[url=http://www.66773388.com]prada shoes[/url]
[url=http://www.66773388.com]Gucci shoes[/url]
[url=http://www.66773388.com/xw_159.htm]true religion jeans [/url]
[url=http://www.kintochina.cn]flexible connectors[/url]
[url=http://www.3721call.cn]包装机械[/url]
[url=http://www.3721call.cn/news.htm]印刷机械[/url]
Posted by nike shoes on July 24, 2008 at 04:11 AM CEST #
<a href="http://gohan.aodiego.net/asahi/auto/">サプリメント健康食品の通販ならアサヒフードアンドヘルスケア</a> <a href="http://www.codiego.com/suntory/auto/">サントリーの健康食品、サプリメント</a>
Posted by ken on August 03, 2008 at 06:45 AM CEST #
http://sunnyren.weblog.com/
this blog introduces jewelry products and fashion jewelry
Posted by fashion jewelry on October 31, 2008 at 06:32 AM CET #