Talk:Setting up Eclipse
Really nice work, Tim, thanks! I've been through and I'm trying it out. Martin Dougiamas 09:05, 5 September 2006 (CDT)
The stuff about changing editors under General -> Editors -> File Associations doesn't work any more if an Eclipse plugin has 'locked' a file type or content type. Not sure how to fix this --Andy Baker 06:40, 28 November 2006 (CST)
Hopefully it will be the PHP plugin, and it will have locked *.php to the setting you want anyway. If not, can you tell us exactly what you are seeing.Tim Hunt 04:24, 29 November 2006 (CST)
Problems with Ubuntu 6.10...
I'd really like to switch completely to Linux and Eclipse on my Moodle developments. However, I can't get the PHPEclipse plug-in to work with Eclipse 3.2 that came with Ubuntu 6.10. After the Eclipse restart required by the "add . to the include path" tweak, the "PHPEclipse stuff" is gone from the menus (forgot what it said), and when I try to open a PHP file in Eclipse I get: "Failed to execute runnable (java.lang.NoClassDefFoundError: net.sourceforge.phpeclipse.phpeditor.PHPUnitEditor)" and "Unhandled event loop exception"... Going to Google around a bit, but there seems to be a lot of other issues with the JVM also: Eclipse crashed when I tried to search the help, for example. --Samuli Karevaara 04:07, 20 December 2006 (CST)
- Just reporting that now the error message has changed to "Problems occurred when invoking code from plug-in: "org.eclipse.jface"." or I was reading the wrong part of the error log before... --Samuli Karevaara 04:11, 20 December 2006 (CST)
- One headache later I was able to get Eclipse to open the PHP files. Apparently it was about the Java Runtime Environment version after all. I had "sun-java5-bin : Sun Java(TM) Runtime Environment (JRE) 5.0" package installed but it didn't help. After completely removing everything "Java 1.4" ("j2re1.4" and friends) and upgrading "libgjc" packages I got it to work. I reeeeally not a friend of Java versioning and library packaging! --Samuli Karevaara 06:05, 20 December 2006 (CST)
Ubuntu Eclipse Improvements
It may help a bit.
There is a problem wiht the different java VM. If you set that the vm is the one of sun it must be like this everywere I did that:
$ sudo aptitude install eclipse-sdk
Remove any reference to gcj in
edit the file /usr/bin/eclipse and comment
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.1/classmap.db et -Dgnu.gcj.runtime.VMClassLoader.library_control=never.
For me now eclipse runs with no problem
Prefs file missing?
Working through this bit:
Open the file net.sourceforge.phpeclipse.ui.prefs that is in the directory (your workspace)/.metadata/.plugins/org.eclipse.core.runtime/.settings in a text editor.
the file is not there. net.sourceforge.phpeclipse.prefs is present, but does not have the line described.
Under Team -> CVS -> SSH2 Connection Method,
this path does not exist (working on Xandros with linux eclipse)
Matt Gibson 16:48, 17 January 2008 (CST)
Note that in the documentation is: - Look for a line in the file that starts _php_include_paths= If it is not there, add it at the end.
In my case, it was nothing there, so I add the line _php_include_paths=. and work.
Under Team -> CVS -> SSH2 Connection Method
I found this to be General -> Network Connections -> SSH2 -> Key Management (the documentation is updated).
After generating a DSA key, and following the rest of the instructions, I finally finish setting up Eclipse.
Eclipse and whitespace
(Moving this out of main page, so as not to confuse people with discussion...) I suggested ... Under General -> Compare/Patch, turn on Ignore white space if you plan to exchange patches with other developers or send patches on the tracker. This will make patches smaller and easier to compare. Mathieu Petit-Clair 20:28, 25 June 2008 (CDT)
Tim replied: but that is a very bad idea. Whitespace is important, you should not change it unnecessarily, and so whitespace changes should be included in patches.
You've got good point there, whitespace is significant. But Eclipse seems to remove trailing space (eg. at the end of lines) by itself, and this makes patches I receive from Eclipse users impossible to apply after a few days of hacking in cvs head. :( Is there a way to tell Eclipse not to remove whitespace by itself? I really like to work with patches, but when they're twice as big as they should be and don't apply, it makes it a nightmare... Mathieu Petit-Clair 20:28, 25 June 2008 (CDT)
Tim: There is a setting for remove trailing whitespace, but I don't know where it is. My Eclipse does not remove whitespace. Eclipse 3.3 has the option to display whitespace, which makes it easy to see what is going on, and is nice. What would be really nice is a "Remove whitespace from lines I have edited only" option.
Just trying this out on a Mac and the interface details seem quite a bit different. I don't know if this is because it's the Mac version or a newer version of Eclipse. Anyway, I've added comments as appropriate in the text --Howard Miller 03:45, 2 July 2008 (CDT)
Setting up Eclipse PDT for Ubuntu 8.04 64bit (Hardy Heron)
Eclipse PDT is only available in a 32bit build but if you have a 64bit installation of Ubuntu you are likely to be using a 64bit version of java. This means that eclipse PDT will try to open via 64bit java and it wont work.
Here is the solution (based on http://dmartin.org/weblog/eclipse-on-ubuntu-linux-for-amd64):
1) Install a 32 bit version of java. Open a new console and enter 'sudo apt-get install ia32-sun-java5-bin' 2) Download eclipse PDT 32 bit version from http://www.eclipse.org/pdt/downloads/ (select linux) 3) Extract the downloaded eclipse archive to $HOME/applications (obviously you can put it somewhere else if you like). You will now have $HOME/applications/eclipse as a directory 4) In the newly extracted eclipse directory, create a file called eclipse.sh 5) Edit eclipse.sh and add the following:
6) Now open a console and enter 'cd $HOME/applications/eclipse' then enter 'chmod +x eclipse.sh' 7) You can now run eclipse 32 bit from this folder by entering './eclipse.sh' in to the console. You can also create a desktop shortcut to this $HOME/applications/eclipse/eclipse.sh if you wish.
Hope this helps someone.