How to Add PHPUnit to your Include Path (for autocompletion) in Eclipse PDT
By default, PHPUnit is not part of the default installation of Eclipse PDT. (Zend Studio is another beast, however…)
These entries are tagged with the “eclipse-pdt” tag. Eclipse PDT is a PHP Development Tool based on the Eclipse platform. Yup, this is still around, but these entries are probably pretty old. I haven’t used Eclipse PDT in a while.
By default, PHPUnit is not part of the default installation of Eclipse PDT. (Zend Studio is another beast, however…)
If I need to run PHPUnit on a remote system against a code suite, I will write a simple shell script like the following to do it for me. (Bonus points, you can even include this as an External Tool in eclipse to do it right from your project).
It had been irritating to me seeing the .svn folders littered throughout my project workspace. In addition, they all show up in the search results… this can be irritating with the svn-base
files that show the old version of the file before a commit.
When searching for how to count the lines of code I had in my project, I ran into this blog entry. While it’s a good start, it still gave me some inaccurate counts. I was getting inflated counts because of new lines. So, here is my alternate solution:
When creating a docblock in Eclipse PDT, if commenting is enabled, a template is inserted. This template references the $user
variable which is usually set to whichever user you are logged into your machine with. You can change this variable on the command line every time you launch Eclipse if you really wanted to:
As you probably know by now, I’m a huge fan of Eclipse PDT. Well, I wanted to stop using MySQL GUI tools for a bit and explore Eclipse tools.
I am using the new PDT2 based off of Eclipse 3.4. The one thing I noticed as an issue for me was the building. I created a project based off of a checkout using SVN. After I had built the PHP project, I could not ctrl-click any of the functions that were part of my project. It just wouldn’t find them.
When I use an IDE, I expect for it to do everything I need for my project, from start to finish. As you may have read in earlier entries, I enjoy using Eclipse PDT. I think its time to include load testing into my arsenal of tools inside of eclipse. I’m going to focus on apache’s AB for this article.
When troubleshooting a different problem the other day, I re-entered the world of eclipse include paths. For those of you who are not familiar, the eclipse include path is located as the last option of a eclipse PDT PHP project.
Unfortunately, at #superdev, there are times when the include_path
in PHP is calculated. It is not always clear where to find a file. Other times there are just too many places to find the file. Because of this - and Eclipse PDT’s inability to find a file from an include or include_once
statement when you ctrl click it, I needed to find a tool to find files fast.
Are you a huge fan of Eclipse PDT as I am?
XDebug and Eclipse PDT on Windows - From Start to Finish
Most of my development in Eclipse PDT with the results tested outside of it - using firefox. PDT has a few options in the Run… menu:
So many times during development, I’ve missed little PHP errors because they were 1) on a processing page that was redirected or 2) output inside of a html tag - and rendered invisible.
In my posting about Integrating PHPDocumentor into Eclipse, I touched on External Tools a bit. The combination of external batch files, the external tools extra options and the console has made my life easier. I’m using two new additional batch files that I’ve written myself and integrated as external tools. These include automated SVN release update and resource refresh and Apache application control (for those who can’t run apache as a service on w32):
I generally don’t like to be tied to a specific IDE when developing. Additionally, I like to have my choice in using tools to manage my source control (tortoisesvn, svn command line, etc). I just think this is the open-source way - it seems to be just a more free-spirited way of developing and managing projects. With this in mind, I’ve been looking for ways to integrate my SVN into my current IDE (Eclipse PDT) but not limit myself from accessing my SVN repositories from the file system. I’ve found a great plugin to help with this - so let’s go over the specifics:
After I installed Eclipse PDT, I had two project navigators. I closed the native one and kept open the PHP Explorer. PHP Explorer showed my php, css, js, etc, files. It also puts a plus sign to the left of the filenames. Using this view, we can expand the file to see the classes and functions inside of the file without opening it.
The last time I downloaded Eclipse PDT for PHP, (located at zend.com/pdt), everything was great. That is, until I wanted to run the updates. It stopped with an error and would never update my PDT. Luckily, one of the consultants from (“the triangle”) had the same issues - and he was able to tell me what was up:
Although I’d like to pretend that my side jobs always are pure programming, but alas, not the case. There are times when the users send word docs to me and I have to convert them to html. Now, even these word docs might have spelling mistakes - but that’s just not ‘acceptable’ to them - I should correct those issues too! Whats up with that? But anyway, I now have a good plugin to do spellchecking in eclipse - that won’t break on code (well not sorta…). This supports spell checking as you type, language specific options, and more. At any rate, let’s check out eclipse’s built in spelling feature, and then see why this plugin I found is better:
Well, maybe that’s a little bit misleading - actually you’re running PHPdocumentor as an external tool.