<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>N, Varun » Tips|Tricks</title>
	
	<link>http://nbguru.wordpress.com</link>
	<description>"Whatever I have interest in, I am able to develop passion for it"</description>
	<lastBuildDate>Fri, 24 Jul 2009 07:35:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain="nbguru.wordpress.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
<image>
		<url>http://www.gravatar.com/blavatar/c725bd8007527dd8e5c6921b14a73b6c?s=96&amp;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>N, Varun » Tips|Tricks</title>
		<link>http://nbguru.wordpress.com</link>
	</image>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/nbguru-tat" type="application/rss+xml" /><feedburner:emailServiceId>nbguru-tat</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:browserFriendly></feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>taT | Hacking Modules..</title>
		<link>http://nbguru.wordpress.com/2009/07/10/tat-hacking-modules-16/</link>
		<comments>http://nbguru.wordpress.com/2009/07/10/tat-hacking-modules-16/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 13:33:36 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[Community Docs]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=1942</guid>
		<description><![CDATA[Ever wondered, apart from extending the NetBeans IDE, or some application based on NetBeans Platform. What else can be done with the module?
Brief Overview
Well, NetBeans IDE provides Module Development Support by providing 4 kinds of Project Templates;

Module
Module Suite
Library Wrapper Module
NetBeans Platform Application

I have some knowledge of the first two, so we will stick to them [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1942&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ever wondered, apart from extending the NetBeans IDE, or some application based on NetBeans Platform. What else can be done with the module?</p>
<h3>Brief Overview</h3>
<p>Well, NetBeans IDE provides <a href="http://apisupport.netbeans.org/" target="_blank">Module Development Support</a> by providing 4 kinds of Project Templates;</p>
<ol>
<li>Module</li>
<li>Module Suite</li>
<li>Library Wrapper Module</li>
<li>NetBeans Platform Application</li>
</ol>
<p>I have <a href="http://platform.netbeans.org/tutorials/nbm-glossary.html" target="_blank">some knowledge</a> of the first two, so we will stick to them for the rest of this post. So, lets have a look at the simplistic module structure;</p>
<p><a href="http://nbguru.files.wordpress.com/2009/07/module-structure.jpg"><img class="alignnone size-full wp-image-1943" title="Module Structure" src="http://nbguru.files.wordpress.com/2009/07/module-structure.jpg?w=230&#038;h=218" alt="Module Structure" width="230" height="218" /></a></p>
<p>This is what you see when you expand the Project node in Files View. We will focus on <strong>platform.properties</strong>, <strong>project.xml</strong>. If you switch to the Project View, you would see the files with following names, visible under Important Files node.</p>
<h4>NetBeans Platform Config</h4>
<p>So, that&#8217;s basically the logical view of the file <strong>platform.properties</strong>. In the past, I have written some pretty useful tips and Tricks (<a href="http://wiki.netbeans.org/NBCDTipsAndTricks#section-NBCDTipsAndTricks-Platform" target="_blank">contributed</a> to NetBeans Community Docs) based on this file;</p>
<ol>
<li><a href="http://wiki.netbeans.org/TaT_ConfigClustersAndModules" target="_blank">Configure Clusters and Modules</a></li>
<li><a href="http://wiki.netbeans.org/TaT_ManageNetBeansPlatforms" target="_blank">Managing NetBeans Platforms</a></li>
</ol>
<h4>Project Metadata</h4>
<p>This is the logical view of the file <strong>project.xml</strong>.<strong> </strong>There&#8217;s one more useful tips and Tricks (contributed), that&#8217;s based on this file, which lets you <a href="http://wiki.netbeans.org/TaT_UsingGSFByMakingFriends" target="_blank">add your module as friends</a> to those modules, if you want your module to depend on the specification version of the same.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/07/nb-ide-67-splash-screen.jpg"><img class="alignnone size-medium wp-image-1967" title="NetBeans IDE 6.7 (Click to enlarge)" src="http://nbguru.files.wordpress.com/2009/07/nb-ide-67-splash-screen.jpg?w=300&#038;h=186" alt="NetBeans IDE 6.7 (Click to enlarge)" width="300" height="186" /></a></p>
<h3>Playing Tricks..</h3>
<p>I will be making use of <strong>NetBeans 6.7 IDE</strong>. Although, these tricks should work well with NetBeans 6.x IDE. So, lets answer the question I asked in the beginning.. Generally, when you create <strong>Module</strong> project, you get an option to either create it as <span style="text-decoration:underline;">Standalone Module</span> or <span style="text-decoration:underline;">Add to Module Suite</span>.</p>
<h4>Standalone Module</h4>
<p style="padding-left:30px;">When you choose this option, you also get an option to select <strong>NetBeans Platform</strong> of your choice, along with <strong>Manage..</strong> button. If you want to know more about that, refer this <a href="http://wiki.netbeans.org/TaT_ManageNetBeansPlatforms" target="_blank">contribution</a>.</p>
<p>Suppose, I choose <span style="text-decoration:underline;">NetBeans 6.5 Build</span> (added with name as <strong>65</strong> in Platform Manager) as Platform and move ahead. I would be able to use 6.7 IDE to create module, targeted for NetBeans 6.5 IDE. The module&#8217;s <strong>platform.properties</strong> looks like this;</p>
<pre>nbplatform.active=65</pre>
<p>This would enable the running IDE to achieve the desired result, as mentioned above. Now, running the module will ofcourse launch NetBeans 6.5 IDE as <span style="text-decoration:underline;">Target Instance</span> to see how your module works. This process might be slow, as you&#8217;re running full-fledged 6.5 IDE.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2008/11/nb65-booting-with-bday-stamp.jpg"><img class="size-medium wp-image-1181 aligncenter" title="NetBeans 6.5 boots with a b'day stamp on splash screen!" src="http://nbguru.files.wordpress.com/2008/11/nb65-booting-with-bday-stamp.jpg?w=300&#038;h=189" alt="NetBeans 6.5 boots with a b'day stamp on splash screen!" width="300" height="189" /></a></p>
<p>If your module doesn&#8217;t depend on clusters other than platform (which is by default). Then, you can tweak the file as follows;</p>
<pre><strong>enabled.clusters=\
 platform</strong>
nbplatform.active=65</pre>
<p>These clusters are <a href="http://wiki.apidesign.org/wiki/NetBeans_Runtime_Container" target="_blank">bare-minimum essentials</a>, that are enabled by default when you create the <strong>NetBeans Platform Application </strong>project using 6.5/6.7 IDE. The property <strong>enabled.clusters</strong> helps to <a href="http://wiki.netbeans.org/TaT_ConfigClustersAndModules" target="_blank">enable only those clusters</a> which are necessary to run this module.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/07/nb-platform-65-splash-screen.jpg"><img class="size-medium wp-image-1966 aligncenter" title="NetBeans Platform Application (Click to enlarge)" src="http://nbguru.files.wordpress.com/2009/07/nb-platform-65-splash-screen.jpg?w=300&#038;h=189" alt="Splash Screen for empty NetBeans Platform Application" width="300" height="189" /></a></p>
<p>Now, run your module and it will look like you&#8217;re running a NetBeans Platform Application having a single user-defined module. Here&#8217;s how module&#8217;s <strong>project.xml</strong> looks like;</p>
<pre>&lt;project xmlns="http://www.netbeans.org/ns/project/1"&gt;
   &lt;type&gt;org.netbeans.modules.apisupport.project&lt;/type&gt;
   &lt;configuration&gt;
      &lt;data xmlns="http://www.netbeans.org/ns/nb-module-project/3"&gt;
          &lt;code-name-base&gt;code.name.base.of.your.module&lt;/code-name-base&gt;
          <strong>&lt;standalone/&gt;</strong>
          &lt;module-dependencies&gt;
           &lt;!-- Here are your module dependencies.. --&gt;
          &lt;/module-dependencies&gt;
          &lt;public-packages/&gt;
      &lt;/data&gt;
   &lt;/configuration&gt;
&lt;/project&gt;</pre>
<p>Note the bold-faced tag <strong>&lt;standalone /&gt;</strong>, this tells the NetBeans IDE that your module is not part of any module suite. Its a standalone module, as you created.<strong><br />
</strong></p>
<h4>Add to Module Suite</h4>
<p style="padding-left:30px;">If you decide to go with this option, you would then browse the filesystem to find the appropriate <strong>Module Suite</strong> project and then, move ahead.</p>
<p>In case of <strong>Module Suite</strong> projects, the <span style="text-decoration:underline;">enabled.clusters</span> property automatically occurs/disappears, when you check/uncheck the modules and/or clusters from its <span style="text-decoration:underline;">Project Properties Wizard</span>.</p>
<p>Note that the module, that becomes part of the suite, would use only those clusters which the suite has enabled. Along with that, <span style="text-decoration:underline;">suite-private.properties</span> file is added under <span style="text-decoration:underline;">/nbproject/private</span>. Also, take a look at the module&#8217;s <strong>project.xml</strong>;</p>
<pre>&lt;project xmlns="http://www.netbeans.org/ns/project/1"&gt;
   &lt;type&gt;org.netbeans.modules.apisupport.project&lt;/type&gt;
   &lt;configuration&gt;
      &lt;data xmlns="http://www.netbeans.org/ns/nb-module-project/3"&gt;
          &lt;code-name-base&gt;code.name.base.of.your.module&lt;/code-name-base&gt;
          <strong>&lt;suite-component/&gt;</strong>
          &lt;module-dependencies&gt;
           &lt;!-- Here are your module dependencies.. --&gt;
          &lt;/module-dependencies&gt;
          &lt;public-packages/&gt;
      &lt;/data&gt;
   &lt;/configuration&gt;
&lt;/project&gt;</pre>
<p>Note the bold-faced tag <strong>&lt;suite-component/&gt;</strong>, this tells that NetBeans IDE that this module is part of a Module Suite project.</p>
<h3>Tips to Remember</h3>
<p>You may convert your standalone module to become part of suite, or vice-versa. Just add/remove <span style="text-decoration:underline;">suite-private.properties</span><strong> </strong>(Per Suite Locator) file and tweak your Module&#8217;s <span style="text-decoration:underline;">project.xml</span> and Module Suite&#8217;s <span style="text-decoration:underline;">project.properties</span>.</p>
<p>Also, note that some changes have taken place in NetBeans 6.7 IDE, you may <a href="http://platform.netbeans.org/whatsnew/67.html" target="_blank">find out more</a> over the web. One more thing, NetBeans 6.5 IDE added <span style="text-decoration:underline;">suite.properties</span> file under <strong>/nbproject</strong> and had same tag as <strong>&lt;suite-component/&gt;</strong>. I think NetBeans 6.0 and 6.1 might do the same. Please try it yourself and let me know.</p>
<p><strong>Stay tuned..</strong></p>
Posted in Community Docs, NetBeans, Platform, Tips|Tricks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/1942/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/1942/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/1942/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/1942/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/1942/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/1942/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/1942/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/1942/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/1942/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/1942/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1942&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2009/07/10/tat-hacking-modules-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/07/module-structure.jpg" medium="image">
			<media:title type="html">Module Structure</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/07/nb-ide-67-splash-screen.jpg?w=300" medium="image">
			<media:title type="html">NetBeans IDE 6.7 (Click to enlarge)</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2008/11/nb65-booting-with-bday-stamp.jpg?w=300" medium="image">
			<media:title type="html">NetBeans 6.5 boots with a b'day stamp on splash screen!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/07/nb-platform-65-splash-screen.jpg?w=300" medium="image">
			<media:title type="html">NetBeans Platform Application (Click to enlarge)</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Hacking Project Properties</title>
		<link>http://nbguru.wordpress.com/2009/07/10/tat-hacking-project-properties-15/</link>
		<comments>http://nbguru.wordpress.com/2009/07/10/tat-hacking-project-properties-15/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 10:28:57 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[Dzone]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=1923</guid>
		<description><![CDATA[Yesterday, I recreated one of the Visual Library Sample  (basically a tutorial based on it at Dzone) using NetBeans 6.7 IDE on Windows XP Professional SP2. The sample was Java Application that had two JAR&#8217;s (present in the platform7 cluster of NetBeans 6.0 IDE) in its classpath.
I followed the tutorial and successfully executed the application. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1923&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday, I recreated one of the Visual Library Sample  (basically a <a href="http://java.dzone.com/news/how-create-visual-applications" target="_blank">tutorial based on it at Dzone</a>) using NetBeans 6.7 IDE on Windows XP Professional SP2. The sample was <strong>Java Application</strong> that had <strong>two JAR&#8217;s</strong> (present in the <strong>platform7</strong> cluster of NetBeans 6.0 IDE) in its classpath.</p>
<p>I followed the tutorial and successfully executed the application. Fortunately, I have NetBeans IDE from 5.5 onwards, so there wasn&#8217;t any issue finding the JAR&#8217;s and adding them in the application&#8217;s classpath.</p>
<p>I didn&#8217;t knew whether it will work with cluster from higher release or not. Hence, I decided to give it a try by making use of clusters from 6.1, 6.5 and finally, 6.7.</p>
<h3>Playing Tricks..</h3>
<p>Now, removing/adding JAR&#8217;s again and again can be boring/cumbersome if you have several releases stored under different hierarchies of your filesystem. So, I looked into the various files created under <strong>/nbproject</strong> to inspect how these JAR&#8217;s being referred.</p>
<p>When you right-click <strong>Libraries</strong> Node and click <strong>Add JAR/Folder..</strong></p>
<p><strong><a href="http://nbguru.files.wordpress.com/2009/07/right-click-libraries-node.jpg"><img class="alignnone size-full wp-image-1932" title="right-click Libraries Node" src="http://nbguru.files.wordpress.com/2009/07/right-click-libraries-node.jpg?w=206&#038;h=96" alt="right-click Libraries Node (Click to enlarge)" width="206" height="96" /></a><br />
</strong></p>
<p>You&#8217;re prompted with the dialog for browsing and then, selecting <strong>Reference/Absolute Path</strong> as per your choice.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/07/browse-select-platform7-cluster.jpg"><img class="size-full wp-image-1933 aligncenter" title="Browse to select platform7 cluster (Click to enlarge)" src="http://nbguru.files.wordpress.com/2009/07/browse-select-platform7-cluster.jpg?w=366&#038;h=208" alt="Browse to select platform7 cluster (Click to enlarge)" width="366" height="208" /></a></p>
<p>I selected the <strong>platform7</strong> cluster (see above figure) and selected the JAR&#8217;s shown in the following figure.</p>
<p><a href="http://nbguru.files.wordpress.com/2009/07/selected-jars-platform7-cluster.jpg"><img class="alignnone size-full wp-image-1934" title="Selected JARs from platform7 cluster" src="http://nbguru.files.wordpress.com/2009/07/selected-jars-platform7-cluster.jpg?w=270&#038;h=380" alt="Selected JARs from platform7 cluster" width="270" height="380" /></a></p>
<h3>/nbproject/project.properties</h3>
<p>This file contains all the project related properties, that are accessed by <strong>build-impl.xml</strong> (created from <strong>project.xml </strong>automatically) for necessary Ant operations.</p>
<pre><strong>file.reference.org-netbeans-api-visual.jar=\</strong>
<strong>  path\\to\\cluster\\modules\\org-netbeans-api-visual.jar
file.reference.org-openide-util.jar=\
  path\\to\\cluster</strong><strong>\\lib\\org-openide-util.jar</strong>
includes=**
jar.compress=false
javac.classpath=\<strong>
 ${file.reference.org-openide-util.jar}:\
 ${file.reference.org-netbeans-api-visual.jar}:\
</strong> ${libs.swing-layout.classpath}</pre>
<p>The bold-faced text is added, once referenced JAR&#8217;s are added from <strong>Projects </strong>Window/<strong>Project Properties</strong> Wizard. Also, <span style="text-decoration:underline;">path\\to\\cluster</span> refers to the directory where the platform cluster is stored. In case of the above application, here&#8217;s the path;</p>
<pre>E:\\OpenSource\\NetBeans_Archies\\NetBeans 6.0\\platform7</pre>
<h3>Playing with Clusters</h3>
<p>Now, as you can see the <span style="text-decoration:underline;">path\\to\\cluster</span> is the same in this case. So, I introduce another property that will have the path as value.</p>
<pre><strong>path.to.cluster.platform</strong>=\
  E:\\OpenSource\\NetBeans_Archies\\NetBeans 6.0\\platform7<strong>
</strong>file.reference.org-netbeans-api-visual.jar=\<strong>
  ${path.to.cluster.platform}</strong>\\modules\\org-netbeans-api-visual.jar
file.reference.org-openide-util.jar=\
<strong>  ${path.to.cluster.platform}</strong>\\lib\\org-openide-util.jar</pre>
<p>This way, the referenced JAR&#8217;s become dependent on this property. Now, one can also change the value of this property, i.e. if one is interested in using JAR&#8217;s from platform cluster of higher releases of the NetBeans IDE.</p>
<p>Then, NetBeans will automatically scan the project, to update dependencies. For instance, I opted for <strong>platform9</strong> cluster from <strong>NetBeans 6.5 IDE</strong>.</p>
<pre>path.to.cluster.platform=\
  <strong>E:\\OpenSource\\NetBeans 6.5\\platform9</strong></pre>
<p>I just made changes at one place, that will be automatically reflected in other properties that depend on it directly/indirectly.</p>
<h3>Tips to Remember</h3>
<p>However, you need to check your code, once you do these changes, as this might cause warnings on deprecated usage of certain API, when you build your application.</p>
<p>Also, if you do any error while editing your <strong>project.properties</strong> as for this scenario, or any other. You may end up seeing lots of error badges in your code and possibly, get an added menu item (<strong>Resolve Reference Problems..</strong>) in the project&#8217;s context menu.</p>
<p><strong>Stay tuned..</strong></p>
Posted in Dzone, Java, NetBeans, Tips|Tricks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/1923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/1923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/1923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/1923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/1923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/1923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/1923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/1923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/1923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/1923/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1923&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2009/07/10/tat-hacking-project-properties-15/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/07/right-click-libraries-node.jpg" medium="image">
			<media:title type="html">right-click Libraries Node</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/07/browse-select-platform7-cluster.jpg" medium="image">
			<media:title type="html">Browse to select platform7 cluster (Click to enlarge)</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/07/selected-jars-platform7-cluster.jpg" medium="image">
			<media:title type="html">Selected JARs from platform7 cluster</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Managing NetBeans Platforms</title>
		<link>http://nbguru.wordpress.com/2009/06/03/tat-managing-netbeans-platforms-14/</link>
		<comments>http://nbguru.wordpress.com/2009/06/03/tat-managing-netbeans-platforms-14/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 14:30:24 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=1730</guid>
		<description><![CDATA[Recently, I asked a question on NetBeans Developers Mailing List about gaining better understanding of managing NetBeans Platform(s) within the NetBeans IDE.
You didn&#8217;t knew that, right? Well, I have also recently discovered that there&#8217;s a provision to manage &#8220;NetBeans Platforms&#8221; for almost every NetBeans Module Project (I guess). Although, I think I knew that this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1730&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently, I asked a question on <a title="Managing NB Platforms within the IDE" href="http://www.netbeans.org/servlets/ReadMsg?list=nbdev&amp;msgNo=44540" target="_blank">NetBeans Developers Mailing List</a> about gaining better understanding of <strong>managing NetBeans Platform(s)</strong> within the NetBeans IDE.</p>
<p>You didn&#8217;t knew that, right? Well, I have also recently discovered that there&#8217;s a provision to manage &#8220;NetBeans Platforms&#8221; for almost every <strong>NetBeans Module Project </strong>(I guess). Although, I think I knew that this feature was there but never actually devoted time to see what exactly it does.</p>
<p style="padding-left:30px;">Yesterday, when I re-discovered this feature and decided to give it a try. I started exploring it and then, faced some issues. So, I raised the above question on the mailing list. <span style="text-decoration:line-through;">I did receive a reply, however it has a different approach to the above problem. Not directly related to scenario&#8217;s I came across. As I await more clarification</span></p>
<p>Now, I got clarification I needed and indeed it should help me understand the way, NetBeans works in this scenario. I thought why not share this scenario with you people. Maybe, you might have faced same issues.</p>
<p>So, how exactly we make use of this feature? Just follow the steps and let me know, what did you observe?</p>
<h2>Here are the Tricks,</h2>
<p>Firstly, run <strong>NetBeans IDE</strong> (bundled with either Java SE, Java or All technologies). I am using <strong>NetBeans 6.5 FCS</strong> for demonstration.</p>
<p><a href="http://nbguru.wordpress.com/2008/11/20/netcat-65-weekly-final-report/" target="_blank"><img class="aligncenter size-medium wp-image-1181" title="NetBeans 6.5 boots with a b'day stamp on splash screen!" src="http://nbguru.files.wordpress.com/2008/11/nb65-booting-with-bday-stamp.jpg?w=300&#038;h=189" alt="NetBeans 6.5 boots with a b'day stamp on splash screen!" width="300" height="189" /></a></p>
<p>Now, goto <strong>Tools | NetBeans Platforms</strong> and generally, you would find same platform configured with your NetBeans IDE and that might be possible, only if you are not running any daily builds.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/06/nb-platform-manager.jpg"><img class="aligncenter size-full wp-image-1746" title="Click to enlarge!" src="http://nbguru.files.wordpress.com/2009/06/nb-platform-manager.jpg?w=376&#038;h=281" alt="Click to enlarge!" width="376" height="281" /></a></p>
<p>So, this figure might look familiar to you, if the above statements are correct. You can configure several <strong>platforms</strong> with your distribution. For instance, I have <strong>NetBeans 6.0, 6.1</strong> installed, along with <strong>6.5</strong> which I am running. So, I will show you how to configure one of them,</p>
<p style="text-align:left;"><strong>Add Platform&#8230;</strong></p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-add-platform.jpg"><img class="aligncenter size-full wp-image-1744" title="Click to enlarge!" src="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-add-platform.jpg?w=376&#038;h=282" alt="Click to enlarge!" width="376" height="282" /></a></p>
<p style="text-align:left;"><strong>Choose Platform Folder</strong></p>
<p style="text-align:left;padding-left:30px;">This step will let you select the installation directory of other NetBeans distributions and let you configure the platform supplied by them.<strong><br />
</strong>
</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-choose-platform-folder.jpg"><img class="aligncenter size-full wp-image-1745" title="Click to enlarge!" src="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-choose-platform-folder.jpg?w=375&#038;h=309" alt="Click to enlarge!" width="375" height="309" /></a></p>
<p style="text-align:left;"><strong>Platform Name<br />
</strong>
</p>
<p style="padding-left:30px;">You may edit the Platform Name as per your need, or keep defaults and click <strong>Finish</strong>.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-platform-name.jpg"><img class="aligncenter size-full wp-image-1747" title="Click to enlarge!" src="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-platform-name.jpg?w=376&#038;h=308" alt="Click to enlarge!" width="376" height="308" /></a></p>
<p>This way you have added platform supplied by <strong>NetBeans 6.0</strong> in <strong>NetBeans 6.5</strong>. Now, switch over to <strong>Harness </strong>tab and click the <strong>2nd radio button</strong> to complete the configuration. This is done to let this platform use its harness to perform tasks related with module projects.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-select-harness.jpg"><img class="aligncenter size-full wp-image-1748" title="Click to enlarge!" src="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-select-harness.jpg?w=376&#038;h=284" alt="Click to enlarge!" width="376" height="284" /></a></p>
<p>Similarly, doing for <strong>6.1</strong>, the following figure shows that I have successfully configured the above NetBeans Platforms,</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-configured-platforms.jpg"><img class="aligncenter size-full wp-image-1750" title="Click to enlarge!" src="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-configured-platforms.jpg?w=376&#038;h=282" alt="Click to enlarge!" width="376" height="282" /></a></p>
<p>Now, you know <strong>how to add/remove NetBeans Platforms</strong>. Lets go further ahead and explore a bit more by taking a typical scenario..</p>
<h2>and some tips,</h2>
<p>Assuming you made a <strong>plug in</strong> using <strong>NetBeans 6.0</strong> (released in Dec &#8216;07) to be compatible with the same. Soon after NetBeans 6.5 FCS (released Nov &#8216;08) was available, you find that <strong>6.5</strong> work very fast compared to <strong>6.1</strong> and due its improved features, it will help you in reducing your development time<strong>. </strong></p>
<p>So, you decide to rework on your module using latest features, however you still want that <strong>plug in</strong> to work only for <strong>NetBeans 6.0</strong>, here&#8217;s what you need to do.</p>
<p><strong>Firstly</strong>, open your <strong>plug in</strong> project and right-click project node to select its <strong>properties</strong>. Now, goto <strong>Libraries</strong> and you would see there&#8217;s a drop-down list for selecting your choice of NetBeans Platform, against which you can build your module. This list of platform&#8217;s can be configured by clicking &#8220;<strong>Manage Platforms&#8230;</strong>&#8221; button and you will see the same image, shown earlier.</p>
<p>See how they are all related.. Isn&#8217;t it cool? <strong>By default</strong>,  the platform supplied by the NetBeans IDE you are running is <strong>selected</strong>.</p>
<p style="padding-left:30px;">Here&#8217;s one thing to keep in mind, that as you are reworking on an old project like this, you must make sure that you configure the NetBeans Platform for it with care, as not doing so will result in <strong>failing the build</strong> and adding irrelevant versions of module dependencies.</p>
<p>In our case, if you have configured <strong>NetBeans 6.0 </strong>as demonstrated above, you need to select that from drop-down list and then, select <strong>NetBeans 6.0 build</strong> to let your module perform tasks against platform supplied with <strong>NetBeans 6.0</strong>.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2009/06/nb-ide-60-running.jpg"><img class="aligncenter size-full wp-image-1749" title="Click to enlarge!" src="http://nbguru.files.wordpress.com/2009/06/nb-ide-60-running.jpg?w=376&#038;h=233" alt="Click to enlarge!" width="376" height="233" /></a></p>
<p>When, you run the module project, the above splash screen for NetBeans 6.0 pops up and now, you can see whether your module works or not. <strong>Hope this helps!</strong></p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_ManageNetBeansPlatforms" href="http://wiki.netbeans.org/TaT_ManageNetBeansPlatforms" target="_blank">contribution</a>.</strong></p>
</blockquote>
<p><strong><span style="text-decoration:underline;">Acknowledgements</span></strong></p>
<p>Thanks to<strong> <a href="http://tomwheeler.com/" target="_blank">Tom Wheeler</a> </strong>(NetBeans Dream Team Member and NetBeans Governance Board Member) for answering my question on the mailing list.<strong><br />
</strong></p>
Posted in NetBeans, Platform, Tips|Tricks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/1730/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/1730/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/1730/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/1730/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/1730/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/1730/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/1730/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/1730/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/1730/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/1730/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1730&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2009/06/03/tat-managing-netbeans-platforms-14/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2008/11/nb65-booting-with-bday-stamp.jpg?w=300" medium="image">
			<media:title type="html">NetBeans 6.5 boots with a b'day stamp on splash screen!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/06/nb-platform-manager.jpg" medium="image">
			<media:title type="html">Click to enlarge!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-add-platform.jpg" medium="image">
			<media:title type="html">Click to enlarge!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-choose-platform-folder.jpg" medium="image">
			<media:title type="html">Click to enlarge!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-platform-name.jpg" medium="image">
			<media:title type="html">Click to enlarge!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-select-harness.jpg" medium="image">
			<media:title type="html">Click to enlarge!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/06/nbplatfmgr-configured-platforms.jpg" medium="image">
			<media:title type="html">Click to enlarge!</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2009/06/nb-ide-60-running.jpg" medium="image">
			<media:title type="html">Click to enlarge!</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | “Deploy on Build” Using JBoss</title>
		<link>http://nbguru.wordpress.com/2009/03/09/tat-deploy-on-build-using-jboss-13/</link>
		<comments>http://nbguru.wordpress.com/2009/03/09/tat-deploy-on-build-using-jboss-13/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 04:52:02 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Tips|Tricks]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=1609</guid>
		<description><![CDATA[Recently, I had asked a question on NetBeans Forums on the &#8220;Deploy-on-Save&#8221; feature supported by NetBeans 6.5 IDE. Well, I know I can&#8217;t configure build script in such a way, so that it can deploy on save. However, I found a trick to deploy the war file everytime I build OR clean and build .
Brief [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1609&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently, I had asked a question on <a title="Java EE Users" href="http://forums.netbeans.org/viewtopic.php?p=25707" target="_blank">NetBeans Forums</a> on the &#8220;Deploy-on-Save&#8221; feature supported by NetBeans 6.5 IDE. Well, I know I can&#8217;t configure build script in such a way, so that it can deploy on save. However, I found a trick to deploy the war file everytime I <strong>build</strong> OR <strong>clean and build</strong> .</p>
<h3>Brief Overview</h3>
<p>This trick will save your time and do lot more stuff with an existing shortcut, which you might have missed otherwise. Actually, I was working on a &#8220;Dynamic Web project&#8221; in <strong>Eclipse IDE</strong> where I was supposed to make use of its <strong>2.0.0.Beta2</strong> version using <strong>JBoss 4.0.5 GA</strong> (with <strong>Java EE Platform</strong> set to <strong>&#8220;J2EE 1.4&#8243;</strong> ). Eclipse was so slow and its editor support for JSP pages was doing no good. Probably, if I could have used a new release of Eclipse, then that might have helped. Still, I am not sure, its just an assumption.</p>
<p>Also, everytime I made changes I had to first right-click project node, then select <strong>&#8220;Run As &gt; Run on Server&#8221;</strong> and if I made any changes during runtime, it was not deploying automatically. Although, &#8220;Project&#8221; menu showed project to be <strong>build automatically</strong> . So, I had to repeat the cycle again and again.</p>
<p>Due to the above stated issues/problems, I decided to import the complete project into NetBeans 6.5 IDE. Import was successful and I added the JBoss server into NetBeans IDE (<strong>&#8220;Tools &gt; Servers&#8221;</strong> ). Now, project is successfully building and deploying. Its absolutely working fine.</p>
<p>Now, NetBeans 6.5 didn&#8217;t supported &#8220;Deploy on Save&#8221; feature for the web applications that were using JBoss Application Server (I am referring to the above release), as per my recent observation.</p>
<p>Then, when I made changes to the webpages in the earlier mentioned project, I still couldn&#8217;t deploy on save/build. So, I had to right-click the &#8220;Project Node&#8221; and click &#8220;Deploy&#8221;. This cycle is shorter one, still frustating if one makes changes frequently.</p>
<h3>Tricks..</h3>
<p>Now, open your project&#8217;s <strong>build.xml</strong> file and here&#8217;s the trick you need to do;<br />
Add the following tags;</p>
<pre>  &lt;target name="-post-dist"&gt;
    &lt;echo&gt;Automatic-deploy&lt;/echo&gt;
    &lt;!--antcall target="run-deploy" inheritrefs="-init-deploy-ant"/--&gt;
    &lt;antcall target="run-display-browser" inheritrefs="-init-deploy-ant"/&gt;
    &lt;echo&gt;Done...&lt;/echo&gt;
  &lt;/target&gt;</pre>
<p>below;</p>
<pre>  &lt;import file="nbproject/build-impl.xml"/&gt;</pre>
<p>This was done to override the above mentioned target present in <strong>build-impl.xml</strong> file, but thats empty.</p>
<pre>    &lt;target name="-post-dist"&gt;
        &lt;!-- Empty placeholder for easier customization. --&gt;
        &lt;!-- You can override this target in the ../build.xml file. --&gt;
    &lt;/target&gt;</pre>
<p>Now, whenever you do &#8220;Shift-F11&#8243; or &#8220;F11&#8243;, it will &#8220;clean &amp; build&#8221; or &#8220;build&#8221; respectively and then, deploy the project to the server.</p>
<h3>Tips to Remember..</h3>
<p>If you replace the following tag;</p>
<pre>    &lt;antcall target="run-display-browser" inheritrefs="-init-deploy-ant"/&gt;</pre>
<p>with</p>
<pre>    &lt;antcall target="run-deploy" inheritrefs="-init-deploy-ant"/&gt;</pre>
<p>The moment you use &#8220;Shift-F11&#8243; or &#8220;F11&#8243;, the project will deploy the &#8220;war&#8221; file, however it will not run the browser for you, as it was doing earlier. If you have better solution, or encounter some problems, do let me know. Hope this helps.</p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_DeployOnBuildUsingJBoss" href="http://wiki.netbeans.org/TaT_DeployOnBuildUsingJBoss" target="_blank">contribution</a>.</strong></p>
</blockquote>
<p><strong>Enjoy NetBeaning!</strong></p>
Posted in NetBeans, Tips|Tricks, Web  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/1609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/1609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/1609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/1609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/1609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/1609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/1609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/1609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/1609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/1609/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=1609&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2009/03/09/tat-deploy-on-build-using-jboss-13/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | I want to use GSF API’s?</title>
		<link>http://nbguru.wordpress.com/2008/11/11/tat-i-want-to-use-gsf-apis-12/</link>
		<comments>http://nbguru.wordpress.com/2008/11/11/tat-i-want-to-use-gsf-apis-12/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 09:12:24 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=972</guid>
		<description><![CDATA[Blogging after 2 weeks&#8230;I have been focusing on my college activities more, I should rather say that I was working on my final year project. So, I thought of sharing some key learnings with you!
Final Year Project
I am working on a project that&#8217;s based on NetBeans Platform. Initially, its intended to provide first-class support for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=972&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Blogging after 2 weeks&#8230;I have been focusing on my college activities more, I should rather say that I was working on my final year project. So, I thought of sharing some key learnings with you!</p>
<h4>Final Year Project</h4>
<p>I am working on a project that&#8217;s based on NetBeans Platform. Initially, its intended to provide first-class support for <strong>NetBeans Wiki</strong> markup editing, syntax highlighting, auto completion, etc. This would help any user using NetBeans Wiki, to edit/create the pages and then, preview them locally (offline).</p>
<p>So, I asked <strong>Caoyuan Deng</strong> (NetBeans Dream Team Member), winner of NBIG Gold Award, experienced developer on integrating languages like Erlang, Scala into the IDE, on <strong>how to go about using GSF?</strong></p>
<p style="text-align:left;">If you want to make use of <a href="http://wiki.netbeans.org/DevFaqImplementationDependency" target="_blank">Specification Version</a> of GSF modules, he suggested to add my module as friend to the GSF modules. Making friends is an easy task (as per my experience). That&#8217;s possible in two ways-</p>
<p style="text-align:left;"><strong>Case #1-</strong> I commit my code to <a href="http://hg.netbeans.org/main/contrib/" target="_blank">/main/contrib</a> and request the GSF Module Owner to add my specific modules as friends. As I had already versioned my project with SVN at java.net! So, I went for the second way.</p>
<p style="text-align:left;"><strong>Case #2- </strong>I should clone the NetBeans sources, and then run my choice of NetBeans IDE. Then, open the necessary GSF modules (from the clone repos)- tweak them (so as to add my module as a friend).</p>
<h4 style="text-align:left;">Tips and Tricks</h4>
<p style="text-align:left;">Actually, I made my module friend of all the three GSF modules- <strong>/gsf</strong>, <strong>/gsf.api</strong> and <strong>/gsfpath.api</strong></p>
<p style="text-align:left;">So, you are required to open the <strong>/nbproject/project.xml</strong> file of one of the GSF modules and add a friend tag with text equivalent to the Code Name Base of your module.</p>
<pre>&lt;friend-packages&gt;
   &lt;!--Many modules added as friends are added here--&gt;
   &lt;friend&gt;code.name.base.of.my.module&lt;/friend&gt;
&lt;/friend-packages&gt;</pre>
<p style="text-align:left;">So, open all these modules in your NetBeans IDE (6.0/6.1 onwards). Tweak those <strong>project.xml</strong> files by searching for a tag &#8220;&lt;friend-packages&gt;&#8221; there you would see many module&#8217;s code name base have been added as friends using tag &#8220;&lt;friend&gt;&#8221;, also specific packages can be added using tag &#8220;&lt;package&gt;&#8221;.</p>
<h4 style="text-align:left;">Build the sources&#8230;</h4>
<p style="text-align:left;">Once you have followed the second approach, its time to build the sources. Firstly, open the project <strong>NetBeans Build System</strong> (/main-golden/nbbuild). To know more about <a href="http://nbguru.wordpress.com/2008/10/23/build-successful/" target="_blank">how to build the sources</a>, give it a read <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Here&#8217;s an excerpt from the entry-</p>
<p style="text-align:left;padding-left:30px;"><em>I referred a document for information on <a href="http://wiki.netbeans.org/WorkingWithNetBeansSources#section-WorkingWithNetBeansSources-MercurialAccessNB6.1OrLaterOnly" target="_blank">Mercurial Access</a>. So, I found out <strong>/main-golden</strong> would be fine for us. As its guaranteed that build would succeed..</em></p>
<p style="text-align:left;">
<p style="text-align:left;">Once you get the build successful, you must now run the IDE either from <strong>/main-golden/nbbuild/netbeans/bin/</strong> OR extract the <strong>distributable zip </strong>you must have created by <strong>running the target</strong> &#8220;build&#8221;.</p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_UsingGSFByMakingFriends" href="http://wiki.netbeans.org/TaT_UsingGSFByMakingFriends" target="_blank">contribution</a>.</strong></p>
</blockquote>
<h4 style="text-align:left;">Finally,</h4>
<p style="text-align:left;">Its done, now you can open your project modules in the newly created build of NetBeans IDE. As and when you make use of the Gsf API&#8217;s, build would definitely succeed.</p>
Posted in Mercurial, NetBeans, Platform, Tips|Tricks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/972/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/972/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/972/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/972/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/972/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/972/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/972/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/972/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/972/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/972/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=972&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/11/11/tat-i-want-to-use-gsf-apis-12/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Configure Clusters and Modules</title>
		<link>http://nbguru.wordpress.com/2008/10/19/tat-configure-clusters-and-modules-11/</link>
		<comments>http://nbguru.wordpress.com/2008/10/19/tat-configure-clusters-and-modules-11/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 10:09:09 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=971</guid>
		<description><![CDATA[Yesterday, someone asked on the OpenIDE mailing list, &#8220;I wonder what is the absolute minimum of modules needed to start developing an app on the platform and after that adding my own modules.&#8221;
Tom Wheeler (NetBeans Dream Team Member) gave an excellent reply, and in his detailed answer, I found something that I will blog here [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=971&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday, someone <strong>asked</strong> on the <a href="http://openide.netbeans.org/servlets/ReadMsg?list=dev&amp;msgNo=35783" target="_blank">OpenIDE mailing list</a>, &#8220;I wonder what is the absolute minimum of modules needed to start developing an app on the platform and after that adding my own modules.&#8221;</p>
<p><strong>Tom Wheeler</strong> (NetBeans Dream Team Member) gave an excellent reply, and in his detailed answer, I found something that I will blog here and it will be another <strong>taT</strong>, that would help you tweak your &#8220;NetBeans Platform Application&#8221; and &#8220;Module Suite&#8221;.</p>
<p>As you know <a href="http://bits.netbeans.org/download/trunk/nightly/latest/" target="_blank">NetBeans 6.5</a> has a new <strong>Project Template</strong> for <strong>NetBeans Modules</strong>, its known as &#8220;NetBeans Platform Application&#8221;. You might find some <a href="http://wiki.netbeans.org/NetBeansDeveloperFAQ" target="_blank">Developer FAQ&#8217;s</a> on several How To&#8217;s on Branding the Application, Disabling Modules, etc. Let me show you a cool way to manipulate the &#8220;NetBeans Platform Config&#8221; file to configure the Platform clusters and modules.</p>
<h3>Brief Overview</h3>
<p>Assuming the concerned project is opened, so <strong>Right-click</strong> the &#8220;Project Node&#8221; in Logical View, and <strong>select</strong> &#8220;Properties&#8221;. Now, on the left of the Wizard, you <strong>select</strong> &#8220;Libraries&#8221;, and on the right, you see related options to configure &#8220;Java Platform&#8221;, &#8220;NetBeans Platform&#8221;, as well as &#8220;Platform Modules&#8221; which are inclusive of &#8220;<a href="http://wiki.netbeans.org/DevFaqWhatIsACluster" target="_blank">Clusters</a> and Modules&#8221;.</p>
<p><strong>Clusters and Modules</strong></p>
<p>Generally, you would <strong>uncheck</strong> those clusters which you don&#8217;t want your application to be dependent on, that also means your application would build faster.</p>
<p>Also, changes get reflected in your App&#8217;s &#8220;platform.properties&#8221; file. So, if you want to avoid using GUI for removing a cluster, not specific modules within that cluster, and tweak it directly in the file.</p>
<p>Continue reading&#8230;</p>
<h3>Tricks</h3>
<p>Daily builds for NetBeans 6.5 have NetBeans Platform with following clusters-</p>
<pre>apisupport1, gsf1, harness, ide10, java2, nb6.5,
platform9, profiler3, websvccommon1</pre>
<p>By default, your application&#8217;s &#8220;platform.properties&#8221; file stored under <strong>nbproject</strong> and displayed as &#8220;NetBeans Platform Config&#8221; in <strong>Logical View</strong>, has contents..</p>
<pre>nbplatform.active=default</pre>
<p>That&#8217;s the only property you have. Now, suppose I want to remove <strong>gsf1 cluster</strong> from the above list, add the following property-</p>
<pre>enabled.clusters=\
    apisupport,\
    harness,\
    ide,\
    java,\
    nb,\
    platform,\
    profiler,\
    websvccommon</pre>
<p>So, as you can see the properties file doesn&#8217;t show version of the clusters (ordered alphabetically always), so its version independent as well. This is what you see when you remove <strong>gsf1</strong> <strong>cluster</strong> using &#8220;<a href="http://wiki.netbeans.org/DevFaqSuppressExistingModule" target="_blank">Project Properties Wizard</a>&#8220;, and rest are meant to be enabled by the Application you are using.</p>
<p>Now, if I want to restore <strong>gsf1</strong>, and remove <strong>websvccommon1</strong>, then you need to just tweak it as follows-</p>
<pre>enabled.clusters=\
    apisupport,\
    gsf,\
    harness,\
    ide,\
    java,\
    nb,\
    platform,\
    profiler</pre>
<p>If you remove some specific modules from a particular cluster, then following properties are added into the properties file-</p>
<pre>disabled.modules=\
    {codename.base.of.modules}
enabled.clusters=\
    apisupport,\
    gsf,\
    harness,\
    ide,\
    java,\
    nb,\
    platform,\
    profiler,\
    websvccommon</pre>
<p>Here you would see that when I disable (Please use GUI Wizard to disable) some modules from (suppose) <strong>java2 cluster</strong>, their &#8220;Code Name Base&#8221; would be added into the <strong>disabled.modules</strong> property. Also, you are required to add <strong>enabled.clusters</strong> property, with all clusters included.</p>
<h3>Tips to Remember</h3>
<p>This is also applicable to <strong>Module Suite </strong>project template, and you would see same files, where you can tweak as shown above. If you remove the property-</p>
<pre>enabled.clusters=</pre>
<p>Then, you would see your application/suite using all the clusters bundled with NetBeans Platform.</p>
<p>Suppose, when you disable a module <strong>A</strong> of cluster <strong>B</strong>, always add  the <strong>enabled.clusters</strong> property as well and also, include the cluster <strong>B</strong>.</p>
<pre>disabled.modules=\
    A
enabled.clusters=\
    B,\
    C,\
    D</pre>
<p>If you disable the cluster, all the modules within the cluster automatically gets disabled. Not, vice-versa <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Also, I recommend you to use <strong>GUI Wizard</strong> to disable specific modules, whether you&#8217;re an expert/not. Reason being that you might not know what dependencies the other modules have on this module <strong>A</strong>.</p>
<blockquote>
<p style="text-align:center;"><strong>Someone has rightly said,</strong><strong> &#8220;Prevention is better than cure&#8221;</strong></p>
</blockquote>
<p>However, if you want to enable some of the modules disabled using Wizard, then of course you may use the tweaks shown above to do the trick.</p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_ConfigClustersAndModules" href="http://wiki.netbeans.org/TaT_ConfigClustersAndModules" target="_blank">contribution</a>.</strong></p>
</blockquote>
<p><strong>Hope this helps..</strong></p>
Posted in NetBeans, Platform, Tips|Tricks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/971/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/971/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/971/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/971/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/971/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/971/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/971/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/971/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/971/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/971/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=971&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/10/19/tat-configure-clusters-and-modules-11/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Open Projects w/o Browsing</title>
		<link>http://nbguru.wordpress.com/2008/10/06/tat-open-projects-wo-browsing-10/</link>
		<comments>http://nbguru.wordpress.com/2008/10/06/tat-open-projects-wo-browsing-10/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 12:55:08 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[Community Docs]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Phase III]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=933</guid>
		<description><![CDATA[Its been 2 months, and I have not written any taT&#8217;s since then   Anyways, its time to move on, and try out another cool trick  
A different way of starting the IDE
Geertjan once blogged this entry, and said, &#8220;Drag and drop a desktop icon of a file onto the NetBeans desktop icon&#8230;&#8230;and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=933&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Its been <strong>2</strong> months, and I have not written any <a href="http://feeds.feedburner.com/nbguru-tat" target="_blank"><strong>taT&#8217;s</strong></a> since then <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' />  Anyways, its time to move on, and try out another cool trick <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4><a href="http://blogs.sun.com/geertjan/entry/a_different_way_of_starting" target="_blank">A different way of starting the IDE</a></h4>
<p><strong>Geertjan</strong> once blogged this entry, and said, &#8220;Drag and drop a desktop icon of a file onto the NetBeans desktop icon&#8230;&#8230;and the IDE will start up, with the specified file open in the editor. That&#8217;s always been possible, but is [as far as I am aware] completely unknown.&#8221;</p>
<p>There are several such observations, which could be made, but it generally happens accidentally <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<h4>Opening Projects..</h4>
<p>Now, there are two ways of opening projects (created/maintained locally), that I have seen.</p>
<p><strong>General way- Browsing from Inside</strong></p>
<p>Firstly, you know that one has to go to &#8220;File &gt; Open Project..&#8221;<strong> OR, use a shortcut key- </strong>&#8220;Ctrl+Shift+O&#8221;</p>
<p>Then, you browse to the location of the project and then you &#8220;Open&#8221; it in the IDE.</p>
<p><strong>New way- Without Internal Browsing</strong></p>
<p>Now, what you can do? Whether NetBeans IDE is running or not, it doesn&#8217;t matter, just use your system file browser which is faster than the IDE, and locate your project root.</p>
<p><em>Drag-n-Drop</em> the folder over NetBeans Desktop Icon, if its not running, OR <em>Drag-n-Drop</em> it over NetBeans running instance. It will take some time, and project would be opened, that too as <strong>Main Project</strong>, by default.</p>
<h4>What you have to do?</h4>
<p>Execute this trick and comment, if you like. Also, if you have some of the tricks to share, which makes life easier for users, share it with NetBeans Community through <a href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a>! Another thing, if you&#8217;re not a blogger and want to share similar DnD discoveries with the community, you can mail me &#8211; <strong>nvarun AT netbeans DOT org</strong></p>
<p>So, that I can blog about your discoveries, and contribute them to the above documentation project as well.</p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_OpenProjInDiffWay" href="http://wiki.netbeans.org/TaT_OpenProjInDiffWay" target="_blank">contribution</a>.</strong></p>
</blockquote>
<p><strong>Have a good day</strong> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
Posted in Community Docs, NetBeans, Phase III, Tips|Tricks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/933/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/933/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/933/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=933&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/10/06/tat-open-projects-wo-browsing-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Sort Key and Woodstock</title>
		<link>http://nbguru.wordpress.com/2008/08/02/tat-sort-key-and-woodstock-9/</link>
		<comments>http://nbguru.wordpress.com/2008/08/02/tat-sort-key-and-woodstock-9/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 15:23:10 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[JSF]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Tips|Tricks]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=371</guid>
		<description><![CDATA[Have you used PluginPortal, you might not have realised but its a JSF Web application. I am using the portal for the past 6 months, and never thought of this.
Anyways, I have been recently working with JSF 1.2 with Woodstock Components, and as I see James blogging some tips and Tricks these days. So, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=371&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Have you used PluginPortal, you might not have realised but its a JSF Web application. I am using the portal for the past 6 months, and never thought of this.</p>
<p>Anyways, I have been recently working with <strong>JSF 1.2</strong> with <strong>Woodstock Components</strong>, and as I see <strong><a href="http://blogs.sun.com/branajam/" target="_blank">James</a></strong> blogging some tips and Tricks these days. So, I thought of doing the same.</p>
<p><span style="text-decoration:underline;"><strong>PluginPortal Users</strong></span></p>
<p>Firstly, I will ask you something, if you have submitted any plugins, you would see your <strong>My Plugins</strong> section, once you logged in.</p>
<p>Table is shown, and recently I saw it has a sortable header, when I click it either it arranges plugin&#8217;s info in descending/ascending order.</p>
<p><span style="text-decoration:underline;"><strong>How do we get that?</strong></span></p>
<p>Now, how do we get this feature in your web application. If you have any Tabular component in your application, then select any column and goto <strong>Properties Window</strong> (Ctrl+Shift+7), there would see a property <strong>sort</strong> under section <strong>Data.</strong></p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-under-data.jpg"><img class="size-full wp-image-376 aligncenter" src="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-under-data.jpg?w=213&#038;h=70" alt="" width="213" height="70" /></a></p>
<p>When you enter a <strong>unique ID</strong> (Sort Key),</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-help.jpg"><img class="alignnone size-full wp-image-378" src="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-help.jpg?w=228&#038;h=86" alt="" width="228" height="86" /></a></p>
<p>the changes that took place in JSP is the following attribute gets added-<br />
sort=&#8221;<strong>$uniqueID</strong>&#8220;</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-inside-jsp.jpg"><img class="size-full wp-image-380 aligncenter" src="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-inside-jsp.jpg?w=470&#038;h=40" alt="" width="470" height="40" /></a></p>
<p>OR, you could have added this attribute yourself in JSP, and when you switch to Design View, and changes are reflected with the <strong>sort header icon</strong> present in the respective column.</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey.jpg"><img class="alignnone size-full wp-image-377" src="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey.jpg?w=139&#038;h=40" alt="" width="139" height="40" /></a></p>
<p style="text-align:left;">Well, I had stopped blogging on weekends, but I couldn&#8217;t resist, so see this as well as, upcoming blogs and have fun <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_AddRemoveSortKeyFromWoodStockTableDataProvider" href="http://wiki.netbeans.org/TaT_AddRemoveSortKeyFromWoodStockTableDataProvider" target="_blank">contribution</a>.</strong></p>
</blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nbguru.wordpress.com/371/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nbguru.wordpress.com/371/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/371/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=371&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/08/02/tat-sort-key-and-woodstock-9/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-under-data.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-help.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey-inside-jsp.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/08/vwjsf-sortkey.jpg" medium="image" />
	</item>
		<item>
		<title>taT | Editor Windows Reactivated</title>
		<link>http://nbguru.wordpress.com/2008/07/25/tat-editor-windows-reactivated-8/</link>
		<comments>http://nbguru.wordpress.com/2008/07/25/tat-editor-windows-reactivated-8/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 08:44:39 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=268</guid>
		<description><![CDATA[Hey,
I have been blogging around for a while on hyperlinks in NetBeans IDE, what about the API&#8217;s, yeah the NetBeans API&#8217;s that helped me achieve a crucial milestone, i.e. activating the Opened panes! Also, the members of OpenIDE mailing lists, for giving accurate suggestions for making it possible.
Tricks
You must see numerous Developer FAQ&#8217;s based on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=268&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hey,</p>
<p>I have been blogging around for a while on hyperlinks in NetBeans IDE, what about the API&#8217;s, yeah the NetBeans API&#8217;s that helped me achieve a crucial milestone, i.e. activating the Opened panes! Also, the members of OpenIDE mailing lists, for giving accurate suggestions for making it possible.</p>
<h3 style="text-align:left;"><strong>Tricks</strong></h3>
<p style="text-align:left;">You must see numerous <a href="http://wiki.netbeans.org/NetBeansDeveloperFAQ#section-NetBeansDeveloperFAQ-EditorAndEditedFiles" target="_blank">Developer FAQ&#8217;s</a> based on Editor and Edited Files. Some of them referring to get access of relevant opened Window for editing. Still, something was missing. So, I would share what I experienced recently.</p>
<pre>TopComponent[] comps = TopComponent.getRegistry().getOpened();
for (int i = 0; i &lt; comps.length; i++) {
    Node[] arr = comps[i].getActivatedNodes();
    for (int j = 0; j &lt; arr.length; j++) {
        EditorCookie ec = (EditorCookie)
arr[j].getCookie(EditorCookie.class);
        if (ec != null) {
            JEditorPane[] panes = ec.getOpenedPanes();
            if (panes != null) {
                // USE panes
            }
        }
    }
}</pre>
<p>This has one issue, it no longers returns an array of <strong>TopComponent</strong>&#8217;s in the 1st line, in 6.0 and 6.1, I saw it returned <strong>Set&lt;TopComponent&gt;</strong>, so outer loop also changes like this-</p>
<pre>Set&lt;TopComponent&gt; comps = TopComponent.getRegistry().getOpened();
for (TopComponent tc: comps) {
    Node[] arr = tc.getActivatedNodes();
    for (int j = 0; j &lt; arr.length; j++) {
        EditorCookie ec = (EditorCookie)
arr[j].getCookie(EditorCookie.class);
        if (ec != null) {
            JEditorPane[] panes = ec.getOpenedPanes();
            if (panes != null) {
                // USE panes
            }
        }
    }
}</pre>
<p style="text-align:center;"><strong>What about My Usecase?</strong></p>
<p style="text-align:left;">Oh, yeah! I wanted to tell you about re-activating opened panes. After interacting with <strong>Wade</strong> on OpenIDE mailing lists. I created this method- <a href="http://wiki.netbeans.org/RevampedHyperlinkNavigation#section-RevampedHyperlinkNavigation-VerifyHyperlinkStatusStringNewIdentifier" target="_blank">verifyHyperlinkStatus()</a>, please have a look, you might have to scroll a bit. So, I have commented 2 lines there-</p>
<pre>//final int index = k;
/*
After some coding...
*/
//tc[index].requestActive();</pre>
<p>tc[index] is a particular TopComponent instance obtained by iterating over an Array of <strong>TopComponent</strong>&#8217;s. <strong>Array?</strong> But, we have just discussed its <strong>Set&lt;TopComponent&gt;</strong> not an Array. You&#8217;re in for another surprise-</p>
<pre>//To obtain an array, use this-
final TopComponent[] tc = TopComponent.getRegistry().
getOpened().toArray(new TopComponent[0]);
//As mentioned in the following reference tutorial.</pre>
<p>Referenced Tutorial- <a href="http://wiki.netbeans.org/RevampedHyperlinkNavigation" target="_blank">http://wiki.netbeans.org/RevampedHyperlinkNavigation</a></p>
<p style="text-align:center;"><strong>final</strong>, but why?</p>
<p style="text-align:left;">Actually, when you deal with methods that required to run within a <strong>AWT Thread</strong>, invoked by various means, then the variables used, within their implemented <strong>run()</strong> method, if defined outside should be made final so as to prevent it from any modification. In Java, final modifier means that an identifier would be constant within a block of code. In this case, within a method- <strong>verifyHyperlinkStatus()</strong></p>
<p style="text-align:left;">So, <strong>index</strong> was modified as final, and was used within an <strong>AWT Thread</strong> inside a <strong>if-block</strong>, which invoked <strong>tc</strong>[index].<strong>requestActive()</strong>, i.e. to activate that window, if its already opened.</p>
<p style="text-align:center;"><strong>Why I am doing this?</strong></p>
<p style="text-align:left;">As I have to re-activate a opened editor window which was already opened by clicking a hyperlink in HTML file. So, I was earlier using <strong>setCaretPositon()</strong>, that&#8217;s why I had to <strong>requestActive()</strong>, to show that editor window again.</p>
<h3 style="text-align:left;"><strong>Tips to Remember</strong></h3>
<p style="text-align:left;"><strong>Vita</strong> suggested to use <strong>NbEditorUtilities</strong> instead of a combination of setCaretPosition() and requestActive(). So, I did that by commenting the following statements present in one of the <a href="http://wiki.netbeans.org/RevampedHyperlinkNavigation#section-RevampedHyperlinkNavigation-SetPositionDocumentD" target="_blank">setPosition()</a> methods.</p>
<pre>NbEditorUtilities.getLine(d, index, true).show(Line.SHOW_GOTO);
//pane[pos].setCaretPosition(index);</pre>
<p style="text-align:left;">Here, <strong>index</strong> is found using <strong>indexOf()</strong>, and d is the document, whose contents were used to retrieve the index. This is indeed a great utility, why? Because, it opens/re-activates the opened document and places the cursor at the beginning of the line, that was searched.</p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/DevFaqGetOpenEditorWindows" href="http://wiki.netbeans.org/DevFaqGetOpenEditorWindows" target="_blank">contribution</a>.</strong></p>
</blockquote>
<h3 style="text-align:left;">Final thoughts</h3>
<p style="text-align:left;">This time <strong>all was said and done</strong>, rather than the saying &#8220;All is said, more than done!&#8221;.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nbguru.wordpress.com/268/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nbguru.wordpress.com/268/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/268/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/268/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/268/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=268&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/07/25/tat-editor-windows-reactivated-8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Reload Debugging (debug-fix-nb)</title>
		<link>http://nbguru.wordpress.com/2008/07/17/tat-reload-debugging-7/</link>
		<comments>http://nbguru.wordpress.com/2008/07/17/tat-reload-debugging-7/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 17:48:43 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=223</guid>
		<description><![CDATA[Just few days back, I talked about that its rather a good practice to debug, not to run! While following that, I discovered another thing, which was there for quite some time, but I didn&#8217;t notice it, as I didn&#8217;t debug  
    &#60;target name="debug-fix-nb" if="netbeans.home"
depends="init,-pre-debug-fix,compile-single"&#62;
        &#60;nbjpdareload&#62;
            &#60;fileset includes="${fix.class}*.class"
dir="${build.classes.dir}"/&#62;
        &#60;/nbjpdareload&#62;
    &#60;/target&#62;
You must be thinking, what&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=223&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just few days back, I talked about that its rather a good practice to <a href="http://nbguru.wordpress.com/2008/07/11/debug-dont-run/" target="_blank">debug, not to run</a>! While following that, I discovered another thing, which was there for quite some time, but I didn&#8217;t notice it, as I didn&#8217;t debug <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<pre><strong> </strong>   &lt;target name="debug-fix-nb" if="netbeans.home"
depends="init,-pre-debug-fix,compile-single"&gt;
        &lt;nbjpdareload&gt;
            &lt;fileset includes="${fix.class}*.class"
dir="${build.classes.dir}"/&gt;
        &lt;/nbjpdareload&gt;
    &lt;/target&gt;</pre>
<p>You must be thinking, what&#8217;s &#8220;debug-fix-nb&#8221;, its actually an Ant target, ran while we apply Code fixes during Debugging! Shocking, Indeed! I felt the same way, actually while building a module to run it in Target Platform, I realized I could reload it as well, without building whole module again.</p>
<p style="text-align:center;">Goto <strong>Installation Directory</strong>, and look for <strong>harness/common.xml</strong><br />
It contains many Ant targets, including the above&#8230;</p>
<p>Similar functionality exists, when you want to reload while debugging, <strong>HOW? </strong>Here lies the trick, while I was debugging a Module in Target Platform, I realized an error just after a <strong>break-point</strong>, so thought of fixing code, just before error could be detected.</p>
<p>Then, I came across an <strong>Icon</strong> in Toolbar, whose <strong>tool-tip</strong> suggested its used for applying code fixes. So, I made changes wherever needed, and clicked on that Icon, it reloaded that class and the debugging continued, from same point!</p>
<p>Now, that&#8217;s what I call a utility.<br />
Amazing, never thought debugging could be fun <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_DebugFixNB" href="http://wiki.netbeans.org/TaT_DebugFixNB" target="_blank">contribution</a>.</strong></p>
</blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nbguru.wordpress.com/223/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nbguru.wordpress.com/223/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/223/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=223&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/07/17/tat-reload-debugging-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Editor Fold Utility</title>
		<link>http://nbguru.wordpress.com/2008/07/08/tat-editor-fold-utility-6/</link>
		<comments>http://nbguru.wordpress.com/2008/07/08/tat-editor-fold-utility-6/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 07:14:01 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Tips|Tricks]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=217</guid>
		<description><![CDATA[Hey,
Another tips and Tricks for today! Whenever you have created a JFrame in NetBeans, the auto-generated code which is in sync with Matisse Builder, has a method initComponents() initially, right?
When you make a switch to the Source view, you see a collapsed section of code, with a label on it- &#8220;Generated Code&#8221;. Ever thought, how [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=217&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hey,</p>
<p>Another tips and Tricks for today! Whenever you have created a JFrame in NetBeans, the auto-generated code which is in sync with Matisse Builder, has a method <strong>initComponents()</strong> initially, right?</p>
<p>When you make a switch to the Source view, you see a collapsed section of code, with a label on it- &#8220;Generated Code&#8221;. Ever thought, how it happens.</p>
<p style="text-align:center;"><strong>Here&#8217;s the trick</strong></p>
<p style="text-align:left;">Write code between following comments;</p>
<pre style="text-align:left;">        //&lt;editor-fold defaultstate="$state" desc="$label"&gt;
        /* Place your code over here */
        //&lt;/editor-fold&gt;</pre>
<p>Replace <strong>$state </strong>with expanded/collapsed and <strong>$label</strong> with any name/phrase you choose. Also, replace the following;</p>
<pre style="text-align:left;">        /* Place your code over here */</pre>
<p>with your code, it could be either inside a method, or inside a Java class, wrapping various methods, variable declarations etc.</p>
<p style="text-align:center;"><strong>Tips to Remember</strong></p>
<p style="text-align:left;">Keep in mind that, the editor-fold tags must be inside same block of code, either inside a Java class, or inside a method! You can&#8217;t opening tag inside a Java class, and closing tag inside a method OR vice-versa!</p>
<p style="text-align:left;">It works in all Java classes. Also, its basic use is to categorize the sections of code. Like, you may have an editor-fold for only variable declarations, and/or for user created methods, and/or for getter/setter methods!</p>
<p style="text-align:left;"><em><strong>eNjoy Technology&#8230;</strong></em></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nbguru.wordpress.com/217/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nbguru.wordpress.com/217/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=217&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/07/08/tat-editor-fold-utility-6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Play with XML Layer (Part 3)</title>
		<link>http://nbguru.wordpress.com/2008/07/07/tat-play-with-xml-layer-part-three-5/</link>
		<comments>http://nbguru.wordpress.com/2008/07/07/tat-play-with-xml-layer-part-three-5/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 13:32:12 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=188</guid>
		<description><![CDATA[Hey,
So, I am writing a third part, Wow   Really, I must admit, I just didn&#8217;t thought I would write so frequently, and that too, on NetBeans Platform. Its something, that needs a lot of time to understand its usability, functionality and extensibility&#8230;   Anyways, in my previous entry- Part Two of this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=188&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hey,</p>
<p>So, I am writing a <strong>third part</strong>, Wow <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Really, I must admit, I just didn&#8217;t thought I would write so frequently, and that too, on <strong>NetBeans Platform</strong>. Its something, that needs a lot of time to understand its usability, functionality and extensibility&#8230; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Anyways, in my previous entry- <a href="http://nbguru.wordpress.com/2008/06/24/tat-play-with-xml-layer-part-two-4/" target="_blank">Part Two</a> of this series, I wrote on how to transform an Action type from one form to another- <strong>CallableSystem</strong> TO <strong>Cookie</strong>! By the way, I have already done the reversal in form of a tutorial, and contributed to the <a href="http://wiki.netbeans.org/TransformConditionallyToAlwaysEnabledAction" target="_blank">Community Docs</a>.</p>
<blockquote>
<p style="text-align:center;">Here, I present to you tricks to add/remove entries into/from XML Layer, that would enable/disable context-aware actions.</p>
</blockquote>
<p><span style="text-decoration:underline;"><em><strong>Pre-requisites</strong></em></span></p>
<p>Just have a look at this webpage- <a href="http://nbguru.wordpress.com/proj-netbeans/tryst-with-platform/" target="_blank">Tryst with Platform</a>! Its basically an index of what all documentations (<strong>11</strong>), I have contributed to the NetBeans Community, be it blogs, tutorials, articles, tips and Tricks, Dzone entries, etc, in the last week of June.</p>
<p><span style="text-decoration:underline;"><em><strong>Tips and Tricks</strong></em></span></p>
<p>Following tips/tricks apply to CookieAction, not CallableSystemAction! Also, check out the references section (at the end of this entry), this part of blog series is inspired by those references!</p>
<blockquote>
<p style="text-align:center;">Syntax of the <strong>MIME Type</strong>: <em>type/subtype</em></p>
</blockquote>
<p><a href="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-keys.jpg"> </a></p>
<p style="text-align:center;"><strong>Tricks for Context Menu Items</strong></p>
<p style="text-align:left;"><em>Trick #1</em> &#8211; If making the action, <strong>file type</strong> context-sensitive. Then, you have to add an entry in folder &#8220;Loaders&#8221; as follows into XML Layer.</p>
<pre>    &lt;folder name="Loaders"&gt;
        &lt;folder name="type"&gt;
            &lt;folder name="subtype"&gt;
                &lt;folder name="Actions"&gt;
                    &lt;file name="org-nvarun-tat-SayCheez.instance"/&gt;
                &lt;/folder&gt;
            &lt;/folder&gt;
        &lt;/folder&gt;
    &lt;/folder&gt;</pre>
<p style="text-align:left;">
<p style="text-align:left;"><em>Trick #2</em> &#8211; If making the action, <strong>editor</strong> context-sensitive. Then, you have to add an entry in folder &#8220;Editors&#8221; as follows into XML Layer.</p>
<p style="text-align:left;">
<pre>    &lt;folder name="Editors"&gt;
        &lt;folder name="type"&gt;
            &lt;folder name="subtype"&gt;
                &lt;folder name="Popup"&gt;
                    &lt;file name="org-nvarun-tat-SayCheez.instance"/&gt;
                &lt;/folder&gt;
            &lt;/folder&gt;
        &lt;/folder&gt;
    &lt;/folder&gt;</pre>
<p style="text-align:left;">
<p style="text-align:center;"><strong>Tips To Remember</strong></p>
<p>In our case, I replaced <em>type</em> with <strong>text</strong> and <em>subtype</em> with <strong>x-java</strong>! What I did, I registered the Action into the <strong>Java Editor Context Menu</strong>, i.e. whenever you open a <strong>Java File</strong>, and do right-click, <strong>popup menu</strong> would show the above action. Also, when you expand relevant Package Node of a Project Node, to uncover Java File Nodes, right-click to see the Action in the popup menu!</p>
<p style="text-align:left;">However, it would be still be <strong>enabled</strong>, if you had earlier chosen <em>EditorCookie, EditCookie, DataObject </em>OR<em> OpenCookie</em>. It would be <strong>disabled</strong>, if you choose <em>Project interface</em> as Cookie class.</p>
<p style="text-align:left;"><em><span style="text-decoration:underline;"><strong>Now, what?<br />
</strong></span></em>
</p>
<p style="text-align:left;">You can find out what all MIME Types are registered into the IDE, by clicking on <strong>Tools &gt; Options,</strong> and click on button <strong>Advanced Options</strong>! There you expand nodes in this order- <strong>IDE Configuration &#8212;&gt; System &#8212;&gt; Object Types</strong></p>
<p style="text-align:left;">Now, select any sub-node, and you could see its property sheet on right panel, where all possible <strong>MIME Types</strong> for that particular<strong> Object Type</strong> are listed. Try this on existing MIME Types, also you may do this for your own created languages (which you might like to integrate into the IDE).</p>
<blockquote>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_HackingNetBeansXMLLayerPartTwo" href="http://wiki.netbeans.org/TaT_HackingNetBeansXMLLayerPartTwo" target="_blank">contribution</a>.</strong></p>
</blockquote>
<p><em><span style="text-decoration:underline;"><strong>References<br />
</strong></span></em>[A] <a href="http://en.wikipedia.org/wiki/MIME#Content-Type" target="_blank">http://en.wikipedia.org/wiki/MIME#Content-Type</a><br />
[B] <a href="http://platform.netbeans.org/tutorials/nbm-filetype.html" target="_blank">Recognizing a File Type Tutorial</a><br />
[C] <a href="http://wiki.netbeans.org/DevFaqActionAddEditorPopup" target="_blank">http://wiki.netbeans.org/DevFaqActionAddEditorPopup</a><br />
[D] <a href="http://wiki.netbeans.org/DevFaqActionAddFileMime" target="_blank">http://wiki.netbeans.org/DevFaqActionAddFileMime</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nbguru.wordpress.com/188/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nbguru.wordpress.com/188/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=188&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/07/07/tat-play-with-xml-layer-part-three-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Play with XML Layer (Part 2)</title>
		<link>http://nbguru.wordpress.com/2008/06/24/tat-play-with-xml-layer-part-two-4/</link>
		<comments>http://nbguru.wordpress.com/2008/06/24/tat-play-with-xml-layer-part-two-4/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 11:45:49 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=190</guid>
		<description><![CDATA[Wow!
I am really enjoying playing with XML Layer. I had mentioned an important note in my previous blog entry- Part One of this series! Its time to work with the CookieAction, i.e. make some Conditionally Enabled Actions and play with it.
By the way, I came to know, that CookieAction does support Shortcut Keys, however I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=190&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Wow!</p>
<p>I am really enjoying playing with XML Layer. I had mentioned an important note in my previous blog entry- <a href="http://nbguru.wordpress.com/2008/06/23/tat-play-with-xml-layer-3/" target="_blank">Part One</a> of this series! Its time to work with the <strong>CookieAction</strong>, i.e. make some <em>Conditionally Enabled Actions</em> and play with it.</p>
<blockquote><p>By the way, I came to know, that CookieAction does support Shortcut Keys, however I used to think it doesn&#8217;t as it was always disabled, when I used Action Wizard to create it.<br />
Its a bug, that&#8217;s present since 5.5 and I never realised- I have filed a <a href="http://www.netbeans.org/issues/show_bug.cgi?id=138924" target="_blank">bug report</a>!</p></blockquote>
<p><span style="text-decoration:underline;"><em><strong>Pre-requisites</strong></em></span></p>
<p>Read my previous blog entry- <a href="http://nbguru.wordpress.com/2008/06/23/tat-play-with-xml-layer-3/" target="_blank">Part One</a> of this series! You should be thorough with all that was explained previously. If not, get it clarified by me OR on <em>Netbeans Community</em> <a href="http://www.netbeans.org/community/lists/top.html" target="_blank">mailing lists</a>.</p>
<p><span style="text-decoration:underline;"><em><strong>Problem Description</strong></em></span></p>
<p>Here, we are going to transform an Action from one type to another, i.e. from CallableSystemAction TO CookieAction, sounds cool! Though, never tried. Well, here I am sharing with you another trick to make it possible, without using <strong>New File Type Wizard</strong>. We will make use of <strong>SayCheez.java</strong>, which was made in previous entry.</p>
<p style="text-align:left;">
<p style="text-align:left;"><span style="text-decoration:underline;"><em><strong>Solution</strong></em></span></p>
<p>So, to start with, remove the CallableSystemAction and let the class SayCheez extend CookieAction, like this;</p>
<p>public final class <strong>SayCheez</strong> extends <strong>CookieAction</strong> {</p>
<p>Now, don&#8217;t remove the already existing implementations of abstract methods of <em>CallableSystemAction</em>, just add following two to let the class SayCheez implement all the abstract methods defined by <em>CookieAction</em>.</p>
<p>@Override<br />
protected Class&lt;?&gt;[] cookieClasses() {<br />
return new Class[]{<strong>{$Interface}</strong>.class};<br />
}</p>
<p>protected int mode() {<br />
return CookieAction.<strong>{$mode}</strong>;<br />
}</p>
<p>Please note, that <strong>{$Interface}</strong> needs to be replaced by appropriate interface, i.e. it could be either of the following Cookie class(es), which are basically interfaces/abstract class(es);</p>
<ol>
<li><strong>Project</strong></li>
<li><strong>OpenCookie</strong></li>
<li><strong>EditCookie</strong></li>
<li><strong>EditorCookie</strong></li>
<li><strong>DataObject</strong> (Abstract Class, NOT an Interface)</li>
</ol>
<p>Also, <strong>{$mode}</strong> needs to be replaced with either MODE_EXACTLY_ONE[1] or MODE_ALL[2].</p>
<ol>
<li>User Selects One Node</li>
<li>User May Select Multiple Nodes</li>
</ol>
<blockquote><p>MODE_EXACTLY_ONE -<br />
Action will be enabled if there is exactly one selected node  and it supports the given cookies.</p>
<p>MODE_ALL -<br />
Action will be enabled if there are one or more selected nodes  and all of them support the given cookies.</p>
<p>In our case, its EditorCookie!</p></blockquote>
<p>Now, alter the <strong>performAction</strong> method like this,</p>
<p>protected void <strong>performAction</strong>(Node[] activatedNodes) {<br />
{$Interface} <strong>ref</strong> = activatedNodes[0].getLookup().lookup({$Interface}.class);<br />
// TODO use {$Interface}<br />
}</p>
<p>Here, <strong>ref</strong> is basically the reference to either the interface/class being made, which is being assigned a subclass reference, it could be of great use. Now, add your code for <strong>DialogDisplayer</strong> used in previous blog entry, in place of <strong>TODO</strong> comment.</p>
<p>See, it was too easy! Anyways, the changes in <strong>XML Layer</strong>,<strong> </strong>which shall be done with respect to the change in the Action type, some of them are as follows and rest will be the mentioned in the next part of this series.</p>
<p style="text-align:center;"><strong>Tricks for Menu Item, Toolbar Button, Shortcut Keys</strong></p>
<p><em>Trick #1 -</em> If you had made a Global Menu Item OR Toolbar Button with CallableSystemAction, then no changes required.</p>
<p><em>Trick #2 </em>- If you had made use of Shortcut Keys earlier, now you have to remove them, as CookieAction doesn&#8217;t support Shortcut Keys! Well, I don&#8217;t know why. So, remove following code from our XML Layer, formed earlier.</p>
<p><a href="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-keys.jpg"><img class="aligncenter size-full wp-image-185" src="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-keys.jpg?w=470&#038;h=55" alt="" width="470" height="55" /></a></p>
<p style="text-align:left;">Thanks for following, enjoy and have fun! Surprise to be revealed soon&#8230;keep an eye on my blog!</p>
<blockquote>
<p style="text-align:center;"><strong>Previously posted on NetBeans Zone -<br />
<a href="http://netbeans.dzone.com/tips/play-with-xml-layer" target="_blank">Playing with NetBeans XML Layer Files (Part 1)</a><br />
</strong><br />
<a href="http://technorati.com/faves?sub=addfavbtn&amp;add=http://nbguru.wordpress.com"><img src="http://static.technorati.com/pix/fave/tech-fav-1.png" alt="Add to Technorati Favorites" /></a></p>
</blockquote>
<p style="text-align:left;"><em><strong>sTay Tuned for More&#8230;</strong></em></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nbguru.wordpress.com/190/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nbguru.wordpress.com/190/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=190&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/06/24/tat-play-with-xml-layer-part-two-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-keys.jpg" medium="image" />

		<media:content url="http://static.technorati.com/pix/fave/tech-fav-1.png" medium="image">
			<media:title type="html">Add to Technorati Favorites</media:title>
		</media:content>
	</item>
		<item>
		<title>taT | Play with XML Layer</title>
		<link>http://nbguru.wordpress.com/2008/06/23/tat-play-with-xml-layer-3/</link>
		<comments>http://nbguru.wordpress.com/2008/06/23/tat-play-with-xml-layer-3/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 08:59:17 +0000</pubDate>
		<dc:creator>Varun</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Platform]]></category>
		<category><![CDATA[Tips|Tricks]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://nbguru.wordpress.com/?p=179</guid>
		<description><![CDATA[Hey,
As I mentioned in my previous entry, that I am starting with a new blog series. This is it- Part One, of Blog Series: XML Layer! Hope you would enjoy, following it. Anyways, coming back to the point. Let me share with you another trick, which I was observing for few weeks, and its really [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=179&subd=nbguru&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hey,</p>
<p style="text-align:left;">As I mentioned in my previous entry, that I am starting with a new blog series. This is it- <strong>Part One</strong>, of <a href="http://nbguru.wordpress.com/2008/06/23/blog-series-xml-layer/" target="_blank"><em>Blog Series: XML Layer</em></a>! Hope you would enjoy, following it. Anyways, coming back to the point. Let me share with you another trick, which I was observing for few weeks, and its really cool! Its based on <a href="http://platform.netbeans.org" target="_blank"><strong>NetBeans Platform</strong></a>. This is my first full-fledged post on NetBeans Platform, as I&#8217;m dealing with it almost daily for over a week, for some cool plugin development.</p>
<p style="text-align:left;"><span style="text-decoration:underline;"><em><strong>Pre-requisites</strong></em></span></p>
<p style="text-align:left;">This trick makes use of the <a href="http://platform.netbeans.org/tutorials/quickstart-nbm.html" target="_blank"><strong>existing tutorial</strong></a>, which is the base on which I have carried out the trick. Also, you must read this tutorial, if you don&#8217;t have prior experience with NetBeans Platform. Hey, give this a read as well,</p>
<blockquote>
<p style="text-align:left;">This <strong><a href="http://platform.netbeans.org/tutorials/nbm-idioms.html" target="_blank">overview</a></strong> will quickly familiarize you with how NetBeans plug-in modules   interact with the NetBeans infrastructure and with each other.</p>
</blockquote>
<p style="text-align:left;"><span style="text-decoration:underline;"><em><strong>Problem Description</strong></em></span></p>
<p style="text-align:left;">As mentioned in the tutorial, I created an <strong>Action Type</strong> (<a href="http://bits.netbeans.org/6.0/javadoc/org-openide-util/org/openide/util/actions/CallableSystemAction.html" target="_blank">CallableSystemAction</a>), made it a Global MenuItem and Toolbar Button. I named the Action Type (Java file) as <strong>SayCheez</strong>, and display Name as <strong>Say Cheez&#8230;</strong></p>
<p style="text-align:left;">Now, I have made this action, as expected in the tutorial. Now, <em>right-click</em> Project &amp; <em>click</em> on <strong>Install/Reload in Target Platform </strong>in the context-sensitive popup menu (context-menu). Its running successfully!</p>
<p style="text-align:left;"><a href="http://nbguru.files.wordpress.com/2008/06/nb-say-cheez-action.png"><img class="aligncenter size-full wp-image-181" src="http://nbguru.files.wordpress.com/2008/06/nb-say-cheez-action.png?w=470&#038;h=339" alt="" width="470" height="339" /></a></p>
<p style="text-align:left;">Now, let me show you the structure of XML Layer (layer.xml), its similar to the one shown in the tutorial, i.e. how it registers the action into the NetBeans IDE. See this image;</p>
<p style="text-align:center;"><a href="http://nbguru.files.wordpress.com/2008/06/nb-module-init-xml-layer.jpg"><img class="size-full wp-image-180 aligncenter" src="http://nbguru.files.wordpress.com/2008/06/nb-module-init-xml-layer.jpg?w=470&#038;h=295" alt="" width="470" height="295" /></a></p>
<p style="text-align:left;">So, the trick is how to play with the Layer and don&#8217;t waste time, placing actions anywhere else in the IDE, by recreating them.</p>
<p style="text-align:left;"><span style="text-decoration:underline;"><em><strong>Solution</strong></em></span></p>
<p style="text-align:left;">Note, all the following tricks would work for <strong>CallableSystemAction</strong> only, I have not tested for <strong>CookieAction</strong>, though it should work for <em>CookieAction</em> as well, if you are working with only <em>MenuItem, Toolbar Button </em>OR<em> Shortcut Keys</em>! For <strong>Editor</strong> and <strong>File Type Context MenuItem</strong>, there would be some other way round, I will see if its comfortable playing with them as well <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align:center;"><strong>By Code Deduction</strong></p>
<p style="text-align:left;"><em>Trick #1- </em>If you want to remove either one of the separators, OR even both of them, then see the following image, the code present in that remove it from the XML Layer, as per your need.</p>
<p style="text-align:left;"><a href="http://nbguru.files.wordpress.com/2008/06/dereg-menu-separator.jpg"><img class="aligncenter size-full wp-image-182" src="http://nbguru.files.wordpress.com/2008/06/dereg-menu-separator.jpg?w=470&#038;h=118" alt="" width="470" height="118" /></a></p>
<p style="text-align:left;"><em>Trick #2</em> &#8211; If you want to remove the Action, from Toolbar, then remove the following code;</p>
<p style="text-align:left;"><a href="http://nbguru.files.wordpress.com/2008/06/dereg-global-toolbar.jpg"><img class="aligncenter size-full wp-image-183" src="http://nbguru.files.wordpress.com/2008/06/dereg-global-toolbar.jpg?w=470&#038;h=82" alt="" width="470" height="82" /></a></p>
<p style="text-align:left;"><em>Trick #3</em> &#8211; If you want to remove the Action from Tools Menu, and retain it only on the Toolbar, then remove the following code;</p>
<p style="text-align:left;"><a href="http://nbguru.files.wordpress.com/2008/06/dereg-global-menuitem.jpg"><img class="aligncenter size-full wp-image-184" src="http://nbguru.files.wordpress.com/2008/06/dereg-global-menuitem.jpg?w=469&#038;h=167" alt="" width="469" height="167" /></a></p>
<p style="text-align:center;"><strong>By Code Replacement</strong></p>
<p style="text-align:left;"><em>Trick #4</em> &#8211; If you want to make a Shortcut key for this action, add the following code,</p>
<p style="text-align:left;"><a href="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-keys.jpg"><img class="aligncenter size-full wp-image-185" src="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-keys.jpg?w=470&#038;h=55" alt="" width="470" height="55" /></a></p>
<p style="text-align:left;"><em>Trick #5</em> &#8211; Sometimes, it might happen, that your action is not suitable for any existing <em>Menu</em>, and you are looking to create your own <em>Menu</em>. By the time, you get ready with your <em>Menu</em>, you can just have this <em>Shortcut Keys</em> alone, i.e. no <em>Menu Item</em>, no <em>Toolbar Button</em>.</p>
<p style="text-align:left;"><a href="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-n-dereg-others.jpg"><img class="aligncenter size-full wp-image-186" src="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-n-dereg-others.jpg?w=470&#038;h=202" alt="" width="470" height="202" /></a></p>
<p style="text-align:left;"><span style="text-decoration:underline;"><em><strong>Tips to remember</strong></em></span></p>
<p style="text-align:left;">This code has a shortcut key &#8220;Alt+F3&#8243;, which is represented as &#8220;O-F3.shadow&#8221;, so this means, if you have some key combination, that uses <strong>&#8220;Alt&#8221;</strong>, then use <strong>&#8220;O&#8221;</strong>, and for each<strong> &#8220;+&#8221; </strong>sign use<strong> &#8220;-&#8221;</strong> ,finally concatenate with the just formed combination with <strong>&#8220;.shadow&#8221;</strong>! If you use <strong>&#8220;Ctrl&#8221;</strong>, then use <strong>&#8220;D&#8221;</strong> and for <strong>&#8220;Shift&#8221;</strong>, use <strong>&#8220;S&#8221;</strong>!</p>
<p style="text-align:left;">Following are some key equivalents used in XML Layer;</p>
<ol>
<li>A to Z (as it is), F1 to F12 (as it is), 0 to 9 (as it is)</li>
<li><strong>/</strong> as SLASH, <strong> </strong> as BACK_SLASH</li>
<li><strong>;</strong> as SEMI_COLON</li>
<li><strong>.</strong> as PERIOD</li>
<li><strong>&#8216;</strong> as QUOTE</li>
</ol>
<p>These were some of the frequently used keys in Shortcut Key combination, if you want to know some more, you can post a comment over here. I would be glad to help you out!</p>
<p>Actually, I was developing a module for past one week, and more intensely on the weekend, and have observed this by <strong>hit-and-trial</strong>, and thought of sharing the trick with you people. By the way, there&#8217;s a surprise! Any guesses, well no prizes for guessing!</p>
<blockquote>
<p style="text-align:center;"><strong>HINT</strong><br />
Its related to the module, I&#8217;m working on for past one week.</p>
</blockquote>
<p><em>Playing with XML Layer</em>, reminded me that I have to resume working on XML Hyperlink Module as well <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Anyways, thanks for following, enjoy and have fun! To know more about the surprise, keep an eye on my blog!</p>
<blockquote>
<p style="text-align:center;"><strong>Previously Posted on NetBeans Zone</strong> -<br />
<strong><a href="http://netbeans.dzone.com/news/update-issue-136216-mysql-serv" target="_blank">Update on Issue #136216: MySQL Server Node Error</a></strong>
</p>
<p style="text-align:center;"><strong>This blog has been contributed to <a title="http://nb-community-docs.blogspot.com/" href="http://nb-community-docs.blogspot.com/" target="_blank">NetBeans Community Docs Program</a> and for latest updates on this content, refer to the <a title="http://wiki.netbeans.org/TaT_HackingNetBeansXMLLayerPartOne" href="http://wiki.netbeans.org/TaT_HackingNetBeansXMLLayerPartOne" target="_blank">contribution</a>.</strong></p>
<p style="text-align:center;"><a href="http://technorati.com/faves?sub=addfavbtn&amp;add=http://nbguru.wordpress.com"><img src="http://static.technorati.com/pix/fave/tech-fav-1.png" alt="Add to Technorati Favorites" /></a></p>
</blockquote>
<p><em><strong>sTay Tuned for More&#8230;</strong></em></p>
<p style="text-align:left;">
<p style="text-align:left;">
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/nbguru.wordpress.com/179/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/nbguru.wordpress.com/179/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nbguru.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nbguru.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nbguru.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nbguru.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nbguru.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nbguru.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nbguru.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nbguru.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nbguru.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nbguru.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nbguru.wordpress.com&blog=3440143&post=179&subd=nbguru&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://nbguru.wordpress.com/2008/06/23/tat-play-with-xml-layer-3/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bc6aaa858b706e02cdb9aee0a9672304?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">nvarun</media:title>
		</media:content>

		<media:content url="http://nbguru.files.wordpress.com/2008/06/nb-say-cheez-action.png" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/06/nb-module-init-xml-layer.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/06/dereg-menu-separator.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/06/dereg-global-toolbar.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/06/dereg-global-menuitem.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-keys.jpg" medium="image" />

		<media:content url="http://nbguru.files.wordpress.com/2008/06/reg-shortcut-n-dereg-others.jpg" medium="image" />

		<media:content url="http://static.technorati.com/pix/fave/tech-fav-1.png" medium="image">
			<media:title type="html">Add to Technorati Favorites</media:title>
		</media:content>
	</item>
	</channel>
</rss>
