Skip to content

Rich Client Platform

Christoph Läubrich edited this page Jun 2, 2024 · 3 revisions

While the Eclipse platform is designed to serve as an open tools platform, it is architected so that its components could be used to build just about any client application. The minimal set of plug-ins needed to build a rich client application is collectively known as the Rich Client Platform.

Applications other than IDEs can be built using a subset of the platform. These rich applications are still based on a dynamic plug-in model, and the UI is built using the same toolkits and extension points. The layout and function of the workbench is under fine-grained control of the plug-in developer in this case.

There is some more content here: https://wiki.eclipse.org/Rich_Client_Platform please help migration and updating anything you find useful

Registering E4 Model Extensions as a Service using IModelProcessorContribution

While one can always use model xmls, there was recently a very handy feature added that allows to using OSGi services instead.

Registering Preference Pages using E4

Currently there is no declarative way to register preference pages, see https://github.com/eclipse-platform/eclipse.platform.ui/issues/1917.

Still it is possible to register a page using E4:

  1. Create a model extension and add a Model Fragment for Application grafik
  2. In the Addon create a new method that accepts an (optional) PreferenceManager this one can then be used to register additional PreferencePages
public class E4PreferencesAddon {

	@Inject
	public void setPreferenceManager(@Optional PreferenceManager manager) {
		if (manager != null) {
			PreferencePage page = new PreferencePage() {

				@Override
				protected Control createContents(Composite parent) {
					Label label = new Label(parent, SWT.NONE);
					label.setText("Hello World");
					return label;
				}
			};
			page.setTitle("Hello E4 Preferences");
			page.setDescription("This demonstrate how to contribute a preference page from pure E4 to Eclipse IDE");
			manager.addToRoot(new PreferenceNode("abcd", page));
		}
	}
}