Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
E4/RAP Integration/Singletons
< E4 | RAP Integration
Singletons
The following classes were changed to work in session scope, using the SessionSingletonBase class provided by RWT:
- org.eclipse.ui.internal.progress.AnimationManager.AnimationManager
- org.eclipse.ui.internal.progress.BlockedJobsDialog.BlockedJobsDialogProvider
- org.eclipse.jface.resource.JFaceResources.ColorRegistryStore
- org.eclipse.ui.internal.WorkbenchPlugin.DecoratorManagerStore.DecoratorManagerStore
- org.eclipse.rap.demo.controls.DefaultButtonManager.DefaultButtonManager
- org.eclipse.jface.resource.JFaceResources.FontRegistryStore.FontRegistryStore
- org.eclipse.jface.resource.JFaceResources.ImageRegistryStore.ImageRegistryStore
- org.eclipse.ui.internal.browser.WorkbenchBrowserSupport.InstanceHolder
- org.eclipse.ui.internal.registry.PerspectiveRegistry.PerspectiveRegistry
- org.eclipse.ui.internal.WorkbenchPlugin.PerspectiveRegistryStore.PerspectiveRegistryStore
- org.eclipse.ui.internal.progress.ProgressManager.ProgressManagerProvider
- org.eclipse.ui.internal.progress.ProgressViewUpdater.ProgressViewUpdater
- org.eclipse.jface.resource.JFaceResources.Registries.Registries
- org.eclipse.ui.internal.util.SessionSingletonEventManager.SessionSingletonEventManager
- org.eclipse.jface.databinding.swt.SWTObservables.SWTObservables
- org.eclipse.jface.internal.databinding.provisional.swt.SWTUtil.SWTUtil
- org.eclipse.ui.internal.WorkbenchPlugin.ThemeRegistryStore.ThemeRegistryStore
- org.eclipse.ui.internal.registry.ViewRegistry.ViewRegistry
- org.eclipse.ui.internal.WorkbenchPlugin.WorkingSetManagerStore
- org.eclipse.ui.internal.WorkbenchPlugin.WorkingSetRegistryStore.WorkingSetRegistryStore
Due to some restrictions on the SessionSingletonBase class it was necessary to extend SessionSingletonBase. Because of this there are a lot of inner classes or ugly constructs like the SessionSingletonEventManager, which allows to let the Workbench become session aware. This isn't necessary anymore and the code could be refactored to be much more cleaner, for example:
public static final Workbench getInstance() { return ( Workbench )SessionSingletonBase.getInstance( Workbench.class ); }