Sep 10 2009

Eclipse PDT and Zend Studio are really nice editors for general use. Once they’re set up the way you want, they work mostly fine. I have an issue where I type a dollar symbol ($) and the code assist goes off in a wobbly, probably due to the size of the projects we work on at Netbasic, and the fact that we’re all working off a network drive (ridiculous in my opinion…).

The biggest gripe I have with Eclipse however, is trying to install plug-ins. I don’t think I’ve EVER installed a plug-in without having to manually mess around with dependencies and trying to manually resolve them. It’s a HUGE downfall, and makes any Eclipse IDE virtually unusable. It’s intensely annoying when I just want to get on with things, but some bloody plug-in I need (normally the CollabNet/Mylyn plugins) just won’t install without getting in a hissy fit.

Take for example this latest error:

Cannot complete the install because of a conflicting dependency.
Software being installed: Mylyn Task List (Required) 3.2.0.v20090617-0100-e3x (org.eclipse.mylyn_feature.feature.group 3.2.0.v20090617-0100-e3x)
Software currently installed: Zend Studio 7.0.0.v20090806 (com.zend.php.ide 7.0.0.v20090806)
Only one of the following can be installed at once:
Java 5 Compatibility Checker 3.2.0.v20090617-0100-e3x (org.eclipse.mylyn.compatibility 3.2.0.v20090617-0100-e3x)
Java 5 Compatibility Checker 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.compatibility 3.2.1.v20090722-0200-e3x)
Cannot satisfy dependency:
From: Zend Studio 7.0.0.v20090806 (com.zend.php.ide 7.0.0.v20090806)
To: org.eclipse.mylyn.ide_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Task-Focused Interface (Recommended) 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.context_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Bridge: Eclipse IDE 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.ide_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn.team_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Bridge: Team Support 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn.team_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn.context_feature.feature.group [3.2.1.v20090722-0200-e3x]
Cannot satisfy dependency:
From: Mylyn Task List (Required) 3.2.0.v20090617-0100-e3x (org.eclipse.mylyn_feature.feature.group 3.2.0.v20090617-0100-e3x)
To: org.eclipse.mylyn.compatibility [3.2.0.v20090617-0100-e3x]
Cannot satisfy dependency:
From: Mylyn Task List (Required) 3.2.1.v20090722-0200-e3x (org.eclipse.mylyn_feature.feature.group 3.2.1.v20090722-0200-e3x)
To: org.eclipse.mylyn.compatibility [3.2.1.v20090722-0200-e3x]

From what I understand here, I can’t install Mylyn because of a 0.0.1 version difference. Because of two packages that were released within a month of each other?! That – in my opinion – is stupid. I just want to get on with things but I can’t because of this.

I sincerely hope the next version of Eclipse will sort out this stupid dependency issue, as if I was the Eclipse development team, this sort of difficulty-of-use issue would be a real show-stopper. In addition, I have no idea why Zend would base their €399 IDE which is meant to be a “professional-grade” solution to “maximise developer productivity” on such a shoddy, buggy IDE.

Jun 4 2009

I’ve started giving Netbeans for PHP a try, considering everyone is saying how much better it is than Eclipse PDT. So far I’m very impressed at it’s simplicity and ease of use – which for the main tool a programmer uses day in an day out for at least 8 hours, is a very good thing.

However I came across a couple of “issues” or teething problems rather, that thankfully with a short Google (sorry Bing…), I managed to find solutions for…

Read the rest of this entry »

May 27 2009

