Welcome to Planet Eclipse

May 09, 2008

Birt World
Birt World

BIRT: Swapping Data Set at Runtime

Often it is a requirement to design a report against a development database and then switch the connection at runtime. This can be done in many ways with BIRT. The options include:

JNDI - Look up the data source.
Property Binding - Swap the data source at runtime using property binding expression.
Script – Write a script in the beforeOpen event handler to modify the data source properties.
Connection Profiles – Store the connection information in a shared profile.
DTP driverBridge extension – Implement a driverBridge extension to intercept calls to a specific driver.
Design Engine API (DE API) - Swap the dataset property on a specific table before running the report.

Using the DE API often serves as a useful alternative, because the data sources may be different types. For example your deployed report may use a scripted data source to retrieve some EJB value, but at design time you may not have access to this data source. So you could develop a stubbed data source that uses JDBC to test your report layout and when deployed swap the data set on elements that are bound to the data set. To do this you need to do a few things. First name your elements that use the data set to be swapped. This can be set in the general properties for each report element. Next make sure your two data sets (one for design time and one for deploy time) have the same result columns. If the result columns are not the same much more work needs to be done in order to implement this solution. Finally implement a beforeFactory script that modifies the report design before it is executed. Assume we have two data sources/data sets and one table. If I name my table “mytable” and my data sets are named “viewer” and “designer” the beforeFactory event script would look as follows:



des = reportContext.getHttpServletRequest().getParameter("__designer");

if( des == null || des == "false" ){
mytable = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("mytable");
mytable.setProperty( "dataSet", "viewer" );
}


Note that the “designer” data set is the default data set used in the report. This is the data set that you should drag to the canvas to build your report


The first line of code determines whether we are using the designer. The designer adds the __designer parameter to URL when the report is previewed. This parameter will not exist when deployed. If this parameter does not exist or is set to false we assume that the report is deployed. This line:



reportContext.getReportRunnable().designHandle.getDesignHandle()



returns the report design handle. BIRT 2.3 has an easier way of getting the report design, but this method should work for BIRT 2.2 and 2.3. We then use the report design handle to locate the table element to be modified. Finally we set the dataSet property to the viewer dataset.


An example report illustrating this concept is located here.

Frank Turovich
Frank Turovich

Deploying our documentation to the web

Posted some future documentation plans on the Creating Carbide.c++ Developer Blog that concern the Eclipse Infocenter and Carbide documentation.

Denis & Karl
Denis & Karl

16 CPUs for Bugzilla all to myself

I'll be deploying two new servers for Bugzilla later today, but in the meanwhile, those two servers are ALL MINE. 16 processor cores are just waiting for me to do something.

Today I'm doing bug triage. It's so amazingly fast.

Ian Skerrett
Ian Skerrett

Thoughts on JavaOne 2008


Just finishing up this years edition on JavaOne. Some thoughts…

  • JavaFX was definitely the main message from Sun. The Sun keynote was full of JavaFX demos showing spinning pictures. It reminded me of 1998 spinning Java logos in applets. Sun appears to want to go head to head with Adobe and Microsoft for the hearts and minds of designers and web programmers. Unlike Cote, I think they are too late and I am not sure anyone really cares about JavaFX.
  • JavaOne is usually full of announcements from the major vendors, this year was the exception. In fact the Sun and Oracle keynotes were non-events; kind of boring.
  • One thing that was very surprising to me is that there was little discussion about openJDK and open source Java. Last year it was all about open source Java. I know Sun is still committed to openJDK, it was just surprising the absence of discussion.
  • OSGi did really well at JavaOne. Lots of people were clearly interested but most people have no idea. We still have a long way to go to educate people about Equinox and OSGi but things have started.
  • The Eclipse party at the Thirsty Bear was a great success. Thanks to everyone that came.
  • I also went to the eBay party. eBay is a huge Eclipse user and they are doing some neat things. btw, eBay is looking to hire some Eclipse experts. If you are interested send me an e-mail.
  • Once again we gave out 750 t-shirts at the Eclipse booth. Thanks to everyone that came by the booth. It is great to hear from all the enthusiastic Eclipse users. See you next year.

