I've been burned by Eclipse upgrades before, especially when it comes to running local tomcat servers in the IDE. I think as recent as 3.1 to 3.2 and 3.2 to 3.3, this or that got moved and all my tomcat servers disappeared, or they were there and they just didn't want to start. I'm pleased to report that this upgrade was uneventful for me. I was able to start all my servers and run my applications with no issues, my eclipse settings were preserved for the most part, with a couple of perspective issues here and there where the perspective reset itself to the default.
Recommended steps to CYA during an eclipse upgrade:
- Back up your old eclipse directory, just rename the folder
- Make a copy of your existing workspace
- Download and unzip eclipse in the same spot the old version was
- Download and unzip any plugins you had previously and were using into the new version of Eclipse, I use PHPEclipse and jadclipse, neither of these have new versions but the plugins worked fine in Ganymede
- Start eclipse, check your servers and apps make sure they compile and run, any sign of trouble just roll on back to the old version of Eclipse and the old version of your workspace
Piece of cake, right. Hopefully your experience is as uneventful as mine.
Once a project is created in Eclipse Europa of a certain type, it's not the most straight forward process of changing the project to a different type. For example you have a project that Eclipse considers to be a Java project, but it's actually a Web Project, you don't get to take advantage of all of the features available for Web Projects, such as deploying to a local tomcat server, unless Eclipse is aware that it's a web project. This has to do with the project settings and what eclipse considers the "Nature" of the project.
As can be determined from my other posts, I'm a Java Developer by trade and Eclipse is my editor of choice. Now I have gone to the darkside now and then for some good out of the box software, such as WordPress, which as you may know is written in PHP. The main reason I chose WordPress was because of it's great community, it's focus on best practices, and the huge number of plug-ins enabling any blog functionality you could imagine, this mix just doesn't seem to be present in an Open source Java-based blog software package. So to the point, I want to be able to develop my WordPress themes, and any other PHP projects for that matter, in the same manner I develop Java applications - In my favorite IDE, which is loaded with features we won't discuss here, with the ability to test the changes locally before I promote them to production. Using the Presentation tab in the WordPress admin console is not an optimal solution or a good development practice. Now these instructions aren't for the faint of heart and I will assume that you most likely have some sort of programming background, or general cognitive skills and that you can get by without a bunch of pretty pictures and click this, click that, click ok, hopefully you've installed shit before. These instructions are geared towards Windows, nobody's perfect, but all the software used here is available for Linux, you may just have to do a little work to make that jump.
List of installs, you can stop here if you don't need me
There always comes that time, when you're debugging a Java application, when you get to that compiled code inside that open source jar that you added to make your life easier. Whether there's an actual bug or you're just trying to understand some behavior or weirdness you're getting from calling this third party API, sometimes it just helps to see the source. If you're using Eclipse you're in luck, things just got easier, well they've been easy for awhile, but if you weren't aware of jad they just got easier. If you download and unzip the most recent version of JAD, Java's fast decompiler, and add the appropriate Jadclipse plug-in for your version of Eclipse, set a little configuration and your workspace will decompile compiled code automagically. No more ugly class outlines, just raw source code. This is by far one of the essential tools a Java developer should have in their tool kit, just like Firebug for a Web developer. Here are some step by step instructions to get you going, of course I'm assuming you're already using eclipse and have an existing workspace.
- Download the latest version of JAD that works with your Operating System from http://www.kpdus.com/jad.html#download
- Unzip the JAD executable to a memorable place on your hard drive, I just stuck mine in the bin directory of the JDK
- Head over to http://sourceforge.net/project/showfiles.php?group_id=40205 and download the version of the Jadclipse jar that matches your eclipse version, lots of choices here 3.1, 3.2, and 3.3 are covered.
- Copy the jar file over to your eclipse/plugins directory, this all depends on where you unzipped and installed Eclipse
- If you're workspace was open during all of this, close it and reopen it, if not open it.
- Click Window -> Preferences
- Expand +Java -> Click on JadClipse
- In the Path to decompiler put in the full path to JAD, or put jad in the path variable for your OS, in my case it was C:\Program Files\Java\jdk1.5.0_05\bin\jad.exe
- Now go looking in Open Type -Ctrl + Shift + T - for a class you know is in a jar or compiled in your workspace and voila it should open decompiled, classes will also decompile during navigation of method calls from the Console, or their calling classes and during debug
The biggest time-saver I've stumbled upon in Eclipse is the Open Resource Shortcut. Under the Navigate menu is the Open Resource command, shortcut Ctrl+Shift+R, which opens a window that allows you to type a search for any file that exists in your workspace, in your search you can use the ? to replace a single character or * to replace an entire string, the search is amazingly fast. If you've worked on a project for a long time you know the names of all of your php, jsp's, classes, xml files, and properties, and digging through the folder structure in the Navigator and Project Explorer views can be time consuming and annoying. I've trained my self to use it so much that IDE's that don't have a comparable feature, like JDeveloper, annoy me to no end.