Posts Tagged ‘ Eclipse

bug or feature?

It seems to be a common joke among people in the software field whether when something odd happens in a program, is it a bug or a feature? I was working with Rational Functional Tester last week, which is a product based on the Eclipse framework, and came across a situation where I was asking myself that same question. This particular incident involved working with the application using the Java Development Tools (JDT), so its quite possible that this problem infests itself in the common IDE versions of Eclipse.

Long story short, Java projects in Eclipse have a source location and a binary location. The binary location is where source files are compiled to so that they can be executed. One of the common actions in Eclipse is to “clean” a project, which erases all of the compiled files and recompiles everything from scratch. This is particularly useful to improve the performance of binaries due to penalties incurred by incremental compilation. The problem I ran into was that my destination folder for compilation was the same as my source folder, which seems innocent enough to me. Why not store compiled files alongside their source counterparts? But when I went to clean the project, Eclipse decided to erase everything in the binary folders, including all of my source files. It would seem to me that the proper behavior would be to only delete files deemed to be generated by the build engine. Luckily, I had most of my work backed up in source control and on network shares, so not much was lost, but it was still very irritating.

RFT is based on Eclipse 3.3 or 3.4, I don’t remember which, but not a recent version, so I’m not sure if this is present in the current release (Helios). But I plan to investigate later when I have some time to burn…