Bug 578582 - [jface] ListSelectionDialog is unusable in an e4 application
Summary: [jface] ListSelectionDialog is unusable in an e4 application
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.22   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-04 07:37 EST by Christoph Laeubrich CLA
Modified: 2022-02-04 10:25 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.