Solved

How to add additional file type to New context menu.

Posted on 2008-06-11
3
1,869 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
ID: 21763141
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
ID: 21763370
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
ID: 21763449
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
.php tree directory? 5 57
test if query has no results 2 19
PHP warning 4 30
How do I remove all except the numbers?  PHP  Regex 3 14
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

863 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

20 Experts available now in Live!

Get 1:1 Help Now