March 18, 2009
Ever wanted how to get parent directories started from current location ??
The following lines from a build.xml file located in /home/manu/tmp/build will set father to /home/manu/tmp and grandFather to /home/manu
<property value="father" location="..">
<property value="grandFather" location="../..">
Leave a Comment » |
Java |
Permalink
Posted by Manuel
March 16, 2009
Since several weeks my headless build main part works perfectly. The few problems encountered since there (Debug info, Html report generation) where secondary problems ;o)
Recently we decided to setup the product headless build on an other workstation and guess what …. ???? I had some ERRORS generated by javac task when building one my plug-in depending on an other …. dependencies were not resolved …. !!!!
Why ??
Because One of the plug-ins used in our product is not under source control for some reasons and this plug-in build.properties and Manifest.mf files were different between the 2 workstations. In my environment the plugin build.properties contains
source.. = src/
output.. = bin/
whereas this file contains the following on my colleague workstation:
source.pluginname.jar = src/
This was the old version of build.properties file .. isn’t it ??
Changing this file (and manifest.mf according to build.properties) in order to generate a plug-in jar containing build classes files in its root instead of generating a plug-in jar containing an embedded jar which contains generated classes fixed the problem.
I am only thinking now (while writing this post) that long times ago I read some where that PDE headless build doesn’t support embedded jar files ….. (I should may be buy more memory for my brain in order to avoid wasting time in the future ;o) )
Hope this can help other.
Manu
2 Comments |
Eclipse Misc |
Permalink
Posted by Manuel
March 10, 2009
Ever wonder how build plug-ins with debug informations using PDE headless build ?
In my case, setting the javacDebugInfo property to true (or on) in my top build configuration build.properties file doesn’t change nothing to the generated class files.
After several reading on the web I found this news group entry from Andrew Niefer (one of the contributor of PDE headless build) saying :
” In your top build configuration build.properties file, set “compilerArg=-g” “
I guess setting javacDebugInfo should have worked the same way setting compilerArg …
Before filling a new bug entry … anyone encountering the same problem ?? What’s the difference with javacDebugInfo ??
Manu
1 Comment |
Eclipse Technical Tips |
Permalink
Posted by Manuel
March 4, 2009
Ever noticed that the icons order in the Eclipse’s about dialog changes from one workbench’s instance to another ??!!
Ever noticed that after installing a new Eclipse feature (I mean here a feature provided by Eclipse.org which branding icon is the same than the Eclipse Platform branding icon, i.g GEF) the tooltip on the Eclipse’s icon in the about dialog is no moer Eclipse Platform but Graphical Editing Framework ??!!
Loving step in the depth of Eclipse’s code I decided to understand what happened behind the scene. I am using a customized Eclipse 3.4 without P2.
After few minutes I reached the org.eclipse.update.internal.configurator.SiteEntry class provided by org.eclipse.update.configurator plug-in.
Here there is a detect feature method that look for features on local disk using File.ListFile() method which specifications doesn’t guaranty anything about the order of the returned array …. Then the features are stored in a HasMap before being returned to the about dialog through the HashMap.values() method which returned order is not deterministic !!!
Thus I concluded that every body should encounter the same “issue” with the about dialog….
I would be interested in any feedback from people already facing this “issue” (between quote because it’s not a big issue but ….)
Manu
2 Comments |
Eclipse Technical Tips |
Permalink
Posted by Manuel
March 2, 2009
Last week was a release week for our product. Thus I decided to complete my headless build with integration of the Unit Tests.
Using this article I quickly got my Unit Tests integrated in my build. Fine !!!!

JUnit Tests - Console Results
I then decided to open the generated Html report in order to see 100% of successful tests in more readable view than the previous console screenshot.
Guess what …. the report was not “correctly” generated. All my tests were there with the correct result and the correct elapsed time but all the tests were grouped under one unique package and one unique class. I am already earing some of you saying : “It doesn’t matter, the important thing is that the build fails if tests fail”.
I am ok with that but I couldn’t close my long headless story with a problem even it this problem is more a detail than a real problem.
As a result, I decided to get my hands dirty and start reviewing the code providing with the article mentioned above. The class responsible for generating xml files that will be pass to junitreport task is the one called PDETestListener. The main work of that class is to listen on a given port the tests results sent by a PDE application responsible to run the tests.
The first thing I noticed with that class is the usage of PDE internal classes. After investigations it seems impossible to easily replace the use of internal classes … f@!1!#
An other problem I noticed with this listener is the lack of high level notifications. Even using internal classes PDE only provides notification about tests started, failed, ended …. with the test ID as String parameter.
After several tricks I was able to correctly generate an html report like this one (found on the web here) where packages and classes are correct !!!

JUnit Tests - Html reports
It was not easy to do to that and I said before a lot of “tricks” were used !!!
If you are interesting on doing the same thing or even better in having this at PDE level or at least in the Eclipse article feel free to comment or/and ask question in bugzilla here.
Manu
1 Comment |
Eclipse Misc, Eclipse Technical Tips, Eclipse Tools |
Permalink
Posted by Manuel