Dave Carver
Dave Carver

Docbook, Blocked by IP Concerns

No Docbook Stylesheet Plugin.

To be more precise, the Docbook Stylesheets and their supporting Xalan java extensions didn't make it through Eclipse IP review. So unfortunately, this puts a partial damper on the requests we've had for some integrated support for Docbook in the XSL Tooling project.

However, I don't think all is lost, as with other projects, one can still download and use the stylesheets with the XSL support we provide. It just means you'll have to work a bit harder, and I'll have to become more creative on designing an example project.

I do plan on updating Chris's authoring article he wrote a while ago, so that it leverages the XSL Tooling project instead of old EclipseXSLT project. EclipseXSLT was one of the code bases that was used to start the XSL Tooling project, much of that code base has been rewritten since that initial contribution, but the same concepts still apply. So maybe I'll do that on my plane trip out to California next month.

My question for the Docbook users are, do you want the XML Schemas for Docbook to be included in the XML Catalog so that editing and content assistance support is available out of the box? If so, what versions do you want: 4.5 or 5.0?

For DITA, I think we can get the DITA open toolkit as an optional plugin configuration, but I'm not overly familiar with DITA or the open toolkit. So what would you need for us to support in the way of XSL support? Is there a standard set of DTDs or schemas for DITA? What do you want supported? Report your requirements here or in bugzilla.


XSL Validation Settings.

I've used many different XSL editing tools over the years. One of the items that has always puzzled me is that all of these tools lacked support for configurable Validation setting reporting. It's not uncommon to have XSL stylesheets that aren't completely runnable and pass validation by themselves. Many of these smaller stylesheets are included or imported into other styelsheets, and the whole is a valid stylesheet. With the latest release of XSL Tooling a user can now control the validation error reporting level for many pieces of the XSL validation.


This is great, for getting rid of extraneous Error messages, that other XSL editing tools don't allow you to control. You can thank my fellow committer, Doug Satchwell, for his tireless effort on working on this validation scenario and configuration. Currently the above is workspace wide, however, Jesper Moeller has volunteered to try and get the project specific settings implemented as well.

XPath Content Assistance.

I didn't make as much progress on this as I had hoped. Mainly because I got caught in the standard architects dreaded trap. That of trying to over architect the current problem, and looking to far ahead. Eventually, I'm going to need an XPath model, to offer some of the functionality I would like to offer, but for now, I don't think I need it. So, to fix some of the problems with content assistance for XPath, I'm going back to the basics and start over. Mainly to fix the issues and design choices that I had originally made when learning to implement it, but also to hopefully provide a better implementation for content assistance going forward. Hopefully, I can get that worked out for 0.5M8 next month.

XSL Tooling is moving right along, and the editor has advanced far enough along that for most my XSL editing needs, I have migrated to it. Where we are still lacking a bit is in the Debug support. Hopefully we can give that a bit more attention in the coming months.

As always, we are looking for community feedback, if there is something missing or not working please let us know.

BJ Hargrave
BJ Hargrave

Hot off the press: my JavaOne presentation

You can now download the JavaOne 2008 presentation Converting (Large) Applications to OSGi I just delivered with Peter Kriens.

The presentation went really well. There was around 700-800 people there and we had some really good questions asked during the 5 minutes we had left for questions. And then many more questions after we left the stage. I felt like a JavaOne Rock Star! :-)

May 08, 2008

RAP Insights
RAP Insights

PresentationFactory for RAP

As Neil pointed out in Having fun with RAP and OSGi there is a challenge for us rappers: Provide a look & feel of RAP applications suitable for the web. We do not claim that we are completely there, but introducing the PresentationFactory is a big step forward.



