Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse IDE: Add/change default filetypes?

When I create a new file in Eclipse, there's a wide selection of different alternatives appearing in Eclipse.

However I am missing a couple of file which I need to open the "file create wizard" to create - JS files included.

How can I add my own file types as a default choice to appear in the "new files" menu?

Screenshot of the menu I am referring to: alt text

like image 323
Industrial Avatar asked Dec 14 '10 13:12

Industrial


People also ask

How do I change the default file opener in Eclipse?

Tip. You can set which Eclipse editor or external program to use to open a specific type of file based on its file extension. Just select Window→ Preferences→ Workbench→ File Associations, select the file type, and associate an editor or program with it (if nothing else, you can use Eclipse's default text editor).

How do I change the default author in Eclipse?

Simply go to: Window - Preferences - Java - Code Style - Code Templates - Comments - Types - Edit... and change ${user} to whatever you want. Also go to: Window - Preferences - Java - Editor - Templates - @author - Edit... and change ${user} to whatever you want.

How do I add an author to STS?

Shift + Alt + J will help you add author name in existing file.

How do I edit a file in Eclipse?

To edit a file, double click it in the Project explorer or Package explorer view. Whenever you open a text file, change it, or the editor receives the focus, the file is checked for errors. If there are errors (or warnings), they are displayed in the editor as shown below.


2 Answers

Yes, from the Eclipse's toolbar, right click > Customize perspective... > Menu Visibility > File > New > check and uncheck file types.

like image 116
lacodajeff Avatar answered Oct 05 '22 04:10

lacodajeff


Puuh - just when I had given up I accidentally found this:

Try this: Right click on Eclipse's toolbar and choose "Customize this perspective" option. You will see a dialog box, and on "Shortcuts" tab choose "New" from "Submenus:" droplist.

Find "PHP" in the left pane and check the checkbox next to it. It will enable both "PHP File" and "PHP Project" in "New" menu of your perspective. You can do the same to other file editors as well. (HTML, CSS,....

http://dev.eclipse.org/newslists/news.eclipse.tools.pdt/msg00228.html

like image 34
Industrial Avatar answered Oct 05 '22 05:10

Industrial