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

Bug 401065

Summary: Focus called twice in Eclipse
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P3 CC: bugs.eclipse.org, daniel_megert, emoffatt, Lars.Vogel, pwebster, tom.schindl
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 379024    
Bug Blocks:    
Attachments:
Description Flags
Project none

Description Lars Vogel CLA 2013-02-18 05:40:20 EST
Looks like we have a small regression in Eclipse 4.2 M5a. Not sure how critical it is but @Focus is called twice.

Please see attached example. The com.example.e4.rcp.todo.product contains the product configuration file. If you start it and select the second parts @Focus is called twice.

The example has been created with N20130214-2000 but we verified that this also happens with Eclipse 4.2 M5a.
Comment 1 Lars Vogel CLA 2013-02-18 05:45:23 EST
Created attachment 227189 [details]
Project
Comment 2 Lars Vogel CLA 2013-02-18 05:46:06 EST
Maybe related to Bug 379024?
Comment 3 Markus Kuppe CLA 2013-10-14 08:55:24 EDT
Still happens in 4.4M2
Comment 4 Lars Vogel CLA 2013-10-14 09:51:52 EDT
@Markus, this actually works as intended. If the @Focus method is not putting focus on an SWT control, the framework places focus on the Composite. Once you have an SWT control in your part and can focus() on it, the @Focus method is only called once.