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

Bug 422646

Summary: Possibility to add Toolbuttons in Form
Product: z_Archived Reporter: Erich Steiger <erich.steiger>
Component: ScoutAssignee: Erich Steiger <erich.steiger>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: erich.steiger, jeremie.bresson, judith.gull, zimmermann
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 424525    
Bug Blocks:    

Description Erich Steiger CLA 2013-11-27 04:34:12 EST
In SWT it is possible to define toolbuttons on the form header. It should be possible in Scout as well.

See also
http://www.eclipse.org/eclipse/platform-ua/proposals/forms/enhancements-3.3/
Comment 1 Jeremie Bresson CLA 2014-01-15 09:07:20 EST
More information about this feature in this forum post:
http://www.eclipse.org/forums/index.php/t/631535/
Comment 2 Jeremie Bresson CLA 2014-01-22 04:50:01 EST
It would be nice to fix Bug 424525 first, otherwise the changes in the ToolButton (scout model) are not reflected on the SWT UI.
Comment 3 Jeremie Bresson CLA 2014-03-13 08:31:56 EDT
Partially available with Scout 4.0.0 M6

commit 4e8bfce5858c0a150c8aad09ceeab81747c2ddc7

http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/commit/?id=4e8bfce5858c0a150c8aad09ceeab81747c2ddc7
Comment 4 Andreas Hoegger CLA 2014-03-13 10:05:31 EDT
The scout form contains a list of toolbuttons. To create toolbuttons simple add inner classes implementing 'org.eclipse.scout.rt.client.ui.action.tool.IToolButton' to the form.

There is an additional property (org.eclipse.scout.rt.client.ui.form.AbstractForm.getConfiguredToobarLocation()) to define the display location in SWT (read also the JavaDoc added with 4.0.0M7).

Furthermore the SwtScoutAction got replaced with org.eclipse.scout.rt.ui.swt.action.SwtScoutActionContributionItem or org.eclipse.scout.rt.ui.swt.action.SwtScoutToolbarAction depending on the usage. 

Several minor bugs in menus and actions are solved.
Comment 5 Jeremie Bresson CLA 2014-03-14 07:34:45 EDT
New and noteworthy entry for 4.0:
https://wiki.eclipse.org/Scout/NewAndNoteworthy/4.0#Toolbuttons_in_Form
Comment 6 Jeremie Bresson CLA 2014-03-27 07:21:38 EDT
I would like to reopen the bug to get these small changes be integrated for the Luna-M7 milestone (discussed with Judith Gull):

- Filter abstract classes (can be used as template and to be consistent with the other cases where we use inner-classes)
- Typo fixes (ToolButton and not Toolbutton)

Gerrit Change:
https://git.eclipse.org/r/23982
Comment 7 Jeremie Bresson CLA 2014-03-28 16:23:29 EDT
Change 23982 added to develop branch with commit 70ee0068be6ce9ce3a0ff28ce3ea5ec717433c6d

http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/commit/?id=70ee0068be6ce9ce3a0ff28ce3ea5ec717433c6d
Comment 8 Jeremie Bresson CLA 2014-05-18 04:24:08 EDT
Deprecated methods (due to typo) were removed with 989cec47e38feab73ce4e1255fa0d4637a4c7774

http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/commit/?id=989cec47e38feab73ce4e1255fa0d4637a4c7774

@Erich:
Can you verify please?

There is one known issue: a click on tool button does not update the scout model with the value that is contained in the focused value field (This issue will be solved with Bug 435052).
Comment 9 Jeremie Bresson CLA 2014-05-20 04:06:54 EDT
The team has noticed, it would be better to use generics in the getToolButtonByClass(Class) method.

It was changed with the 2 small commits:
- a2331120b178f90367377756b12ff9a9cd98089e
- ef348db443a1b2e293b3f829bf5f3a122fc469ca

http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/commit/?id=a2331120b178f90367377756b12ff9a9cd98089e
http://git.eclipse.org/c/scout/org.eclipse.scout.rt.git/commit/?id=ef348db443a1b2e293b3f829bf5f3a122fc469ca

Will be available with Luna-RC1.
Comment 10 Erich Steiger CLA 2014-06-20 00:43:56 EDT
Tested with Luna 4.4 RC3 under Ubuntu 64bit and it works fine for SWT. It does not work for Swing. I do not use Swing anyway, so this is OK for me.

The Option to switch the Toolbar location is cool.
Comment 11 Matthias Zimmermann CLA 2014-07-01 03:18:02 EDT
Shipped with Eclipse Luna Release