If you created a project in Eclipse, but you created a regular “Project” instead of a particular project type (in my case, a “PHP Project” then there is a fairly easy way of fixing it. I had to do this to make a particular project work in the PHP Explorer (which for some reason worked fine on Windows version of Eclipse, but not my version…)

Create a new project of the type you want to convert your existing project to. In my case, I just created a new PHP Project. Alternatively, you can use an existing PHP Project (or project of the type you want to convert to) if you have one. Open the .project file of this, and copy the <natures> and <buildSpec> XML sections. Open the .project file of the project you wish to convert. Remove the old <natures> and <buildSpec> sections and replace with the copied section. If you have other <natures>, for example PDE etc., then you’ll have to merge them by hand. Mine now looks a little like this:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>someprojectname</name>
	<comment></comment>
	<projects>
		<project>otherproject</project>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.wst.validation.validationbuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.dltk.core.scriptbuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.php.core.PhpIncrementalProjectBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.php.core.ValidationManagerWrapper</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.php.core.PHPNature</nature>
	</natures>
</projectDescription>

It’s as simple as that! Close the project and re-open it and you’ll have all the magical features of PDT (or whichever project type you wanted…)

May 9 2009

Just a quick reminder to myself as I always end up Googling for this. The update sites for CollabNet for Eclipse are:

Current Release (1.5.1):

Eclipse 3.2: http://downloads.open.collab.net/eclipse/update-site/e3.2

Current Release (1.8.1):

Eclipse 3.3: http://downloads.open.collab.net/eclipse/update-site/e3.3
Eclipse 3.4: http://downloads.open.collab.net/eclipse/update-site/e3.4

Development Builds:

Eclipse 3.2: http://downloads.open.collab.net/eclipse/dev-builds/e3.2
Eclipse 3.3: http://downloads.open.collab.net/eclipse/dev-builds/e3.3
Eclipse 3.4: http://downloads.open.collab.net/eclipse/dev-builds/e3.4

These are sourced from: http://desktop-eclipse.open.collab.net/servlets/ProjectProcess?pageID=3794

May 7 2009

Whenever I tried to get CollabNet for Eclipse plugin working in Eclipse PDT, it always failed, yielding the error “Unable to load SVN client” upon any SVN activity. I did endless amounts of Googling to try to solve the problem, but always came to a brick wall.

The big problem here is that Eclipse is just too new for Ubuntu – even Jaunty. An apt-get install subversion on Jaunty Jackalope will install subversion 1.5.4, which just doesn’t work, and thats where the big problem lies. CollabNet for Eclipse categorically requires Subversion 1.6. Unfortunately the only solution I’ve come up with is to compile subversion and it’s javahl bindings yourself. I’ll try and remember all the steps I took to make it work.

First, download the latest subversion and subversion-deps tgz from http://subversion.tigris.org/. At time of writing they are here and here. Extract them both:

$ tar zxvf subversion-1.6.1.tar.gz
$ tar zxvf subversion-deps-1.6.1.tar.gz
$ cd subversion-1.6.1

You’ll need to install a couple of extra packages (this assumes you’re using Sun’s JRE), and assuming you already had subversion and libsvn-javahl already installed, uninstall a couple:

$ sudo apt-get install libssl-dev sun-java6-jdk g++
$ sudo apt-get remove subversion libsvn-javahl

Configure, make and install subversion. You can check it’s the right version too:

$ ./configure --disable-nls --enable-javahl --with-jdk=/usr/lib/jvm/java-6-sun-1.6.0.13
$ make
$ sudo make install
$ svn --version

Once that’s done, you’ll want to compile the javahl binding. Once installed, check it’s installed correctly too. It’s fairly likely the .so file will be in /usr/local/lib.

$ make javahl
$ sudo make install-javahl
$ sudo updatedb
$ locate libsvnjavahl-1.so
$ sudo ldconfig

Open your eclipse.ini, and after the -vmargs line, add:

-Djava.library.path=/usr/local/lib

replacing the path with the path where the libsvnjavahl-1.so with your correct path.

Now fire up Eclipse, go to Window > Preferences > Team > SVN. The SVN Interface should now say JavaHL (JNI) 1.6.1 and a revision, depending on the particular version of SVN you installed.

I think that’s all the steps I took, so I apologise if I missed something out – if I remember something I’ll add it in!

Update: Compiling javahl requires g++, so I added that into the apt-get install line.

Update 2: Missed out ldconfig after libraries creation.

Update 3: If you still have issues getting it to work, I recommend looking at http://subclipse.tigris.org/wiki/JavaHL, reading it carefully, especially the Troubleshooting on Linux section. The javahltests.jar JUnit tests that are provided on the page may be very handy when debugging problems!