Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "E4/RAP Integration/Singletons"

(No difference)

Revision as of 10:06, 14 August 2008

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.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 );
 }

Back to the top