Solved

How to add additional file type to New context menu.

Posted on 2008-06-11
3
1,864 Views
Last Modified: 2013-12-15
Hello.
I'm using Eclipse PDT for php development but it should be the same for Java.
When I'm using right click on file explorer I have New menu to add new file.
Depending on what type of project I;m working (java or php) there are different file types that I can create
for Java there is .java for php there is .php , .html and so on.
I want to add additional file extension .phtml (yes Phtml) .
I know I can add phtml file by using other and simple file then just typing filename.phtml but its more time consuming.

How can I do this?
Is there any configuration file?
Best Regards
FooKy
0
Comment
Question by:f_o_o_k_y
  • 2
3 Comments
 
LVL 8

Expert Comment

by:CoyotesIT
Comment Utility
Yes you can, here is a great tutorial on adding custom templates, which is what you will need to do.

In Ecplipse click \Window\Preferences and type templates in the search bar

You will then be able to add a new template by selecting the "Templates" under PHP for your new filetype.

http://eclipse.dzone.com/news/effective-eclipse-custom-templ

Good luck!

0
 
LVL 11

Author Comment

by:f_o_o_k_y
Comment Utility
I don't think so. Or I couldn't understand this.

But using this I can create templates which I can then use by pressing ctl+space
for example to use if else statement.

But I want to be able to create new file in my "solution explorer" I see ther New php file with this code
<?php
${cursor}
?>

But when I added new Phtml and code ${cursor} then nothing happened and I still do not have phtml under right mouse buton in file explorer in eclipse.

I'm not sure but meybe I need to change something in php plugin for eclipse? or something else?
0
 
LVL 8

Accepted Solution

by:
CoyotesIT earned 500 total points
Comment Utility
Sorry, after trying that myself, i realized that was not the answer you were looking for.

I think this may be more to what you are looking for.

http://www.ibm.com/developerworks/library/os-eclipse-3.3menu/index.html

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now