Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 286073

Summary: [Toolbar] RADIO items are completely broken
Product: [RT] RAP Reporter: Benjamin Muskalla <b.muskalla>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: tbuschto
Version: 1.3   
Target Milestone: 1.3 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Temporary solution
none
patch none

Description Benjamin Muskalla CLA 2009-08-09 16:10:59 EDT
RADIO Tooltems currently throw a Javascript error in CVS HEAD. The reason is that RADIO ToolItems use the ButtonUtil#radioSelected method which is no longer available (see RadioToolItemLCA).
Steps to reproduce:
* open controls demo
* switch to toolbar tab

Output:
Could not evaluate javascript response:
TypeError: org.eclipse.swt.ButtonUtil is undefined
Comment 1 Tim Buschtoens CLA 2009-08-10 05:32:29 EDT
Created attachment 143878 [details]
Temporary solution

This patch restores the ButtonUtil.js. In the long run, it should be replaced by RadioButtonUtil.js.
Comment 2 Benjamin Muskalla CLA 2009-08-10 06:29:39 EDT
Created attachment 143880 [details]
patch

Having both listener state functions in the RadioButtonUtil should do the trick for this one. This way we don't need to introduce the ButtonUtil again.

Any thoughts?
Comment 3 Tim Buschtoens CLA 2009-08-10 08:12:19 EDT
Certainly works, but in the long run toolbar.RadioButton should be re-implemented using the new Button and use the same functions, that is "register".
Comment 4 Benjamin Muskalla CLA 2009-08-10 16:09:13 EDT
Fixed in CVS with patch from comment #2. And yes Tim, you're right. In the long run this should be streamlined with the new ToolItem implementation.
Comment 5 Benjamin Muskalla CLA 2009-08-10 16:41:20 EDT
Ok, finally the methods were moved to ToolItemUtil where they really belong (at least for now)