Solved

How to add additional file type to New context menu.

Posted on 2008-06-11
3
1,881 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

791 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