Bug 578582

Summary: [jface] ListSelectionDialog is unusable in an e4 application
Product: [Eclipse Project] Platform Reporter: Christoph Laeubrich <laeubi>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: wim.jongman
Version: 4.22   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Christoph Laeubrich CLA 2022-02-04 07:37:52 EST
It fails with:

Caused by: java.lang.IllegalStateException: Workbench has not been created yet.
	at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:102)
	at org.eclipse.ui.dialogs.ListSelectionDialog.configureShell(ListSelectionDialog.java:412)
	at org.eclipse.jface.window.Window.createShell(Window.java:498)
	at org.eclipse.jface.window.Window.create(Window.java:430)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1094)
	at org.eclipse.jface.window.Window.open(Window.java:788)

this is because of:
@Override
	protected void configureShell(Shell shell) {
		super.configureShell(shell);
		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, IWorkbenchHelpContextIds.LIST_SELECTION_DIALOG);
	}

It should either have the opportunity to disable the help or catch the exception.
Comment 1 Wim Jongman CLA 2022-02-04 10:25:30 EST
(In reply to Christoph Laeubrich from comment #0)

> org.eclipse.ui.dialogs.ListSelectionDialog.

It is not a JFace element but belongs to eclipse.ui which is free to poke around in the workbench.