E4/RAP Integration/Singletons

From Eclipsepedia

< E4‎ | RAP Integration
Revision as of 10:04, 25 February 2009 by Bmuskalla.eclipsesource.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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