Project: Eclipse_Platform_UI
Bug 36780 [Dialogs] ElementTreeSelectionDialog does not come up
Reported: 2003-04-22 21:49:08 | Status: closed fixed

I created a dialog of type ElementTreeSelectionDialog. I then called open() to open the dialog. But the platform was giving an IlegalArgumentException. I found that there is a field "message" in SelectionDialog(which is an ancestor of ElementTreeSelectionDialog). This is by default set to null. At some point while creating the dialog contents, the framework tries to set this "message" field as text to a label using label.setText(message). but since message is null, the label.setText() method throws IllegalArgumentException. The solution:- I call the ElementTreeSelectionDialog.setMessage(message) method before I call open() ; Since message is now not null, the problem goes away. But the user does not have a clue of what has happened if this is not documented. SO this is a bug.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SelectionDialog.java