You now no longer depend on our design capabilities, just do it yourself. And to help you get started we created a mockup presentation as part of the rap demo that comes with M4. We have recently been talking to a company that does user interface design for a couple of famous customers and they offered to help with UI and interaction design. I am very much looking forward to work with those guys.

The latest RAP 1.1 M4 build provides a couple of more interesting new things: We have been moving to the 3.4 code base and created some tooling to enable PDE jUnit style testing. We are even using the original tests from JFace / Platform. See the New and Noteworthy for details and more interesting new stuff.



Virgil Dodson
Virgil Dodson

Forums back online

For several days last week, the BIRT forums were not allowing new Threads.  If you tried to post a question to the forums and ran into this problem, try again. 

Chris Aniszczyk
Chris Aniszczyk

SWT / Qt?

I just noticed this post on the newsgroup. It seems EPL 1.0 is now included as an exception for Qt. IANAL, but does that mean it's possible to do some SWT / Qt love without fearing the wrath of lawyers?

Ralph Müller
Ralph Müller

Bug Report

We need do better in communicating and where to report bugs and issues. Why do I think so? Because I received the following 'Bug Report' today, from a developer (?) called Nagy:

F*ING JAVA, and F*ING ECLIPSE!!!!!!!!!!!
java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space
Exception in thread "Worker-7" java.lang.OutOfMemoryError: PermGen space

 7965 mark      20   0 1540m 520m  23m S   99 13.2   1:48.24 java
 8186 mark      20   0 1272m  78m  10m S    0  2.0   0:03.20 java

NICE JOB, CONTINUE F*ING GOOD JOB AND EAT ALL OF F*ING WORLD'S
F***ING MEMORY!

So Nagy, here is the idea: Please report the problem you have at https://bugs.eclipse.org/bugs/. You will have to go through the inconvenience of creating an account and answer some questions like what platform you use, what version you use and the likes, but this type of information would help the team tremendously to assess your problem. As a matter of fact, they might be really happy if you sent them some code example too that demonstrates the problem - please avoid f***ing comments to protect the minors in our community.

The address you sent your report to cannot help to solve the issue.

Hope this helps ...

PS: Excuse me for slightly editing your original message.

Ralph

Eclipse MAT
Eclipse MAT

The Power of Aggregation: Making sense of the Objects in a Heap Dump

The goal of this article is not to provide you with a step-by-step approach in finding memory problems, but to reveal several powerful features of the Memory Analyzer, which are irreplaceable in memory leak hunting. These features might be unified into one topic – aggregation.

Memory Analyzer - is a powerful Java heap analyzer. It makes it possible to find a memory leak or reduce memory consumption by looking into the heap dump only. Our wiki page provides detailed information on how to acquire a heap dump.

Sometimes you open a heap dump in Memory Analyzer and see nothing … but a pile of small objects:

oveview page without memory leak suspect

As overview pane shows, the majority of retained memory is more or less equally distributed among several objects, which makes it difficult to see a suspect for a memory leak at first sight.

Grouping in Dominator Tree

The pie in the overview pane is a graphical representation of the Dominator Tree, which you can open from the toolbar using the button dominator tree toolbar icon

dominator tree without grouping

The Dominator Tree is built out of an object graph. Each object in the tree is responsible for keeping its children alive. The tree is sorted in descending order according to the size an object retains in memory.
Now, if we group the dominator tree by class (using the drop-down toolbar menu), we will see a different picture:

dominator tree grouped by class

We can see that 700 objects of class com.foo.bar.menu.MenuEntry retain 46 % of the total heap space. Suddenly we see an unequal distribution of the retained memory.
How is it possible that we see it only now? The answer is that in this heap dump we do not have one single big object, but a group of leaking objects. Remember, the overview page of the heap dump only displays the distribution of retained memory heap on a per-object basis. So, when we group the dominator tree by class, we group our leaking objects to their origin class and thus get an accumulated retained heap.
Let’s find out who is referencing all those com.foo.bar.menu.MenuEntry objects. For this select List objects –> with incoming references from the context menu. As a result we will get an object reference graph:

