Eclipse Error Log File Location

Yesterday I was trying to build php-maven project in Eclipse Juno, but Eclipse gave me the following error:

but did not tell me where the location of the error log file is.

After digging into the Eclipse configuration files, I finally found it:

<workspace-location>/.metadata/.log

or use the Eclipse menu:

Eclipse > About Eclipse

Click on “Installation Details”, and then “Configuration”

Finally “View Error Log”.

Hope this helps.

PHPStorm – My One Month Trial

Last month I downloaded Jetbrain’s PHPStorm IDE and tried it for nearly a month. The main reason for the trial is that Eclipse simply doesn’t meet what I need. It is a great IDE offering lots of features, but it is slow and crashes often. I have been suggested through the LinkedIn discussion that lots of people love PHPStorm, even though it is a commercial product. So I decided to give it a try and ask my boss to pay for it if it meets what I need :).

Pros:

1. Speed – Even though PHPStorm is based on Java as well, its performance is much better than Eclipse. The indexing is not lightening fast, but faster enough to make me happy. The autocompletion is really handy at reasonable performance.

2. Inline diff – It immediately shows the diff you have made to a file by simply click on the icon next to the line number bar, and allow you to undo or copy the old text if you wish. Eclipse lacks this feature but Netbean does.

3. Class search + File search – I guess the main reason for them to break search into class and file is the performance, so when you are search classes, all other ordinary files can be skipped, and it is fast. Eclipse’s open file feature is not bad either.

4. PHPStorm’s SVN support is quite good, from what I can see anyway, although I don’t use this feature much. I am more of a command line user when it comes to managing svn files, some how I feel more comfortable do these stuff on a shell :).

5. Smart SQL support and syntax highlighting – not just php syntax. PHPStorm is smart enough to figure out whether a given string is SQL query or not and highlight it accordingly.

6. It tells you when there are unused variables in your code. If a variable is not used in the current function, it will be highlighted as grey:

 

Cons:

1. PHPStorm is Java based, which makes it another memory hungry IDE:

I just used a few hours and it jumped to more than 400M already. And sometimes it actually jumped to more than 700MB of memory usage and I am certain that once you are in the debugging mode, the memory usage will be much higher.

2. It is hard to work on two or more different projects under PHPStorm, as it doesn’t allow you to show more than one projects at a time. You will have to keep switching back and forward:

Update: You can actually open more than one projects in different windows

3. When you have lots of files open, it is hard to see which file you are currently on in the tab section, the color chosen is really poor:

Update: PHPStorm 3 has slightly better tab colors:

4. Well, it is commercial and you have to pay. It cost $200 for commercial use and $100 for personal.

Conclusion:

So far I quite like PHPStorm compared with Eclipse. The performance  + SVN integration with inline diff are the key winner. I am certain that there are still lots of great features out there that are yet to be discovered. I will certainly persuade my boss to pay for the license as I will get performance gain out of this IDE.

Inspired by – Rich’s PHPStorm – my week’s trial

Mac Eclipse JavaHL Error for Subclipse

I have recently installed a plugin version of Flash Builder 4 into my Eclipse IDE so that I can use the same IDE for both AS3 and PHP, and then installed Subclipse. However, I keep getting an error message from subclipse:


Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
/opt/local/lib/libsvnjavahl-1.0.0.0.dylib:  no suitable image found.
Did find:  /opt/local/lib/libsvnjavahl-1.0.0.0.dylib: mach-o, but wrong architecture

This is due to Snow Leopard is still compiling Subversion and JavaHL package using 32-bit binaries, but my Mac is using 64-bit JVM and 64-bit JVM can’t load 32-bit native library. To fix this problem, you will need to install openCollabNet, which is available on their site.

You can find more information on Subclipse site.

YAML Support in Eclipse

YAML is a very nice format for configurations and is very popular in the Symfony world. However, it is not supported by Eclipse IDE natively (Eclipse simply sees it as a pure text file with no highlighting at all).

Luckily, there is a plugin you can install in Eclipse to take the advantage of this powerful file format.

Go to http://code.google.com/p/yedit/ and follow the installation instructions or simply add http://dadacoalition.org/yedit into your Eclipse install sites.

Happy YAMLing..

Disable White Space Visibility To Speed Up Eclipse PDT

I always have the habit of turning on white space visibility while coding, because I like to keep my coding clean and see straight away when spaces and tabs are used. However, this has really big impact on performance on Eclipse PDT ( I am using Helios ) in Mac, as it will slow down your typing when PDT has trouble to display the characters you type on the screen at the speed you type. I have never had this problem on WIndows platform though.

To turn off the “whitespace characters” go to Eclipse > Preferences > General > Editors > Text Editors and un-tick the “show whitespace characters”, then you should be fine.

If anyone know the reason behind it, please let me know. Many thanks.