Showing posts with label pde. Show all posts
Showing posts with label pde. Show all posts

Tuesday, May 10, 2011

Eclipse Day India 2011


Anshu Jain started of the day with an excellent talk Eclipse - A Framework of Frameworks. In his talk he went through the design of a very simple calculator framework to explain all the things that Eclipse does - extensions, dynamic loading, plugin discovery etc. There was also a .cff file (calculator framework format) equivalent to plugin.xml in Eclipse. The example code from his talk is available at his site - highly recommended for someone starting of with plug-in development.

Ankur followed up with another great talk Good Practices for Plug-in Developers.  Some of the images he used to drive his point home were really funny and awesome. I thought my session JDT Bootcamp (JDT Tips and Tricks, and Extending JDT) went well, of course the fact that Satyam did a fantastic job of explaining the Java Model and the Search APIs helped a great deal.

There was a lot of interest in What's new in Java 7 talk by Ayush (the guy with the funny pose in the above pic), which was nice to see. After this Praveen talked about his experience at Adobe with migrating a Eclipse 3.x application to Eclipse 4.x platform. It was nice to hear that Adobe wants to stay on the latest Eclipse platform and has made considerable progress in this regard.

The day ended with an interesting talk about Eclipse UOMo project. Werner Keil gave a few funny examples on what can go wrong if the proper care is not taken in consistently interpreting the units, for e.g. if one team uses inches and feet and the another team interprets the values as meters and centimeters. The image of an upside down NASA shuttle because someone messed up the measurement units will always stay in my mind :)


Lastly a big thank you to SAP Laps for hosting the event! You have been a great host for Eclipse Day India 2011 and the demo camp in Nov 2010. However I would like to see the next Eclipse event in Bangalore hosted at a different venue - just for variety :) Maybe other organizations can step forward. 

I almost forgot, the 'discussion' over drinks in the evening with fellow Eclipse committers and Eclipse users was 'entertaining' ;-) Those who could not join us for drinks, please do next time.

Thursday, April 28, 2011

Debugging Eclipse builders

Do you think Eclipse builds too often ? Do you think Eclipse build too much ? At least I do, or maybe I just got tired of seeing 'Building workspace: (12%)' in the status bar. Anyway I decided to see for myself what the heck the builders were doing.

I use JDT and PDE which means there are two builders of interest
  • Java Builder
  • API Analysis Builder
There are also Plug-in Manifest Builder and Extension Point Schema Builder, but I think these two do not do much and hence do not take much time.

To know what these two builders are doing in your running Eclipse instance two things are required
  • Start Eclipse with -debug option, to me more precise I used the following to redirect the debug output to a file as the debug output can grow large very soon and overflow the console buffer
    •  eclipsec –debug > log.txt
  • Enable debug options for three plug-ins (details below)
    • org.eclipse.core.resources
    • org.eclipse.jdt.core
    • org.eclipse.pde.api.tools
All three plug-ins ship a .options file containing all the debug options provided by these plug-ins, just open the the corresponding jars in your eclipse installation to get the .options files. Create a single .options file from these and place it in the same directory as eclipsec.exe before starting eclipse.

I had the following options set to true in my .options file
###################################################################
# Turn on debug tracing for org.eclipse.jdt.core plugin
org.eclipse.jdt.core/debug=true

# Reports java  builder activity : nature of build, built state reading, indictment process
org.eclipse.jdt.core/debug/builder=true

# Reports java builder stats
org.eclipse.jdt.core/debug/builder/stats=true

###################################################################
# Debugging options for the org.eclipse.core.resources plugin.

# Turn on debugging for the org.eclipse.core.resources plugin.
org.eclipse.core.resources/debug=true

# Reports the start and end of all builder invocations
org.eclipse.core.resources/build/invoking=true

# Reports the start and end of build delta calculations
org.eclipse.core.resources/build/delta=true

# For incremental builds, displays which builder is being run
# and because of changes in which project.
org.eclipse.core.resources/build/needbuild=true

# Prints a stack trace every time an operation finishes that requires a build
org.eclipse.core.resources/build/needbuildstack=true

###################################################################
# Turn on debug tracing for org.eclipse.pde.api.tools plugin
org.eclipse.pde.api.tools/debug=true

# Reports incremental builder activity : nature of build, indictment process,...
org.eclipse.pde.api.tools/debug/builder=true

# Print notified compatibility deltas
org.eclipse.pde.api.tools/debug/delta=true

# for the tag scanner
org.eclipse.pde.api.tools/debug/tagscanner=true

# for API profile
org.eclipse.pde.api.tools/debug/apiprofile=true

#for api analyzer
org.eclipse.pde.api.tools/debug/apianalyzer=true

#for our workspace delta processor
org.eclipse.pde.api.tools/debug/workspacedeltaprocessor=true
###################################################################

So far I have found a few scenarios where the builders could do less work - Bug 344090, Bug 344110, Bug 344163, Bug 344137. I think there are more issues, but getting a reproducible test case is proving to be a little hard in some cases.