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

Bug 322146

Summary: [Forms] FormToolbar renders a separator using ControlContributions
Product: [RT] RAP Reporter: Niels Lippke <niels.lippke>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.3   
Target Milestone: 1.4 M2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Simple snippet to reproduce it none

Description Niels Lippke CLA 2010-08-09 10:54:21 EDT
When adding a control to the form's toolbar using a ControlContribution,
additionally to the control a seperator is also drawn, which is not the case in an RCP  Application.

To reproduce:

public void createPartControl(Composite parent) {
FormToolkit toolkit = new FormToolkit(parent.getDisplay());
final Form form = toolkit.createForm(parent);
form.setText("Form Header");
form.getBody().setLayout(new FillLayout());
toolkit.decorateFormHeading(form);

IToolBarManager mgr = form.getToolBarManager();
mgr.add(new ControlContribution("label") {

@Override
protected Control createControl(Composite parent) {
CLabel label = new CLabel(parent, SWT.NONE);
label.setText("Test");
return label;
}});

mgr.update(true);
}
Comment 1 Ivan Furnadjiev CLA 2010-08-13 08:01:51 EDT
Created attachment 176546 [details]
Simple snippet to reproduce it

When the toolbar parent background mode is set to INHERIT_DEFAULT, the separator shines through the control (Label, CLabel).
Comment 2 Ivan Furnadjiev CLA 2010-08-24 04:42:02 EDT
Fixed in CVS HEAD. Now, separator tool item hides the separator line if a control has been set.