Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333146 - Switching applications causes binding exception (on Linux / OS X)
Summary: Switching applications causes binding exception (on Linux / OS X)
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jürgen Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-23 06:19 EST by Jürgen Becker CLA
Modified: 2011-09-27 05:36 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Becker CLA 2010-12-23 06:19:21 EST
When switching from "Playground" to "Navigation" in the SWT Example & Playground Client I get an exception:

org.eclipse.core.runtime.AssertionFailedException: null argument:Null ridget for property: toolbarAction.1
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
	at org.eclipse.riena.ui.ridgets.uibinding.DefaultBindingManager.updateBindings(DefaultBindingManager.java:183)
	at org.eclipse.riena.ui.ridgets.uibinding.DefaultBindingManager.unbind(DefaultBindingManager.java:164)
	at org.eclipse.riena.navigation.ui.swt.views.SubApplicationView.rebind(SubApplicationView.java:533)
...

This does not happen on Windows - only Linux and OS X.

The root cause is an "interesting" use of an ToolBar/ToolItem in the CoolItem implementation on the affected platforms. A ToolBar with one ToolItem is used as the chevron for CoolItems with style SWT.DROP_DOWN.

The method SubApplicationView.getAllToolItems() collects all the ToolItems from all the CoolBars/ToolBars which also contains the chevron ToolItem.
During the binding process a generated binding property ("toolbarAction.1" from SubApplicationView.getItemId(...)) is assigned to the ToolItem.
Switching applications causes an unbind and the DefaultBindingManager (updateBindings(...)) tries to unbind the ToolItem which is not bound to any Ridget and the assertion fails.

One solution would be to convert the Assert.isNotNull to an "if (ridget != null)" . This works fine for me.
Or maybe we should not assign binding properties automatically to Ridgets. I don't know if this would cause any side effects.
Comment 1 Jürgen Becker CLA 2011-09-27 05:36:00 EDT
Proposed solution works fine on OS X and Linux.