object list with incoming references

If we drill down into the com.foo.bar.menu.MenuEntry, we can see the chain of objects referencing our suspect. Unfortunately, in this case it is not really helpful as we see only a LinkedList structure.

Grouping referrers to the class level

As we have seen looking at the incoming references graph for our suspect objects did not reveal a lot. Grouping referrers to class level might be more helpful. This operation is performed via a context menu. Back in the dominator tree grouped by class, right-click on our suspect com.foo.bar.menu.MenuEntry and select Show objects by class –> by incoming references:

show objects by class - context menu

Grouping referrers by class allows us to see a simple and easy to understand reference chain:

incoming references grouped to the class level

We can now see, that class com.foo.bar.menu.MenuEntry is referenced by a LinkedListEntry, which we already knew. But as we continue we see that this entry is again referenced by a LinkedListEntry (this is the head of the LinkedList) and by the LinkedList. LinkedList itself is referenced by two classes, one of which is of no interest as it is from the java.* package (which for now we assume to be unproblematic). The other one, however, is of interest.
The easiest way to find out what keeps our memory leaking group of objects alive in the heap is to check the path to the garbage collection roots. However, paths to garbage collection roots can only be found for a single object but we are interested in finding a common chain of references to a group of objects. Well, this is also possible.

Merging Paths to Garbage Collection Roots

The Merged Paths to GC Roots view shows the shortest paths from the GC roots to each instance of the selected class. You can open this heap editor using the context menu Merge Shortest Paths to GC Roots on the com.foo.bar.menu.MenuEntry class instance:

merge paths to the garbage collection roots context menu

This operation explores all the paths from the different objects to their GC roots at once and finds a common chain of references for this group of objects. It is a common procedure to exclude weak and soft references from the result as they cannot be the main reason of keeping the objects of interest alive.

merged paths to garbage collection roots

There we got the reason: one instance of the class com.foo.bar.menu.FoodSupplies keeps in memory 700 instances of the class com.foo.bar.menu.MenuEntry. Now is the right time to check what is going on in the code and fix the problem.

Conclusion

Apparently, Memory Analyzer has more aggregation features to offer. Some of them will be covered in our future blogs.

Ralph Müller
Ralph Müller

Visiting the Home of the GUIDancer

Never heard of the GUIDancer? Well, I didn't know her either, until a year ago. Then Bredex GmbH from Braunschweig, Germany, joined the Eclipse Foundation as an Add-in Provider Member, and since then they have become quite visible in my world.

When I first visited them a couple of month ago, I came to a nice office in the center of Braunschweig, in walking distance from the town center. They had invited for Stammtisch, and Hans-Joachim Brede and Achim Lörke made sure that I had to do some work before I could enjoy the drinks and finger food.

Now they are inviting for the next Stammtisch. It will take place on Wednesday, 14.05.2008, at 19:00 at the Bredex location in Braunschweig. We hope to get a good number of participants. But we don't know if we can actually beat this week's number from Hamburg (I still have to tell Mike that the bar bill was higher than I expected).

Now getting back to the GUIDancer: Hans-Joachim Brede demo'd it to me some time ago, and it is an impressive tool for UI testing of RCP applications (yes, it works for Swing apps too). What I really liked was the concept of starting the UI testing early in the development, which is one of the cool features of GUIDancer. But try it out yourself.

Hans-Joachim will actually join us at Eclipse Summit Europe this year, where he will -together with Christine Mitterbauer- host the testing symposium.

I look forward to meeting you all on Wednesday.

Ralph

Ian Skerrett
Ian Skerrett

New resource for Eclipse newbies


DZone has just released the first set of their Refcardz, including a ‘Getting Started with Eclipse‘. It looks like a great resource for anyone starting in Eclipse.

Nitin from Dzone was kind enough to drop off some of the Refcardz for the Eclipse booth at JavaOne; they proved to be very popular. Lets hope they do more of these for other Eclipse projects.

