Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a custom file extension to Netbeans

Tags:

php

ide

netbeans

I am trying to figure out how to add a custom file type to be recognised by Netbeans.

I am editing .tpl files and I would like them to be recognised as PHP/HTML files.

I've looked here and here but I cant find cnd.properties in config directory and there is no Advanced Options dialog in the options dialog.

I'm using Netbeans 6.5 with PHP and all modules up to date.

like image 925
garrow Avatar asked May 25 '09 05:05

garrow


People also ask

How do I open a file in Netbeans?

The best way to search and open file in netbeans: Press ctrl + o and type file name you are looking for, it will search in current projects and list matching files thn you can select file and open.

How do I create a PNG file in Netbeans?

It's quite easy: Just copy the file from source folder and paste it into the desired folder of your Netbeans project tree (inside the IDE). Show activity on this post. Yes, drag and drop is easier to use with Netbeans.

How do I change the file extension in NetBeans 8?

In NetBeans 8.XX this is achieved by going to NetBeans > Preferences > Miscellaneous > Files. In the row File Extension click on NEW and enter your new file extension without the dot (example: tpl ).

How to create a mime file in NetBeans 8?

Select Files sub-tab thing. Click on New file extension and enter tpl. Select the mime type. Click OK. Done! Show activity on this post. In NetBeans 8.XX this is achieved by going to NetBeans > Preferences > Miscellaneous > Files. In the row File Extension click on NEW and enter your new file extension without the dot (example: tpl ).

How do I install a NetBeans module?

Right-click the module project and install it. Create a new web application, or open an existing one, and notice that it has an Important Files node, containing the files from the 'nbproject' folder: For more information about creating and developing NetBeans modules, see the following resources:

How do I create a NetBeans project with importantwebfiles?

Choose File > New Project (Ctrl-Shift-N). Under Categories, select NetBeans Modules. Under Projects, select Module. Click Next. In the Name and Location panel, type ImportantWebFiles in Project Name.


2 Answers

Let me guess, for Smarty templates? I did the following

  1. Open Tools and Select Options.
  2. Select Miscellaneous tab.
  3. Select Files sub-tab thing.
  4. Click on New file extension and enter tpl.
  5. Select the mime type.
  6. Click OK. Done!
  7. (Restart of Netbeans may be required to see the actual changes)
like image 133
karim79 Avatar answered Sep 22 '22 08:09

karim79


In NetBeans 8.XX this is achieved by going to NetBeans > Preferences > Miscellaneous > Files. In the row File Extension click on NEW and enter your new file extension without the dot (example: tpl). Choose the Associated File Type (MIME) and click Apply.

like image 32
Jörg Bayreuther Avatar answered Sep 22 '22 08:09

Jörg Bayreuther