Get PHP Eclipse to run error checking on different types of files

In my project, I have a series of *.tpl files that I would like to interpret Eclipse as PHP code. I managed to get syntax highlighting to work correctly for these files by adding the *.tpl in Preferences -> General -> Editors -> Content Types . However, this does not seem to allow checking / checking for syntax error either.

Thus, I would like Eclipse show me errors in a line in the editor, and also indicate any errors / warnings in files in PHP Explorer - for files with the .tpl extension. Nothing is happening right now.

I also tried adding *.tpl to Preferences -> General -> Editors -> File Associations . I tried to press F5 in various relevant places and tried to restart Eclipse . The folder with *.tpl files is a subdirectory of the source folder. Other subdirectories of this source folder work correctly (although they have .php files). I do not know what else to do. Please, help!

Thanks!

+4
source share
2 answers

Good, that's strange. I just tried to check the Ashutosh example, and it worked. After creating a new test.tpl file, suddenly all the other .tpl files in the project began to be parsed / checked correctly, and all warning / error icons appeared unexpectedly.

So this seems like a bug in this version of Eclipse (http://www.zend.com/en/community/pdt/downloads). Hope this is a recurring workaround for everyone who is having a problem though!

Thanks a lot guys.

+1
source

For what I tried to create a custom *.guvava and was able to do this by adding *.guvava to Content Types and File Associations . When after that I opened a new guvava file, I had everything that I would have in a java file.

enter image description here

enter image description here

enter image description here

+3
source

All Articles