May 07, 2008

Wayne Beaton
Wayne Beaton

More pictures from JavaOne

img_0952.JPGimg_0954.JPGimg_0958.JPGimg_0959.JPGimg_0960.JPGimg_0961.JPGimg_0966.JPGimg_0974.JPGcrowd.JPG

Denis & Karl
Denis & Karl

Eclipse Website Redesign? Give it your best shot

As Bjorn blogged earlier, the Phoenix team is actively seeking design ideas for a new website look.

Boldly Go Where No One Has

Now is the time to be wild -- we're open to ideas. Do you imagine a home page with a single download button, and nothing else? Submit it! Tired of all that purple? So are we!

Please read this mail announcement, follow the simple submission guidelines and show us what you've got.








Contest closes July 31, 2008. No purchase necessary. Valid to residents of Earth only. Void where prohibited. We reserve a bunch of rights. This disclaimer is just a joke.

Andy Maleh
Andy Maleh

Clean Code Clinic: TDD Ping Pong Match!

The event Dave Hoover and I proposed for the Toronto Agile 2008 conference got accepted!

Title: TDD Ping Pong Match!

Synopsis:
Attendees will be entered into a competition where they will pair-program on implementing small software application features following the TDD Ping Pong game rules. Each game will last for a few minutes, and the programmer with the least time driving (i.e. doing the simplest thing that works and coming up with the most tests) will be declared winner. This game is a great opportunity to learn TDD and Pair-Programming effectively and pragmatically. Winners will receive prizes, so sharpen your TDD Ping Pong skills and get ready for Andy and Dave’s challenge!

If you plan to attend the conference, see you in Toronto in August :)

Wayne Beaton
Wayne Beaton

Some pictures from JavaOne

The Eclipse booth at JavaOne is being hosted this year (as it is normally hosted) by a broad cast of Eclipse committers, representatives from member companies, and other generally-knowledgeable people.

Yesterday, some of the folks from nexB hung out at the booth, answering questions about Equinox and being all-around great ambassadors for Eclipse. Here are the nexB folks (along with Lynn and Donald) during a lull in the excitement (it’s hard for me to take shots when there’s lots of activity at the booth, as I end up being one of the folks chatting with the visitors).

javaone-nexb.jpg

A highlight of the show for me was meeting up with Luke Li, and old friend from university (back then we knew him as Danny Li). Here’s Luke eating the fish after a great Sushi dinner.

luke.jpg

Hanging out with the nexB guys, and then later with Doug and Shaun from EclipseLink and Virgil from BIRT is the best part of the show for me.

Today, be sure to drop by the Eclipse booth. I’ll be there from 1130 to 1330 to chat about Equinox, runtimes, and everything else you want to know about Eclipse. Mik Kersten will be there from 1330 to 1500 to talk about Mylyn, and Oliver Wolf will be there from 1500 to 1630 to talk about Swordfish. FWIW, no real swordfish were injured during our sushi-fest last night…

Eclipse Enthusiasts Poznań
Eclipse Enthusiasts Poznań

Poznan's Eclipse GSoC students at IBM Eclipse Support Center



We were guesting our Google Summer of Code students recently. We got to know each other and had a chat with : Ola Woźniak who is working on project “Compare with” dialog, Marek Zawirski (on the right) with Push operation implementation and GUI improvements for egit Eclipse plugin and Mateusz Matela (on the left) who was accepted to contribute toString() generator.

They are welcome to use our Eclipse Center as a place where they can find support, advice from our engineers and good coffee :-).

Onec again congratulations and good luck with your projects!

Doug Schaefer
Doug Schaefer

Flash on the Brain

I hate it when that happens. A shiny object flies by and I can't sleep until I catch it. So I was up until 3 a.m. last night trying to figure out what Adobe Air/Flex/Flash/ActionScript was all about. It's actually pretty interesting stuff technically. But as a number of people commented when I brought it up a couple of days ago, you do get the sense of vendor lock in, at least for now. But the specs are all open now, so open source implementations of this stuff at least have a fighting chance.

