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 "Riena/RAP Support"

(Known Issues)
(Singletons)
Line 25: Line 25:
 
=== Singletons ===
 
=== Singletons ===
 
There are two kinds of singletons within Riena
 
There are two kinds of singletons within Riena
* Class.getInstance() based singletons (based on a static getInstance() method), e.g. NavigationNodeProvider
+
# Class.getInstance() based singletons (based on a static getInstance() method), e.g. NavigationNodeProvider
* Class.staticMethods() based singletons (based on static methods and static fields), e.g. ApplicationNodeManager
+
# Class.staticMethods() based singletons (based on static methods and static fields), e.g. ApplicationNodeManager
  
 
Two solve the singleton problem within RAP it provides the (abstract) SessionSingletonBase class that is able to create session-dependent singletons. This class may be used directly by calling it's (static) getInstance(Class type) method or by sub-classing and providing a taylored (static) getInstance() method.
 
Two solve the singleton problem within RAP it provides the (abstract) SessionSingletonBase class that is able to create session-dependent singletons. This class may be used directly by calling it's (static) getInstance(Class type) method or by sub-classing and providing a taylored (static) getInstance() method.
 +
With this it is very easy to transform the first singleton type and a little bit more work to transform the second type - both without breaking the current interface of course.
 +
 
The straightforward technique of just passing a class to the getInstance() method is for most cases sufficent. However, it does not allow to:
 
The straightforward technique of just passing a class to the getInstance() method is for most cases sufficent. However, it does not allow to:
 
* use constructores with parameters
 
* use constructores with parameters
Line 37: Line 39:
 
* do the wiring within the constructor - makes e.g. unit testing more complicated
 
* do the wiring within the constructor - makes e.g. unit testing more complicated
  
The introduction of e.g. an IInstanceFactory interface with a single getInstance() method could solve this. The class implementing IInstanceFactory could then internally be used for creating the key to store the singleton in the session store.
+
The introduction of e.g. an IInstanceFactory interface with a single getInstance() method could solve this. The class implementing the IInstanceFactory could then internally be used for creating the key to store the singleton in the session store.
 +
And the usage of generics would be a nice bonus.
  
 
[[Category:Riena]] [[Category:RAP]]
 
[[Category:Riena]] [[Category:RAP]]

Revision as of 07:45, 17 August 2010

This page is a whiteboard with information about running Riena on RAP and known issues.

Getting Started

See readme.txt in org.eclipse.riena.releng.rap for the most current information.

Known Issues

This is ongoing work. Expect more issues to be added.

  • [ui] Error Marker decoration does not show
  • [ui] Splash Dialog is not supported in RAP - affects riena login mechanism
  • [ui] Custom text ridgets (numeric, decimal, date) don't work because of differences in event handling
  • [ui] Dialog based classes (RienaMessageDialog, UIProcessWindow) don't work - their renderer needs single-sourcing
  • [ui] DatePicker - icon on 'picker' button missing
  • [ui] CompletionCombo - icon for drop-down button missing
  • [ui] InfoFlyout - need RAP specific implementation (also: discuss animations in RAP team)
  • [ui] Playground - Link/Browser demo - link needs two clicks before browser is updated
  • [ui] SWT UI Synchronizer is broken - likely fix: receive an external display reference at construction time
  • [navi] Navigation model does not support multiple users (singleton)
  • [navi] Submodules (i.e. tree element) sometimes need two clicks before the corresponding view is shown
  • [rap] No support for keyboard shortcuts / mnemonics
  • [rap] Widget traversal by hitting TAB

Singletons

There are two kinds of singletons within Riena

  1. Class.getInstance() based singletons (based on a static getInstance() method), e.g. NavigationNodeProvider
  2. Class.staticMethods() based singletons (based on static methods and static fields), e.g. ApplicationNodeManager

Two solve the singleton problem within RAP it provides the (abstract) SessionSingletonBase class that is able to create session-dependent singletons. This class may be used directly by calling it's (static) getInstance(Class type) method or by sub-classing and providing a taylored (static) getInstance() method. With this it is very easy to transform the first singleton type and a little bit more work to transform the second type - both without breaking the current interface of course.

The straightforward technique of just passing a class to the getInstance() method is for most cases sufficent. However, it does not allow to:

  • use constructores with parameters
  • it is not possible to "wire" the singleton

Of course, it possible to create workarounds:

  • use setters instead of constructor paramters - may result in undesired usage
  • do the wiring within the constructor - makes e.g. unit testing more complicated

The introduction of e.g. an IInstanceFactory interface with a single getInstance() method could solve this. The class implementing the IInstanceFactory could then internally be used for creating the key to store the singleton in the session store. And the usage of generics would be a nice bonus.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.