<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>PMA Media Group&#187; NetBeans 6.5</title>
	<atom:link href="http://www.pmamediagroup.com/tag/netbeans-65/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pmamediagroup.com</link>
	<description>Unique Marketing Techniques and Strategies with Guaranteed Results!</description>
	<lastBuildDate>Fri, 27 Aug 2010 18:14:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Add a New File Type For NetBeans 6.5.1</title>
		<link>http://www.pmamediagroup.com/2009/04/how-to-add-a-new-file-type-for-netbeans-651/</link>
		<comments>http://www.pmamediagroup.com/2009/04/how-to-add-a-new-file-type-for-netbeans-651/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 15:29:04 +0000</pubDate>
		<dc:creator>Chris Gunnels</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[create a NetBeans language]]></category>
		<category><![CDATA[NetBeans 6.5]]></category>
		<category><![CDATA[NetBeans Cucumber Plugin]]></category>
		<category><![CDATA[New File Types]]></category>

		<guid isPermaLink="false">http://www2.pmamediagroup.com/?p=33</guid>
		<description><![CDATA[This tutorial shows you how to write a module that lets the NetBeans IDE, or any other application built on the NetBeans Platform, recognize a new file type. I taught myself how to do this in search for a way to have NetBeans color code and recognize the Cucumber file extension &#8220;.feature&#8221;.

First you must have [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial shows you how to write a module that lets the NetBeans IDE, or any other application built on the NetBeans Platform, recognize a new file type. I taught myself how to do this in search for a way to have NetBeans color code and recognize the Cucumber file extension &#8220;.feature&#8221;.</p>
<p><span id="more-33"></span></p>
<p>First you must have the ability to create a new module, so if you just downloaded the NetBeans bundle for Java, Ruby or PHP, then you&#8217;ll need to download and install the <a href="http://www.netbeans.org/downloads/index.html">entire NetBeans bundle</a> because you&#8217;ll most likely not be able to create a new module. Assuming you have that:</p>
<p><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>Creating the Module Project</strong></span></span></p>
<ol>
<li>Click File -&gt; New Project, In the dialog box under the Categories section choose NetBeans Modules and then under the Projects section choose Module. Click Next. ( see Figure 1 )
<div id="attachment_37" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-1.png"><img class="size-medium wp-image-37" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-1-300x186.png" alt="figure 1 (click to view larger)" width="300" height="186" /></a><p class="wp-caption-text">figure 1 (click image for larger size)</p></div></li>
<li>Type in the the Project Name (no spaces), browse to the location that you want to save this module, and make sure to keep Standalone Module checked. Set it to be the Main Project and click Next. ( see Figure 2 )
<p><div id="attachment_44" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-3.png"><img class="size-medium wp-image-44" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-3-300x186.png" alt="Figure 3 (click image for larger size)" width="300" height="186" /></a><p class="wp-caption-text">Figure 2 (click image for larger size)</p></div></li>
<li>In the next panel,  fill in the Code Name Base by typing <span style="color: #808080;"><em>org.myorg.cucumberfiletype</em></span>. You&#8217;ll want to add spaces to the Module Display Name, so its <em><span style="color: #808080;">Cucumber File Type</span></em> instead of CucumberFileType. Last Select the &#8220;Generate XML Layer&#8221; checkbox, leave the location of the localizing bundle and XML layer as the defaults, and click Finish. The panel should look something like this:  ( see Figure 3 )
<p><div id="attachment_48" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-4.png"><img class="size-medium wp-image-48" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-4-300x186.png" alt="Figure 3 ()" width="300" height="186" /></a><p class="wp-caption-text">Figure 3 (click image for larger size)</p></div></li>
</ol>
<p>NetBeans creates the <em>Cucumber File Type</em> project. After it is finished building the project it will open in the IDE. For example, the Projects window should now look as follows: ( see Figure 4 )</p>
<p><div id="attachment_61" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-41.png"><img class="size-medium wp-image-61" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-41-300x162.png" alt="Figure 4" width="300" height="162" /></a><p class="wp-caption-text">Figure 4 (click image for larger size)</p></div>
<p><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>Creating the File Type</strong></span></span></p>
<ol>
<li><span style="color: #3366ff;"><span style="color: #000000;">Right click the project and click New -&gt; File Type</span></span></li>
<li><span style="color: #3366ff;"><span style="color: #000000;">In the dialog box do the following: </span></span> ( see Figure 5 )
<ul>
<li>MIME Type text box: <span style="color: #000000;">type</span><em><span style="color: #808080;"> text/x-feature</span></em> (the word feature is the name of the extension you want)</li>
<li>Extensions text box: type <em><span style="color: #808080;">.feature .FEATURE</span></em></li>
<li><span style="color: #808080;"><span style="color: #000000;">Click Next</span></span><em><span style="color: #808080;"><br />
</span></em></li>
</ul>
<div id="attachment_70" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-5.png"><img class="size-medium wp-image-70" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-5-300x211.png" alt="Figure 5" width="300" height="211" /></a><p class="wp-caption-text">Figure 5 (click image for larger size)</p></div></li>
<li>Now type in the Class Name Prefix, in this example it is <em><span style="color: #888888;">Cucumber</span></em>. Browse to an image that is 16&#215;16, it can be a gif or png (maybe other image types to but I haven&#8217;t tried them). We will use <a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/cucumber16x16.png"><img class="alignnone size-full wp-image-73" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/cucumber16x16.png" alt="cucumber16x16" width="16" height="16" /></a> for this example. Leave everything else as is and click Finish.   ( see Figure 6 ) The IDE will create a bunch of files for you, but you can close them because you won&#8217;t have to edit them for what we&#8217;re doing.
<p><div id="attachment_82" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-6.png"><img class="size-medium wp-image-82" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-6-300x260.png" alt="Figure 6" width="300" height="260" /></a><p class="wp-caption-text">Figure 6 (click image for larger size)</p></div></li>
</ol>
<p>Your project should now look like this:</p>
<p><div id="attachment_87" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-7.png"><img class="size-medium wp-image-87" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-7-300x206.png" alt="Figure 7" width="300" height="206" /></a><p class="wp-caption-text">Figure 7 (click image for larger size)</p></div>
<p>In the layer.xml file, you should see the following or something like it:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE filesystem PUBLIC &quot;-//NetBeans//DTD Filesystem 1.1//EN&quot; &quot;http://www.netbeans.org/dtds/filesystem-1_1.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filesystem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Services&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;MIMEResolver&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;CucumberResolver.xml&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;CucumberResolver.xml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;SystemFileSystem.localizingBundle&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;org.myorg.cucumberfiletype.Bundle&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;text-feature-mime-resolver.xml&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;text-feature-mime-resolver.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Editors&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;feature&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;language.nbs&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;language.nbs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> name =<span style="color: #ff0000;">&quot;icon&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;org/myorg/cucumberfiletype/cucumber16x16.png&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Loaders&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;x-feature&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Actions&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-CopyAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;400&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-CutAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;300&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-DeleteAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;600&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-FileSystemAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;1100&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-OpenAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;100&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-PropertiesAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;1400&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-RenameAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;700&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-SaveAsTemplateAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;900&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-openide-actions-ToolsAction.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;1300&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;sep-1.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;instanceClass&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;javax.swing.JSeparator&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;200&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;sep-2.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;instanceClass&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;javax.swing.JSeparator&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;500&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;sep-3.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;instanceClass&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;javax.swing.JSeparator&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;800&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;sep-4.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;instanceClass&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;javax.swing.JSeparator&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;1000&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;sep-5.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;instanceClass&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;javax.swing.JSeparator&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;position&quot;</span> <span style="color: #000066;">intvalue</span>=<span style="color: #ff0000;">&quot;1200&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Factories&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;CucumberDataLoader.instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;SystemFileSystem.icon&quot;</span> <span style="color: #000066;">urlvalue</span>=<span style="color: #ff0000;">&quot;nbresloc:/org/myorg/cucumberfiletype/cucumber16x16.png&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;dataObjectClass&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;org.myorg.cucumberfiletype.CucumberDataObject&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;instanceCreate&quot;</span> <span style="color: #000066;">methodvalue</span>=<span style="color: #ff0000;">&quot;org.openide.loaders.DataLoaderPool.factory&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;mimeType&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;text/x-feature&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Navigator&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Panels&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;feature&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;org-netbeans-modules-languages-features-LanguagesNavigator.instance&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Templates&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;folder</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Other&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;CucumberTemplate.feature&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;CucumberTemplate.feature&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;SystemFileSystem.localizingBundle&quot;</span> <span style="color: #000066;">stringvalue</span>=<span style="color: #ff0000;">&quot;org.myorg.cucumberfiletype.Bundle&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;template&quot;</span> <span style="color: #000066;">boolvalue</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attr</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;templateWizardURL&quot;</span> <span style="color: #000066;">urlvalue</span>=<span style="color: #ff0000;">&quot;nbresloc:/org/myorg/cucumberfiletype/Description.html&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/file<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/folder<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filesystem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>How to Install and Try Out Your New File Type</strong></span></span></p>
<ol>
<li>Right click on the project and click on &#8220;Install/Reload in Development IDE&#8221;. NetBeans will create and install your new file type only for this session of NetBeans. Once you close the IDE it will delete the &#8220;install&#8221;, but not the module/project.</li>
<li>Click File -&gt; New Project and create any type of project you want</li>
<li>Right click the project you just created and click New -&gt; Other. You will see your new file type in the File Types section.
<p><div id="attachment_103" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-8.png"><img class="size-medium wp-image-103" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-8-300x216.png" alt="Figure 8" width="300" height="216" /></a><p class="wp-caption-text">Figure 8 (click image for larger size)</p></div></li>
<li>You can add default code for your new File Type&#8217;s template by editing the <em><span style="color: #808080;">CucumberTemplate.feature</span></em> file. This will be explained in another post, but for now its beyond the scope of this tutorial.</li>
</ol>
<p>You can add more features to your module at this point, but we will skip that for now. See <a href="http://platform.netbeans.org/tutorials/nbm-filetype.html#adding">Creating Features for New File Types</a></p>
<p><span style="color: #3366ff;"><span style="text-decoration: underline;"><strong>How to Create Shareable Module Binary</strong></span></span></p>
<p>This section will allow you to share your new module with others. In order to do this you must create a NBM file.</p>
<ol>
<li>Right click on your project and click Create NBM</li>
<li>You should now be able to view the NBM file in the Files window
<p><div id="attachment_113" class="wp-caption alignnone" style="width: 310px"><a href="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-9.png"><img class="size-medium wp-image-113" src="http://www2.pmamediagroup.com/wp-content/uploads/2009/04/picture-9-300x204.png" alt="Figure 9" width="300" height="204" /></a><p class="wp-caption-text">Figure 9 (click image for larger size)</p></div></li>
<li>You can now share your module by going to the <a href="http://plugins.netbeans.org/PluginPortal/">NetBeans Plugin Portal</a></li>
</ol>
<p>I hope you enjoyed this tutorial and that it all worked for you!</p>
<p>Please view our post on the <a href="http://www.pmamediagroup.com/2009/04/what-netbeans-651-can-now-recognize-my-cucumber-feature-files/">Cucumber BDD NetBeans Plugin</a> to download it and get the latest updates.</p>
<p>Comment, Tweet, Appreciate!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pmamediagroup.com/2009/04/how-to-add-a-new-file-type-for-netbeans-651/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.pmamediagroup.com @ 2012-02-08 16:38:10 -->
