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

Bug 334865

Summary: Save action in main toolbar is not enabled after Organize Imports
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: SWTAssignee: Scott Kovatch <skovatch>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, eclipse.felipe
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Markus Keller CLA 2011-01-20 04:52:16 EST
I20110118-0800 Cocoa, is OK in 3.6.2 candidate (M20110119-0834)

The Save action in the main toolbar is not enabled after Organize Imports. The editor tab gets the *, the Save action is correctly enabled in the menus, and Command+S works.
Comment 1 Markus Keller CLA 2011-01-20 04:55:39 EST
When I switch to another editor and then back to the dirty one, the Save toolbar button gets enabled, but Save All stays disabled.
Comment 2 Dani Megert CLA 2011-01-20 11:38:38 EST
It works on Windows XP. Markus, can you take a look?
Comment 3 Markus Keller CLA 2011-01-20 20:44:19 EST
SWT bug in ToolItem#setEnabled(boolean).

When you set a breakpoint there, and then try to organize imports, the new 	"enableWidget(enabled && parent.isEnabled());" (from bug 326200) does not enable the button, since the CoolBar and the CBanner in its ancestor chain are temporarily disabled. This doesn't happen on other platforms and didn't happen in 3.6.

If an ancestor of a ToolItem is disabled, this should just block clicks to the item, but should not stop it from becoming enabled.

If you're curious to know why the ancestors are disabled, add a breakpoint to Control#setEnabled(..) with condition "!enabled && (getClass() == org.eclipse.swt.custom.CBanner.class || getClass() == CoolBar.class)"
Comment 4 Dani Megert CLA 2011-01-21 01:13:54 EST
This should get fixed for 3.7.
Comment 5 Scott Kovatch CLA 2011-01-21 12:23:49 EST
Fixed > 20110121.
Comment 6 Markus Keller CLA 2011-01-25 06:03:43 EST
Verified in I20110124-1800.