So why do I care about Flash (other than my insatiable need to learn as much as I can about the software industry)? Well, it fits in with my interest in mobile devices, especially those based on embedded Linux. As these devices get more powerful and have bigger screens, the line between laptop and mobile device is going to blur. And I think the expectations of users on the UI for these devices is going to grow as well. Everyone oos and ahs over the iPhone UI. It's setting the bar.

But looking at a traditional embedded Linux box with a UI, does it make sense to run X Windows on it? X is horrible and antiquated. And it's very hard to build flashy (sorry about the pun) UIs with it. It certainly wasn't intended for resource constrained devices. Mind you the old X Terminals were pretty much embedded devices, but then where are they now...

So what are the alternatives? DirectFB looks very promising and is growing in popularity in the embedded world. It gives you an nice API over the graphics hardware and input devices that let you build your UI as low level as you need. But it does require you to build a UI from scratch.

So this is the architecture that piqued my interest: Adobe AIR (which include Flash and the WebKit browser) running on DirectFB. Which then opens up other interesting architectures. Like mobile devices turning into web appliances that let you work connected or disconnected (is there a Flash office suite app?). And with Flash's animation, video, and audio capabilities, you could build a pretty lively UI. And, from what I hear, there are a lot of graphic artists who have learned Flash who could give us a hand.

Now, I have no links to Adobe and this only crossed my mind as they "opened" up the technology with the Open Screen project. But if this move helps them build momentum in the mobile space, it opens up a lot of opportunities for mobile software developers, and graphic artists for that matter...

Bjorn Freeman-Benson
Bjorn Freeman-Benson

Design is Important

The Phoenix team has begun a discussion about a new website design (see the dev list thread). In my morning coffee wanderings of the internet, I found this paragraph that sums up my position better than I could myself:

We're Sweet To Look At!

CuteWe admit it, we're proud of our design. But it's much more than just eye candy, as we believe that people work better when they work with something that pleases the senses. The pretty face of Ma.gnolia doesn't sacrifice usability, either. We place a premium on being easy to understand for people who don't know or care about how something works - they just plain want it to work.

(comments to phoenix-dev)

Kenn Hussey
Kenn Hussey

On Change...

Embarcadero. It ain't just about databases anymore...

Dave Carver
Dave Carver

XSL Tooling 0.5M7 Available

XSL Tooling 0.5M7 is now available. Several new features have been added:

  • New XSL creation wizard.
  • Configurable preferences for validation of XSL.
  • Navigation to definition of called-templates via F3.
  • Smarter XPath validation.
More information can be found in the New and Noteworthy.

BJ Hargrave
BJ Hargrave

An AJO is not a POJO

A POJO is a plain old Java object. Everyone talks POJOs these days. They are easy to compose and unit test. They are free of coupling to specific infrastructure details. So you can take your POJO to another infrastructure. For example, from JavaEE to Spring or OSGi. I like them and I think it is the right way to do things.

However, people are also fascinated with annotations now. Things like Guice and EJB3 and Glassfish all want you to annotate your POJO. But once you do that, your POJO ceases to be plain. While the non-annotation part of your code is still the same, the annotations in your code mean that your source now has coupling to specific infrastructure details and it is wrong to call is a POJO anymore. You can't compile your code without the proper support for those annotations. If you want to deploy your code in another infrastructure that uses annotations to describe the infrastructure details, you have to add more annotations to your source.

While I see the interest in putting the infrastructure information in the source near where it is used. We need to be honest. Your code is not a POJO anymore. It is now an AJO: an annotated Java object.

Max Rydahl Andersen
Max Rydahl Andersen

JBoss Tools 2.1.0.CR1 Released

While everyone else is having fun at JavaOne we uploaded the candidate release of JBoss Tools 2.1.0 at sourceforge and via th